An ammonium ion intelligent monitoring method based on prussian blue analogue electrochromic response in water body
Patent Information
- Application Number
- CN202511179700.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-22
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2045-08-22
AI Technical Summary
[0004]本发明针对现有水体铵离子监测方法存在依赖化学试剂、操作繁琐、实时性差、难以现场部署等问题,提供了一种基于普鲁士蓝类似物电致变色响应的水体铵离子智能监测方法
[0028] This invention provides an intelligent monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues. Combining the selectivity of electrochemical reactions with the intuitiveness of color responses, it achieves highly sensitive, low-interference, and visualized intelligent monitoring of ammonium ions in water without the need for additional chemical reagents. Through the synergistic effect of image processing algorithms and concentration prediction models, it can accurately reflect the trend of ammonium ion concentration changes and possesses adaptive model switching and automatic early warning capabilities, demonstrating good field adaptability and promising prospects for widespread application. Its beneficial effects are mainly reflected in the following aspects:
Smart Images

Figure CN121027077B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of environmental monitoring technology, specifically relating to an intelligent monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues, used for real-time monitoring and early warning of ammonium ion concentration in water. Background Technology
[0002] Water pollution has always been a key focus of environmental monitoring, as deteriorating water quality poses a threat to ecosystems and human health. Ammonia nitrogen is a crucial indicator of water pollution; its excessive levels can lead to eutrophication, fish poisoning, and drinking water safety hazards. Ammonia nitrogen exists in water in two forms: ammonium ions and free ammonia, and its distribution is related to the pH of the water. In most aquatic environments, the pH is around neutral, and ammonia nitrogen mainly exists as ammonium ions. Therefore, in environmental monitoring, ammonium ions serve as an important indicator pollutant, and their concentration reflects the accumulation of pollutants in the water and the effectiveness of treatment. Currently, commonly used detection methods include Nessler's reagent colorimetric method, ion-selective electrode method, and ion chromatography, but these methods generally suffer from problems such as cumbersome operation, detection lag, expensive instruments, or reagent consumption, making it difficult to meet the needs of continuous on-site monitoring and intelligent management.
[0003] In recent years, electrochromic materials have shown great potential in the sensor field due to their intuitive color response and fast response speed. Prussian blue and its analogues, in particular, exhibit good selectivity and reversible intercalation-deintercalation stability for ammonium ions under applied voltage, and display different redox states during the intercalation-deintercalation process, achieving reversible color changes. However, existing research mainly focuses on reversible adsorption or capacitive deionization behavior, and a systematic approach to quantifying the relationship between color changes and specific ion concentrations is still lacking. Combining image recognition and intelligent recognition models holds promise for developing intelligent monitoring methods for ammonium ions in water that require no chemical reagents or complex operations. Summary of the Invention
[0004] This invention addresses the problems of existing methods for monitoring ammonium ions in water, such as reliance on chemical reagents, cumbersome operation, poor real-time performance, and difficulty in on-site deployment. It provides an intelligent monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues. This method constructs a visual monitoring strategy that integrates selective electrochemical intercalation / deintercalation, image recognition analysis, and intelligent model prediction. It enables in-situ visual identification, continuous dynamic monitoring, and remote early warning of ammonium ion concentration without reagents or electrode replacement, making it particularly suitable for applications such as aquaculture wastewater, aquaculture, and sewage treatment.
[0005] The present invention uses a Prussian blue analogue response electrode with reversible ammonium ion intercalation / deintercalation behavior, utilizes its electrochromic property to produce a significant color change related to ammonium ion concentration at a specific potential, and combines intelligent analysis of an image recognition algorithm to realize ammonium ion monitoring that requires no chemical reagents, no complicated operations and can provide real-time feedback. In this method, the ammonium ion exchange process is regulated by setting the intercalation potential, the deintercalation potential and their durations, color characteristic values are collected and extracted through images, and prediction models between color and ammonium ion concentration in different intervals are constructed and a multi-model library is established in combination with a variety of machine learning algorithms, so that high-sensitivity detection of ammonium ion concentration is realized, and different prediction models can be adaptively switched to adapt to different water background conditions and monitoring requirements. The method supports setting a concentration threshold according to user scenarios, and realizes remote early warning and system linkage control. The method of the present invention not only avoids the problems existing in the aforementioned traditional monitoring methods, but also emphasizes the intelligent feedback and model-driven mechanism at the system level, strengthens the real-time performance, accuracy and scene adaptability to the change of ammonium ion concentration in a complex environment, and improves the system stability, response speed and intelligent level.
[0006] An intelligent water ammonium ion monitoring method based on Prussian blue analogue electrochromic response of the present invention:
[0007] is carried out according to the following steps:
[0008] Step 1, construction of a working electrode: loading a Prussian blue analogue material with reversible electrochromic performance and capable of selectively responding to ammonium ions on a conductive glass substrate to form a working electrode;
[0009] Step 2, assembly of an electrochemical monitoring system: immersing the working electrode, together with a counter electrode and a reference electrode, into water to be measured, connecting to an electrochemical control module with a periodic potential control function, and setting the intercalation potential, duration, deintercalation potential and duration of the working electrode to drive the reversible intercalation / deintercalation of ammonium ions in the working electrode;
[0010] Step 3, collection of electrode color images: in a closed and uniform lighting environment, collecting, by using an image acquisition system, working electrode images after completion of ammonium ion intercalation and deintercalation processes in the working electrode respectively;
[0011] Step 4, image preprocessing and color feature extraction: carrying out electrode region recognition, color space conversion, brightness normalization and noise removal processing on acquired images, extracting color characteristic values, and using the extracted color characteristic values as input variables of a subsequent color-concentration prediction model;
[0012] Step 5: Construct a color-concentration prediction model library: Divide the ammonium ion liquid with a mass concentration of 1–1000 mg / L into several sub-intervals according to the concentration gradient, and prepare standard solutions for each sub-interval; for each sub-interval, set different working electrode insertion / extraction potentials and their duration parameters, and obtain the image and color features of the working electrode in the standard solution according to the methods described in Steps 2, 3, and 4; based on the color feature-ammonium ion concentration dataset collected from each sub-interval, train color-concentration prediction models using machine learning algorithms, and store them in the model library;
[0013] Step Six: Intelligent Monitoring and Early Warning Output: During real-time monitoring, the color feature values extracted from the acquired images are input into the color-concentration prediction model to obtain the predicted value of ammonium ion concentration in the current water body. When the predicted value exceeds the applicable concentration range of the current color-concentration prediction model, the system automatically adjusts the working electrode embedding / de-embedding potential and duration parameters, and switches to other color-concentration prediction models in the model library to achieve continuous monitoring over a wide concentration range. The monitoring system supports users in setting ammonium ion concentration thresholds. When the predicted value exceeds the set ammonium ion concentration threshold, it automatically triggers an audible and visual alarm or remotely sends early warning information via the communication module.
[0014] The working electrode and counter electrode are platinum, titanium, or graphite electrodes. The reference electrode is an Ag / AgCl or Hg / Hg2Cl2 electrode.
[0015] The "suitable sub-intervals" mentioned in this invention refer to multiple predicted concentration intervals within the concentration range of 1–1000 mg / L, based on the magnitude of color change and resolvable accuracy of the CuHCF electrode under different potentials and insertion / extraction durations. Since the color-concentration response range of the electrode under the same potential and time conditions is limited, directly using a single model to cover the entire range would significantly reduce prediction accuracy due to nonlinear distortion. For example, at lower potentials and shorter times, the model is suitable for higher concentration intervals; at higher potentials and longer times, the model is suitable for lower concentration intervals, but may saturate at high concentrations. Therefore, this application divides the total concentration range into multiple sub-intervals, each matched with the optimal potential-time combination conditions, and collects sample data to establish a prediction model (Ri). 2 (≥0.98), store in the model library.
[0016] Furthermore, the Prussian blue analogue is a copper ferrocyanide or a cobalt ferrocyanide.
[0017] Furthermore, the working electrode is formed by loading a Prussian blue analogue onto the surface of ITO or FTO conductive glass using a drop-coating, spin-coating, or electrodeposition method to form a thin film electrode with a thickness of 50–500 nm.
[0018] Furthermore, the periodic potential control includes an ion insertion stage and an extraction stage, which respectively control the entry or release of ammonium ions into the electrode material; the insertion potential is -0.5~0.7V vs. SHE relative to the standard hydrogen electrode, and the extraction potential is 1.0~2.0V vs. SHE relative to the standard hydrogen electrode, with insertion and extraction durations ranging from 0.5~60 s and 1~100 s, respectively; different potential and duration parameters will affect the color response rate of the electrode material and the number of inserted ions, thereby affecting the prediction accuracy and the suitable concentration range.
[0019] Furthermore, the image acquisition system includes a ring-shaped LED light source with a color temperature of 4500–6000 K, a fixed-angle high-definition camera with a resolution of not less than 1920×1080, and a light-collecting cavity with a black anti-reflective inner wall; image acquisition is performed immediately after each embedding and de-embedding reaction.
[0020] Furthermore, the image preprocessing steps include: automatically identifying the electrode region using edge detection or image segmentation algorithms; converting the original RGB image to HSV color space for brightness normalization; applying Gaussian filtering or median filtering algorithms to the electrode image to remove illumination noise; and extracting the average value of RGB or HSV channels, the dominant color, or the color histogram as color feature input variables.
[0021] Furthermore, the aforementioned training of the color-concentration prediction model using machine learning algorithms is based on the color feature values of electrode images of ammonium ion standard solutions at different concentrations collected under different insertion potentials, extraction potentials, and durations. The fitting accuracy R0 is [missing information]. 2 The mean absolute error is not less than 0.98 and not more than 5%; the machine learning algorithm is a multiple linear regression model, a support vector regression model, an artificial neural network model, a decision tree regression model, or a random forest model.
[0022] Furthermore, the automatic adjustment of the insertion / extraction potential and duration parameters is based on an intelligent monitoring method that supports automatic model invocation and switching. When the concentration prediction result exceeds the applicable concentration range of the current model, the electrochemical operation parameters are adjusted according to the detection signal and the model is switched to other suitable models in the model library. The electrochemical operation parameters are insertion and extraction potentials and duration.
[0023] Furthermore, the intelligent monitoring method supports program-controlled cyclic detection, and by setting periodic intercalation-deintercalation reaction electrochemical parameters, image acquisition and recognition prediction processes, it can achieve automatic operation and data updates without human intervention.
[0024] Furthermore, the applicable concentration range for each prediction model in step five refers to the range under the corresponding electrochemical operating parameters that can guarantee the fitting accuracy R.2 The concentration range is not less than 0.98 and the mean absolute error is not higher than 5%.
[0025] Furthermore, the intelligent monitoring method allows users to set ammonium ion concentration thresholds according to different monitoring scenarios. When the predicted value exceeds the set threshold, an audible and visual alarm is automatically triggered or a remote warning message is sent through the communication module to prompt the user to intervene.
[0026] Furthermore, the intelligent monitoring method supports remote communication modules and data recording functions, and has the functions of real-time monitoring of ammonium ion concentration, historical trend recording, local data storage and wireless uploading, so as to realize remote monitoring, intelligent early warning and traceability of monitoring data.
[0027] The present invention has the following beneficial effects:
[0028] This invention provides an intelligent monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues. Combining the selectivity of electrochemical reactions with the intuitiveness of color responses, it achieves highly sensitive, low-interference, and visualized intelligent monitoring of ammonium ions in water without the need for additional chemical reagents. Through the synergistic effect of image processing algorithms and concentration prediction models, it can accurately reflect the trend of ammonium ion concentration changes and possesses adaptive model switching and automatic early warning capabilities, demonstrating good field adaptability and promising prospects for widespread application. Its beneficial effects are mainly reflected in the following aspects:
[0029] 1. In-situ electrochromic feedback mechanism: This invention utilizes the reversible color change of Prussian blue materials during the insertion and extraction of ammonium ions to achieve reagent-free, stable, repeatable, and visualized in-situ monitoring feedback. It avoids the pollution, cumbersome procedures, and response lag problems caused by traditional chemical colorimetric methods, and has good response consistency and ease of operation.
[0030] 2. High selectivity and anti-interference capability: The Prussian blue analog electrode used in this invention has the ability to preferentially insert ammonium ions, even in the presence of Na+. + K + Even in complex water bodies where common coexisting ions are present, the system maintains a stable response pattern, ensuring the accuracy and selectivity of the monitoring process.
[0031] 3. Intelligent Image Analysis and Dynamic Model Adjustment: This invention establishes a color-concentration prediction model library through image acquisition and intelligent algorithms (color recognition, machine learning), supporting dynamic switching of the optimal model based on different water body backgrounds and concentration ranges. Combined with concentration prediction and process control, it achieves wide-range, high-throughput, continuous monitoring without electrode replacement, significantly improving operational efficiency and reducing costs.
[0032] 4. Early Warning and Intelligent Operation and Maintenance: This invention supports users in setting concentration thresholds and automatically issues early warnings when thresholds are exceeded, while recording data for historical trend tracking and anomaly identification. The fully automated design of the "embedded recognition - image acquisition - concentration prediction - de-embedded recovery" process makes it suitable for online deployment and intelligent operation and maintenance in various scenarios such as aquaculture wastewater and domestic sewage. Attached Figure Description
[0033] Figure 1 This is a schematic diagram of a smart monitoring platform for ammonium ions in water based on CuHCF Prussian blue analogues.
[0034] Figure 2 The cyclic voltammetric response curves of the CuHCF electrode in different cations are shown.
[0035] Figure 3 The diagram shows the color changes of the CuHCF electrode before and after ammonium ion insertion, from left to right: the initial orange-yellow color gradually changes to a deep red color after ammonium ion insertion.
[0036] Figure 4 The image shows the fitting effect between the actual and predicted values of the constructed ammonium ion concentration-color feature prediction model.
[0037] Figure 5 The graph shows the results of ammonium ion concentration changes predicted under 30 dynamic cycles. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the spirit of the contents disclosed in the present invention will be described in detail below. After understanding the embodiments of the present invention, any person skilled in the art can make changes and modifications based on the technology taught in the present invention without departing from the spirit and scope of the present invention.
[0039] The illustrative embodiments and descriptions of the present invention are used to explain the present invention, but are not intended to limit the present invention.
[0040] Example 1:
[0041] This embodiment discloses an intelligent monitoring method for ammonium ions in water based on the electrochromic response of CuHCF Prussian blue analogues. By combining a reversible intercalation-deintercalation mechanism with an image color recognition algorithm, it can achieve rapid judgment and continuous monitoring of the concentration of ammonium ions in water. Figure 1 The diagram shows the structure of the intelligent monitoring platform on which this method is based, which mainly includes an electrochemical reaction module, an image acquisition module, a color recognition module, a concentration prediction module, and a system control module.
[0042] The specific implementation steps of the embodiment are as follows:
[0043] 1. Construction of CuHCF thin film electrodes
[0044] CuHCF powder was synthesized via a coprecipitation method. Specifically, solution A was prepared by dissolving 5 mM K3[Fe(CN)6] in 50 mL of ultrapure water, and solution B was prepared by dissolving 10 mM CuSO4 in 50 mL of ultrapure water. Under continuous stirring (600 rpm), solutions A and B were simultaneously added dropwise to 100 mL of ultrapure water using a constant flow pump at a rate of 0.5 mL / min to ensure thorough mixing. After the reaction was complete, the precipitate was collected by vacuum filtration and washed three times alternately with ultrapure water and ethanol to remove unreacted ions and byproduct impurities. The resulting precipitate was then dried in a vacuum drying oven at 70°C. Subsequently, the obtained CuHCF powder was added to a 5% Nafion solution (1 μL / mg) and ethanol (1.5 μL / mg) solvent and ultrasonically dispersed for 30 min to obtain a homogeneous slurry. The slurry was uniformly coated onto the pretreated ITO conductive glass surface using a coating machine to form a CuHCF film electrode, which was then naturally dried at room temperature for later use. The final film thickness was approximately 300 nm.
[0045] 2. Electrochemical response of CuHCF thin film electrode
[0046] Cyclic voltammetry curves were performed on the CuHCF membrane electrode in 1 M NH4Cl, 1 M KCl, 1 M NaCl, 0.5 M CaCl2, and 0.5 M MgCl2. Figure 2 As shown, reversible redox peaks can be observed in its cyclic voltammetry curves, reflecting the reversible Faraday reaction mechanism caused by the ion insertion / extraction process, and CuHCF in NH4 + The reduction / oxidation peak current response in solution compared to Na + Mg 2+ The plasma was significantly enhanced, reflecting its ability to react with NH4. + Its selective responsiveness. Its insertion order for different cations is: NH4 + (0.93 V) > K + (0.88 V) > Na + (0.78 V) > Ca 2+ (0.77 V) = Mg 2+ (0.77 V). The order of current response intensity for different cations is: NH4 + (5.34 A·g) -1 K + (3.41 A·g) -1 Na + (3.09A·g) -1 Ca2+ (0.91 A·g) -1 )> Mg 2+ (0.03 A·g) -1 This indicates that CuHCF affects NH4+. + The preferential response of CuHCF was observed. During ion insertion, CuHCF gradually changed from orange-yellow to deep red; while during extraction, the electrode returned to its initial color. Therefore, CuHCF exhibits preferential response not only to NH4+. + The intercalation reaction is reversible and selective, and also exhibits an electrochromic response; this color change can be used as a NH4+ ion exchange signal. + In-situ optical indication for embedding / de-embedding.
[0047] 3. Embedding / De-embedding Drivers and Color Image Acquisition
[0048] A CuHCF membrane electrode was used as the working electrode, along with a platinum counter electrode and an Ag / AgCl reference electrode to form a three-electrode system, which was then immersed in the water sample to be tested. An intercalation potential of -0.1 V vs. SHE was set and maintained for 3 s to drive ammonium ions to intercalate into the working electrode. Immediately after the intercalation reaction, images were captured in a sealed light-collecting chamber to obtain electrode images (the image acquisition system includes a ring-shaped LED light source with a color temperature of 4500-6000 K, a fixed-angle high-definition camera with a resolution of no less than 1920×1080, and a light-collecting cavity with a black anti-reflective inner wall; image acquisition was performed immediately after each intercalation and deintercalation reaction). Images are shown below. Figure 3 As shown, the images, from left to right, are acquired after the intercalation reaction in standard solutions ranging from 5 mg / L to 170 mg / L. The colors gradually change from orange-yellow to deep red, reflecting the material's affinity for NH4+. + The significant electrochromic response characteristics were observed. After the intercalation process was completed, a set deintercalation potential (1.2 V vs. SHE, 5 s) was applied to drive the intercalated ammonium ions to be released back into the water. Electrode images were acquired immediately after the deintercalation reaction to determine whether the electrode color had returned to its initial state.
[0049] 4. Image Processing and Color-Density Prediction Model Construction
[0050] Image processing utilizes edge recognition algorithms to locate the electrode reaction area, ensuring the consistency of the extracted area. Subsequently, the image is converted from RGB space to HSV space and normalized. On this basis, Gaussian filtering and other methods are used to remove local noise and pixel fluctuations, improving image quality and recognition stability. Finally, the average value of the three RGB channels in the electrode area is extracted as a color feature, which is used as the input variable for the subsequent color-density prediction model.
[0051] The steps for building the color-concentration prediction model are as follows: Based on the configured standard solution of known concentration, the features of the images acquired after the aforementioned electrochemical processing are extracted to construct a dataset of color features and corresponding concentrations. The dataset is divided into a training set and a test set in a 7:3 ratio. The mean of the RGB channels is used as the input feature and the ammonium ion concentration is used as the output variable. Different machine learning algorithms are used to train the color-concentration prediction model, and 10-fold cross-validation is performed.
[0052] To achieve broad-range concentration identification under different scenarios, color feature data of standard ammonium ion solutions were collected under different electrochemical operating parameters. Three color-concentration prediction models were established and stored in a model library. The fitting results of the three models are shown below. Figure 4 As shown. Model A is a medium concentration model, applicable to concentration ranges of 5-170 mg / L. Electrochemical conditions include an intercalation potential of -0.10 V vs. SHE for 3 s and an intercalation / deintercalation potential of 1.2 V vs. SHE for 5 s. It is trained based on an artificial neural network algorithm, and the fitting accuracy on the test set is R0. 2 =0.993, RMSE = 3.89 mg / L; Model B is a low-concentration model, applicable to concentration ranges of 1–20 mg / L, with electrochemical conditions of intercalation potential -0.20 V vs. SHE for 6 s, and deintercalation potential 1.2 V vs. SHE for 5 s. It was trained using a support vector regression algorithm, and the fitting accuracy on the test set was R0. 2 =0.989, RMSE = 0.608 mg / L; Model C is a high-concentration model, applicable to concentration ranges of 170-850 mg / L, with electrochemical conditions of intercalation potential -0.10 V vs. SHE for 1 s, and deintercalation potential 1.2 V vs. SHE for 5 s. It was trained using a random forest regression algorithm, and the test set fitting accuracy R0 was [value missing]. 2 =0.989, RMSE = 20.77 mg / L. The three models cover different concentration ranges under their respective electrochemical parameters. The system can automatically switch and adjust the insertion / extraction potential and duration based on real-time monitoring results and the applicable range of the model, achieving wide-range continuous monitoring, and the prediction accuracy remains within R... 2 ≥0.98.
[0053] 5. Continuous cyclic monitoring
[0054] To achieve real-time dynamic tracking of ammonium ion concentration in water, this method constructs a continuous cyclic monitoring mechanism based on the color change of a CuHCF electrode. This mechanism relies on the system control module to automatically coordinate the four processes of "embedding recognition - image acquisition - concentration prediction - de-embedding recovery," enabling multi-round, uninterrupted cyclic operation.
[0055] The specific process is as follows: First, by applying a set embedding potential (-0.1 V vs. SHE, 3 s), ammonium ions are driven to embed into the CuHCF electrode material, causing the electrode color to change from orange-yellow to dark red. Then, the image acquisition module immediately acquires the electrode image, the color recognition module completes image preprocessing and color feature extraction, and the concentration prediction module outputs the current concentration of ammonium ions in the water in real time. After recognition is completed, the system automatically switches to the de-embedding stage, applying a de-embedding potential (1.2 V vs. SHE, 5 s) to cause the embedded ammonium ions to release back into the water. Simultaneously, the electrode image is acquired again, and the color difference is compared with the initial state (ΔE calculation) to determine whether the electrode color has returned to its initial state. If the ΔE value is less than 2, the color is considered fully restored, and the next test can proceed. If the color has not been restored, the desorption time is automatically extended, and a reminder is issued.
[0056] Figure 5 The graph shows the ammonium ion concentration changes after 30 dynamic cycle predictions. The results demonstrate that in actual water bodies, this monitoring platform can operate continuously throughout the entire cycle, achieving high-frequency, continuous, reagent-free, and visual monitoring of ammonium ion concentration in the target water body, with good repeatability and long-term stability. This cycle mechanism not only improves monitoring efficiency and response frequency but also allows for setting cycle intervals and monitoring thresholds according to different scenarios, exhibiting good adaptability and engineering expansion potential. Combined with remote communication and data recording modules, it can be expanded into an integrated intelligent water quality monitoring system encompassing online monitoring, dynamic recording, and exceedance early warning.
[0057] The above embodiments verify the effectiveness of the intelligent monitoring method in selective response, color recognition and concentration prediction, and have the advantages of simple operation, rapid response and strong applicability.
Claims
1. A smart monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues, characterized in that, It is done in the following steps: Step 1: Constructing the working electrode: A Prussian blue analog material with reversible electrochromic properties and selective response to ammonium ions is loaded onto a conductive glass substrate to form the working electrode; Step 2: Construct an electrochemical monitoring system: Immerse the working electrode, counter electrode, and reference electrode together in the water body to be tested, connect an electrochemical control module with periodic potential control function, and set the insertion potential and duration of the working electrode and the deintercalation potential and duration to drive the reversible insertion / deintercalation of ammonium ions in the working electrode. Step 3: Acquire electrode color images: In a closed, uniformly lit environment, use an image acquisition system to acquire images of the working electrode after the ammonium ion insertion and extraction processes are completed; Step 4: Image preprocessing and color feature extraction: Electrode region identification, color space conversion, brightness normalization, and noise removal are performed on the acquired images to extract color feature values, which are used as input variables for the subsequent color-density prediction model. Step 5: Construct a color-concentration prediction model library: The color-concentration prediction model library consists of three color-concentration prediction models: a low-concentration model, a medium-concentration model, and a high-concentration model. The low-concentration model is applicable to a concentration range of 1–20 mg / L, with electrochemical conditions of an intercalation potential of −0.20 V vs. SHE for 6 s and an intercalation potential of 1.2 V vs. SHE for 5 s. The medium-concentration model is applicable to a concentration range of 5–170 mg / L, with electrochemical conditions of an intercalation potential of −0.10 V vs. SHE for 3 s and an intercalation potential of 1.2 V vs. SHE for 5 s. The high-concentration model is applicable to a concentration range of 170–850 mg / L, with electrochemical conditions of an intercalation potential of −0.10 V vs. SHE for 1 s and an intercalation potential of 1.2 V vs. SHE for 5 s. s; Obtain the image and color features of the working electrode in the standard solution according to steps two, three, and four; Based on the color feature-ammonium ion concentration datasets collected by the three color-concentration prediction models, train the color-concentration prediction models using machine learning algorithms and store them in the model library; Step Six: Intelligent Monitoring and Early Warning Output: During real-time monitoring, the color feature values extracted from the acquired images are input into the color-concentration prediction model to obtain the predicted value of ammonium ion concentration in the current water body. When the predicted value exceeds the applicable concentration range of the current color-concentration prediction model, the system automatically adjusts the working electrode embedding / de-embedding potential and duration parameters, and switches to other color-concentration prediction models in the model library to achieve continuous monitoring over a wide concentration range. The monitoring system supports users in setting ammonium ion concentration thresholds. When the predicted value exceeds the set ammonium ion concentration threshold, it automatically triggers an audible and visual alarm or remotely sends early warning information via the communication module.
2. The intelligent monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues according to claim 1, characterized in that, The Prussian blue analogues mentioned are copper ferrocyanide or cobalt ferrocyanide.
3. The intelligent monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues according to claim 1, characterized in that, The working electrode is formed by loading a Prussian blue analogue onto the surface of ITO or FTO conductive glass using drop coating, spin coating, or electrodeposition to form a thin film electrode with a thickness of 50–500 nm.
4. The intelligent monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues according to claim 1, characterized in that, The periodic potential control includes potential control for the ammonium ion insertion and extraction stages; the insertion potential is -0.5~0.7V vs. SHE relative to the standard hydrogen electrode, and the extraction potential is 1.0~2.0V vs. SHE relative to the standard hydrogen electrode, with insertion and extraction durations ranging from 0.5 to 60 s and 1 to 100 s, respectively.
5. The intelligent monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues according to claim 1, characterized in that, The image acquisition system includes a ring-shaped LED light source with a color temperature of 4500–6000 K, a fixed-angle high-definition camera with a resolution of not less than 1920×1080, and a light-collecting cavity with a black anti-reflective inner wall; image acquisition is performed immediately after each embedding and de-embedding reaction.
6. The intelligent monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues according to claim 1, characterized in that, The image preprocessing steps include: automatically identifying the electrode region using edge detection or image segmentation algorithms; converting the original RGB image to HSV color space for brightness normalization; applying Gaussian filtering or median filtering algorithms to the electrode image to remove illumination noise; and extracting the average value of RGB or HSV channels, the dominant color, or the color histogram as color feature input variables.
7. The intelligent monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues according to claim 1, characterized in that, The aforementioned training of color-concentration prediction models using machine learning algorithms is based on the color feature values of electrode images of ammonium ion standard solutions at different concentrations, acquired under conditions of different insertion potentials, extraction potentials, and durations. The fitting accuracy R0 is [missing value]. 2 The mean absolute error is not less than 0.98 and not more than 5%; the machine learning algorithm is multiple linear regression, support vector regression, artificial neural network, decision tree regression or random forest.
8. The intelligent monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues according to claim 1, characterized in that, The automatic adjustment of the working electrode insertion / extraction potential and duration parameters includes automatic adjustment of the intelligent monitoring support model for automatic calling and switching. When the concentration prediction result exceeds the applicable concentration range of the current model, the intelligent monitoring adjusts the electrochemical operation parameters according to the detection signal and switches to other suitable color-concentration prediction models in the model library. The electrochemical operation parameters are insertion and extraction potentials and duration.
9. The intelligent monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues according to claim 1, characterized in that, The intelligent monitoring system supports program-controlled cyclic detection. By setting periodic working electrode insertion / deintercalation reaction electrochemical parameters, image acquisition and recognition prediction processes, it achieves automatic operation and data updates without human intervention.
10. The intelligent monitoring method for ammonium ions in water based on the electrochromic response of Prussian blue analogues according to claim 1, characterized in that, In step five, the applicable concentration range for each prediction model refers to the range under the corresponding electrochemical operating parameters that ensures the fitting accuracy R. 2 The concentration range is not less than 0.98 and the mean absolute error is not higher than 5%.