PH value detection method and device, water treatment equipment and storage medium

By incorporating a standard colorimetric chamber and mixed indicator into the water treatment equipment, integrated and coordinated control of pH detection is achieved, solving the problems of detection lag and insufficient accuracy in existing technologies and ensuring the pH safety of drinking water.

CN121954971APending Publication Date: 2026-05-01GUANGDONG LIZI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGDONG LIZI TECH CO LTD
Filing Date
2025-12-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing water treatment equipment suffers from significant limitations in pH detection, including strong detection lag, susceptibility to environmental interference, insufficient accuracy of detection results, and difficulty in achieving coordinated control between detection and water quality regulation.

Method used

The water treatment equipment incorporates a standard colorimetric chamber and a mixed indicator. By responding to the water outlet operation, pure water is extracted and mixed with the mixed indicator, reagent images are acquired, and pH is detected based on a preset colorimetric library, thus achieving integrated detection and linkage control.

Benefits of technology

It completely solves the problem of lag in traditional testing, provides accurate test results, supports subsequent water quality adjustment, and ensures the safety of drinking water pH levels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121954971A_ABST
    Figure CN121954971A_ABST
Patent Text Reader

Abstract

The invention provides a pH value detection method and device, water treatment equipment and a storage medium, the pH value detection method and device are applied to the water treatment equipment, the water treatment equipment is internally provided with a standard colorimetric cavity, the standard colorimetric cavity is internally provided with a mixed indicator, and the pH value detection method comprises the following steps: in response to water outlet operation aiming at the water treatment equipment, determining the pH value of the water treatment equipment; extracting pure water and mixing the pure water with the mixed indicator; collecting a reagent image of the mixed reagent; the pH value of the pure water is detected based on a preset color gradation library and the reagent image, and the pH value detection scheme provided by the invention solves the technical problems that an existing pH value detection scheme is high in detection hysteresis quality, large in interference of environmental factors, insufficient in detection result precision and the like, and linkage control of detection and water quality adjustment is difficult to achieve.
Need to check novelty before this filing date? Find Prior Art

Description

pH testing methods, devices, water treatment equipment and storage media Technical Field

[0001] This application relates to the field of water purification technology, and in particular to a method, apparatus, water treatment equipment, and storage medium for detecting pH. Background Technology

[0002] As residents' living standards continue to improve, their requirements for drinking water quality are becoming increasingly stringent. pH, as one of the core indicators for measuring the safety and suitability of drinking water, has become a key area for the development of water treatment equipment technology, with its precise detection and dynamic control being crucial. The pH of drinking water directly affects human physiological functions. For example, excessively acidic drinking water may disrupt the body's fluid balance and increase the metabolic burden on the kidneys; excessively alkaline drinking water may affect the body's absorption of minerals and even cause gastrointestinal discomfort.

[0003] Existing water treatment equipment mainly focuses on basic functions such as filtering impurities and removing odors. The methods for detecting acidity and alkalinity have many limitations, such as reliance on external detection equipment, strong detection lag, great interference from environmental factors, and insufficient accuracy of detection results. Furthermore, it is difficult to achieve linkage control between detection and water quality adjustment. Summary of the Invention

[0004] To address the aforementioned technical problems, this application provides a method, apparatus, water treatment equipment, and storage medium for pH detection, which does not rely on external detection devices. This solves the technical problems of current pH detection schemes, such as strong detection lag, significant interference from environmental factors, insufficient accuracy of detection results, and difficulty in achieving linkage control between detection and water quality adjustment.

[0005] To address the aforementioned technical problems, this application provides a pH detection method applied to a water treatment device. The water treatment device has a built-in standard colorimetric chamber containing a mixing indicator. The pH detection method includes: in response to an operation on the effluent from the water treatment device, extracting pure water and mixing it with the mixing indicator; acquiring a reagent image of the mixed reagent; and detecting the pH of the pure water based on a preset colorimetric library and the reagent image.

[0006] Optionally, in some embodiments of this application, the step of extracting pure water and mixing it with the mixing indicator in response to the water discharge operation of the water treatment device includes: extracting a preset volume of pure water and delivering it to a standard colorimetric chamber in response to the water discharge operation of the water treatment device; and mixing the pure water with the mixing indicator when the delivery of pure water to the standard colorimetric chamber is stopped.

[0007] Optionally, in some embodiments of this application, before mixing the pure water with the mixing indicator when the supply of pure water to the standard colorimetric chamber is stopped, the method further includes: detecting the temperature inside the standard colorimetric chamber; when the temperature inside the standard colorimetric chamber is detected to exceed a preset temperature range, pure water with a preset temperature is extracted from the water treatment equipment and mixed with the pure water inside the standard colorimetric chamber, and the mixed pure water is then mixed with the mixing indicator.

[0008] Optionally, in some embodiments of this application, the step of detecting the pH of the pure water based on a preset color library and the reagent image includes: extracting color feature parameters from the reagent image; comparing the extracted color feature parameters with standard color parameters corresponding to different pH levels in the color library; and determining the pH of the pure water based on the comparison results.

[0009] Optionally, in some embodiments of this application, the step of comparing the extracted color feature parameters with standard color parameters corresponding to different pH levels in a color scale library, and determining the pH of the pure water based on the comparison results, includes: performing a one-to-one pairing comparison between the extracted target color feature parameters and all standard color parameters corresponding to different pH levels in a preset color scale library; calculating the similarity value between the target parameter and the standard parameter using a similarity algorithm; selecting the standard color parameter with the highest similarity value as the target standard color parameter, and determining the pH value corresponding to the target standard color parameter as the pH of the pure water.

[0010] Optionally, in some embodiments of this application, the method further includes: outputting an alarm message when the pH of the pure water exceeds a preset range; and triggering a target adjustment device based on the pH of the pure water.

[0011] Optionally, in some embodiments of this application, the target adjustment device triggered according to the pH of the pure water includes: activating the degassing device corresponding to the water treatment equipment when the pH of the pure water is less than or equal to a first preset value; and activating the mineralization adjustment device corresponding to the water treatment equipment when the pH of the pure water is greater than or equal to a second preset value.

[0012] Accordingly, this application provides an acid-base detection device for use in water treatment equipment. The water treatment equipment has a built-in standard colorimetric chamber containing a mixing indicator. The acid-base detection device includes: an extraction module for extracting pure water and mixing it with the mixing indicator in response to a water outlet operation of the water treatment equipment; an acquisition module for acquiring a reagent image of the mixed reagent; and a detection module for detecting the acid-base level of the pure water based on a preset colorimetric library and the reagent image.

[0013] This application also provides a water treatment device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the control method as described in any of the above embodiments.

[0014] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described control method.

[0015] Implementing the embodiments of this application has the following beneficial effects: As described above, the acidity / alkalinity detection method, apparatus, water treatment equipment, and storage medium provided in this application are applied to water treatment equipment. The water treatment equipment has a built-in standard colorimetric chamber, and a mixing indicator is disposed in the standard colorimetric chamber. The acidity / alkalinity detection method includes: in response to the water outlet operation of the water treatment equipment, extracting pure water and mixing it with the mixing indicator; acquiring a reagent image of the mixed reagent; and detecting the acidity / alkalinity of the pure water based on a preset colorimetric library and the reagent image. In the acidity / alkalinity detection scheme provided in this application, the built-in standard colorimetric chamber and the mixing indicator are used to achieve the following benefits: This indicator eliminates the drawbacks of existing technologies that rely on external detection equipment, achieving integrated pH detection. It simultaneously initiates the mixing of pure water and the mixed indicator, reagent image acquisition, and colorimetric library comparison detection process in response to the effluent operation of the water treatment equipment, completely solving the problem of lag in traditional detection. Detection is completed within the built-in environment of the water treatment equipment, requiring no manual intervention throughout the entire process. Furthermore, the detection results can directly provide accurate data support for subsequent water quality adjustments, laying the foundation for coordinated control between detection and regulation. It specifically addresses the core technical problems of the limitations of existing water treatment equipment in pH detection and the difficulty in coordinated regulation, ensuring the safety of drinking water pH levels. Attached Figure Description

[0016] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0017] Figure 1 is a schematic diagram of the pH detection system provided in an embodiment of this application; Figure 2 is a flowchart of the pH detection method provided in an embodiment of this application; Figure 3 is a schematic diagram of the pH detection device provided in an embodiment of this application; Figure 4 is a structural block diagram of the water treatment equipment provided in an embodiment of this application.

[0018] The realization of the objectives, functional features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and textual descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concepts of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation

[0019] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0020] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.

[0021] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0022] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0023] This embodiment provides a pH detection system for water treatment equipment. Its overall structure is shown in Figure 1. The system includes a standard colorimetric chamber, an extraction module, a temperature detection module, a temperature control module, a mixing module, an image acquisition module, a color recognition module, a color scale library storage module, a comparison analysis module, an alarm module, an adjustment device, and a main control module. The specific structure and function of each module are as follows: The standard colorimetric chamber can be made of quartz glass. Quartz glass has good light transmittance (transmittance ≥98%), strong chemical stability, is not prone to reacting with the mixed indicator, and is resistant to high and low temperatures, adapting to different environmental temperature conditions. A mixed indicator is pre-placed in the standard colorimetric chamber. The mixed indicator is prepared by mixing bromocresol green, methyl red, and phenolphthalein in a mass ratio of 2:3:1 and dissolving them in an ethanol solution. The mixed indicator has a color change range covering pH 4.0–10.0, with clear color changes corresponding to different pH levels. For example, it is red at pH 4.0, orange at pH 5.0, yellow at pH 6.0, green at pH 7.0, blue at pH 8.0, indigo at pH 9.0, and purple at pH 10.0. The mixed indicator is added in 0.8 mL increments and is pre-sealed and stored in the indicator storage compartment at the top of the standard colorimetric chamber. When pure water is supplied to the standard colorimetric chamber, the sealing membrane of the indicator storage compartment automatically breaks, releasing the mixed indicator to mix with the pure water.

[0024] The extraction module can employ a miniature peristaltic pump with precise flow control. The inlet of the extraction module connects to the pure water outlet of the water treatment equipment, while the outlet connects to the pure water inlet of the standard colorimetric chamber via a conduit. The main control module controls the start and stop of the peristaltic pump to achieve the extraction and delivery of a preset volume of pure water.

[0025] The temperature sensor can be embedded inside the side wall of a standard colorimetric cavity, directly contacting the pure water inside the cavity to detect the temperature inside the cavity in real time and transmit the temperature data to the main control module.

[0026] The temperature control module includes a constant-temperature water tank, an auxiliary extraction pump, and a temperature sensor. The constant-temperature water tank has a built-in electric heating element and a cooling element to control the water temperature. The inlet of the auxiliary extraction pump is connected to the constant-temperature water tank, and its outlet is connected to the pure water inlet of the standard colorimetric chamber via a conduit. When the main control module determines that the temperature in the standard colorimetric chamber exceeds the preset temperature range, it controls the auxiliary extraction pump to start, drawing pure water from the constant-temperature water tank at the preset temperature and delivering it to the standard colorimetric chamber to mix with the pure water already there to adjust the temperature. The temperature after mixing is fed back in real time by the temperature detection module, and the auxiliary extraction pump stops operating once the temperature reaches the preset range.

[0027] The mixing module can use a miniature electromagnetic stirrer, which can be installed at the bottom of the standard colorimetric chamber. When the pure water delivery stops and the temperature is adjusted, the main control module controls the stirrer to start. After stirring is completed, the stirrer automatically stops running and image acquisition is performed after a preset set time, so as to avoid the air bubbles generated by stirring from interfering with image acquisition.

[0028] The image acquisition module includes a high-definition camera, a supplementary lighting device, and an image transmission unit. The color recognition module can employ an embedded processor. After receiving the reagent image transmitted from the image acquisition module, it first preprocesses the image, including grayscale conversion, noise reduction, and enhancement, to remove noise and interference factors from the image. Then, it uses a color space conversion algorithm to convert the RGB color space of the image to the HSV color space (Hue-Saturation-Lightness), extracting color feature parameters such as RGB values, saturation (S), and lightness (V) of the reagent area in the image. Finally, the extracted color feature parameters are transmitted to the comparison and analysis module.

[0029] It should be noted that the specific steps of image preprocessing are as follows: (1) Grayscale processing: The RGB image is converted to a grayscale image by weighted average method, with grayscale value G=0.299R+0.587G+0.114B, preserving the brightness information of the image and simplifying the subsequent processing flow; (2) Noise reduction processing: The median filtering algorithm is used, and a 3×3 filtering window is selected to filter the grayscale image to remove salt and pepper noise in the image. The signal-to-noise ratio of the filtered image is ≥50dB; (3) Enhancement processing: The histogram equalization algorithm is used to enhance the contrast of the image and make the color features of the reagent clearer; (4) Region segmentation: The threshold segmentation algorithm is used, and the grayscale threshold is set to 128 to separate the reagent area from the background area in the image and extract the image of the reagent area for subsequent color feature parameter extraction.

[0030] The color scale library storage module is used to store standard color parameters corresponding to different pH levels. The construction process of the color scale library is as follows: (1) Preparation of standard solutions: Prepare standard buffer solutions with a pH gradient of 0.01 pH, covering a pH range of 4.00~10.00 pH; (2) Color acquisition: Mix each standard buffer solution with a mixed indicator at a volume ratio of 100:1, place it in a standard colorimetric chamber, and acquire reagent images through the image acquisition module under the same light conditions as the actual detection; (3) Parameter extraction: Preprocess the acquired standard reagent images through the color recognition module to extract color feature parameters such as RGB value, saturation (S), and brightness (V) corresponding to each standard solution; (4) Database construction: Associate and store the pH values ​​of each standard solution with the corresponding color feature parameters to construct the color scale library.

[0031] The comparison and analysis module is electrically connected to the color recognition module and the color scale library storage module. After receiving the target color feature parameters transmitted by the color recognition module, it retrieves all standard color parameters from the color scale library and performs a one-to-one pairing comparison. In this embodiment, the cosine similarity algorithm is used to calculate the similarity value between the target parameter and the standard parameter. After the comparison is completed, the standard color parameter with the highest similarity value is selected as the target standard color parameter. For example, if the similarity value is ≥0.95, the corresponding pH value is determined to be the pH of pure water; if the similarity value is <0.95, the detection is judged to have failed, a detection error prompt is output, and the detection process is restarted.

[0032] The alarm module includes indicator lights, a display screen, a buzzer, and a wireless communication unit. The indicator lights use tri-color LEDs: green indicates normal detection, yellow indicates abnormal detection, and red indicates that the pH level exceeds the preset range. When the pH level exceeds the preset range, the buzzer will sound an alarm continuously until the user confirms or the water quality returns to normal.

[0033] The adjustment device includes a degassing device and a mineralization adjustment device, both of which are electrically connected to the main control module and start or stop operation according to the control commands of the main control module.

[0034] When the degassing device starts, the pure water from the water treatment equipment first enters the degassing tank for degassing to remove carbon dioxide. The degassed pure water is then delivered to the outlet tap. The running time of the degassing device is dynamically adjusted based on the pH test results. For example, when pH=4.5, the running time is 60 seconds; when pH=5.0, the running time is 30 seconds.

[0035] The mineralization adjustment device includes a mineralization filter cartridge and a flow regulating valve. The mineralization filter cartridge is filled with natural maifanite particles, which release mineral ions such as calcium, magnesium, and potassium to adjust the pH of the water. The flow regulating valve controls the flow rate of pure water through the mineralization filter cartridge. When the pH of the pure water is detected to be ≥ the second preset value (9.0 pH), the main control module activates the mineralization adjustment device, the flow regulating valve opens, and the pure water passes through the mineralization filter cartridge for mineralization adjustment. The adjusted pure water is then delivered to the faucet. The flow rate of the mineralization adjustment is dynamically adjusted based on the pH detection results. For example, when pH=9.5, the flow rate is set to 0.5 L / min; when pH=9.0, the flow rate is set to 1 L / min.

[0036] The main control module, as the core control unit of the entire detection system, is electrically connected to the extraction module, temperature detection module, temperature regulation module, mixing module, image acquisition module, color recognition module, color scale library storage module, comparison analysis module, alarm module, and adjustment device, enabling the coordinated operation of each module. The main control module has a built-in detection process control program that can control the start, operation, and stop of each module according to preset logic, while simultaneously receiving data transmitted from each module for data processing and judgment.

[0037] This application provides a method for detecting acidity and alkalinity. Please refer to Figure 2. Figure 2 is a schematic flowchart of the acidity and alkalinity detection method provided in the embodiment of this application, which is as follows: S101, in response to the water effluent operation of the water treatment equipment, pure water is extracted and mixed with the mixing indicator.

[0038] When a user turns on the tap of the water treatment equipment, the water outlet sensor (flow sensor) detects the water flow signal and transmits the water outlet operation signal to the main control module. In response to this signal, the main control module initiates the pH detection process, controlling each module to sequentially enter its operating state.

[0039] Optionally, in some embodiments of this application, upon receiving a trigger signal, the built-in clean water rinsing unit is first activated to introduce a preset volume of clean water into the standard colorimetric chamber to rinse the inner wall of the chamber and residual reagents. After rinsing, the clean water is discharged through the built-in drain pipe to avoid residual reagents interfering with the accuracy of this test. The entire pretreatment process is completed in a closed environment inside the water treatment equipment, effectively avoiding interference from external environmental factors. After pretreatment, the control module activates the built-in water pump of the water treatment equipment to extract pure water (i.e., the water to be tested) filtered by the water treatment equipment and delivers it to the standard colorimetric chamber through the built-in delivery pipe. At the same time, the power of the water pump is controlled to ensure that the pure water delivery flow rate is constant and that the extraction volume is precisely matched with the preset amount of mixed indicator in the standard colorimetric chamber to ensure the stability of the mixing reaction.

[0040] Optionally, in some embodiments of this application, the step "in response to the water discharge operation of the water treatment equipment, extract pure water and mix with the mixing indicator" may specifically include: in response to the water discharge operation of the water treatment equipment, extracting a preset volume of pure water and delivering it to the standard colorimetric chamber; when the delivery of pure water to the standard colorimetric chamber is stopped, mixing the pure water and the mixing indicator.

[0041] For example, after receiving a trigger signal, the control module first activates the built-in clean water rinsing unit, introducing a preset volume of clean water into the standard colorimetric chamber. The clean water flows through the inner wall of the chamber and washes away residual reagents. After rinsing, the control module controls the valve of the built-in drain pipe to open, discharging the rinsing water containing residual reagents. The entire pretreatment process is completed in a closed environment inside the water treatment equipment, effectively avoiding interference from external environmental factors and preventing residual reagents from affecting the accuracy of this test. After the pretreatment rinsing is completed, the control module closes the drain pipe valve and starts the built-in water pump of the water treatment equipment. The water pump draws pure water filtered by the water treatment equipment (i.e., the water to be tested) and delivers it to the standard colorimetric chamber through the built-in delivery pipeline. During the delivery process, the control module adjusts the power of the water pump in real time to ensure a constant pure water delivery flow rate, and simultaneously monitors the volume of pure water delivered in real time through the flow monitoring unit. When the delivery volume reaches a preset value (which precisely matches the preset amount of mixed indicator in the standard colorimetric chamber), the control module controls the water pump to stop working, completing the delivery of pure water to the standard colorimetric chamber.

[0042] When the water pump stops delivering pure water to the standard colorimetric chamber, the control module immediately activates the built-in micro-stirring component inside the standard colorimetric chamber. The stirring component drives the mixed indicator in the chamber to fully mix with the delivered pure water, and the stirring process is kept at a uniform and stable speed. After stirring for a preset time, the control module controls the stirring component to stop working, so that the mixed reagent can fully undergo a colorimetric reaction.

[0043] Optionally, in some embodiments of this application, before the step "when the supply of pure water to the standard colorimetric chamber is stopped, mix the pure water with the mixing indicator", the method may further include: detecting the temperature inside the standard colorimetric chamber; when the temperature inside the standard colorimetric chamber is detected to be outside the preset temperature range, then pure water with a preset temperature is extracted from the water treatment equipment and mixed with the pure water inside the standard colorimetric chamber, and the mixed pure water is then mixed with the mixing indicator.

[0044] When the temperature inside the standard colorimetric chamber exceeds the preset range, the required volume of constant-temperature pure water is calculated. For example, if the current temperature inside the chamber is 15℃ (below the preset lower limit of 18℃), the volume of pure water inside the chamber is 80mL, and the water temperature in the constant-temperature water tank is 20℃, the required volume of pure water at 20℃ is calculated. Then, pure water at 20℃ is drawn from the constant-temperature water tank and delivered to the standard colorimetric chamber, with the delivered volume being the calculated replenishment volume. After delivery, the auxiliary extraction pump is stopped.

[0045] S102. Acquire reagent images of the mixed reagents.

[0046] For example, activate the built-in supplementary lighting component integrated around the standard colorimetric cavity, aligning the supplementary light with the reagent observation area; after the supplementary light brightness reaches the preset standard value, activate the image acquisition module built into the water treatment equipment, and perform single or multiple consecutive acquisitions (e.g., 3 times) of the mixed reagent according to preset parameters to obtain the original reagent image; after acquisition, verify the validity of the acquired original reagent image, focusing on detecting whether there are problems such as distortion, blurring, reflection, or occlusion of the reagent area; filter out valid images without abnormalities. If all acquired images are invalid (e.g., all 3 consecutive acquisitions are blurry), trigger the supplementary lighting component to recalibrate, and repeat the acquisition operation of steps 3-4 until a valid image is obtained.

[0047] S103. Based on a preset colorimetric library and reagent images, the acidity or alkalinity of pure water is detected.

[0048] For example, specifically, the preprocessed color parameters to be compared are paired one by one with all standard color feature parameters in the preset color scale library. Standardized similarity algorithms (such as Euclidean distance and cosine similarity) can be used to calculate the similarity value between the parameters to be compared and each set of standard parameters. Then, from all similarity results, the set of standard parameters with the highest similarity value is selected, and the accurate pH value associated with this set of standard parameters is used as the current pH detection result of pure water.

[0049] Optionally, in some embodiments of this application, the step "detecting the pH of pure water based on a preset color scale library and reagent images" may specifically include: extracting color feature parameters from the reagent images; comparing the extracted color feature parameters with standard color parameters corresponding to different pH levels in the color scale library; and determining the pH of pure water based on the comparison results.

[0050] For example, specifically, the extracted color feature parameters of the pure water to be tested are paired and compared one by one with all standard color feature parameters in the color scale library; a standardized similarity algorithm (such as Euclidean distance algorithm, cosine similarity algorithm) can be used to calculate the similarity value between the parameter to be tested and each set of standard parameters (the closer the similarity value is to 1, the higher the color matching degree). Then, from all comparison records, the set of standard parameters with the highest similarity value is selected; the pH value associated with this set of standard parameters is used as the preliminary pH result of the pure water to be tested; at the same time, The highest similarity value is compared with a preset confidence threshold. If the highest similarity value is greater than or equal to the confidence threshold, the preliminary result is confirmed as the final pH test result. If the highest similarity value is less than the confidence threshold, additional color feature parameters such as saturation and brightness are extracted from the reagent image and compared with the corresponding multi-dimensional standard parameters in the color scale library one by one. The comprehensive similarity (weighted fusion of the similarities of each dimension) is calculated, and the pH value associated with the standard parameter with the highest comprehensive similarity is used as the updated preliminary result. The confidence is checked again until the threshold is reached.

[0051] If, after multiple multi-dimensional comparisons, the overall similarity still fails to reach the confidence threshold, or if abnormal color development states such as reagent layering or precipitation are detected in the reagent image during the detection process, the control module determines that the detection is invalid, triggers an abnormality prompt, and restarts the detection; if the verification passes, the final pH detection result will be output to the main control system of the water treatment equipment.

[0052] Optionally, in some embodiments of this application, the step "comparing the extracted color feature parameters with standard color parameters corresponding to different pH levels in the color scale library, and determining the pH of pure water based on the comparison results" may specifically include: pairing and comparing the extracted target color feature parameters with all standard color parameters corresponding to different pH levels in the preset color scale library one by one; calculating the similarity value between the target parameter and the standard parameter using a similarity algorithm; selecting the standard color parameter with the highest similarity value as the target standard color parameter, and determining the pH value corresponding to the target standard color parameter as the pH of pure water.

[0053] Optionally, in some embodiments of this application, it may further include: outputting an alarm message when the pH of the pure water exceeds a preset range; and triggering a target adjustment device based on the pH of the pure water.

[0054] The target adjustment device refers to the core functional module built into the water treatment equipment, which is used to specifically adjust the pH of the effluent. Specifically, it includes a degassing device and a mineralization regulating valve, both of which are triggered according to the type of pH abnormality.

[0055] Specifically, the final pH test result of the pure water is compared with the preset acceptable pH range for drinking water (e.g., pH 6.2-7.5). If the test result is within the acceptable range, the water treatment equipment is controlled to maintain normal water output. If the test result exceeds the preset range (i.e., pH ≤ 6.2 or pH ≥ 7.5), the subsequent alarm and adjustment process is immediately initiated.

[0056] Optionally, in some embodiments of this application, the step "triggering the target adjustment device according to the pH of pure water" may specifically include: when the pH of pure water is less than or equal to a first preset value, activating the degassing device corresponding to the water treatment equipment; when the pH of pure water is greater than or equal to a second preset value, activating the mineralization adjustment device corresponding to the water treatment equipment.

[0057] When the detected pH level is ≤5.0 (acidic), an acidic alarm message and the detection result are pushed to the user's mobile app. Simultaneously, the main control module activates the degassing unit, switching the pure water from the water treatment equipment to the degassing process. The water first enters the vacuum degassing tank for degassing to remove carbon dioxide. The degassing unit's operating time is dynamically adjusted based on the pH detection results. During operation, the main control module receives real-time feedback signals from the degassing unit's status to ensure the process proceeds normally. After degassing is complete, the degassing unit stops operating, the main control module stops the alarm buzzer, and the red indicator light flashes green, indicating that the water quality has returned to normal. At the same time, the detection process (steps S2-S9) is restarted to re-detect the pH of the degassed pure water, ensuring the water quality meets standards.

[0058] When the detected pH level is ≥9.0 (alkaline), the main control module activates the alarm module, the red indicator light flashes, and the mineralization adjustment device is started. Simultaneously, the alkalinity alarm information and test results are pushed to the user's mobile app. At the same time, the main control module activates the mineralization adjustment device, the flow control valve opens, and pure water passes through the mineralization filter for mineralization adjustment, releasing mineral ions to regulate pH. The flow rate for mineralization adjustment is dynamically adjusted based on the pH test results. During mineralization adjustment, the main control module receives real-time flow rate feedback signals from the flow control valve. After adjustment, the flow control valve closes, and the mineralization adjustment device stops operating. The main control module stops the alarm module's buzzer, and the red indicator light flashes green, indicating to the user that the water quality has returned to normal. Simultaneously, the testing process restarts to retest the pH of the mineralized pure water to ensure that the water quality meets standards.

[0059] This application provides a pH detection method for water treatment equipment. The water treatment equipment has a built-in standard colorimetric chamber containing a mixing indicator. The pH detection method includes: in response to the water treatment equipment's effluent operation, extracting pure water and mixing it with the mixing indicator; acquiring a reagent image of the mixed reagent; and detecting the pH of the pure water based on a preset colorimetric library and the reagent image. In the pH detection scheme provided in this application, the built-in standard colorimetric chamber and mixing indicator eliminate the drawbacks of existing technologies that rely on external detection equipment, achieving integrated pH detection. The method simultaneously initiates the mixing of pure water and the mixing indicator, reagent image acquisition, and colorimetric library comparison detection process in response to the water treatment equipment's effluent operation, completely solving the problem of lag in traditional detection. The detection is completed within the water treatment equipment's built-in environment, requiring no manual intervention. Furthermore, the detection results can directly provide accurate data support for subsequent water quality adjustments, laying the foundation for coordinated control of detection and regulation. This method specifically addresses the limitations of existing water treatment equipment in pH detection and the difficulty in coordinated adjustment, ensuring the safety of drinking water pH.

[0060] Accordingly, referring to Figure 3, this application also provides an acid-base detection device, which specifically includes a conduction module 201, an acquisition module 202, and a detection module 203, as follows: the extraction module 201 is used to extract pure water and mix it with the mixing indicator in response to the water discharge operation of the water treatment equipment; the acquisition module 202 is used to acquire the reagent image of the mixed reagent; and the detection module 203 is used to detect the acid-base of the pure water based on a preset colorimetric library and the reagent image.

[0061] Optionally, in some embodiments of this application, the extraction module 201 may be specifically used to: extract a preset volume of pure water and deliver it to a standard colorimetric chamber in response to the water discharge operation of the water treatment equipment; and mix the pure water with the mixing indicator when the delivery of pure water to the standard colorimetric chamber is stopped.

[0062] Optionally, in some embodiments of this application, the extraction module 201 may be specifically used to: detect the temperature inside the standard colorimetric chamber; when the temperature inside the standard colorimetric chamber is detected to exceed a preset temperature range, extract pure water with a preset temperature from the water treatment device and mix it with the pure water inside the standard colorimetric chamber, and then mix the mixed pure water with the mixing indicator.

[0063] Optionally, in some embodiments of this application, the detection module 203 may be specifically used to: extract color feature parameters from the reagent image; compare the extracted color feature parameters with standard color parameters corresponding to different pH levels in the color scale library, and determine the pH of the pure water based on the comparison results.

[0064] Optionally, in some embodiments of this application, the detection module 203 may be specifically used to: pair and compare the extracted target color feature parameters with all standard color parameters corresponding to different pH levels in a preset color scale library one by one; calculate the similarity value between the target parameter and the standard parameter using a similarity algorithm; select the standard color parameter with the highest similarity value as the target standard color parameter, and determine the pH value corresponding to the target standard color parameter as the pH of the pure water.

[0065] Optionally, in some embodiments of this application, the detection module 203 may be specifically used to: output an alarm message when the pH of the pure water exceeds a preset range; and trigger a target adjustment device based on the pH of the pure water. Optionally, in some embodiments of this application, the detection module 203 may be specifically used to: activate the degassing device corresponding to the water treatment equipment when the pH of the pure water is less than or equal to a first preset value; and activate the mineralization adjustment device corresponding to the water treatment equipment when the pH of the pure water is greater than or equal to a second preset value.

[0066] This application provides an acid-base detection device for use in water treatment equipment. The water treatment equipment has a built-in standard colorimetric chamber containing a mixing indicator. An extraction module 201, in response to a water effluent operation from the water treatment equipment, extracts pure water and mixes it with the mixing indicator. An acquisition module 202 acquires an image of the mixed reagent. A detection module 203 detects the acid-base level of the pure water based on a preset colorimetric library and the reagent image. This acid-base detection solution, by incorporating a built-in standard colorimetric chamber and mixing indicator, eliminates the reliance on external detection equipment found in existing technologies. This approach addresses the shortcomings of traditional methods by integrating pH detection. It simultaneously initiates the mixing of pure water and mixed indicators, reagent image acquisition, and colorimetric library comparison detection processes in response to the effluent operation of water treatment equipment, completely resolving the lag issue of traditional detection. Detection is completed within the built-in environment of the water treatment equipment, requiring no manual intervention throughout the process. Furthermore, the detection results provide precise data support for subsequent water quality adjustments, laying the foundation for coordinated control between detection and regulation. This approach specifically addresses the limitations of existing water treatment equipment in pH detection and the difficulty in coordinated regulation, ensuring the safety of drinking water pH levels.

[0067] In one embodiment, a water treatment device is provided, the internal structure of which can be shown in Figure 4. The water treatment device includes a processor, a memory, a network interface, and a database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface of the water treatment device is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements a function or step based on a water treatment device control method.

[0068] In one embodiment, a water treatment device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor; when the processor executes the computer program, it performs the following steps: in response to a water discharge operation of the water treatment device, it extracts pure water and mixes it with a mixing indicator; it acquires a reagent image of the mixed reagent; and it detects the pH of the pure water based on a preset colorimetric library and the reagent image.

[0069] This application embodiment, through the built-in standard colorimetric chamber and mixed indicator, eliminates the drawbacks of existing technologies that rely on external detection equipment, achieving integrated pH detection. It synchronously initiates the mixing of pure water and mixed indicator, reagent image acquisition, and colorimetric library comparison detection process in response to the water treatment equipment's effluent operation, completely solving the lag problem of traditional detection. Detection is completed within the built-in environment of the water treatment equipment; the entire detection process requires no manual intervention, and the detection results can directly provide accurate data support for subsequent water quality adjustments, laying the foundation for coordinated control of detection and regulation. It specifically addresses the core technical problems of the limitations of existing water treatment equipment in pH detection and the difficulty in coordinated adjustment, ensuring the safety of drinking water pH.

[0070] In one embodiment, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, performs the following steps: in response to an operation of discharging water from a water treatment device, extracting pure water and mixing it with a mixing indicator; acquiring a reagent image of the mixed reagent; and detecting the pH of the pure water based on a preset colorimetric library and the reagent image.

[0071] This application embodiment, through the built-in standard colorimetric chamber and mixed indicator, eliminates the drawbacks of existing technologies that rely on external detection equipment, achieving integrated pH detection. It synchronously initiates the mixing of pure water and mixed indicator, reagent image acquisition, and colorimetric library comparison detection process in response to the water treatment equipment's effluent operation, completely solving the lag problem of traditional detection. Detection is completed within the built-in environment of the water treatment equipment; the entire detection process requires no manual intervention, and the detection results can directly provide accurate data support for subsequent water quality adjustments, laying the foundation for coordinated control of detection and regulation. It specifically addresses the core technical problems of the limitations of existing water treatment equipment in pH detection and the difficulty in coordinated adjustment, ensuring the safety of drinking water pH.

[0072] It should be noted that the functions or steps that the computer-readable storage medium or water treatment device can achieve are described in the relevant descriptions of the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0073] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0074] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0075] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention 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 the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for detecting pH, characterized in that, The method for detecting pH value is applied to water treatment equipment, which has a built-in standard colorimetric chamber containing a mixing indicator. The method includes: in response to an operation that discharges water from the water treatment equipment, extracting pure water and mixing it with the mixing indicator; acquiring a reagent image of the mixed reagent; and detecting the pH value of the pure water based on a preset colorimetric library and the reagent image.

2. The acidity / alkalinity detection method according to claim 1, characterized in that, The step of extracting pure water and mixing it with the mixing indicator in response to the water discharge operation of the water treatment equipment includes: extracting a preset volume of pure water and delivering it to a standard colorimetric chamber in response to the water discharge operation of the water treatment equipment; and mixing the pure water with the mixing indicator when the delivery of pure water to the standard colorimetric chamber is stopped.

3. The acidity / alkalinity detection method according to claim 2, characterized in that, Before mixing the pure water with the mixing indicator when the supply of pure water to the standard colorimetric chamber is stopped, the method further includes: detecting the temperature inside the standard colorimetric chamber; when the temperature inside the standard colorimetric chamber is detected to exceed a preset temperature range, pure water with a preset temperature is extracted from the water treatment equipment and mixed with the pure water inside the standard colorimetric chamber, and the mixed pure water is then mixed with the mixing indicator.

4. The acidity / alkalinity detection method according to claim 1, characterized in that, The method of detecting the pH of the pure water based on a preset color scale library and the reagent image includes: extracting color feature parameters from the reagent image; comparing the extracted color feature parameters with standard color parameters corresponding to different pH levels in the color scale library; and determining the pH of the pure water based on the comparison results.

5. The acidity / alkalinity detection method according to claim 4, characterized in that, The step of comparing the extracted color feature parameters with standard color parameters corresponding to different pH levels in a color scale library, and determining the pH of the pure water based on the comparison results, includes: pairing and comparing the extracted color feature parameters with all standard color parameters corresponding to different pH levels in a preset color scale library one by one; calculating the similarity value between the target parameter and the standard parameter using a similarity algorithm; selecting the standard color parameter with the highest similarity value as the target standard color parameter, and determining the pH value corresponding to the target standard color parameter as the pH of the pure water.

6. The method for detecting pH according to any one of claims 1 to 5, characterized in that, Also includes: When the pH of the pure water exceeds the preset range, an alarm message will be output. The target adjustment device is triggered based on the pH of the pure water.

7. The acidity / alkalinity detection method according to claim 6, characterized in that, The target adjustment device triggered by the pH of the pure water includes: activating the degassing device corresponding to the water treatment equipment when the pH of the pure water is less than or equal to a first preset value; and activating the mineralization adjustment device corresponding to the water treatment equipment when the pH of the pure water is greater than or equal to a second preset value.

8. A pH detection device, characterized in that, The device is applied to water treatment equipment, which has a built-in standard colorimetric chamber containing a mixing indicator. The pH detection device includes: an extraction module for extracting pure water and mixing it with the mixing indicator in response to a water discharge operation of the water treatment equipment; an acquisition module for acquiring a reagent image of the mixed reagent; and a detection module for detecting the pH of the pure water based on a preset colorimetric library and the reagent image.

9. A water treatment device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the pH detection method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the pH detection method as described in any one of claims 1 to 7.