High-precision automatic analyzer and water quality analysis methods
By using a high-precision automatic analyzer and image processing technology, bubbles and particles are identified and removed, liquid surface shape is identified, and optical characteristic parameters are corrected. This solves the problems of optical interference and real-time monitoring in water quality analysis, and achieves efficient and accurate measurement of water quality parameters.
Patent Information
- Application Number
- CN202410629067.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-21
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-05-21
AI Technical Summary
Existing water quality analysis technologies suffer from optical interference and optical stability issues, making real-time online monitoring impossible. Furthermore, traditional methods are cumbersome to operate and slow to analyze, failing to meet the high timeliness and high frequency requirements of water quality monitoring.
A high-precision automatic analyzer is used to identify and remove bubbles and particles through image acquisition and processing, liquid surface shape recognition, and optical property parameter correction. Combined with deep learning and machine learning algorithms, accurate calculation and correction of optical property parameters are achieved.
It improves the accuracy and reliability of optical water quality analysis, enables rapid and accurate monitoring of water quality parameters and trend early warning, and reduces measurement errors and human errors.
Smart Images

Figure CN118624543B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to water quality analysis methods, and in particular to high-precision automatic analyzers and water quality analysis methods. Background Technology
[0002] Water quality analysis is a crucial tool for environmental monitoring, pollution control, and water resource management, playing a vital role in safeguarding human health, maintaining ecological balance, and promoting sustainable development. With the acceleration of industrialization and urbanization, water environment problems are becoming increasingly prominent, placing higher demands on water quality analysis technologies. Traditional water quality analysis methods, such as titration and colorimetry, suffer from drawbacks such as cumbersome operation, slow analysis speed, and low sensitivity, making them insufficient to meet current water quality monitoring needs. In recent years, optical detection technologies, such as ultraviolet-visible spectrophotometry, fluorescence spectroscopy, and chemiluminescence, have been widely applied in the field of water quality analysis. These methods offer advantages such as speed, sensitivity, and good selectivity, but still face many challenges in practical applications.
[0003] For example, the complex matrix of water samples can cause severe optical interference, such as scattering, absorption, and fluorescence quenching, leading to decreased accuracy and reproducibility of measurement results. Furthermore, the presence of organic or inorganic contaminants in water results in variations in density, surface tension, color, and concentration, leading to different liquid surfaces (convex or concave) in the sampling tube. Additionally, the influence of air bubbles and particulate matter hinders the rapid and accurate acquisition of liquid level measurements using Lambert-Beer's law. Moreover, the optical stability of the instrument and temperature drift also affect measurement performance. Simultaneously, most existing water quality analysis technologies employ offline batch processing, requiring significant time from sample collection to result reporting, making real-time online monitoring impossible. However, frequent dynamic changes in water quality and sudden pollution events necessitate timely and continuous monitoring data to support decision-making and emergency response. Therefore, developing highly efficient and frequent online water quality analysis technologies to achieve real-time monitoring and trend early warning of water quality parameters has become an urgent need and a research hotspot in the field of water quality monitoring.
[0004] How to effectively overcome these interfering factors and improve the accuracy and reliability of optical water quality analysis has become a key issue that urgently needs to be addressed, thus requiring research and innovation. Summary of the Invention
[0005] The purpose of this invention is to provide a high-precision automatic analyzer and a water quality analysis method to solve the aforementioned problems existing in the prior art.
[0006] The technical solution, a high-precision water quality analysis method, includes the following steps:
[0007] S1. Acquire images of water samples and preprocess them;
[0008] S2. Identify and remove bubbles and particles from the preprocessed image;
[0009] S3. Based on the image after removing bubbles and particles, perform liquid surface shape recognition;
[0010] S4. Acquire optical measurement data, calculate optical characteristic parameters, and correct the optical characteristic parameters based on the liquid surface shape recognition results; among which the optical characteristic parameters include scattering coefficient, light-absorbing particle interaction parameters, temperature drift, and optical path length;
[0011] S5. Based on the corrected optical characteristic parameters, the concentration result is calculated.
[0012] High-precision automatic analyzers, including:
[0013] At least one processor; and,
[0014] A memory communicatively connected to at least one of the processors; wherein,
[0015] The memory stores instructions that can be executed by the processor to implement the high-precision water quality analysis method described in any of the above technical solutions.
[0016] Beneficial effects: By providing a high-precision automatic analyzer and water quality analysis method, this invention overcomes the interference caused by scattering, bubbles, particulate matter, and temperature drift, thereby improving the accuracy and reliability of optical water quality analysis. Attached Figure Description
[0017] Figure 1 This is a flowchart of the present invention.
[0018] Figure 2 This is a flowchart of step S1 of the present invention.
[0019] Figure 3 This is a flowchart of step S2 of the present invention.
[0020] Figure 4 This is a flowchart of step S3 of the present invention.
[0021] Figure 5 This is a flowchart of step S4 of the present invention.
[0022] Figure 6 This is a flowchart of step S5 of the present invention. Detailed Implementation
[0023] like Figure 1 As shown, this application proposes a high-precision water quality analysis method, including the following steps:
[0024] S1. Acquire images of water samples and preprocess them;
[0025] S2. Identify and remove bubbles and particles from the preprocessed image;
[0026] S3. Based on the image after removing bubbles and particles, perform liquid surface shape recognition;
[0027] S4. Acquire optical measurement data, calculate optical characteristic parameters, and correct the optical characteristic parameters based on the liquid surface shape recognition results; among which the optical characteristic parameters include scattering coefficient, light-absorbing particle interaction parameters, temperature drift, and optical path length;
[0028] S5. Based on the corrected optical characteristic parameters, the concentration result is calculated.
[0029] This embodiment acquires preliminary information about water samples quickly by acquiring and preprocessing images. This non-contact sampling method not only improves efficiency but also avoids the contamination problems that may arise with traditional sampling. By identifying and removing bubbles and particles from the images, measurement errors can be reduced. Bubbles and particles affect the accuracy of optical measurements; removing these interfering factors improves data reliability. Liquid surface shape recognition is crucial for subsequent optical characteristic parameter correction. The shape of the liquid surface affects the propagation path of light, thus influencing the measurement of scattering coefficients and light-absorbing particle interaction parameters. Accurate identification of the liquid surface shape helps to calculate optical characteristic parameters more precisely. By acquiring optical measurement data and calculating optical characteristic parameters, and then correcting them based on the results of liquid surface shape recognition, the measurement accuracy can be further improved. The concentration results calculated based on the corrected optical characteristic parameters will be very close to the actual water quality. This method not only improves the accuracy and reliability of measurements but also provides more scientific and accurate data support for water quality monitoring.
[0030] This embodiment provides a fast, accurate, and efficient new approach to water quality analysis through image acquisition and processing, removal of interference factors, liquid surface shape recognition, and precise correction of optical characteristic parameters. This not only contributes to environmental monitoring and protection but also provides technical means for related research fields.
[0031] like Figure 2 As shown, according to one aspect of this application, step S1 further comprises:
[0032] S11. Collect images of water samples and perform distortion correction on the images;
[0033] S12. Based on the image after distortion correction, histogram equalization is used to enhance the image contrast.
[0034] S13. Use the Gabor filtering algorithm to extract the texture features of the image after contrast enhancement.
[0035] This embodiment preprocesses water sample images through distortion correction, contrast enhancement, and texture feature extraction. This not only improves the accuracy and reliability of water quality analysis but also enables rapid analysis without direct contact with the water sample. This is of great significance for environmental monitoring and protection, especially in pollution incidents or emergency monitoring situations requiring rapid response. Furthermore, this method is highly automated, reducing human error and improving the efficiency of water quality monitoring.
[0036] According to one aspect of this application, step S11 further comprises:
[0037] S111. Collect images of water samples and extract local distortion features from the images using an adaptive grid method;
[0038] S112. Based on local distortion characteristics, Gaussian process regression is used to establish a distortion mapping function;
[0039] S113. Based on the distortion mapping function, distortion correction is performed on the image, and an attention mechanism is introduced to dynamically adjust the intensity of distortion correction.
[0040] In this embodiment, an adaptive grid method is used to divide the image and extract local distortion features; a Gaussian process regression is used to establish a distortion mapping function to achieve pixel-level distortion correction; and an attention mechanism is introduced to automatically adjust the correction intensity, thereby improving the accuracy and robustness of distortion correction.
[0041] In a specific embodiment, pyramid downsampling is performed on the input image I to generate a multi-scale image sequence {I}. m |m=1,2,...,M}, where I k The size is 1 / 2 of the original image. m From the coarsest scale I M Initially, the Canny operator is used to extract image edges, resulting in edge map E. M According to edge graph E M The edge distribution is represented by a quadtree structure for the coarsest scale I. M Adaptive mesh generation is performed to obtain the initial mesh G. M For each scale m = M⁻¹, ..., 1, the grid G of the previous scale is... m+1 Upsample by one time to obtain the initial grid G for the current scale. m '; Extract the current scale image I m Edge graph E m According to edge graph E m Optimize the initial mesh G m ', Subdivide densely populated regions and merge sparsely populated regions to obtain an adaptive mesh G. mAdaptive meshing is performed on the original image I to obtain the final distortion correction mesh G.
[0042] Based on the imaging model, select a set of control points {(x i y i ) | i=1,2,...,N}, where (x i y i (x) represents the coordinates of the control point in the ideal, distortion-free image; for each control point (x) i y i The corresponding coordinates (u) in the distorted image are measured through a calibration process. i v i Construct a Gaussian process regression model and define a kernel function k(·, ·), such as Gaussian kernel k(x, y) = exp(-∣∣xy∣∣). 2 / (2σ 2 )) Calculate the covariance matrix K between control points, where K ij = k((x i y i ), (x j y j )); Calculate the observed value (u i v i The mean vector μ and covariance matrix Σ of the adaptive grid G are calculated; for each vertex (x, y) in the adaptive grid G, the kernel function value vector k* of (x, y) and all control points is calculated; using the Gaussian process regression formula, the coordinates (u, v) of (x, y) in the distorted image are predicted, specifically:
[0043] (u, v) = μ + k* T · K -1 · ([(u1,v1),...,(u N v N )] -μ)
[0044] Based on the predicted distortion coordinates, the adaptive mesh G is deformed to obtain the distortion-corrected mesh G'; using bilinear interpolation, the distorted image I is mapped onto the corrected mesh G' to obtain the distortion-corrected image I'.
[0045] According to one aspect of this application, step S12 further comprises:
[0046] S121. Perform multi-scale illumination decomposition on the distortion-corrected image to obtain the illumination component and the reflection component;
[0047] S122. Dynamically adjust the illumination components using adaptive Gamma correction;
[0048] S123. A guided filtering algorithm is used to smooth the edges of the reflection components;
[0049] S124. The dynamically adjusted illumination component and the edge-smoothed reflection component are weighted and fused to obtain an image with enhanced contrast.
[0050] In a specific embodiment, Gaussian pyramid decomposition is performed on the input image I to generate a multi-scale image sequence {I}. m | m = 1, 2, ..., M}, where I k The size is 1 / 2 of the original image. m For each scale m=1,...,M, bilateral filtering is applied to I... m Smoothing is performed to obtain the illumination component L. m According to Retinex theory, the reflection component R is calculated. m = I m / L m For the illumination component L m and reflection component R m Upsampling is performed on the Gaussian pyramids to obtain the original-size multi-scale components L'. m and R' m .
[0051] The illumination component L' for each scale m m Calculate the illumination component L' m mean μ m and standard deviation σ m According to μ m and σ m Adaptively determine the Gamma correction parameter γ m :
[0052] γ m = 1 +α(μ m - 0.5) +β(σ m - 0.5)
[0053] Where α and β are empirical coefficients, controlling for the influence of the mean and standard deviation on the Gamma parameter. For the illumination component L' m Gamma correction is performed to obtain the corrected illumination component L'' m :
[0054] L'' m =L' m γm
[0055] The reflection component R' for each scale m m Using guided filtering on the reflection component R' m Smoothing is performed to obtain the smoothed reflection component R'' m The input to the guided filter is R' m The guiding image is the original image I, and the filtering radius r and regularization parameter ε are adaptively selected according to the scale. Guided filtering achieves smooth edges by minimizing the difference between the output image and the input image while maintaining gradient consistency with the guiding image.
[0056] For each scale m, calculate the weight w. m = 1 / (M-m+1), reflecting the importance of components at different scales; the corrected illumination component L'' for all scales m and the smoothed reflection component R'' m Perform weighted fusion:
[0057] L = ∑ m w m ·L'' m
[0058] R = ∑ m w m ·R'' m
[0059] Multiplying the fused illumination component L and reflection component R, we obtain the contrast-enhanced image I' = L·R.
[0060] According to one aspect of this application, step S13 further comprises:
[0061] S131. Gabor wavelet transform is used to extract multi-scale, multi-directional texture features;
[0062] S132. Introduce fractional differential operators to construct a multi-fractional Gabor filter bank;
[0063] S133. Improve the discriminative power of liquid surface recognition by optimizing the texture feature set through feature selection algorithm.
[0064] In a specific embodiment, a Gabor filter bank {g} is constructed. s,o | s=1,...,S; o=1,...,O}, where s represents the scale and o represents the direction; Gabor filtering is performed on the input image I: for each scale s and direction o, Gabor filter g is used. s,oConvolution is performed on the input image I to obtain the Gabor feature map Fs. ,o A total of S×O Gabor feature maps were obtained.
[0065] For each Gabor filter g s,o Introduce a fractional-order parameter θ. In the frequency domain, for g... s,o Perform a fractional Fourier transform to obtain a fractional Gabor filter g. s,o θ The fractional-order parameter θ controls the attenuation rate and directional selectivity of the filter; the fractional-order Gabor filter bank g s,o θ Convolution is performed on the input image I to obtain the fractional-order Gabor feature map F. s,o θ .
[0066] Multiscale Gabor feature map Fs ,o and fractional-order Gabor feature maps F s,o θ By concatenating pixels, we obtain a set of texture feature vectors {f}. n | n=1,...,N}, where N is the total number of pixels; Feature selection is performed on the texture feature vector set using the mutual information criterion to evaluate the relevance of each feature to the liquid surface recognition task, and the top M features with the highest mutual information are selected to obtain the optimized texture feature vector set f'. n ; The optimized texture feature f' n Reorganize into a feature map format to obtain the final texture feature map T.
[0067] The embodiments of this application involve various image processing and machine learning techniques, including adaptive mesh generation, Gaussian process regression, multi-scale Retinex decomposition, adaptive Gamma correction, guided filtering, fractional-order Gabor filtering, and mutual information feature selection. Through refined parameter adjustment and strategy design, optimal results are achieved in distortion correction, contrast enhancement, and texture feature extraction, providing high-quality image input for subsequent liquid surface recognition and bubble particle analysis. These processing steps are interconnected and progressive, forming a complete image preprocessing workflow. Each step involves multi-scale decomposition, adaptive processing, and feature transformation of image data, fully utilizing the multi-level structural information and local detail features of the image, demonstrating the application value of computer vision and artificial intelligence technologies in complex image processing.
[0068] To address common problems in water quality analysis such as optical window contamination, pipe wall reflection, and camera distortion, this solution systematically optimizes the image acquisition and preprocessing stages. An adaptive correction strategy based on a distortion model effectively eliminates optical distortion in the imaging system. Multi-scale Retinex decomposition and guided filtering enhance liquid surface details while suppressing pipe wall reflection and background interference. Fractional-order Gabor wavelets and texture feature optimization are used to extract the most discriminative image features, significantly improving the accuracy and robustness of subsequent liquid surface recognition and shape analysis.
[0069] like Figure 3 As shown, according to one aspect of this application, step S2 further comprises:
[0070] S21. Employ a deep learning object detection algorithm to identify and locate bubbles and particles in the preprocessed image in real time.
[0071] S22. Track the trajectories of bubbles and particles using a target tracking algorithm;
[0072] S23. Analyze the trajectory and predict its movement trend based on the analysis results;
[0073] S24. Based on the prediction results, remove bubbles and particles from the preprocessed image in a directional manner in the optical path system and image layer.
[0074] In a further embodiment, nanosecond-level time-resolved imaging technology is used to achieve ultra-high-speed acquisition of bubbles and particles; a deep learning target detection algorithm is employed to identify and locate bubbles and particles in real time; a transfer learning strategy is introduced to improve the generalization ability of the recognition model under different media conditions. A Kalman filter algorithm is used for motion prediction and state estimation of bubbles and particles; a multi-hypothesis tracking framework is constructed to address the occlusion and intersection problems of bubbles and particles; association rule mining is introduced to extract the spatiotemporal feature patterns of bubble and particle motion. A deep sequence learning model is used to model the trajectories of bubbles and particles; an attention mechanism and memory network are introduced to improve the long-term dependency modeling ability of trajectory prediction; and a hybrid logical dynamics model of bubble and particle motion is constructed by combining physical constraints and prior knowledge.
[0075] According to one aspect of this application, step S24 further comprises:
[0076] S241. Based on the predicted results, surface plasmon resonance technology is used to generate a directional surface tension gradient.
[0077] S242. Based on the directional surface tension gradient, a photothermal effect is introduced to generate Marangoni convection through local heating, which drives the movement of bubbles and particles.
[0078] S243. Using surface acoustic waves, moveable bubbles and particles are directionally manipulated, and the directionally manipulated bubbles and particles are removed.
[0079] In a specific embodiment, adaptive thresholding is performed on the preprocessed image. The Otsu algorithm is used to automatically determine the global threshold T, converting the preprocessed image into a binary image B. The binary image B is then thinned using a local adaptive thresholding algorithm (such as the Sauvola algorithm) to obtain an adaptive threshold map B'. In the adaptive threshold map B', white pixels correspond to suspected bubble and particle regions, while black pixels correspond to background regions.
[0080] Morphological processing is performed on the adaptive threshold map B'. A morphological opening operation is performed on the adaptive threshold map B' to eliminate small noise regions; a morphological closing operation is performed on the opening result to fill the voids inside bubbles and particles; connected component analysis is performed on the closing result to extract all suspected bubble and particle regions, obtaining a candidate region set R. i .
[0081] For the candidate region set R i Extract geometric features from each region and calculate the region set R. i Area A i Perimeter P i The width W of the minimum bounding rectangle i and height H i Computational region set R i Circularity C i = 4πA i / P i 2 Describe the circular similarity of regions; calculate the region set R. i Aspect R i = W i / H i It describes the elongation and slenderness of the region's shape; it combines geometric features into a feature vector f. g = [A i P i C i R i ].
[0082] For the candidate region set R i Optical features are extracted from each region in the dataset, and a candidate region set R is calculated. i Average gray value u of internal pixels i and standard deviation σ i Describe the brightness and uniformity of the region; calculate the candidate region set R. i Contrast with the surrounding background area D i = |u i - ub | / (u i + u b ), where u b For the candidate region set R i The average grayscale value of the surrounding background pixels; combining optical features into a feature vector f o = [u i , σ i D i ]; Geometric features f g and optical characteristics f o By splicing, candidate region R is obtained. i The comprehensive feature vector f i = [f g f o ].
[0083] Construct a classifier model for bubble and particle recognition. Select a suitable classifier algorithm, such as Support Vector Machine (SVM), Random Forest (RF), or Gradient Boosting Decision Tree (GBDT). Based on physical laws, manually label a subset of candidate region samples to obtain a set of positive and negative samples (f). i y i ), where y i Assign category labels to samples (bubbles, particles, or background); optimize classifier hyperparameters using methods such as grid search; evaluate classifier performance through cross-validation; and select the optimal model.
[0084] The trained classifier model is used to identify candidate regions. The candidate region set R is... i For each region in the dataset, extract its comprehensive feature vector f. i ; Combine the feature vector f i The input is fed into a trained classifier model to predict its class label y. i Based on the prediction results, the candidate region is divided into bubble region, particle region and background region.
[0085] Post-processing of the recognition results eliminates misidentified areas. For bubbles and particles with excessively small areas, they are filtered out based on a set threshold and considered noise areas. For bubbles and particles with excessively large areas, their aspect ratio and roundness are used to determine if they are misidentified, and segmentation is performed if necessary. For adjacent bubble and particle areas, their shape and brightness similarity is used to determine whether merging is necessary. The recognition results are optimized to improve detection accuracy and robustness. Tracking algorithms (such as Kalman filtering and particle filtering) are introduced to track bubbles and particles using time-series information, eliminating the instability of single-frame recognition. The recognition results are further verified and corrected by combining physical laws and prior knowledge, such as the rising motion of bubbles and the settling motion of particles. For areas with high recognition uncertainty, targeted manual annotation and algorithm optimization are performed through active learning and other methods to improve the adaptive ability of the recognizer.
[0086] This embodiment involves several key technical aspects, including adaptive threshold segmentation, morphological processing, geometric and optical feature extraction, classifier design, tracking algorithm, and active learning. By comprehensively utilizing image processing, machine learning, and physical modeling, it can effectively overcome the influence of factors such as bubble and particle deformation, occlusion, and blurring, and achieve accurate and robust recognition and positioning.
[0087] By introducing an adaptive threshold algorithm in region pre-segmentation, the system can better adapt to local brightness variations in the image. By comprehensively considering geometric and optical features in feature representation, the characteristics of bubbles and particles can be more fully characterized. Introducing tracking algorithms and active learning in post-processing optimization allows for full utilization of spatiotemporal information and human-computer interaction to improve recognition performance. This embodiment enables the bubble and particle recognition method to overcome the limitations of traditional methods and achieve superior performance. Of course, the specific algorithm selection and parameter settings still need to be adjusted and optimized according to the actual application scenario and performance requirements. Furthermore, in practical applications, it is also necessary to focus on computational efficiency and real-time performance to meet the needs of online water quality analysis. This may require considering parallel computing, hardware acceleration, and other measures in algorithm design to improve computational speed and response time.
[0088] Suspended bubbles and particles in water samples cause optical scattering, severely interfering with optical analysis measurements. This embodiment employs a combination of morphological watershed and random forest methods to achieve accurate identification and segmentation of bubbles and solid particles. Based on the scattering-absorption decoupling model, spatiotemporal correlation tracking and flow field constraint optimization are introduced to quantitatively characterize and correct the scattering effect in the optical path, reducing the measurement error caused by suspended matter scattering by more than 95%, significantly improving the accuracy and reproducibility of optical analysis. The bubble and particle identification process in this embodiment provides a practical technical route for a key step in high-precision water quality analysis, and is expected to significantly reduce the impact of image quality and environmental interference while ensuring identification accuracy and robustness.
[0089] In this embodiment, two main approaches are used to remove the influence of bubbles and particles on the measurement results. First, by identifying and predicting the trajectory of bubbles and particles, it is determined whether they are located on the optical path, such as the measurement optical path of a spectrophotometer or similar optical system. If they are, the measurement data for that time period is removed; alternatively, data from time periods without bubbles or particles on the optical path are selected, and the average value is calculated. This avoids measurement errors. The second approach is to use an algorithm to calculate the impact of bubbles and particles on the data and then directly correct the measurement data. That is, image data acquired by a camera is cross-validated with data acquired by optical measurement devices such as spectrophotometers, thereby significantly improving the accuracy of the measurement data.
[0090] like Figure 4 As shown, according to one aspect of this application, step S3 further comprises:
[0091] S31. Extract the liquid surface edge from the image after removing bubbles and particles to obtain the contour curve of the liquid surface;
[0092] S32. By using curvature calculation methods, the contour curve is characterized to obtain the shape features of the liquid surface;
[0093] S33. Obtain historical shape characteristic data and use machine learning methods to construct a liquid surface shape recognition model;
[0094] S34. Input the shape characteristics of the liquid surface into the liquid surface shape recognition model to realize the recognition of the liquid surface shape.
[0095] In a further embodiment, when extracting the liquid surface edge, a variational inference method can be used to adaptively extract the liquid surface edge; shape priors and hydrodynamic constraints are introduced to improve the continuity and smoothness of the liquid surface edge; and sub-pixel edge localization technology is used to achieve sub-pixel level precise localization of the liquid surface edge.
[0096] When performing feature description, fractional-order geometric invariants of liquid surface curvature can be proposed to characterize the multi-scale features of liquid surface shape; curve unfolding and shape matching algorithms are used to realize quantitative comparison and similarity measurement of liquid surface shape; manifold learning method is introduced to construct a low-dimensional embedding space of liquid surface shape and extract compact shape representation.
[0097] When performing shape recognition and classification, a generative adversarial network (GAN) is used to learn the deep feature representation of liquid surface shape; a Siamese neural network is introduced to construct an end-to-end liquid surface shape recognition and comparison model; and an incremental learning framework for liquid surface shape is proposed to realize online updating of the recognition model and knowledge accumulation.
[0098] When performing real-time recognition and correction, knowledge distillation technology is used to build a lightweight liquid surface shape recognition model to improve real-time performance; an active learning strategy is introduced to optimize the recognition model through human-computer interaction to improve the interpretability of correction; and multi-view, multi-modal liquid surface recognition results are integrated to improve the robustness and confidence of liquid surface correction.
[0099] In a specific embodiment, Canny edge detection is performed on the preprocessed image, specifically by: smoothing the preprocessed image using a Gaussian filter to suppress noise interference; and calculating the gradient A of the smoothed image in the x and y directions. x and A y ; Calculate the gradient magnitude map A = sqrt(A x 2 + A y 2 ) and gradient pattern Θ = atan2(A y A x Non-maximum suppression is applied to gradient magnitude map A to obtain the pixel with the maximum local edge intensity; the edge map after non-maximum suppression is thresholded using the double thresholding method to obtain the initial edge map E.
[0100] Morphological processing is performed on the edge graph E. Connectivity analysis is conducted on the edge graph E to extract each connected edge region. Based on the geometric characteristics of the regions (such as area, aspect ratio, and circularity), small regions that are clearly not part of the liquid surface or pipe wall are filtered out, resulting in a candidate edge region set E. i For the set of edge regions E i Morphological closure operations are performed on each region to fill in edge breaks, resulting in a complete liquid surface and pipe wall contour line B.
[0101] Feature points are extracted from the extracted contour line B. The curvature ξ of each point on B is calculated, and B is divided into several segments based on the extreme points of curvature. j For each segment B jThe Douglas-Peucker algorithm is used to simplify the contour line with a certain threshold, resulting in a simplified feature point set P. j .
[0102] For the feature point set P j Perform curve fitting. Select a suitable parametric curve model, such as a spline curve or elliptic curve; use the least squares method or robust estimation methods such as RANSAC to estimate the curve model parameters, and obtain the fitted liquid surface profile curve C. l and pipe wall profile curve C w Based on the geometric characteristics of the fitted curve, such as the geodesic length and curvature integral, the shape parameters of the liquid surface, such as the liquid surface height h and the liquid surface concavity δ, are calculated.
[0103] For the fitted liquid surface profile curve C l Extract shape features. Calculate the liquid surface profile curve C. l Shape feature vectors f, such as geometric moments, Fourier descriptors, and wavelet descriptors. l For the shape feature vector f l Normalization and standardization are performed to eliminate the effects of scale and rotation; a pre-trained shape classification model is used to classify the shape feature vector f. l Perform classification; classify the shape feature vector f l The input is fed into a pre-trained classifier such as Support Vector Machine (SVM), Random Forest (RF), or Convolutional Neural Network (CNN); the classifier predicts the category of the liquid surface shape (such as concave liquid surface, convex liquid surface, flat liquid surface, etc.) based on the feature representation of the shape feature vector; the training samples of the classifier are generated by manual annotation or physical simulation, and the generalization performance of the model is optimized by methods such as cross-validation.
[0104] Select the corresponding shape correction model based on the liquid surface shape category label. For concave liquid surfaces, use the liquid surface curvature correction model: h' = h - α·δ c ;
[0105] Where h' is the corrected liquid level height, δ c α is the coefficient of influence of liquid surface curvature on height measurement, and α is the correction coefficient.
[0106] For convex liquid surfaces, the surface tension correction model is used: h' = h +β·δ t .
[0107] Where δ t β is the coefficient of influence of surface tension on height measurement, and β is the correction coefficient.
[0108] The corrected liquid level height h' is accurately measured. Based on the pipe wall profile curve C... wDetermine the central axis of the liquid column; calculate the liquid surface profile curve C. l The point of intersection with the central axis yields the measured liquid level height h. m The sub-pixel edge localization algorithm was used to measure the liquid level height h. m The measurement is refined to obtain a high-precision measurement value h at the sub-pixel level. s .
[0109] This embodiment involves several key technical aspects, including edge extraction, contour fitting, shape feature representation, classifier design, and shape correction model. Through reasonable algorithm design and parameter selection, the influence of factors such as changes in liquid surface shape and interference from pipe walls can be effectively overcome, achieving accurate identification and measurement of the liquid surface position. By introducing wavelet descriptors into the liquid surface shape feature representation, employing the RANSAC algorithm to improve the robustness of contour fitting, and introducing shape correction coefficients based on a physical model, the accuracy and reliability of liquid surface identification and processing are further improved, overcoming the limitations of traditional methods.
[0110] Changes in the shape and position of the water sample surface can significantly affect the measurement results of optical analysis. This embodiment innovatively proposes an adaptive liquid surface segmentation method based on shape prior. Through iterative optimization of curve fitting, the liquid surface contour can be accurately extracted from complex backgrounds. Geometric moments and wavelet descriptors are used to characterize the liquid surface shape features, and a shape-optical path compensation model is constructed by coupling physical mechanisms. This achieves in-situ self-correction of measurement deviations caused by changes in liquid surface shape, thereby reducing the measurement uncertainty caused by liquid surface changes by more than 80%.
[0111] In some practical cases, the influence of solutes and impurities in the solution causes the liquid surface to be neither an ideal concave nor convex surface. Therefore, when measuring the upper and lower limits, the optical path is difficult to adjust, resulting in larger errors. By obtaining the edge lines of the page at the image level, the measurement data of the optical path can be better calibrated, thus making the measurement more accurate.
[0112] The liquid level identification and processing flow in this embodiment provides a practical and feasible technical route for a key step in high-precision water quality analysis. It is expected to reduce the impact of factors such as liquid level changes and pipe wall interference while ensuring measurement accuracy and efficiency, thus laying a good data foundation for subsequent optical correction and concentration measurement.
[0113] like Figure 5 As shown, according to one aspect of this application, step S4 further comprises:
[0114] S41. Acquire optical measurement data, and based on the results of optical measurement data and liquid surface shape recognition, construct a light transmission model in the scattering medium;
[0115] S42. Based on the transmission model, estimate the scattering phase function, introduce sparsity regularization, and correct the scattering coefficient of the scattering phase function.
[0116] S43. Based on the results of liquid surface shape recognition and optical measurement data, calculate the interaction energy between light-absorbing particles;
[0117] S44. Based on the interaction energy, construct an absorption cross section correction model and use the Bayesian optimization algorithm to adaptively estimate and dynamically correct the interaction parameters of the light-absorbing particles.
[0118] S45. Obtain the three-dimensional temperature field distribution inside the water sample, calculate the temperature drift, and construct a coupled model of temperature-refractive index-absorbance based on the results of the three-dimensional temperature field distribution and liquid surface shape recognition. Use the coupled model to correct the temperature drift.
[0119] S46. Confocal microscopy is used to reconstruct the three-dimensional liquid surface morphology in the water sample in real time, and the optical path length is dynamically estimated based on the three-dimensional liquid surface morphology.
[0120] S47. Based on the results of liquid surface shape recognition, construct a dynamic correction model of optical path length-absorbance, and use the dynamic correction model to correct the optical path length.
[0121] In a further embodiment, the scattering effect is corrected. Based on Monte Carlo simulation, a light transmission model in the scattering medium is constructed; the stochastic gradient descent algorithm is used to solve the radiative transfer equation and estimate the scattering phase function; sparsity regularization is introduced to improve the ill-conditioned well-stability and stability of the scattering coefficient inversion.
[0122] The interaction between light-absorbing particles is corrected. Density functional theory is used to calculate the Coulomb interaction energy between the light-absorbing particles; a Green's function is introduced to construct an absorption cross-section correction model considering quantum many-body effects; and a Bayesian optimization algorithm is used to achieve adaptive estimation and dynamic correction of the interaction parameters.
[0123] Temperature effects are compensated for. Distributed fiber optic temperature sensing is used to obtain the three-dimensional temperature field distribution within the capillary; a coupled model of temperature-refractive index-absorbance is constructed to achieve real-time temperature drift correction; and an adaptive Kalman filter is introduced to dynamically track and compensate for measurement errors caused by temperature.
[0124] Dynamic optical path length correction was performed. Confocal microscopy was used to reconstruct the three-dimensional liquid surface morphology within the capillary in real time; a liquid surface tracking algorithm based on the Level-set method was developed to estimate the dynamic optical path length variation; and a dynamic correction model of optical path length versus absorbance was established to achieve adaptive compensation for absorbance measurement.
[0125] Intelligent concentration measurement is implemented. A concentration measurement sequence prediction model based on a Long Short-Term Memory (LSTM) network is constructed; transfer learning and meta-learning paradigms are adopted to achieve generalization of the concentration measurement model across media and operating conditions; a reinforcement learning framework is introduced to optimize the measurement process by adaptively adjusting the light source-detector parameters.
[0126] In a specific embodiment, the traditional Lambert-Beer law describes the linear relationship between absorbance, concentration, and optical path length: A = εbc, where A is absorbance, ε is the molar absorptivity, b is the optical path length, and c is the concentration. A scattering term is introduced to modify the Lambert-Beer law: A = εbc + kλ -n , where kλ -n Let λ be the scattering term, k be the scattering coefficient, λ be the light wavelength, and n be the scattering index. Based on the measured absorbance data and the standard sample of known concentration, the scattering correction model is fitted using the least squares method to obtain the estimated values of the scattering coefficient k and the scattering index n.
[0127] According to Mie theory, scattering intensity is related to parameters such as incident light wavelength, scattering particle size, and refractive index. Using techniques such as liquid refractive index measurement and dynamic light scattering (DLS), the refractive index and scattering particle size distribution data of the sample are obtained. The measured refractive index and particle size distribution are substituted into the Mie scattering formula to calculate the scattering cross section and phase function at different wavelengths. Combining the scattering cross section and phase function, the measured absorbance spectrum is scattered and corrected to obtain an absorption spectrum free from scattering effects.
[0128] Based on the liquid level recognition results, the real-time liquid level height h is obtained. According to Beer-Lambert's law, the optical path length b is linearly related to the liquid level height h: b = kh, where k is a proportionality coefficient. By measuring a series of standard samples with known heights, the bh curve is fitted to obtain an estimated value of the proportionality coefficient k. Using the estimated k value, the optical path length b is dynamically calculated based on the real-time liquid level height h for absorbance correction. A laser ranging module is introduced into the optical path. By measuring the flight time or phase difference of the laser pulse, the distance d from the light source to the liquid surface is obtained. Based on optical geometry, the real-time optical path length b is calculated using the measured distance d and known optical system parameters (such as incident angle, refractive index, etc.). The calculated optical path length b is substituted into Beer-Lambert's law to dynamically compensate for absorbance.
[0129] Establish an empirical correction formula for absorbance versus temperature, such as A. t = A ref + k(t - t ref ), where A t A is the absorbance at temperature t. ref Reference temperature t refThe absorbance is measured at a certain temperature, and k is the temperature correction coefficient. By measuring a series of standard samples at different temperatures and fitting the At curve, an estimated value of the temperature correction coefficient k is obtained. Using the estimated k value and the real-time measured temperature data, the absorbance is dynamically temperature corrected.
[0130] According to thermodynamic principles, temperature changes cause effects such as volume expansion and refractive index changes in solutions, which in turn affect absorbance measurements. A thermodynamic model considering temperature effects is established to describe the quantitative relationship between temperature and solution properties (such as density and refractive index). Real-time temperature data is substituted into the thermodynamic model to calculate changes in solution properties and correct absorbance accordingly. At the same time, temperature changes also affect the performance of optical components (such as lenses and detectors), which requires compensation through instrument calibration and other methods.
[0131] For samples with high concentrations, interactions between absorbing particles (such as dipole-dipole interactions) can cause absorbance to deviate from the linear relationship of the Lambert-Beer law. A series of dilutions were performed on the high-concentration sample using the "dilution method," and the absorbance values at different dilution factors were measured. The absorbance-concentration data of the dilution series were then nonlinearly fitted using the least squares method to obtain a correction model that considers the influence of interactions. This correction model was then used to correct the absorbance of the high-concentration sample, eliminating the influence of interaction effects.
[0132] Quantum chemical calculation methods (such as density functional theory and time-dependent density functional theory) are used to simulate the electronic structure and optical properties of absorbing particles at different concentrations. By calculating intermolecular interaction energies (such as dispersion forces and electrostatic forces) and electronic excited state properties (such as transition dipole moments and oscillator strengths), the influence of interactions on absorption spectra is predicted. The calculated interaction correction terms are introduced into the Lambert-Beer law to establish an absorbance-concentration relationship that considers the interaction effect. The corrected relationship is used to correct the measured absorbance data, thereby achieving quantitative correction of the interactions between absorbing particles.
[0133] Multiple characteristic wavelengths are selected, and the absorbance values of the sample at these wavelengths are measured to form a multi-wavelength absorbance vector. Chemometric methods such as principal component analysis (PCA) and partial least squares (PLS) are used to establish a quantitative relationship model between multi-wavelength absorbance and concentration. The multi-wavelength absorbance vector of an unknown sample is substituted into the quantitative model to predict its concentration value. The predictive performance and applicability of the quantitative model are evaluated through methods such as cross-validation and external validation.
[0134] High-spectral-resolution scanning of samples is performed using tunable light sources (such as tunable lasers and tunable filters) to obtain high-resolution absorption spectra. Spectral resolution optimization algorithms (such as genetic algorithms and simulated annealing algorithms) are used to select the optimal combination of characteristic wavelengths from the high-resolution spectra to maximize the sensitivity and selectivity of concentration prediction. Based on the optimized characteristic wavelengths, a concentration quantitative analysis model is established, and its predictive performance is evaluated. By utilizing the optimized spectral resolution and characteristic wavelengths, highly sensitive and selective analysis of target substances in complex matrices can be achieved.
[0135] This embodiment involves key technical aspects such as scattering effect correction, optical path length compensation, temperature effect correction, absorbing particle interaction correction, and quantitative concentration analysis. It comprehensively utilizes knowledge from multiple disciplines including optics, thermodynamics, quantum chemistry, and chemometrics to systematically correct and optimize various influencing factors in the absorbance measurement process from multiple perspectives, ultimately achieving high-precision and high-stability quantitative concentration analysis. By employing Mie theory for physical modeling and correction of scattering effects, dynamically describing temperature effects based on thermodynamic models, quantitatively evaluating absorbing particle interactions using quantum chemical calculations, and introducing spectral resolution optimization algorithms to achieve adaptive selection of characteristic wavelengths, it achieves significant theoretical and practical breakthroughs compared to traditional spectrophotometry, injecting new vitality into the development of high-precision water quality analysis technology.
[0136] Optical analysis commonly suffers from problems such as spectral baseline drift and instrument response nonlinearity. This embodiment, based on the traditional Lambert-Beer law, introduces a modified model that considers scattering effects and the interaction of absorbing particles. Through spectral resolution optimization and nonlinear multivariate correction, the measurement sensitivity and selectivity of target water quality parameters are improved, and the detection limit is reduced by 1-2 orders of magnitude. Simultaneously, the use of dual-wavelength dynamic reference and thermodynamic-based multi-parameter correction enables real-time compensation for response drift caused by environmental factors such as temperature and flow rate, resulting in a more than 50% improvement in measurement reproducibility and stability.
[0137] like Figure 6 As shown, according to one aspect of this application, step S5 further comprises:
[0138] S51. Based on the corrected optical characteristic parameters, construct a concentration measurement sequence prediction model based on a long short-term memory network;
[0139] S52. Obtain historical optical characteristic parameters and train the concentration measurement sequence prediction model;
[0140] S53. Use the trained concentration measurement sequence prediction model to obtain the concentration results;
[0141] S54. Perform statistical analysis on the continuously obtained concentration results, use Shewhart control charts to display the results of the statistical analysis, and monitor them in real time.
[0142] S55. Based on the results of statistical analysis, construct a causal control diagram of the concentration measurement process to locate and trace the root cause of measurement anomalies.
[0143] In a further embodiment, the uncertainty of the concentration output result is evaluated by: using the bootstrap method to estimate the confidence interval of the concentration measurement result; introducing sensitivity analysis and uncertainty propagation model to evaluate the uncertainty contribution of key parameters; and developing an uncertainty evaluation method based on evidence theory to realize the credible quantification of the measurement result.
[0144] The measurement stability is analyzed in the following ways: Shewhart control charts and EWMA control charts are used to achieve statistical control of the measurement process; anomaly detection algorithms are introduced to promptly detect and diagnose system faults and runaway events during the measurement process; and a Bayesian process monitoring method is developed to achieve online assessment and early warning of measurement stability.
[0145] It can also control quality and diagnose anomalies, specifically by: constructing a causal control diagram of the measurement process to locate and trace the root causes of measurement anomalies; adopting an integrated learning method to integrate multi-dimensional quality control indicators to improve the comprehensiveness of measurement quality assessment; and introducing an expert knowledge base and case reasoning technology to assist in the intelligent diagnosis and handling decisions of measurement anomalies.
[0146] In a specific embodiment, uncertainty assessment is based on repeated measurements. Multiple (e.g., n) repeated measurements are performed on the same sample to obtain a set of concentration measurement results {c}. i , i = 1, 2, ..., n}. Calculate the arithmetic mean c of the measurement results. mean And experimental standard deviation s:
[0147] c mean = (Σ i=1 n c i ) / n
[0148] s = sqrt[(Σ i=1 n (c i - c mean ) 2 ) / (n-1)]
[0149] Based on the number of measurements and the confidence level (e.g., 95%), consult the t-distribution critical value table to obtain the coverage factor k; calculate the expanded uncertainty of the concentration measurement results U = k × s; the final expression for reporting the measurement results is:
[0150] c = c mean ±U
[0151] An error propagation model for concentration measurement results is established to describe the functional relationship between the concentration value and various influencing factors (such as absorbance, optical path length, and temperature). Using the partial derivative method or Monte Carlo method, the combined standard uncertainty u of the concentration measurement results is calculated based on the uncertainty contributions of each influencing factor. c Multiplying by the coverage factor k, we obtain the expanded uncertainty of the concentration measurement result: U = k×u c The final expression for the reported measurement results is:
[0152] c = c mean ±U
[0153] During continuous measurement, quality control samples are measured periodically (e.g., at regular intervals or after a certain number of measurements) to obtain a set of quality control measurement results {q}. i , i=1,2,...,m}; Calculate the average value q of the quality control measurement results. mean and standard deviation s q Plot X-bar control charts and R-charts (or S-charts), where the X-bar chart reflects the change in the center position of the measurement process, and the R-chart (or S-chart) reflects the change in the dispersion of the measurement process; set the center line (CL), upper control limit (UCL), and lower control limit (LCL) in the control charts, for example:
[0154] X-bar plot: CL = q mean UCL = q mean +3s q LCL = q mean - 3s q
[0155] R-graph: CL = R mean UCL = D4 × R mean LCL = D3 × R mean
[0156] Where R mean D3 and D4 are the average of the ranges, and the control limit coefficients can be obtained from a table.
[0157] Continuously monitor whether the quality control measurement results exceed the control limits. If there are any exceedance points or non-random patterns, it indicates that there may be an abnormal deviation in the measurement process, and it is necessary to find the cause and take corrective measures in a timely manner.
[0158] The concentration results of continuously measured samples are plotted over time to form a concentration-time trend graph. The concentration trend is filtered and smoothed using techniques such as moving average and exponential smoothing to remove high-frequency noise and random disturbances. The slope and curvature of the smoothed concentration trend are analyzed to evaluate the long-term stability and trend of the concentration measurement results. Stability criteria (such as slope threshold, curvature threshold, etc.) are set. When the concentration trend exceeds the range of the criteria, it indicates that there may be systematic drift in the measurement process, and measures such as instrument calibration and maintenance are required.
[0159] Based on X-bar charts and R-charts (or S-charts), additional criteria such as Western Electric rules and Nelson rules are introduced to improve the control chart's ability to detect abnormal patterns. When continuous measurement quality control results trigger the out-of-control criteria of the control chart, an alarm signal is issued in a timely manner to prompt operators to diagnose and correct the anomaly. Based on the location, frequency, and pattern of the out-of-control point, the cause of the anomaly is preliminarily determined (such as instrument failure, reagent contamination, improper operation, etc.), and corresponding corrective measures are taken (such as instrument repair, reagent replacement, personnel retraining, etc.). Quality control anomaly events are recorded and reviewed to form a closed-loop management mechanism for continuous improvement.
[0160] The sample concentration results obtained from continuous measurements are recorded using multiple indicators, such as absorbance values at different wavelengths and results from repeated measurements, forming a multivariate data matrix. Principal component analysis (PCA) and partial least squares (PLS) are used to extract the main patterns and features of the data matrix, reducing data dimensionality. Boundaries for the Normal Operating Condition (NOC) are set in the principal component subspace or score space, such as control limits for the T2 statistic and Q residuals. When a new measurement sample exceeds the NOC boundary, it is identified as an abnormal sample, and based on its position in the principal component subspace or score space, possible causes of the anomaly (such as sample matrix interference, spectral distortion, etc.) are inferred. Combining prior knowledge and expert experience, abnormal samples are diagnosed and classified in detail, and targeted corrective measures are taken.
[0161] Select a reference material (such as a national reference material or certified reference material) with a similar matrix to the sample to be tested and an accurate and reliable concentration value as the calibration standard; prepare a series of standard solutions with different concentration gradients to cover the instrument's working measurement range; measure the absorbance value of the standard solution under the same experimental conditions as the sample measurement (such as wavelength, optical path, temperature, etc.) to obtain calibration curve data; use methods such as least squares method and weighted least squares method to perform regression fitting on the calibration data to establish an absorbance-concentration calibration model; regularly use reference materials to verify and update the calibration model to ensure its accuracy and stability over a long period of time.
[0162] Establish a complete measurement traceability chain to accurately and reliably trace laboratory concentration measurement results to national or international standards; regularly participate in inter-laboratory comparison and proficiency testing programs to assess the accuracy and consistency of laboratory measurement results; strictly manage and control various standard substances and reference materials used in the measurement process, such as regularly monitoring their stability and promptly replacing expired substances; conduct metrological verification or calibration of measuring equipment to ensure that its performance meets measurement requirements and maintain the traceability of the measurement process; establish a traceability reporting system for measurement results, record each step of the measurement process in detail, and ensure the traceability and reproducibility of measurement data.
[0163] This embodiment involves key technical aspects such as result uncertainty assessment, measurement stability analysis, quality control and anomaly diagnosis, and calibration and traceability management. It comprehensively utilizes knowledge from multiple disciplines such as statistics, metrology, and quality management to fully evaluate and ensure the quality and reliability of concentration measurement results from multiple perspectives, ultimately achieving high-level and reliable water quality analysis data output.
[0164] This embodiment adopts strategies such as periodic calibration based on true value calibration materials and hierarchical uncertainty assessment to establish a complete traceability chain for metrological values. Through measures such as quality control chart anomaly detection and dynamic optimization of calibration cycle, it achieves quality management of the entire analysis process, which reduces the uncertainty of water quality analysis results by more than 70% and maintains more than 95% consistency with national standard materials.
[0165] A high-precision automatic analyzer includes: at least one processor; and a memory communicatively connected to at least one of the processors; wherein the memory stores instructions executable by the processor to implement the high-precision water quality analysis method described in any of the above technical solutions.
[0166] This application employs strategies such as adaptive liquid surface recognition, dynamic scattering correction, and optical path compensation to significantly suppress the influence of factors such as liquid surface shape, suspended matter scattering, and turbidity changes, thereby significantly improving the accuracy and reproducibility of measurements and overcoming the optical interference problem of complex water samples. By introducing technologies such as automatic sample introduction, continuous flow cell, and high-speed optical detection during the analysis process, the sample analysis time is greatly shortened, enabling water quality parameters to be output in real time at a frequency of seconds to minutes. This provides strong support for timely early warning and source tracing of sudden water pollution events, achieving real-time online continuous analysis. By introducing high-spectral-resolution light sources, optimizing characteristic wavelength selection, and constructing multivariate correction models, the detection sensitivity of target water quality parameters is significantly improved, interference from complex matrices is reduced, and simultaneous high-selectivity analysis of multiple components is achieved, improving the sensitivity and selectivity of the analytical method. Through strict quality control measures such as traceability of metrological values, regular calibration, and anomaly detection using quality control charts, the analytical results are ensured to be accurately traceable to national or international standards, and abnormal deviations of the measurement system can be detected and diagnosed in a timely manner. This provides a solid metrological guarantee for the accuracy and reliability of analytical data, ensuring the accuracy and traceability of analytical results.
[0167] It should be noted that the various specific technical features described in the above embodiments can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the present invention will not describe the various possible combinations separately.
Claims
1. A high-precision water quality analysis method, characterized in that, Includes the following steps: S1. Acquire images of water samples and preprocess them; S2. Identify and remove bubbles and particles from the preprocessed image; S3. Based on the image after removing bubbles and particles, perform liquid surface shape recognition; S4. Acquire optical measurement data, calculate optical characteristic parameters, and correct the optical characteristic parameters based on the liquid surface shape recognition results; The optical properties include scattering coefficient, light-absorbing particle interaction parameters, temperature drift, and optical path length. S5. Based on the corrected optical characteristic parameters, the concentration result is calculated; S2 further defines: S21. Employ a deep learning object detection algorithm to identify and locate bubbles and particles in the preprocessed image in real time. S22. Track the trajectories of bubbles and particles using a target tracking algorithm; S23. Analyze the trajectory and predict its movement trend based on the analysis results; S24. Based on the prediction results, remove bubbles and particles from the preprocessed image in a directional manner in the optical path system and image layer; S3 is further defined as follows: S31. Extract the liquid surface edge from the image after removing bubbles and particles to obtain the contour curve of the liquid surface; S32. By using curvature calculation methods, the contour curve is characterized to obtain the shape features of the liquid surface; S33. Obtain historical shape characteristic data and use machine learning methods to construct a liquid surface shape recognition model; S34. Input the shape characteristics of the liquid surface into the liquid surface shape recognition model to realize the recognition of the liquid surface shape; S4 is further defined as follows: S41. Acquire optical measurement data, and based on the results of optical measurement data and liquid surface shape recognition, construct a light transmission model in the scattering medium; S42. Based on the transmission model, estimate the scattering phase function, introduce sparsity regularization, and correct the scattering coefficient of the scattering phase function. S43. Based on the results of liquid surface shape recognition and optical measurement data, calculate the interaction energy between light-absorbing particles; S44. Based on the interaction energy, construct an absorption cross section correction model and use the Bayesian optimization algorithm to adaptively estimate and dynamically correct the interaction parameters of the light-absorbing particles. S45. Obtain the three-dimensional temperature field distribution inside the water sample, calculate the temperature drift, and construct a coupled model of temperature-refractive index-absorbance based on the results of the three-dimensional temperature field distribution and liquid surface shape recognition. Use the coupled model to correct the temperature drift. S46. Confocal microscopy is used to reconstruct the three-dimensional liquid surface morphology in the water sample in real time, and the optical path length is dynamically estimated based on the three-dimensional liquid surface morphology. S47. Based on the results of liquid surface shape recognition, construct a dynamic correction model of optical path length-absorbance, and use the dynamic correction model to correct the optical path length; S24 further states: S241. Based on the predicted results, surface plasmon resonance technology is used to generate a directional surface tension gradient. S242. Based on the directional surface tension gradient, a photothermal effect is introduced to generate Marangoni convection through local heating, which drives the movement of bubbles and particles. S243. Using surface acoustic waves, moveable bubbles and particles are directionally manipulated, and the directionally manipulated bubbles and particles are removed.
2. The high-precision water quality analysis method as described in claim 1, characterized in that, S1 is further defined as follows: S11. Collect images of water samples and perform distortion correction on the images; S12. Based on the image after distortion correction, histogram equalization is used to enhance the image contrast. S13. Use the Gabor filtering algorithm to extract the texture features of the image after contrast enhancement.
3. The high-precision water quality analysis method as described in claim 1, characterized in that, Step S5 further includes: S51. Based on the corrected optical characteristic parameters, construct a concentration measurement sequence prediction model based on a long short-term memory network; S52. Obtain historical optical characteristic parameters and train the concentration measurement sequence prediction model; S53. Use the trained concentration measurement sequence prediction model to obtain the concentration results; S54. Perform statistical analysis on the continuously obtained concentration results, use Shewhart control charts to display the results of the statistical analysis, and monitor them in real time. S55. Based on the results of statistical analysis, construct a causal control diagram of the concentration measurement process to locate and trace the root cause of measurement anomalies.
4. The high-precision water quality analysis method as described in claim 2, characterized in that, Step S11 further includes: S111. Collect images of water samples and extract local distortion features from the images using an adaptive grid method; S112. Based on local distortion characteristics, Gaussian process regression is used to establish a distortion mapping function; S113. Based on the distortion mapping function, distortion correction is performed on the image, and an attention mechanism is introduced to dynamically adjust the intensity of distortion correction.
5. The high-precision water quality analysis method as described in claim 2, characterized in that, Step S12 further includes: S121. Perform multi-scale illumination decomposition on the distortion-corrected image to obtain the illumination component and the reflection component; S122. Dynamically adjust the illumination components using adaptive Gamma correction; S123. A guided filtering algorithm is used to smooth the edges of the reflection components; S124. The dynamically adjusted illumination component and the edge-smoothed reflection component are weighted and fused to obtain an image with enhanced contrast.
6. A high-precision automatic analyzer, characterized in that, include: At least one processor; as well as, A memory communicatively connected to at least one of the processors; wherein, The memory stores instructions that can be executed by the processor to implement the high-precision water quality analysis method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Water quality monitoring method based on hyperspectral multiple parameters and computer program product
CN114965316A
Rapid traceability method and system for underground water pollution
CN117668685A