Microfluidic water quality detection method and device based on water concentration regulation

By constructing multi-layer models and factor setting models, the accuracy and stability issues of microfluidic water quality detection in complex water areas and multi-polluted scenarios were solved, achieving high-precision water quality detection results.

CN121938488APending Publication Date: 2026-04-28WUHAN NEWFIBER OPTOELECTRONICS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUHAN NEWFIBER OPTOELECTRONICS TECH
Filing Date
2025-12-30
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing microfluidic water quality detection methods lack accuracy and stability in complex water areas and multi-polluted scenarios, making it difficult to meet the demand for high-precision detection. Furthermore, they lack adaptation mechanisms to the complexity of water quality and detection scenarios, leading to distorted detection results.

Method used

By constructing an initial pre-detection model, pollutant density is predicted using a meta-learning adaptive layer, a cross-modal feature alignment layer, an adversarial distillation layer, and a dynamic correction output layer. Combined with a factor setting model, water quality complexity correction factors and scenario adaptation factors are generated to adjust the concentration of water samples. Finally, detection is performed on a microfluidic chip.

Benefits of technology

It achieves accurate prediction of target pollutant density, significantly improves the accuracy and stability of microfluidic water quality detection, avoids detection failure, adapts to the characteristics of different detection scenarios, and improves detection accuracy and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121938488A_ABST
    Figure CN121938488A_ABST
Patent Text Reader

Abstract

The invention provides a microfluidic water quality detection method and device based on water concentration adjustment, and relates to the field of water quality detection.The method comprises the steps that parameters of an initial pre-detection interpretation model are iteratively optimized through a historical data set, and a final pre-detection interpretation model is obtained; inputting to-be-detected key water quality data into the final pre-detection interpretation model for pollutant density prediction to obtain target pollutant density; inputting the target pollutant density into a factor setting model for factor calculation to obtain a water quality complexity correction factor and a scene adaptation factor; determining an adjustment type and an adjustment multiple according to the water quality complexity correction factor, the scene adaptation factor, the minimum microfluidic detection value, the maximum microfluidic detection value and the target pollutant density, and performing concentration adjustment on the to-be-detected water body sample according to the adjustment type and the adjustment multiple to obtain a final water body sample; and injecting the final water body sample into a micro-fluidic chip for water quality detection to obtain a water quality detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of water quality testing, and in particular to a microfluidic water quality testing method and device based on water concentration adjustment. Background Technology

[0002] In the field of water quality testing, microfluidic technology is widely used due to its advantages such as small size, low sample consumption, and rapid detection. However, existing microfluidic water quality testing methods still have many technical bottlenecks, resulting in insufficient accuracy and stability of microfluidic water quality testing, making it difficult to meet the high-precision testing needs in complex water areas and multi-polluted scenarios.

[0003] Traditional prediction models often rely on single features or simple feature fusion, making it difficult to capture cross-modal correlations in water quality data and susceptible to redundant noise interference, resulting in insufficient accuracy in pollutant density prediction. Existing microfluidic water quality detection methods lack adaptation mechanisms to water quality complexity and detection scenarios, failing to provide a reliable basis for concentration adjustment. When the pollutant density in a water sample exceeds the detection range of the microfluidic chip, dilution or concentration operations lack scientific calculation logic and can only rely on manual experience for adjustment, which can easily lead to the sample concentration deviating from the optimal detection range, thereby causing problems such as distorted detection results and data failure. Summary of the Invention

[0004] To address the aforementioned problems, in a first aspect, the present invention provides a microfluidic water quality detection method based on water concentration adjustment, comprising: Acquire historical data sets, construct an initial pre-detection and interpretation model, iteratively optimize the parameters of the initial pre-detection and interpretation model using historical data sets, and obtain the final pre-detection and interpretation model; Obtain water samples to be tested, and collect key water quality data of the water samples to be tested using sampling equipment; The key water quality data to be tested are input into the final pre-detection and interpretation model to predict pollutant density and obtain the target pollutant density. Construct a factor setting model, input the target pollutant density into the factor setting model to perform factor calculation, and obtain water quality complexity correction factor and scenario adaptation factor; Set minimum and maximum microfluidic detection values, determine the adjustment type and adjustment factor based on water quality complexity correction factor, scenario adaptation factor, minimum and maximum microfluidic detection values ​​and target pollutant density, and adjust the concentration of the water sample to be tested according to the adjustment type and adjustment factor to obtain the final water sample; The final water sample is injected into a microfluidic chip for water quality testing to obtain the water quality test results.

[0005] Optionally, the historical data set includes historical key water quality data and labeled pollutant densities; The initial pre-detection and interpretation model includes a meta-learning adaptive layer, a cross-modal feature alignment layer, an adversarial distillation layer, and a dynamic correction output layer.

[0006] Optionally, the step of iteratively optimizing the parameters of the initial pre-detection model through historical data sets to obtain the final pre-detection model includes: S11: Input historical key water quality data into the initial pre-detection and interpretation model, and after processing through the meta-learning adaptive layer, cross-modal feature alignment layer, adversarial distillation layer and dynamic correction output layer, output the predicted pollutant density. S12: Calculate the mean squared error loss between the predicted pollutant density and the labeled pollutant density. Based on the mean squared error loss, update the weight parameters of the initial pre-detection model using backpropagation based on the gradient descent algorithm. S13: Repeat steps S11-S12 until the mean squared error loss value converges to the preset threshold, then stop the iteration and obtain the final pre-detection model.

[0007] Optionally, the step of inputting the key water quality data to be tested into the final pre-detection and interpretation model to predict pollutant density and obtain the target pollutant density includes: The key water quality data to be tested is input into the meta-learning adaptive layer of the final pre-detection and interpretation model for weight adjustment to obtain the first feature vector. The first feature vector is input into the cross-modal feature alignment layer of the final pre-detection and interpretation model. Spatial alignment and correlation fusion are performed on each feature in the first feature vector to obtain a multi-dimensional fusion feature matrix. The multidimensional fusion feature matrix is ​​input into the adversarial distillation layer of the final pre-detection model for noise suppression, and core features strongly correlated with pollutant density are extracted to obtain a set of core prediction features. The core prediction feature set is input into the dynamic correction output layer of the final pre-detection and interpretation model for nonlinear calculation to obtain the initial pollutant density. The initial pollutant density is then corrected according to the correction coefficients embedded in the dynamic correction output layer to obtain the target pollutant density.

[0008] Optionally, the factor setting model includes a feature dimension parsing unit, a scene association mapping unit, and a correction coefficient calculation unit.

[0009] Optionally, the step of setting the model to calculate the target pollutant density input factor to obtain the water quality complexity correction factor and the scenario adaptation factor includes: The target pollutant density is input into the feature dimension parsing unit for feature extraction to obtain distribution features, correlation features, and integrity features. The distribution features, correlation features, and integrity features constitute the correlation feature vector. The scene threshold of the target detection scene is obtained, and the scene adaptation factor is generated by nonlinearly mapping the correlation feature vector and the scene threshold through the radial basis function embedded in the scene association mapping unit. The correlation feature vector is input into the correction coefficient calculation unit for weight correction to obtain the correction feature vector. The feature values ​​in the correction feature vector are weighted and summed to obtain the water quality complexity correction factor.

[0010] Optionally, determining the adjustment type and adjustment factor based on the water quality complexity correction factor, scenario adaptation factor, minimum microfluidic detection value, maximum microfluidic detection value, and target pollutant density includes: When the target pollutant density is greater than the maximum microfluidic detection value, set the adjustment type to dilution. This is used as an adjustment factor for dilution, where y is the target pollutant density. This is a water quality complexity correction factor. For scene adaptation factors, This is the minimum microfluidic detection value. This represents the maximum microfluidic detection value. When the target pollutant density is less than the minimum microfluidic detection value, set the adjustment type to concentration. As an adjustment factor during concentration; when ≤y≤ In this case, the water sample to be tested is directly used as the final water sample for water quality testing.

[0011] Secondly, the present invention provides a microfluidic water quality detection device based on water concentration adjustment, used to implement the aforementioned microfluidic water quality detection method based on water concentration adjustment, the device comprising: The final pre-detection model acquisition module is used to acquire historical data sets, construct an initial pre-detection model, iteratively optimize the parameters of the initial pre-detection model through historical data sets, and obtain the final pre-detection model. The key water quality data acquisition module is used to acquire key water quality data of the water body sample to be tested through sampling equipment. The target pollutant density acquisition module is used to input the key water quality data to be tested into the final pre-detection and interpretation model to predict the pollutant density and obtain the target pollutant density. The factor setting module is used to build a factor setting model. The target pollutant density is input into the factor setting model to perform factor calculation and obtain water quality complexity correction factor and scenario adaptation factor. The final water sample acquisition module is used to set the minimum and maximum microfluidic detection values, determine the adjustment type and adjustment factor based on the water quality complexity correction factor, scenario adaptation factor, minimum and maximum microfluidic detection values, and target pollutant density, and adjust the concentration of the water sample to be tested according to the adjustment type and adjustment factor to obtain the final water sample; The water quality test result acquisition module is used to inject the final water sample into the microfluidic chip for water quality testing and obtain the water quality test results.

[0012] Thirdly, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the microfluidic water quality detection method based on water concentration adjustment.

[0013] Fourthly, the present invention provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the microfluidic water quality detection method based on water concentration adjustment.

[0014] The present invention has the following beneficial effects: 1. The key water quality data to be tested is input into the final pre-detection and interpretation model for pollutant density prediction. Through a full-process processing of dynamic weight adjustment, cross-modal feature alignment and fusion, noise suppression, and dynamic correction output, the contribution of key features is effectively enhanced and redundant interference is weakened, achieving accurate prediction of target pollutant density. Multidimensional features of target pollutant density are extracted through a factor setting model. Combined with nonlinear scene mapping of radial basis functions and scientific weight correction, core factors adapted to scene characteristics and water quality complexity are generated, providing a reliable basis for subsequent concentration adjustment. Water samples are diluted or concentrated according to water quality complexity correction factors, scene adaptation factors, minimum microfluidic detection values, maximum microfluidic detection values, and target pollutant density to accurately control the sample concentration within the optimal detection range, avoiding detection failure caused by range mismatch. Water quality testing is performed on the final water samples after concentration adjustment, significantly improving the accuracy and stability of microfluidic water quality detection.

[0015] 2. The meta-learning adaptive layer dynamically adjusts the weights of key water quality indicators to be measured, strengthens the contribution of indicators strongly correlated with pollutant density, weakens the interference of redundant indicators, and solves the problem of poor adaptability of fixed weights in traditional models. The cross-modal feature alignment layer maps different types of water quality features to a unified space and fuses them, breaking the isolation of features, strengthening the potential correlation between indicators, and making the fused multi-dimensional feature matrix better reflect the changing pattern of pollutant density. The adversarial distillation layer effectively filters random noise in water quality data, accurately extracts core features strongly correlated with pollutant density, reduces the impact of invalid features on prediction results, and improves the model's computational efficiency. The dynamic correction output layer fits complex mapping relationships through nonlinear calculations and corrects initial errors by combining embedded scene correction coefficients, significantly improving the prediction accuracy of target pollutant density.

[0016] 3. The feature dimension analysis unit extracts three types of features: distribution, correlation, and integrity, covering the statistical characteristics of pollutant density, indicator correlation, and data validity. This avoids the one-sidedness of a single feature and ensures that the correlation feature vector can comprehensively reflect the core attributes of pollutant density. By leveraging the nonlinear mapping capability of the radial basis function, the correlation feature vector is deeply integrated with the scene threshold. The generated scene adaptation factor can accurately match the characteristic differences of different detection scenarios, solving the problem of poor adaptability of traditional linear mapping. The correction coefficient calculation unit optimizes the weight allocation based on historical data, strengthening the contribution of key features to water quality complexity. The water quality complexity correction factor obtained by weighted summation can objectively reflect complex situations such as water quality impurity interference and component differences, avoiding errors from subjective experience judgment. The generated water quality complexity correction factor and scene adaptation factor provide the core basis for calculating the adjustment type and multiple, allowing the concentration adjustment to adapt to the scene requirements while taking into account the complexity of the water quality itself, thus improving the accuracy of microfluidic detection. Attached Figure Description

[0017] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a flowchart of a method according to an embodiment of the present invention; Figure 2 This is a structural diagram of the device according to an embodiment of the present invention. Detailed Implementation

[0019] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0020] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.

[0021] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0022] To enable those skilled in the art to better understand the technical solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.

[0023] Reference Figure 1 This invention provides a microfluidic water quality detection method based on water concentration adjustment, comprising: S100 acquires historical data sets, constructs an initial pre-detection and interpretation model, and iteratively optimizes the parameters of the initial pre-detection and interpretation model through historical data sets to obtain the final pre-detection and interpretation model.

[0024] In some embodiments, the historical data set includes historical key water quality data and labeled pollutant densities; The initial pre-detection and interpretation model includes a meta-learning adaptive layer, a cross-modal feature alignment layer, an adversarial distillation layer, and a dynamic correction output layer.

[0025] In some embodiments, taking blue-green algae as the pollutant and key water quality data including turbidity, dissolved oxygen, conductivity, and chlorophyll a density as an example, monitoring data from different water bodies over the past 5 years are collected. The dimensions include turbidity, dissolved oxygen, conductivity, and chlorophyll a density, covering scenario data of different seasons, weather, and pollution levels. Each data point is labeled with auxiliary information such as collection time, location, and water temperature.

[0026] The measured values ​​of cyanobacterial cell density of the corresponding water samples were recorded simultaneously. Microscopic counting or standard turbidity method was used to detect the data to ensure the accuracy of the label data. Finally, a structured historical data set of four water quality indicators and cyanobacterial density was formed.

[0027] After inputting historical key water quality data, the meta-learning adaptive layer automatically learns the differences in the distribution of indicators in different water areas and dynamically adjusts the weights of the four indicators. For example, in the scenario of lakes with high incidence of blue-green algae, the weight of chlorophyll a density is set to 0.4, turbidity to 0.25, dissolved oxygen to 0.2, and conductivity to 0.15, adapting to the data characteristics of different scenarios.

[0028] The cross-modal feature alignment layer maps turbidity, dissolved oxygen, electrical conductivity, and chlorophyll a density to the same feature space. By calculating the Pearson correlation coefficient between each index and the density of blue-green algae, the cross-modal feature association and fusion are realized, and a 4×128-dimensional multidimensional fusion feature matrix is ​​output.

[0029] Noise interference is suppressed by using a resistant distillation layer, core features are extracted, the strong correlation between chlorophyll a density and blue-green algae and the negative correlation between dissolved oxygen are retained, and redundant information of conductivity in low-pollution scenarios is filtered out, finally outputting a 20-dimensional core prediction feature set.

[0030] The dynamic correction output layer fits the nonlinear relationship between four indicators and cyanobacteria density through a three-layer fully connected neural network, embeds scene correction coefficients, corrects the initial prediction value, and outputs the predicted value of cyanobacteria density.

[0031] In some embodiments, the step of iteratively optimizing the parameters of the initial pre-detection model through a historical data set to obtain the final pre-detection model includes: S11: Input historical key water quality data into the initial pre-detection and interpretation model, and after processing through the meta-learning adaptive layer, cross-modal feature alignment layer, adversarial distillation layer and dynamic correction output layer, output the predicted pollutant density. S12: Calculate the mean squared error loss between the predicted pollutant density and the labeled pollutant density. Based on the mean squared error loss, update the weight parameters of the initial pre-detection model using backpropagation based on the gradient descent algorithm. S13: Repeat steps S11-S12 until the mean squared error loss value converges to the preset threshold, then stop the iteration and obtain the final pre-detection model.

[0032] In some embodiments, the formula for calculating the mean squared error loss value L is: Where N is the batch data size. Let be the density of the labeled contaminants in the i-th sample. To predict pollutant density.

[0033] The stochastic gradient descent algorithm was selected, with an initial learning rate of 0.001, a batch size of 32, and a momentum parameter of 0.9. As the number of iterations increased, the learning rate was decayed to 0.9 times its original value every 100 iterations.

[0034] Based on the calculated mean squared error loss value, the gradients of the parameters of each layer are solved, including the gradient of the attention weights of the meta-learning adaptive layer and the gradient of the mapping matrix of the cross-modal feature alignment layer. Through the backpropagation algorithm, all weight parameters of the model, including the convolutional kernel weights, fully connected layer weights and bias terms, are updated in the direction of gradient descent, so that the loss value iterates in the direction of decreasing.

[0035] Based on the accuracy requirements of water quality testing, the convergence threshold for the mean square error loss value is set to 0.001. After each iteration, the current loss value is recorded. If the loss value for five consecutive iterations remains stable below the preset threshold, and the difference between the loss values ​​of two adjacent iterations is less than 1e-5, convergence is considered achieved. After stopping the iteration, all weight parameters, layer structure configuration, and preprocessing parameters of the current model are saved to generate the final pre-detection model for subsequent pollutant density prediction.

[0036] The S200 acquires water samples to be tested and collects key water quality data of the samples through sampling equipment.

[0037] In some embodiments, the sampling method for the water sample to be tested is determined according to the type of water body. For rivers, the sample is collected slowly in the middle of the water flow at a depth of 0.5m using a sampler to avoid disturbing the water flow. For lakes, a three-point mixing method is used, with equal amounts of water samples taken from each point and mixed together. For groundwater, the sample is taken through the wellhead, and water is first released for 3 minutes to drain the water remaining in the pipe before collection.

[0038] Select calibrated glass or polytetrafluoroethylene sampling containers, soak them in 10% nitric acid solution for 24 hours in advance, rinse them with clean water 3 times, and then dry them for later use; calibrate the sampling equipment, which includes a portable turbidimeter, dissolved oxygen meter, conductivity meter, and chlorophyll a fluorescence sensor.

[0039] Turbidity was measured using a portable turbidimeter. The probe of the portable turbidimeter was immersed in the middle of the water sample, stirred evenly, and allowed to stand for 30 seconds. The data was read three times and the average value was taken. The unit was converted to NTU. Dissolved oxygen was measured using an optical dissolved oxygen meter. After calibration, the sensor was placed in the water sample, and the reading was recorded after it stabilized. The unit was mg / L. Conductivity was measured using a conductivity meter. The probe was completely immersed in the water sample, and the value was read at a standard temperature of 25℃. The unit was converted to μS / cm. Chlorophyll a density was directly detected using a fluorescence sensor. The probe was inserted into the water sample, allowed to stand in the dark for 1 minute, and the density value converted from fluorescence intensity was recorded. The unit was μg / L.

[0040] The S300 inputs the key water quality data to be tested into the final pre-detection and interpretation model to predict pollutant density and obtain the target pollutant density.

[0041] In some embodiments, the step of inputting the key water quality data to be tested into the final pre-detection and interpretation model to predict pollutant density and obtain the target pollutant density includes: The key water quality data to be tested is input into the meta-learning adaptive layer of the final pre-detection and interpretation model for weight adjustment to obtain the first feature vector. The first feature vector is input into the cross-modal feature alignment layer of the final pre-detection and interpretation model. Spatial alignment and correlation fusion are performed on each feature in the first feature vector to obtain a multi-dimensional fusion feature matrix. The multidimensional fusion feature matrix is ​​input into the adversarial distillation layer of the final pre-detection model for noise suppression, and core features strongly correlated with pollutant density are extracted to obtain a set of core prediction features. The core prediction feature set is input into the dynamic correction output layer of the final pre-detection and interpretation model for nonlinear calculation to obtain the initial pollutant density. The initial pollutant density is then corrected according to the correction coefficients embedded in the dynamic correction output layer to obtain the target pollutant density.

[0042] In some embodiments, the key water quality data to be measured, including turbidity, dissolved oxygen, conductivity, and chlorophyll a density, are converted into a model-compatible tensor format and used as input to the meta-learning adaptive layer. An attention mechanism is employed, based on the historical correlation matrix between each indicator and pollutant density stored during the training of the final pre-detection model, to calculate the attention weight of each indicator in the current input data. The calculation formula is as follows:

[0043] Where n is the number of types of key water quality data to be tested, and the value of n is 4; i and j represent the type number of the key water quality data to be tested, and the type numbers 1-4 represent turbidity, dissolved oxygen, conductivity and chlorophyll a density, respectively. This refers to the key water quality data to be tested for the i-th category; This represents the attention weight of the i-th element; () indicates cosine similarity; This represents the average of key historical water quality data.

[0044] The various key water quality data to be measured are multiplied by their corresponding attention weights to obtain adjusted feature values. These values ​​are then arranged in the order of the input indicators to generate a first feature vector with dimensions [1,4]. .

[0045] The cross-modal feature alignment layer employs a linear transformation matrix to map the first feature vector to a 128-dimensional high-dimensional feature space, obtaining high-dimensional features for each modality. By calculating the Euclidean distance between features of different modalities, the feature positions are adjusted to cluster strongly correlated features in the space, with the alignment error controlled within 0.01. The correlation strength between each high-dimensional feature is calculated based on the Pearson correlation coefficient, and a weighted summation method is used to fuse the correlated features, generating a 4×128-dimensional multidimensional fused feature matrix M. The calculation formula is as follows:

[0046] in, This represents the element in the i-th row and k-th column of the multidimensional fusion feature matrix; Represents a linear transformation matrix; This represents the element in the k-th column of the product of the first eigenvector and the linear transformation matrix; The k-th dimension high-dimensional feature fusion weight represents the i-th type of key water quality data to be tested; I() represents the mutual information value function; Let d represent the k-th high-dimensional feature; d is the number of dimensions of the high-dimensional feature.

[0047] Noise suppression and core feature extraction are achieved through an adversarial distillation layer. A distillation temperature coefficient of 1.2 is set to soften the multidimensional fusion feature matrix, reducing the impact of discrete noise. A threshold filtering method is employed, setting the correlation coefficient threshold to 0.15 to remove feature columns with correlation coefficients below the threshold for pollutant density, retaining only highly correlated feature columns. A discriminator generated through adversarial training further filters out core features that accurately distinguish pollutant density levels, ultimately retaining 20 key feature columns to form a [4,20]-dimensional core feature matrix. After flattening, a 1×80-dimensional core prediction feature set F is obtained, calculated using the following formula:

[0048] in, This represents the t-th core predicted feature; T is the distillation temperature coefficient. The k-th eigenvalue represents the i-th type of key water quality data to be tested after softening; The threshold for the correlation coefficient; This represents the correlation coefficient between the element in the i-th row and k-th column of the multidimensional fusion feature matrix and the density of the labeled pollutants; () indicates an indicator function, retaining only those functions that satisfy... Its characteristics.

[0049] The core predicted feature set is input into a three-layer fully connected neural network in the dynamic correction output layer. Through matrix multiplication and nonlinear transformation, the mapping relationship between the features and pollutant density is fitted, outputting the initial pollutant density. The dynamic correction output layer embeds a scene correction coefficient library, automatically matching the corresponding correction coefficient based on the scene type of the water body being tested. The initial pollutant density is corrected using these correction coefficients, and the corrected result, rounded to two decimal places, is the target pollutant density. The calculation formula is as follows:

[0050] in, It is the ReLU activation function; b is the output layer weight matrix; b is the output layer bias term; Initial pollutant density; For scene correction coefficients; This serves as the basic coefficient for water quality complexity. The target pollutant density.

[0051] The S400 constructs a factor setting model, inputs the target pollutant density into the factor setting model for factor calculation, and obtains water quality complexity correction factors and scenario adaptation factors.

[0052] In some embodiments, the factor setting model includes a feature dimension parsing unit, a scene association mapping unit, and a correction coefficient calculation unit.

[0053] In some embodiments, the feature dimension parsing unit includes a data preprocessing submodule, a distribution feature calculation submodule, a correlation feature calculation submodule, an integrity feature calculation submodule, and a vector construction submodule.

[0054] The data preprocessing submodule normalizes the input target pollutant density and filters outliers to ensure the accuracy of feature extraction. The distribution feature calculation submodule calculates the normalized standard deviation and skewness of the target pollutant density using statistical analysis algorithms, and outputs distribution feature parameters. The correlation feature calculation submodule calls the historical key water quality index database to calculate the Pearson correlation coefficient between the target pollutant density and each index, and takes the mean of the absolute values ​​as the correlation feature. The integrity feature calculation submodule determines whether the target pollutant density is within the historical valid range and outputs the integrity feature through a decay function. The vector construction submodule concatenates the distribution, correlation, and integrity features in a fixed order to generate a correlation feature vector.

[0055] The scene association mapping unit includes a scene type identification submodule, a scene threshold invocation submodule, a radial basis function processing submodule, and an adaptation factor calibration submodule.

[0056] The scene type recognition submodule receives target detection scene information and matches the corresponding scene category label; the scene threshold retrieval submodule retrieves the corresponding distribution, correlation, and integrity feature thresholds from the preset threshold library based on the scene category label, forming a scene threshold vector; the radial basis function processing submodule has a built-in Gaussian radial basis function to calculate the Euclidean distance between the correlation feature vector and the scene threshold vector, performing a nonlinear mapping; the adaptation factor calibration submodule: constrains the range of the mapping results and outputs the final scene adaptation factor.

[0057] The correction coefficient calculation unit includes a weight configuration submodule, a feature correction submodule, a summation calculation submodule, and a weight optimization interface.

[0058] The weight configuration submodule has a built-in fixed weight vector optimized based on historical data, which supports dynamic updates through grid search; the feature correction submodule multiplies the correlation feature vector and the weight vector element by element to generate a corrected feature vector, which strengthens the contribution of key features; the summation calculation submodule performs a weighted summation of each element of the corrected feature vector and outputs the water quality complexity correction factor; the weight optimization interface supports manual or automatic adjustment of the weight allocation ratio according to different detection scenarios.

[0059] In some embodiments, the step of setting a model to calculate factors based on the target pollutant density input factor to obtain a water quality complexity correction factor and a scenario adaptation factor includes: The target pollutant density is input into the feature dimension parsing unit for feature extraction to obtain distribution features, correlation features, and integrity features. The distribution features, correlation features, and integrity features constitute the correlation feature vector. The scene threshold of the target detection scene is obtained, and the scene adaptation factor is generated by nonlinearly mapping the correlation feature vector and the scene threshold through the radial basis function embedded in the scene association mapping unit. The correlation feature vector is input into the correction coefficient calculation unit for weight correction to obtain the correction feature vector. The feature values ​​in the correction feature vector are weighted and summed to obtain the water quality complexity correction factor.

[0060] In some embodiments, the target pollutant density y is normalized and aligned with the labeled pollutant density in the historical dataset to ensure consistency in feature extraction. Statistical analysis methods are used to calculate the normalized standard deviation of the target pollutant density within the historical data distribution. Skewing value The calculation formula is:

[0061] in, The local standard deviation of the target pollutant density. The global standard deviation of the labeled contaminant density, The average density of the labeled contaminants; take and The weighted average of the weights, each with a weight of 0.5, is used as the distribution characteristic. .

[0062] Calculate the Pearson correlation coefficient between the target pollutant density and historical key water quality data, and take the mean of the absolute values ​​of all correlation coefficients as the correlation feature. , , Let be the correlation coefficient between the target pollutant density and the historical key water quality data of category i.

[0063] Determine whether the density of the target pollutant is within the valid range of historical data. Within, if it is within the interval, then the integrity feature is... If the value exceeds the limit, the integrity characteristic is calculated according to the distance attenuation formula. .

[0064] Will , , Arranged in order, they form a correlation feature vector with dimensions [1,3]. .

[0065] Based on the target detection scene type, a preset scene threshold library is invoked. For example, the threshold for a lake scene. The corresponding distribution characteristics, correlation characteristics, and integrity characteristics are matched with the threshold values, which are obtained by statistical optimization of historical scene data.

[0066] Gaussian radial basis functions are selected. Calculate the Euclidean distance between the correlation feature vector and the scene threshold. Then, substituting the Euclidean distance into the radial basis function, we obtain the scene adaptation factor. ,in, , , These are the adaptation thresholds for distribution characteristics, correlation characteristics, and integrity characteristics, respectively. The smaller the Euclidean distance, the higher the fitness, and the closer the factor is to 1.

[0067] Based on the degree of influence of various features on water quality complexity in historical data, a pre-defined weight vector is used. ; The correlation feature vector The corrected feature vector is obtained by multiplying it element-wise with the corrected weights. The water quality complexity correction factor is obtained by summing the elements of the modified eigenvector. , This represents the u-th element in the modified eigenvector. A higher value indicates greater water quality complexity, requiring stronger concentration adjustment and correction.

[0068] The S500 sets the minimum and maximum microfluidic detection values. Based on the water quality complexity correction factor, scenario adaptation factor, minimum and maximum microfluidic detection values, and target pollutant density, it determines the adjustment type and adjustment factor. Based on the adjustment type and adjustment factor, it adjusts the concentration of the water sample to be tested to obtain the final water sample.

[0069] In some embodiments, determining the adjustment type and adjustment factor based on the water quality complexity correction factor, scenario adaptation factor, minimum microfluidic detection value, maximum microfluidic detection value, and target pollutant density includes: When the target pollutant density is greater than the maximum microfluidic detection value, set the adjustment type to dilution. This is used as an adjustment factor for dilution, where y is the target pollutant density. This is a water quality complexity correction factor. For scene adaptation factors, This is the minimum microfluidic detection value. This represents the maximum microfluidic detection value. When the target pollutant density is less than the minimum microfluidic detection value, set the adjustment type to concentration. As an adjustment factor during concentration; when ≤y≤ In this case, the water sample to be tested is directly used as the final water sample for water quality testing.

[0070] In some embodiments, minimum and maximum microfluidic detection values ​​are preset according to the microfluidic chip model and the type of target pollutant. For example, when the pollutant is cyanobacteria, cells / mL The detection range was measured in cells / mL and calibrated using three sets of standard concentration samples to ensure an error of ≤±3%. The water quality complexity correction factor output by the model was then called. and scene adaptation factors Ensure that both are the latest calculation results.

[0071] After determining that a dilution operation is to be performed, a gradient dilution method is used. Take one part of the water sample to be tested, add one part of deionized water (adjustment factor), stir well, and let stand for 5 minutes to ensure uniform concentration distribution.

[0072] Once the concentration operation is determined, the vacuum distillation concentration method is used, and the temperature is controlled at ≤40℃. The water sample to be tested is concentrated to 1 / adjustment factor of the original volume, and stirring is carried out throughout the process to prevent the local concentration from being too high.

[0073] After the concentration adjustment is completed, 10% of the final water sample is extracted, and the pollutant density is preliminarily verified by a rapid detection sensor to ensure that it falls within the target range. If the deviation exceeds ±10%, the adjustment multiple is recalculated and secondary adjustment is performed.

[0074] S600 injects the final water sample into the microfluidic chip for water quality detection and obtains the water quality detection result.

[0075] In some embodiments, a dedicated microfluidic chip adapted to the target pollutant is selected. The chip channels are rinsed with absolute ethanol and then rinsed three times with deionized water to remove residual impurities. Subsequently, a buffer solution is introduced to activate the reaction area of the chip, and it is left standing for 5 minutes to ensure that the channels are moist and free of bubbles.

[0076] Using a high-precision micro-injection pump, 20 μL of the final water sample is extracted and slowly injected through the chip injection port, controlling the injection flow rate at 10 μL / min to avoid the generation of bubbles due to too fast flow rate. After the injection is completed, the injection valve is closed, and the sample is incubated in the chip reaction channel for 3 minutes.

[0077] Detection parameters are set according to the type of pollutant. For fluorescence detection, the excitation wavelength is set at 470 nm, the emission wavelength is set at 685 nm, and the integration time is 500 ms. For electrochemical detection, the working electrode voltage is set at +0.8 V, the detection time is 10 seconds, and the signal sampling frequency is 100 Hz. At the same time, the chip temperature control module is turned on to stabilize the detection ambient temperature at 25 °C.

[0078] The optical signal I is collected by the detector supporting the microfluidic chip, and the water quality detection result is obtained based on the optical signal. The water quality detection result includes 5 levels: when I ≤ 500 fluorescence intensity units, the water quality is level 1, the pollutant content is extremely low, the water quality is clean, and the ecological safety is high; when 500 < I ≤ 2000 fluorescence intensity units, the water quality is level 2, the pollutant content is within the safety threshold, and there is no ecological risk; when 2000 < I ≤ 5000 fluorescence intensity units, the water quality is level 3, the pollutant content is close to the critical value, there is no harm in the short term but the cumulative effect needs to be vigilant; when 5000 < I ≤ 10000 fluorescence intensity units, the water quality is level 4, the pollutant content exceeds the standard, and there is a potential ecological impact; when I > 10000 fluorescence intensity units, the water quality is level 5, the pollutant is highly enriched, and the ecological risk is high.

[0079] Refer to Figure 2 , the present invention provides a microfluidic water quality detection device 20 based on water body concentration adjustment for implementing the microfluidic water quality detection method based on water body concentration adjustment. The device includes: A final pre-detection and interpretation model acquisition module 21 for obtaining a historical data set, constructing an initial pre-detection and interpretation model, and iteratively optimizing the parameters of the initial pre-detection and interpretation model through the historical data set to obtain the final pre-detection and interpretation model; The key water quality data acquisition module 22 is used to acquire the key water quality data of the water sample to be tested through sampling equipment. The target pollutant density acquisition module 23 is used to input the key water quality data to be tested into the final pre-detection and interpretation model to predict the pollutant density and obtain the target pollutant density. The factor setting module 24 is used to construct a factor setting model. The target pollutant density is input into the factor setting model to perform factor calculation and obtain water quality complexity correction factor and scenario adaptation factor. The final water sample acquisition module 25 is used to set the minimum and maximum microfluidic detection values, determine the adjustment type and adjustment factor based on the water quality complexity correction factor, scenario adaptation factor, minimum and maximum microfluidic detection values ​​and target pollutant density, and adjust the concentration of the water sample to be tested according to the adjustment type and adjustment factor to obtain the final water sample; The water quality test result acquisition module 26 is used to inject the final water sample into the microfluidic chip for water quality testing and obtain the water quality test results.

[0080] This application provides an electronic device, including a processor and a memory; the memory stores a computer program, wherein the computer program, when executed by the processor, implements any of the above-described schemes of a microfluidic water quality detection method based on water concentration adjustment.

[0081] Specifically, the processor may include, for example, a general-purpose microprocessor, an instruction set processor and / or an associated chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor may also include onboard memory for caching purposes. The processor may be a single processing unit or multiple processing units for performing different actions of the method flow according to embodiments of this application.

[0082] Memory can be any medium capable of containing, storing, transmitting, propagating, or transmitting instructions. For example, memory can include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, instruments, or propagation media. Specific examples of memory include: magnetic storage devices such as magnetic tape or hard disk drives (HDDs); optical storage devices such as optical discs (CD-ROMs); and also random access memory (RAM) or flash memory; and / or wired / wireless communication links.

[0083] This application also provides a computer-readable medium storing a computer program thereon, which, when executed by a processor, implements the microfluidic water quality detection method based on water concentration adjustment as described above. This computer-readable medium may be included in the device / apparatus / system described in the above embodiments; or it may exist independently and not assembled into that device / apparatus / system. The aforementioned computer-readable medium carries one or more programs, which, when executed, implement the method as described in the embodiments of this application.

[0084] According to embodiments of this application, a computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, optical fiber, radio frequency signals, etc., or any suitable combination thereof.

[0085] Those skilled in the art will understand that the features described in the various embodiments and / or claims of this application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in this application. In particular, the features described in the various embodiments and / or claims of this application can be combined and / or combined in various ways without departing from the spirit and teachings of this application. All such combinations and / or combinations fall within the scope of this application. Therefore, the scope of this application should not be limited to the above embodiments, but should be defined not only by the appended claims, but also by their equivalents. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A microfluidic water quality detection method based on water concentration adjustment, characterized in that, include: Acquire historical data sets, construct an initial pre-detection and interpretation model, iteratively optimize the parameters of the initial pre-detection and interpretation model using historical data sets, and obtain the final pre-detection and interpretation model; Obtain water samples to be tested, and collect key water quality data of the water samples to be tested using sampling equipment; The key water quality data to be tested are input into the final pre-detection and interpretation model to predict pollutant density and obtain the target pollutant density. Construct a factor setting model, input the target pollutant density into the factor setting model to perform factor calculation, and obtain water quality complexity correction factor and scenario adaptation factor; Set minimum and maximum microfluidic detection values, determine the adjustment type and adjustment factor based on water quality complexity correction factor, scenario adaptation factor, minimum and maximum microfluidic detection values ​​and target pollutant density, and adjust the concentration of the water sample to be tested according to the adjustment type and adjustment factor to obtain the final water sample; The final water sample is injected into a microfluidic chip for water quality testing to obtain the water quality test results.

2. The microfluidic water quality detection method based on water concentration adjustment according to claim 1, characterized in that, The historical data set includes historical key water quality data and labeled pollutant densities; The initial pre-detection and interpretation model includes a meta-learning adaptive layer, a cross-modal feature alignment layer, an adversarial distillation layer, and a dynamic correction output layer.

3. The microfluidic water quality detection method based on water concentration adjustment according to claim 2, characterized in that, The step of iteratively optimizing the parameters of the initial pre-detection model using historical data sets to obtain the final pre-detection model includes: S11: Input historical key water quality data into the initial pre-detection and interpretation model, and after processing through the meta-learning adaptive layer, cross-modal feature alignment layer, adversarial distillation layer and dynamic correction output layer, output the predicted pollutant density. S12: Calculate the mean squared error loss between the predicted pollutant density and the labeled pollutant density. Based on the mean squared error loss, update the weight parameters of the initial pre-detection model using backpropagation based on the gradient descent algorithm. S13: Repeat steps S11-S12 until the mean squared error loss value converges to the preset threshold, then stop the iteration and obtain the final pre-detection model.

4. The microfluidic water quality detection method based on water concentration adjustment according to claim 1, characterized in that, The step of inputting the key water quality data to be tested into the final pre-detection and interpretation model to predict pollutant density and obtain the target pollutant density includes: The key water quality data to be tested is input into the meta-learning adaptive layer of the final pre-detection and interpretation model for weight adjustment to obtain the first feature vector. The first feature vector is input into the cross-modal feature alignment layer of the final pre-detection and interpretation model. Spatial alignment and correlation fusion are performed on each feature in the first feature vector to obtain a multi-dimensional fusion feature matrix. The multidimensional fusion feature matrix is ​​input into the adversarial distillation layer of the final pre-detection model for noise suppression, and core features strongly correlated with pollutant density are extracted to obtain a set of core prediction features. The core prediction feature set is input into the dynamic correction output layer of the final pre-detection and interpretation model for nonlinear calculation to obtain the initial pollutant density. The initial pollutant density is then corrected according to the correction coefficients embedded in the dynamic correction output layer to obtain the target pollutant density.

5. The microfluidic water quality detection method based on water concentration adjustment according to claim 1, characterized in that, The factor setting model includes a feature dimension parsing unit, a scene association mapping unit, and a correction coefficient calculation unit.

6. The microfluidic water quality detection method based on water concentration adjustment according to claim 5, characterized in that, The step of setting the model by inputting the target pollutant density as an input factor to perform factor calculations, and obtaining water quality complexity correction factors and scenario adaptation factors, includes: The target pollutant density is input into the feature dimension parsing unit for feature extraction to obtain distribution features, correlation features, and integrity features. The distribution features, correlation features, and integrity features constitute the correlation feature vector. The scene threshold of the target detection scene is obtained, and the scene adaptation factor is generated by nonlinearly mapping the correlation feature vector and the scene threshold through the radial basis function embedded in the scene association mapping unit. The correlation feature vector is input into the correction coefficient calculation unit for weight correction to obtain the correction feature vector. The feature values ​​in the correction feature vector are weighted and summed to obtain the water quality complexity correction factor.

7. The microfluidic water quality detection method based on water concentration adjustment according to claim 1, characterized in that, The determination of the adjustment type and adjustment factor based on the water quality complexity correction factor, scenario adaptation factor, minimum microfluidic detection value, maximum microfluidic detection value, and target pollutant density includes: When the target pollutant density is greater than the maximum microfluidic detection value, set the adjustment type to dilution. This is used as an adjustment factor for dilution, where y is the target pollutant density. This is a water quality complexity correction factor. For scene adaptation factors, This is the minimum microfluidic detection value. This represents the maximum microfluidic detection value. When the target pollutant density is less than the minimum microfluidic detection value, set the adjustment type to concentration. As an adjustment factor during concentration; when ≤y≤ In this case, the water sample to be tested is directly used as the final water sample for water quality testing.

8. A microfluidic water quality detection device based on water concentration adjustment, used to implement the microfluidic water quality detection method based on water concentration adjustment as described in any one of claims 1 to 7, characterized in that, The device includes: The final pre-detection model acquisition module is used to acquire historical data sets, construct an initial pre-detection model, iteratively optimize the parameters of the initial pre-detection model through historical data sets, and obtain the final pre-detection model. The key water quality data acquisition module is used to acquire key water quality data of the water body sample to be tested through sampling equipment. The target pollutant density acquisition module is used to input the key water quality data to be tested into the final pre-detection and interpretation model to predict the pollutant density and obtain the target pollutant density. The factor setting module is used to build a factor setting model. The target pollutant density is input into the factor setting model to perform factor calculation and obtain water quality complexity correction factor and scenario adaptation factor. The final water sample acquisition module is used to set the minimum and maximum microfluidic detection values, determine the adjustment type and adjustment factor based on the water quality complexity correction factor, scenario adaptation factor, minimum and maximum microfluidic detection values, and target pollutant density, and adjust the concentration of the water sample to be tested according to the adjustment type and adjustment factor to obtain the final water sample; The water quality test result acquisition module is used to inject the final water sample into the microfluidic chip for water quality testing and obtain the water quality test results.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the microfluidic water quality detection method based on water concentration adjustment as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the microfluidic water quality detection method based on water concentration adjustment as described in any one of claims 1 to 7.