Water quality fluoride detection method based on digital image colorimetric analysis
By constructing zirconium-based nanozyme probes and three-layer paper-based microfluidic chips, and combining digital image colorimetric analysis and blockchain technology, the problems of colorimetric system specificity and environmental interference correction in water fluoride detection have been solved, achieving rapid on-site detection with high accuracy, stability and data security.
Patent Information
- Application Number
- CN202511087965.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-08-05
AI Technical Summary
Existing water fluoride detection technologies suffer from insufficient specificity of colorimetric systems, inadequate environmental interference correction, and low data security and reliability, making it difficult to meet the needs of rapid on-site detection.
A digital image colorimetric analysis method was adopted, which involves constructing a zirconium-based nanozyme probe, developing a three-layer paper-based microfluidic chip, simultaneously acquiring dual-modal images of reflection and fluorescence, constructing a dynamic compensation matrix to correct matrix interference, and encrypting the detection data and writing it into the blockchain to achieve data verification and alarm for exceeding the standard.
It achieves specific recognition of fluoride ions, eliminates the influence of environmental factors, improves the accuracy and stability of detection, ensures the security and reliability of data, and meets the needs of rapid on-site detection.
Smart Images

Figure CN120870101A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of water quality testing technology, and in particular to a method for detecting fluoride in water based on digital image colorimetric analysis. Background Technology
[0002] Currently, fluoride detection in water quality mainly relies on traditional chemical analysis methods, such as ion chromatography, spectrophotometry, and electrochemical methods. While these methods offer high detection accuracy, they also have several limitations. For example, ion chromatography requires expensive equipment and specialized operators, making it complex and costly; spectrophotometry requires complex colorimetric reagents and spectrophotometers, and is highly sensitive to environmental conditions; electrochemical methods suffer from poor electrode stability and repeatability, making them unsuitable for rapid on-site detection. Therefore, existing technologies face numerous limitations in practical applications, especially in resource-constrained or on-site testing scenarios.
[0003] In recent years, with the rapid development of smartphones and image processing technology, digital image colorimetric analysis technology has gradually emerged. This technology utilizes the smartphone's camera to capture images after the colorimetric reaction and extracts color information through image processing algorithms, thereby achieving quantitative analysis of target substances. This method has the advantages of simple operation, low cost, and high portability, making it suitable for rapid on-site detection. However, the application of existing digital image colorimetric analysis technology in the detection of fluoride in water quality still faces challenges, such as the specificity of the colorimetric system, correction for environmental interference, and issues related to data reliability and security.
[0004] While some existing water quality detection methods are based on digital image colorimetric analysis, these methods typically employ a single colorimetric system, such as zirconium alizarin sulfonate or xylenol orange. These systems have limited specificity for fluoride ion recognition and are easily affected by the water matrix. Furthermore, existing technologies are inadequate in correcting for environmental interference, lacking an effective dynamic compensation mechanism, resulting in low accuracy and reliability of the detection results.
[0005] In water fluoride detection, data security and reliability are paramount. In existing technologies, detection data is typically stored on local devices or cloud servers, making it susceptible to tampering, loss, or leakage. Therefore, this invention proposes a water fluoride detection method based on digital image colorimetric analysis. Summary of the Invention
[0006] The purpose of this invention is to propose a water fluoride detection method based on digital image colorimetric analysis to address the problems of insufficient specificity of colorimetric systems, imperfect correction for environmental interference, and low data security and reliability in existing technologies.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: a method for detecting fluoride in water quality based on digital image colorimetric analysis, comprising the following steps:
[0008] Step S1: Construct a zirconium-based nanozyme probe with reversible color development function, and achieve specific recognition of fluoride ions through Zr-Mn bimetallic coordination and boric acid modification;
[0009] Step S2: Develop a three-layer paper-based microfluidic chip, immobilize zirconium-based nanozyme probes in hydrophilic channels, and integrate an optical reference array and a distributed temperature control network;
[0010] Step S3: Switch between multiple light sources using a smartphone to simultaneously acquire dual-modal images of reflection and fluorescence.
[0011] Step S4: Extract multi-color space features from the dual-modal image and fuse environmental parameters to construct a dynamic compensation matrix to correct matrix interference;
[0012] Step S5: A lightweight neural network with attention mechanism is used to process the corrected features and output the fluoride concentration and confidence interval.
[0013] Step S6: The detection data is encrypted and written to the blockchain, and data verification and alarm for exceeding the limit are realized through smart contracts.
[0014] Furthermore, step S1 also includes the following sub-steps:
[0015] S1-1, Under an inert atmosphere, a soluble zirconium source, a manganese source, and an organic ligand containing boric acid groups are dissolved in a polar organic solvent in a predetermined ratio to form a precursor solution;
[0016] S1-2, the precursor solution is transferred to a pressure-resistant reaction vessel and hydrothermal reaction is carried out in a closed environment to generate zirconium-manganese bimetallic organic framework material.
[0017] S1-3 After the hydrothermal reaction is completed, the precipitate is collected by solid-liquid separation and washed alternately with low-boiling-point organic solvent and deionized water to obtain zirconium-manganese bimetallic organic framework precipitate.
[0018] S1-4, the zirconium-manganese bimetallic organic framework precipitate was redispersed in deionized water and freeze-dried to obtain porous nanoenzyme powder.
[0019] S1-5, mix nanozyme powder with a weakly acidic buffer solution, and stir to disperse it evenly to form a nanozyme suspension with reversible color development function;
[0020] S1-6: After mixing the nanozyme suspension with the lyophilization protectant, the mixture is dropped into the mold and then subjected to a second lyophilization to form a solid colorimetric detection unit.
[0021] S1-7. The dried colorimetric detection unit is sealed and stored under light-proof and dry conditions to obtain a zirconium-based nanozyme probe with reversible colorimetric function, which can be used for fluoride ion detection.
[0022] Furthermore, step S2 also includes the following sub-steps:
[0023] S2-1, cellulose-based filter paper is selected as the substrate material, and a hydrophobic barrier pattern is formed on the substrate surface by photolithography to define hydrophilic channels;
[0024] S2-2, three independently patterned substrates are prepared, which serve as the sample introduction layer, probe reaction layer and optical detection layer, respectively;
[0025] S2-3, three independently patterned substrates are aligned and stacked, and bonded together by UV-curing adhesive to form a vertical flow channel that runs through the three layers;
[0026] S2-4, Zirconium-based nanozyme probes are immobilized in the middle section of the probe reaction layer using microdispensing technology;
[0027] S2-5, a reference array containing the three primary colors of cyan, magenta and yellow is printed on the optical detection layer;
[0028] S2-6 involves vacuum-attaching a polyimide heating film to the back of the chip and integrating at least three temperature sensors to form a distributed temperature control network.
[0029] Furthermore, step S3 also includes the following sub-steps:
[0030] S3-1, Establish a two-way digital communication connection between the smartphone and the multi-band light source, generate and send digital control commands through the mobile application, the multi-band light source has visible light band and ultraviolet light band emission capabilities, and the digital control commands include wavelength selection function, light intensity adjustment function and trigger timing control function;
[0031] S3-2, according to digital control instructions, controls the light source to alternately output the continuous spectrum required for reflection imaging and the pulsed narrowband spectrum required for fluorescence excitation;
[0032] S3-3 synchronously controls the mobile phone camera to continuously acquire images in reflective imaging mode, and starts fluorescence image acquisition after detecting a fluorescence trigger signal to obtain paired reflective and fluorescence dual-modal images;
[0033] S3-4 acquires environmental parameters through the built-in environmental sensor of the smartphone and writes the environmental parameters into the metadata storage area of the dual-modal image file.
[0034] Furthermore, step S4 also includes the following sub-steps:
[0035] S4-1 uses a zirconium-based nanozyme probe to coordinate with fluoride ions to form a recognizable color change, thus locating the colorimetric reaction region in a dual-modal image.
[0036] S4-2, Perform pixel-level segmentation on the color reaction area and extract multi-color space features from the segmented area. The multi-color space features include channel intensity features based on RGB color space and chromaticity features based on Lab color space.
[0037] S4-3, performs feature-level fusion of environmental parameters in the metadata storage area with multi-color space features to construct a feature representation for environmental perception;
[0038] S4-4, A dynamic compensation matrix is generated through a distribution alignment algorithm. The dynamic compensation matrix can eliminate the feature distribution shift caused by differences in water quality matrix.
[0039] S4-5 performs a linear transformation between the environmental perception feature representation and the dynamic compensation matrix to obtain the standardized feature output after matrix effect correction.
[0040] Furthermore, step S5 also includes the following sub-steps:
[0041] S5-1 constructs a lightweight neural network with an attention mechanism, receives dynamically compensated feature input, and generates weighted feature representations by automatically learning the importance relationship between feature channels;
[0042] S5-2 uses fluoride concentration labeled data to train a lightweight neural network, optimizes the network parameters through the backpropagation algorithm, and outputs the concentration prediction value and the confidence interval calculated based on Monte Carlo Dropout.
[0043] S5-3, Perform mobile adaptation processing on the trained neural network, the mobile adaptation processing includes weight quantization, computation graph fusion and hardware adaptation instruction set optimization;
[0044] S5-4 deploys the adapted neural network to portable devices to establish an offline detection process.
[0045] Furthermore, step S6 also includes the following sub-steps:
[0046] S6-1, Select a blockchain platform that supports smart contract execution to build a distributed evidence storage network, configure at least three consensus nodes to form a Byzantine fault-tolerant cluster, and deploy data verification services and maintain a complete copy of the ledger on each consensus node;
[0047] S6-2 uses an asymmetric encryption algorithm to digitally sign the detection results, packages the signed data with the collection timestamp and device identifier to generate a data block, and appends it to the end of the blockchain after consensus verification.
[0048] S6-3: Write automatic verification logic code and deploy it as an on-chain smart contract to verify the signature validity, timestamp continuity and device identity legitimacy when data is uploaded to the chain, and reject the writing of data that does not conform to the preset rules;
[0049] S6-4: Pre-set fluoride concentration threshold judgment conditions in the smart contract. When the detected data exceeds the threshold, an alarm message is automatically sent to the preset regulatory platform and the data is marked as a high-risk record.
[0050] S6-5: Develop a data access interface service that conforms to the REST specification. The interface uses digital certificates for identity authentication, and authorized users can use the interface to query historical detection records on the blockchain and verify data integrity.
[0051] The beneficial effects of the technical solution provided by this invention include at least the following:
[0052] This invention constructs a zirconium-based nanozyme probe with reversible color development function, which achieves specific recognition of fluoride ions. This not only improves the sensitivity and selectivity of detection, but also effectively avoids interference from other ions, significantly improving the accuracy and reliability of detection.
[0053] This invention achieves real-time correction of water quality matrix interference by constructing a dynamic compensation matrix, which can effectively eliminate the influence of environmental factors on the test results and ensure the stability and accuracy of the test results.
[0054] This invention significantly improves data security and reliability by encrypting the detection data and writing it into the blockchain, and using smart contracts to realize data verification and alarm for exceeding limits. It ensures the authenticity and integrity of the data, enables timely detection and processing of abnormal data, and meets the needs of supervision and emergency response.
[0055] This invention enables rapid on-site detection by coordinating the switching of multi-band light sources with a smartphone and simultaneously acquiring dual-modal images of reflection and fluorescence. It is not only simple to operate and low in cost, but also meets the needs of scenarios with limited resources or on-site detection, significantly improving the portability and practicality of water fluoride detection. Attached Figure Description
[0056] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0057] Figure 1 This is a flowchart of a method provided in an embodiment of the present invention. Detailed Implementation
[0058] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a water fluoride detection method based on digital image colorimetric analysis proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0059] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0060] The following examples are for illustrative purposes only and are not intended to limit the scope of the invention.
[0061] The following description, in conjunction with the accompanying drawings, details a specific scheme for a water fluoride detection method based on digital image colorimetric analysis provided by the present invention.
[0062] Please see Figure 1 The diagram illustrates a flowchart of a water fluoride detection method based on digital image colorimetric analysis according to an embodiment of the present invention. The method includes the following steps:
[0063] Step S1: Construct a zirconium-based nanozyme probe with reversible color development function, and achieve specific recognition of fluoride ions through Zr-Mn bimetallic coordination and boric acid modification;
[0064] Step S1 further includes the following sub-steps:
[0065] S1-1, Under an inert atmosphere, a soluble zirconium source, a manganese source, and an organic ligand containing boric acid groups are dissolved in a polar organic solvent in a predetermined ratio to form a precursor solution;
[0066] S1-2, the precursor solution is transferred to a pressure-resistant reaction vessel and hydrothermal reaction is carried out in a closed environment to generate zirconium-manganese bimetallic organic framework material.
[0067] S1-3 After the hydrothermal reaction is completed, the precipitate is collected by solid-liquid separation and washed alternately with low-boiling-point organic solvent and deionized water to obtain zirconium-manganese bimetallic organic framework precipitate.
[0068] S1-4, the zirconium-manganese bimetallic organic framework precipitate was redispersed in deionized water and freeze-dried to obtain porous nanoenzyme powder.
[0069] S1-5, mix nanozyme powder with a weakly acidic buffer solution, and stir to disperse it evenly to form a nanozyme suspension with reversible color development function;
[0070] S1-6: After mixing the nanozyme suspension with the lyophilization protectant, the mixture is dropped into the mold and then subjected to a second lyophilization to form a solid colorimetric detection unit.
[0071] S1-7. The dried colorimetric detection unit is sealed and stored under light-proof and dry conditions to obtain a zirconium-based nanozyme probe with reversible colorimetric function, which can be used for fluoride ion detection.
[0072] It should be noted that soluble zirconium sources refer to any compound that can release zirconium in aqueous solutions or polar organic solvents, including zirconium chloride, zirconium oxynitrate, and zirconium sulfate, which provide zirconium metal nodes for the final framework.
[0073] Manganese source: refers to soluble salts that can release manganese in the reaction medium, including manganese sulfate, manganese chloride and manganese acetate. The introduction of manganese can give the framework additional electronic / magnetic centers and enhance catalytic activity in conjunction with zirconium nodes.
[0074] Organic ligands containing boric acid groups: These are compounds whose molecules contain the structure –B(OH)2 or –B(OR)2, including phenylboronic acid, 4-carboxyphenylboronic acid and 2-aminophenylboronic acid. The boric acid group can reversibly chelate with fluoride ions when the pH changes, thus achieving specific recognition of fluoride.
[0075] Polar organic solvents: These are polar solvents that can dissolve inorganic salts and organic ligands, including N,N-dimethylformamide (DMF), dimethyl sulfoxide (DMSO), ethanol, methanol, ethylene glycol, and mixtures thereof. Polarity facilitates the coordination reaction between metal ions and ligands.
[0076] Precursor solution: refers to the homogeneous and transparent solution formed after the zirconium source, manganese source and boric acid ligand are completely dissolved in the solvent, which is the raw material solution for subsequent hydrothermal reactions.
[0077] Pressure-resistant reaction vessels: These are closed containers that can withstand the self-generated pressure of the reaction system and do not react with the reactants, including PTFE-lined stainless steel autoclaves and glass-lined reaction vessels.
[0078] Hydrothermal reaction: refers to a synthesis reaction carried out in a closed system at a temperature higher than the boiling point of the solvent. Hydrothermal conditions promote the self-assembly of metal ions and ligands to form a three-dimensional porous metal-organic framework (MOF) structure.
[0079] Solid-liquid separation: including centrifugation, filtration or vacuum filtration, is used to separate the generated solid product from the mother liquor and remove unreacted impurities.
[0080] Low-boiling-point organic solvents: These are volatile solvents with boiling points below 120°C, including methanol, ethanol, and acetone, used for repeated washing to remove residual ligands and metal ions.
[0081] Deionized water: High-purity water with a resistivity ≥18MΩ·cm, used for final washing to remove ionic impurities and prevent salt precipitation during subsequent freeze-drying.
[0082] Freeze-drying: also known as lyophilization, involves rapidly freezing the sample and then sublimating the solvent under vacuum to obtain a fluffy, non-collapsed, high specific surface area dry powder while maintaining the integrity of the skeletal pores.
[0083] Weakly acidic buffer: A buffer system with a pH range of 3.5–5.0, including acetate-sodium acetate and citrate-sodium citrate, to ensure that the colorimetric reaction occurs within the optimal acidity of the probe and is reversible.
[0084] Freeze-drying protectants: These are additives of sugars, polyols, and polymers (trehalose, mannitol, PVP) that prevent protein or skeletal structures from collapsing or agglomerating during freeze-drying.
[0085] Mold: including silicone microporous plate, polytetrafluoroethylene template and 3D printed microcavity, used to control the shape, thickness and consistency of dry micro pellets.
[0086] Light-proof, dry, and airtight storage: This refers to placing the final solid-state colorimetric unit in an aluminum foil bag, an inert gas-filled bag, or a vacuum bag to avoid performance degradation caused by light, moisture, and oxygen.
[0087] Step S2: Develop a three-layer paper-based microfluidic chip, immobilize zirconium-based nanozyme probes in hydrophilic channels, and integrate an optical reference array and a distributed temperature control network;
[0088] Step S2 further includes the following sub-steps:
[0089] S2-1, cellulose-based filter paper is selected as the substrate material, and a hydrophobic barrier pattern is formed on the substrate surface by photolithography to define hydrophilic channels;
[0090] S2-2, three independently patterned substrates are prepared, which serve as the sample introduction layer, probe reaction layer and optical detection layer, respectively;
[0091] S2-3, three independently patterned substrates are aligned and stacked, and bonded together by UV-curing adhesive to form a vertical flow channel that runs through the three layers;
[0092] S2-4, Zirconium-based nanozyme probes are immobilized in the middle section of the probe reaction layer using microdispensing technology;
[0093] S2-5, a reference array containing the three primary colors of cyan, magenta and yellow is printed on the optical detection layer;
[0094] S2-6 involves vacuum-attaching a polyimide heating film to the back of the chip and integrating at least three temperature sensors to form a distributed temperature control network.
[0095] It should be noted that the specific process of developing the three-layer paper-based microfluidic chip is as follows:
[0096] 1. Material pretreatment: Place the cellulose filter paper in a 105℃ oven and dry for 30 minutes to remove residual moisture and ensure uniform adhesion of the photoresist.
[0097] 2. Photolithographic patterning: Spin-coat a 15μm thick photoresist onto the paper surface; expose the mask under a UV lamp for 30s; develop and rinse to form a 0.2–0.4mm wide hydrophilic channel.
[0098] 3. Prepare three independent patterned substrates: the introduction layer is prepared by laser drilling of 1mm diameter injection holes; the reaction layer is prepared by reserving a 3mm×3mm probe area; the detection layer is prepared by screen printing a CMY dot matrix with a spacing of 0.5mm.
[0099] 4. Interlayer alignment bonding: UV-LED curing for 3 seconds ensures vertical through-hole alignment error of <50μm, guaranteeing liquid flow from top to bottom.
[0100] 5. Probe fixation: 5×5 micro-dispensing array, 2nL per dot, 0.5mm spacing between dots; after vacuum drying for 30min, the probe is firmly embedded in the fiber network.
[0101] 6. Reference array curing: After screen printing, bake at 120℃ for 5 minutes to cross-link the pigments and prevent diffusion.
[0102] 7. Heating film attachment: After the PI film is pre-punched with positioning holes, it is vacuum-attached to the back of the chip, and silver paste is used to spot-weld the leads to form a distributed temperature measurement closed loop.
[0103] 8. Sealing and storage: Place the completed chip in an aluminum foil bag filled with desiccant, vacuum seal it, and store it at room temperature away from light for ≥12 months.
[0104] Cellulose-based filter paper: a porous filter material made primarily of plant cellulose, typically with a basis weight of 80–250 g / m³. 2 It has good hydrophilicity and mechanical strength, and can be used as a flexible substrate for microfluidic chips.
[0105] Photolithography: Using ultraviolet exposure, mask patterning and development processes, a hydrophobic wax or photocurable resin barrier is formed on the surface of filter paper, thereby defining the shape and size of the hydrophilic channel. The typical wax pattern thickness is 20–50 μm, and the width can be designed according to fluid requirements.
[0106] Hydrophobic barrier: refers to the hydrophobic layer left on the surface of filter paper after photolithography. Its function is to allow water to flow only in the uncovered area, forming a "wall-channel" structure to prevent the liquid from spreading laterally.
[0107] Hydrophilic channels: The areas of the filter paper not covered by the hydrophobic layer have capillary absorption capabilities and serve as the flow path and reaction site for samples, probes, and chromogenic products.
[0108] Patterned substrate: refers to filter paper with a specific microchannel pattern after photolithography. This invention uses three independent substrates: sample introduction layer: entrance and distribution channel; probe reaction layer: fixation of colorimetric probe; optical detection layer: providing optical signal reading and reference.
[0109] Vertical flow channel: After aligning three layers of filter paper, through holes formed by laser drilling or mechanical punching are created, allowing liquid to pass through each layer in the Z direction, realizing "top-down" interlayer transport.
[0110] UV-curing adhesive: An acrylic or epoxy adhesive that cures rapidly under ultraviolet light, used to permanently bond three layers of filter paper, preventing interlayer leakage while maintaining transparency and not affecting the light path.
[0111] Microdispensing technology: Using microinjectors, piezoelectric printheads or inkjet dispensing machines, liquid probes ranging from picoliters to nanoliters are precisely dropped onto designated channel areas, and after drying, they form a solid microarray, ensuring that the probe position and dosage are consistent.
[0112] Zirconium-based nanozyme probe: the final product of step S1, in the form of solid microspheres or dry powder, containing a zirconium-manganese bimetallic organic framework with reversible color development function, and its color / fluorescence undergoes a reversible change upon contact with fluoride ions.
[0113] Optical reference array: A 3×2 or 4×3 color block matrix is formed by screen printing or inkjet printing of cyan, magenta and yellow inks onto the optical detection layer. It is used to correct light source fluctuations, camera white balance and background interference in real time.
[0114] Polyimide heating film: A flexible, heat-resistant thin-film heater capable of uniformly heating the entire chip, with a thickness of 25–75 μm and a power density of 0.1–0.5 W / cm². 2 Distributed resistor strips are implemented by screen printing silver paste circuitry.
[0115] Distributed temperature control network: refers to the integration of ≥3 miniature temperature sensors (NTC thermistors or digital temperature chips) on the back or side edge of the chip, which are controlled by a closed loop MCU to achieve a constant temperature of ±0.5℃ in the entire reaction zone.
[0116] Bonding and encapsulation: The three layers of filter paper are aligned with UV-cured adhesive, pressure is applied, and UV irradiation is performed for 5–10 seconds to complete the bonding. The entire assembly is then encapsulated in a transparent PET bag or aluminum foil bag to prevent moisture absorption and contamination.
[0117] Step S3: Switch between multiple light sources using a smartphone to simultaneously acquire dual-modal images of reflection and fluorescence.
[0118] Step S3 further includes the following sub-steps:
[0119] S3-1 establishes a two-way digital communication connection between the smartphone and the multi-band light source, generates and sends digital control commands through the mobile application, and the multi-band light source has the ability to emit in the visible light band and the ultraviolet light band. The digital control commands include wavelength selection function, light intensity adjustment function and trigger timing control function.
[0120] S3-2, according to digital control instructions, controls the light source to alternately output the continuous spectrum required for reflection imaging and the pulsed narrowband spectrum required for fluorescence excitation;
[0121] S3-3 synchronously controls the mobile phone camera to continuously acquire images in reflective imaging mode, and starts fluorescence image acquisition after detecting a fluorescence trigger signal to obtain paired reflective and fluorescence dual-modal images;
[0122] S3-4 acquires environmental parameters through the built-in environmental sensor of the smartphone and writes the environmental parameters into the metadata storage area of the dual-modal image file.
[0123] It should be noted that a smartphone refers to a general-purpose mobile terminal (Android or iOS phone) equipped with a camera, Bluetooth / Wi-Fi, accelerometer, ambient light / temperature and humidity sensor, and capable of running custom apps, used for light source control, image acquisition, data caching and uploading.
[0124] Two-way digital communication connection: refers to the point-to-point or star network established between the mobile phone and the light source via Bluetooth 4.0 / 5.0, Wi-Fi or USB-C / OTG protocols, enabling the mobile phone to send commands and receive light source status feedback in real time.
[0125] Mobile application: refers to user-side software, which is responsible for generating digital control instructions (JSON, BLE byte packets or custom protocols) and providing a UI for users to select wavelength, light intensity, trigger timing and start / stop detection with one click.
[0126] Multi-band light source: refers to a composite light source that can cover visible light (400–700nm) and ultraviolet light (300–400nm). Typical devices include: multiple narrowband LED arrays (470nm, 530nm, 610nm, 365nm), white LED + filter wheel / liquid crystal tunable filter and miniature xenon lamp + fiber optic coupling.
[0127] Wavelength selection function: This refers to the APP controlling the light source drive circuit to switch or scan wavelengths according to detection requirements, avoiding manual filter replacement and improving automation.
[0128] Light intensity adjustment function: refers to continuously adjusting the LED current through PWM duty cycle or constant current drive to ensure that the signal-to-noise ratio of the reflected and fluorescent images is consistent.
[0129] Trigger timing control function: This refers to the timing table defined by the APP for "constant reflection → fluorescence pulse" to ensure that the camera and the light source are synchronized and to avoid missing frames or overexposure.
[0130] Continuous spectrum: refers to the continuous visible light output by white LEDs or broadband LED arrays, used for reflection imaging (observation of color changes).
[0131] Narrow-band pulsed spectroscopy: refers to short-pulse ultraviolet light output from a narrow-band ultraviolet LED at 365nm or 420nm, used to excite fluorescence signals.
[0132] Reflective imaging mode: refers to the mode in which the camera continuously acquires data at a high frame rate under visible light illumination, used to capture color changes in color development reactions.
[0133] Fluorescence trigger signal: refers to a TTL pulse or GPIO level change generated by the APP or hardware, which notifies the camera to switch to long exposure + ultraviolet cutoff filter mode and start fluorescence image acquisition.
[0134] Paired reflectance and fluorescence bimodal images: refer to RGB reflectance images and grayscale / pseudocolor fluorescence images acquired at the same time or at the same pixel coordinates, which complement each other.
[0135] Mobile phone camera: refers to the main camera or macro lens of the mobile phone, which must support manual focus, manual exposure, RAW output and external triggering (via HAL).
[0136] Environmental sensors: These refer to the temperature sensor, humidity sensor, and ambient light sensor built into the phone. Data is acquired in real time through AndroidSensorManager or iOSCoreMotion.
[0137] Metadata storage area: refers to EXIF header, JPEGAPP1, private TIFF fields or independent JSON side-car file, used to write temperature, humidity, light intensity, device ID, timestamp.
[0138] Step S4: Extract multi-color space features from the dual-modal image and fuse environmental parameters to construct a dynamic compensation matrix to correct matrix interference;
[0139] Step S4 further includes the following sub-steps:
[0140] S4-1 uses a zirconium-based nanozyme probe to coordinate with fluoride ions to form a recognizable color change, thus locating the colorimetric reaction region in a dual-modal image.
[0141] S4-2, the color reaction area is segmented at the pixel level, and multi-color space features are extracted from the segmented area. The multi-color space features include channel intensity features based on RGB color space and chromaticity features based on Lab color space.
[0142] S4-3, performs feature-level fusion of environmental parameters in the metadata storage area with multi-color space features to construct a feature representation for environmental perception;
[0143] S4-4, a dynamic compensation matrix is generated through a distribution alignment algorithm. The dynamic compensation matrix can eliminate the feature distribution shift caused by differences in water quality matrix.
[0144] S4-5 performs a linear transformation between the environmental perception feature representation and the dynamic compensation matrix to obtain the standardized feature output after matrix effect correction.
[0145] It should be noted that the zirconium-based nanozyme probe refers to the solid chromogenic unit obtained in step S1, which contains a zirconium-manganese bimetallic active center. After fluoride ions coordinate with it, the chromogenic group undergoes reversible electron transfer, producing a color or fluorescence change that is visible to the naked eye.
[0146] Dual-modal images refer to reflection images acquired at the same time: RGB images obtained under white light illumination and fluorescence images: grayscale or pseudo-color images obtained after ultraviolet / blue light excitation; the two complement each other, improving the signal-to-noise ratio and anti-interference ability.
[0147] Colorimetric reaction area: refers to the set of pixels whose color / fluorescence changes after the probe reacts with fluoride ions. It needs to be accurately located by segmentation algorithm to avoid background interference.
[0148] Pixel-level segmentation: refers to separating the colored area from the background using a single pixel as the smallest unit, including threshold segmentation, improved U-Net, and deep learning models such as Mask R-CNN.
[0149] Multi-color space features: refers to simultaneously extracting numerical values from the following color descriptors:
[0150] RGB: Intensity of red, green, and blue channels;
[0151] Lab: L* Brightness, a* Green-Red, b* Blue-Yellow Dimension Components.
[0152] Metadata storage area: refers to the image file header, used to store environmental parameters such as temperature, humidity, light intensity, and device ID.
[0153] Feature-level fusion refers to concatenating color features (12–18 dimensions) with environmental parameters (3–5 dimensions) into a 15–23 dimensional vector to form an "environment-aware" input, enabling subsequent models to "see" both color and surrounding conditions simultaneously.
[0154] Distribution alignment algorithms refer to methods that can make the feature distribution of different batches / different water quality samples consistent without requiring a large number of labels. These include CORAL, MMD, and Adversarial Domain Adaptation. They output a compensation matrix that maps the "offset" features to a unified space.
[0155] Dynamic compensation matrix: refers to the linear transformation matrix M that is updated in real time with changes in the environment, satisfying the condition that the corrected feature = M × the original feature; during the online inference stage, M is recalculated in real time based on the on-site temperature and turbidity to ensure detection accuracy.
[0156] Matrix effect: refers to the color / fluorescence signal drift caused by turbidity, color, and coexisting ions in the water sample. It must be eliminated by a compensation matrix, otherwise false positives or false negatives will occur.
[0157] Standardized feature output: refers to the feature vector after linear transformation by the compensation matrix. Its numerical range and distribution center are consistent with the calibration dataset. It can be directly fed into the neural network regression model without recalibration.
[0158] Step S5: A lightweight neural network with attention mechanism is used to process the corrected features and output the fluoride concentration and confidence interval.
[0159] Step S5 further includes the following sub-steps:
[0160] S5-1 constructs a lightweight neural network with an attention mechanism, receives dynamically compensated feature input, and generates weighted feature representations by automatically learning the importance relationship between feature channels;
[0161] S5-2 uses fluoride concentration labeled data to train a lightweight neural network, optimizes the network parameters through the backpropagation algorithm, and outputs the concentration prediction value and the confidence interval calculated based on Monte Carlo Dropout.
[0162] S5-3 performs mobile adaptation processing on the trained neural network. Mobile adaptation processing includes weight quantization, computation graph fusion, and hardware adaptation instruction set optimization.
[0163] S5-4 deploys the adapted neural network to portable devices to establish an offline detection process.
[0164] It should be noted that the attention mechanism is an algorithm that allows the network to automatically "focus" on important channels / pixels. In lightweight CNNs, channel attention (SE-block) or spatial-channel hybrid attention is usually used. Weights are generated by global average pooling and two fully connected layers, and then multiplied with the original feature map to achieve "amplification of important information and suppression of redundant information".
[0165] Lightweight neural networks: These refer to deep models with ≤1MB of parameters and ≤50ms inference latency, including MobileNet-V3, EfficientNet-Lite, and GhostNet. Core techniques include depthwise separable convolution: splitting standard convolution into "channel-wise convolution + 1×1 point convolution", reducing computation to 1 / 8–1 / 9; channel pruning: removing channels with low contribution; and quantization: compressing 32-bit floating-point weights into 8-bit integers or 4-bit mixed precision.
[0166] Dynamically compensated feature input: refers to the 15-23 dimensional feature vector (color + environmental parameters) after correction by the S4 dynamic compensation matrix, which is directly fed into the first layer of the network without the need for additional manual feature engineering.
[0167] Fluoride concentration labeling data: refers to a collection of samples with actual concentration labels, including: groundwater, tap water, and river water samples measured by ion chromatography; and laboratory-prepared 0.001–10 mg / L gradient standard solutions.
[0168] Backpropagation algorithm: refers to the standard training process of error backpropagation + Adam / SDG optimizer: Forward: the network outputs the predicted concentration; loss: the mean square error between the predicted value and the true value + confidence error; Backward: the gradient is propagated back to each layer along the computation graph to update the weights.
[0169] Monte Carlo Dropout: During the inference phase, Dropout is kept on (typically p = 0.1), and the forward propagation is repeated N times (N ≥ 50) to obtain N predicted values; concentration = mean of N predictions; confidence interval = mean ± 1.96 × standard deviation. Model uncertainty can be provided without an additional model.
[0170] Mobile adaptation processing: refers to the complete set of optimizations that convert the trained model into a model that can run offline on mobile phones, Raspberry Pi, and MCU.
[0171] Weighted quantization: INT8 / FP16 / mixed precision.
[0172] Computation graph fusion: Combine Conv+BN+ReLU into a single operator to reduce memory read and write operations.
[0173] Instruction set optimization: Rewrite convolution kernels and matrix multiplication for SIMD instructions from ARMNEON, Qualcomm Hexagon, and AppleAMX.
[0174] Offline detection process: This refers to the detection process that can be completed without cloud or server access: data acquisition → image preprocessing → dynamic compensation → network inference → result output → blockchain uploading; all code and weights are embedded in the APP or embedded firmware, and it can still work even when the network is disconnected.
[0175] Step S6: The detection data is encrypted and written to the blockchain, and data verification and alarm for exceeding the limit are realized through smart contracts;
[0176] Step S6 further includes the following sub-steps:
[0177] S6-1, Select a blockchain platform that supports smart contract execution to build a distributed evidence storage network, configure at least three consensus nodes to form a Byzantine fault-tolerant cluster, and deploy data verification services and maintain a complete copy of the ledger on each consensus node;
[0178] S6-2 uses an asymmetric encryption algorithm to digitally sign the detection results, packages the signed data with the collection timestamp and device identifier to generate a data block, and appends it to the end of the blockchain after consensus verification.
[0179] S6-3: Write automatic verification logic code and deploy it as an on-chain smart contract to verify the signature validity, timestamp continuity and device identity legitimacy when data is uploaded to the chain, and reject the writing of data that does not conform to the preset rules;
[0180] S6-4: Pre-set fluoride concentration threshold judgment conditions in the smart contract. When the detected data exceeds the threshold, an alarm message is automatically sent to the preset regulatory platform and the data is marked as a high-risk record.
[0181] S6-5: Develop a data access interface service that conforms to the REST specification. The interface uses digital certificates for identity authentication, and authorized users can use the interface to query historical detection records on the blockchain and verify data integrity.
[0182] It should be noted that the blockchain platform refers to the distributed ledger technology that supports smart contracts. In this embodiment, Hyperledger Fabric (consortium blockchain) is selected, which provides pluggable consensus, private data sets and identity management, and is suitable for water quality supervision.
[0183] Distributed Evidence Storage Network: A P2P network consisting of ≥3 consensus nodes. Nodes can be deployed on cloud servers and edge gateways. Nodes communicate with each other through gRPC or libp2p to jointly maintain a unique ledger and prevent single point of tampering.
[0184] Byzantine Fault-Tolerant Cluster: The consensus algorithm uses PBFT, which can tolerate ≤1 / 3 of the nodes acting maliciously or going down, ensuring that consensus can still be reached even when malicious or faulty nodes are present.
[0185] Data verification service: Each node runs chaincode that can verify digital signatures, check timestamp continuity, verify device identity whitelists, and execute threshold alarm logic.
[0186] Ledger copy: Includes a world state database and blockchain log, recording all transaction hashes, timestamps, signatures, and alarm markers. All nodes maintain a complete copy to ensure data redundancy and traceability.
[0187] Asymmetric encryption algorithm: ECC-256 is used to generate a public / private key pair. The device-side private key performs SHA-256 hashing and ECDSA signing on the original detection data, while the public key is made public for on-chain verification.
[0188] Consensus verification: After receiving a new block, a node runs a three-stage process of consensus algorithm endorsement, sorting, and submission. Only after confirming that the signature is valid, the timestamp is incremented, and the device certificate is on the on-chain whitelist, is it appended to the end of the ledger.
[0189] Fluoride concentration threshold judgment condition: Write the global variable threshold during contract initialization, support on-chain governance, and the alarm message includes: the value exceeding the limit, the block height, the device ID, and the timestamp.
[0190] Digital certificate authentication: X.509 certificates (issued by a CA) are used, and API requests must include the client's certificate. The server uses mTLS handshake to verify the certificate chain, ensuring that only authorized users or regulatory platforms can read the data.
[0191] Data integrity verification: After receiving the historical records, the client can recalculate the SHA-256 of each record and compare it with the hash on the chain; if they do not match, it is considered that the record has been tampered with, the system will refuse service and issue an automatic alarm.
[0192] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for detecting fluoride in water quality based on digital image colorimetric analysis, characterized in that, Includes the following steps: Step S1: Construct a zirconium-based nanozyme probe with reversible color development function, and achieve specific recognition of fluoride ions through Zr-Mn bimetallic coordination and boric acid modification; Step S2: Develop a three-layer paper-based microfluidic chip, immobilize zirconium-based nanozyme probes in hydrophilic channels, and integrate an optical reference array and a distributed temperature control network; Step S3: Switch between multiple light sources using a smartphone to simultaneously acquire dual-modal images of reflection and fluorescence. Step S4: Extract multi-color space features from the dual-modal image and fuse environmental parameters to construct a dynamic compensation matrix to correct matrix interference; Step S5: A lightweight neural network with attention mechanism is used to process the corrected features and output the fluoride concentration and confidence interval. Step S6: The detection data is encrypted and written to the blockchain, and data verification and alarm for exceeding the limit are realized through smart contracts.
2. The water fluoride detection method based on digital image colorimetric analysis according to claim 1, characterized in that: Step S1 further includes the following sub-steps: S1-1, Under an inert atmosphere, a soluble zirconium source, a manganese source, and an organic ligand containing boric acid groups are dissolved in a polar organic solvent in a predetermined ratio to form a precursor solution; S1-2, the precursor solution is transferred to a pressure-resistant reaction vessel and hydrothermal reaction is carried out in a closed environment to generate zirconium-manganese bimetallic organic framework material. S1-3 After the hydrothermal reaction is completed, the precipitate is collected by solid-liquid separation and washed alternately with low-boiling-point organic solvent and deionized water to obtain zirconium-manganese bimetallic organic framework precipitate. S1-4, the zirconium-manganese bimetallic organic framework precipitate was redispersed in deionized water and freeze-dried to obtain porous nanoenzyme powder. S1-5, mix nanozyme powder with a weakly acidic buffer solution, and stir to disperse it evenly to form a nanozyme suspension with reversible color development function; S1-6: After mixing the nanozyme suspension with the lyophilization protectant, the mixture is dropped into the mold and then subjected to a second lyophilization to form a solid colorimetric detection unit. S1-7. The dried colorimetric detection unit is sealed and stored under light-proof and dry conditions to obtain a zirconium-based nanozyme probe with reversible colorimetric function, which can be used for fluoride ion detection.
3. The water fluoride detection method based on digital image colorimetric analysis according to claim 1, characterized in that: Step S2 further includes the following sub-steps: S2-1, cellulose-based filter paper is selected as the substrate material, and a hydrophobic barrier pattern is formed on the substrate surface by photolithography to define hydrophilic channels; S2-2, three independently patterned substrates are prepared, which serve as the sample introduction layer, probe reaction layer and optical detection layer, respectively; S2-3, three independently patterned substrates are aligned and stacked, and bonded together by UV-curing adhesive to form a vertical flow channel that runs through the three layers; S2-4, Zirconium-based nanozyme probes are immobilized in the middle section of the probe reaction layer using microdispensing technology; S2-5, a reference array containing the three primary colors of cyan, magenta and yellow is printed on the optical detection layer; S2-6 involves vacuum-attaching a polyimide heating film to the back of the chip and integrating at least three temperature sensors to form a distributed temperature control network.
4. The water fluoride detection method based on digital image colorimetric analysis according to claim 1, characterized in that: Step S3 further includes the following sub-steps: S3-1, Establish a two-way digital communication connection between the smartphone and the multi-band light source, generate and send digital control commands through the mobile application, the multi-band light source has visible light band and ultraviolet light band emission capabilities, and the digital control commands include wavelength selection function, light intensity adjustment function and trigger timing control function; S3-2, according to digital control instructions, controls the light source to alternately output the continuous spectrum required for reflection imaging and the pulsed narrowband spectrum required for fluorescence excitation; S3-3 synchronously controls the mobile phone camera to continuously acquire images in reflective imaging mode, and starts fluorescence image acquisition after detecting a fluorescence trigger signal to obtain paired reflective and fluorescence dual-modal images; S3-4 acquires environmental parameters through the built-in environmental sensor of the smartphone and writes the environmental parameters into the metadata storage area of the dual-modal image file.
5. The water fluoride detection method based on digital image colorimetric analysis according to claim 1, characterized in that: Step S4 further includes the following sub-steps: S4-1 uses a zirconium-based nanozyme probe to coordinate with fluoride ions to form a recognizable color change, thus locating the colorimetric reaction region in a dual-modal image. S4-2, Perform pixel-level segmentation on the color reaction area and extract multi-color space features from the segmented area. The multi-color space features include channel intensity features based on RGB color space and chromaticity features based on Lab color space. S4-3, performs feature-level fusion of environmental parameters in the metadata storage area with multi-color space features to construct a feature representation for environmental perception; S4-4, A dynamic compensation matrix is generated through a distribution alignment algorithm. The dynamic compensation matrix can eliminate the feature distribution shift caused by differences in water quality matrix. S4-5 performs a linear transformation between the environmental perception feature representation and the dynamic compensation matrix to obtain the standardized feature output after matrix effect correction.
6. The water fluoride detection method based on digital image colorimetric analysis according to claim 1, characterized in that: Step S5 further includes the following sub-steps: S5-1 constructs a lightweight neural network with an attention mechanism, receives dynamically compensated feature input, and generates weighted feature representations by automatically learning the importance relationship between feature channels; S5-2 uses fluoride concentration labeled data to train a lightweight neural network, optimizes the network parameters through the backpropagation algorithm, and outputs the concentration prediction value and the confidence interval calculated based on Monte Carlo Dropout. S5-3, Perform mobile adaptation processing on the trained neural network, the mobile adaptation processing includes weight quantization, computation graph fusion and hardware adaptation instruction set optimization; S5-4 deploys the adapted neural network to portable devices to establish an offline detection process.
7. The water fluoride detection method based on digital image colorimetric analysis according to claim 1, characterized in that: Step S6 further includes the following sub-steps: S6-1, Select a blockchain platform that supports smart contract execution to build a distributed evidence storage network, configure at least three consensus nodes to form a Byzantine fault-tolerant cluster, and deploy data verification services and maintain a complete copy of the ledger on each consensus node; S6-2 uses an asymmetric encryption algorithm to digitally sign the detection results, packages the signed data with the collection timestamp and device identifier to generate a data block, and appends it to the end of the blockchain after consensus verification. S6-3: Write automatic verification logic code and deploy it as an on-chain smart contract to verify the signature validity, timestamp continuity and device identity legitimacy when data is uploaded to the chain, and reject the writing of data that does not conform to the preset rules; S6-4: Pre-set fluoride concentration threshold judgment conditions in the smart contract. When the detected data exceeds the threshold, an alarm message is automatically sent to the preset regulatory platform and the data is marked as a high-risk record. S6-5: Develop a data access interface service that conforms to the REST specification. The interface uses digital certificates for identity authentication, and authorized users can use the interface to query historical detection records on the blockchain and verify data integrity.
Citation Information
Patent Citations
Fluoride red fluorescent powder and luminescent device based on fluorescent powder
CN111471456A
Water quality fluoride detection method based on digital image colorimetric analysis
CN113945556A
Self-adaptive pre-fusion detection method for gas sensor array
CN116340882A
Magnetic nano-enzyme, enzyme catalysis of magnetic nano-enzyme, immunodetection method of multichannel micro-fluidic chip and application of magnetic nano-enzyme
CN118558362A
MOF (Metal Organic Framework) nano-enzyme, synthesis method and method for detecting fluorine ions by using MOF nano-enzyme
CN118655128A