A detection control method of a water quality analyzer device and related apparatus
By implementing structured measurement task planning and action queue management, the rigidity of control systems in commercial water quality analyzers has been resolved, achieving high reliability and flexibility, ensuring the accuracy and traceability of test results, and supporting multi-channel collaboration and remote operation and maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI TANGQIANYAN ROBOT TECHNOLOGY CO LTD
- Filing Date
- 2026-05-18
- Publication Date
- 2026-07-03
AI Technical Summary
The control system architecture of existing commercial water quality analyzers is rigid and cannot adapt to the rapidly changing needs of testing items. Furthermore, they cannot identify fault points in a timely manner during multi-step testing processes, resulting in inaccurate test results, frequent resource conflicts, and maintenance difficulties.
The structured measurement task plan is broken down into action queues, and a serial sub-state machine is used for self-checking. The detection process is monitored and task execution logs are generated, achieving unified resource arbitration and exception handling, and supporting modular expansion and remote operation and maintenance.
It improves the stability and accuracy of detection, reduces fault identification time, enhances the traceability and reliability of detection results, and supports multi-channel collaborative operation and remote maintenance.
Smart Images

Figure CN122330451A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of water quality analysis technology, and relates to a detection and control method and related device for a water quality analyzer. Background Technology
[0002] With the increasing demands for refined water quality management in industries such as industry, agriculture, municipal administration, and environmental protection, the demand for commercial water quality analyzers is growing. These instruments are typically used for the rapid and automated detection of multiple indicators in water samples, such as total alkalinity, total acidity, residual chlorine, ammonia nitrogen, total phosphorus, and heavy metals, either in the field or in the laboratory. Compared to large-scale laboratory analytical equipment, commercial water quality analyzers aim to achieve ease of operation, rapid detection, and flexible field deployment while maintaining a certain level of accuracy and stability.
[0003] Currently, most mainstream commercial water quality analyzers employ wet chemical methods, such as titration and colorimetry. Internally, their automated control primarily relies on programmable logic controllers (PLCs), microcontrollers, or simple embedded systems. Following a pre-set, fixed process, these systems sequentially control actuators and sensors, including syringe pumps, peristaltic pumps, solenoid valves, heaters, stirrers, and optical sensors, to complete a series of steps such as water sample aspiration, reagent addition, mixing and reaction, signal detection, result calculation, and waste discharge.
[0004] However, existing control system architectures generally suffer from the following problems: First, the software of most instruments is "hard-coded" for a limited number of specific detection indicators. The detection process for each indicator is written as a large, continuous, and indivisible program block. When new detection indicators need to be added or existing processes need to be optimized, it is often necessary to modify a large amount of low-level control code, or even redesign the program structure. This results in long development cycles, high error risks, and difficulty in adapting to the market's demand for rapid updates in instrument detection items. The control logic is rigid, and the scalability and reusability are poor. Furthermore, before starting a detection task, the instrument's own status (such as fluid path patency, reagent balance, sensor health status, and whether the equipment is level) is not fully checked or is completely missing. Once an anomaly occurs during the complex multi-step detection process (such as pipeline blockage, pump dry running, sensor malfunction, or equipment movement), the system often cannot identify the fault point in a timely and accurate manner, which may lead to incorrect detection results, reagent waste, or even damage to expensive actuators (such as pumps and valves). In addition, there are also deep-seated defects such as resource conflicts and lack of process traceability. When multiple testing processes concurrently request the use of the same fluid path, pump, or sensor, it can easily lead to hidden resource contention and state conflicts, such as valve malfunctions and reagent cross-contamination, directly compromising the accuracy and reliability of test results. Regarding process traceability, existing solutions typically highly couple actuator drives, sensor readings, process logic, and exception handling code, resulting in fragmented system logs and unstructured action feedback. When anomalies occur or results are questionable, technicians find it difficult to trace the complete task execution chain, making root cause analysis challenging and significantly compromising instrument maintainability and data reliability in compliance scenarios.
[0005] Furthermore, for water quality analyzers practically applied to multi-channel modular reagent reaction detection equipment, the detection process involves not only the main control processor and general pump and valve control, but also the simultaneous coordination of multiple titration peristaltic pumps, inlet peristaltic pumps, electromagnetic water distribution valves, drain peristaltic pumps, reagent chambers, pretreatment filter heads, automatic cleaning fluid paths, communication and positioning modules, human-machine interfaces, and expansion boards. If the control method does not uniformly model and arbitrate resources for these components, problems such as fluid path switching errors, reagent residue, increased dead volume, insufficient waste discharge, incomplete cleaning, difficulties in remote operation and maintenance, and unidentifiable expansion channels can easily occur.
[0006] In summary, there is an urgent need for a new type of control solution for commercial water quality analyzers that can solve the above problems at the system level. This solution should provide a modular, flexibly configurable, highly reliable, easy-to-maintain, and intelligent control system with strong anomaly handling capabilities. It should also cover practical product functions such as multi-channel liquid circuits, reagent supply, automatic cleaning, remote communication and positioning, human-computer interaction, and modular expansion, thereby improving the detection efficiency and accuracy of water quality analysis results. Summary of the Invention
[0007] The purpose of this invention is to provide a detection and control method and related device for a water quality analyzer, in order to solve the technical problems that the existing technology generally adopts highly coupled single sequential control or decentralized task scheduling, which leads to rigid system architecture and affects detection efficiency and accuracy when facing multiple concurrent tasks, multi-channel liquid path switching, reagent supply, automatic cleaning, remote operation and maintenance and abnormal events.
[0008] To achieve the above objectives, the present invention employs the following technical solution: In a first aspect, the present invention provides a detection and control method for a water quality analyzer, comprising the following steps: Upon receiving detection and control commands from an external command port, the system enters a self-test access control state and executes a preset system self-test process. After the system performs a self-test, it generates a structured measurement task plan based on the received detection control commands and preset detection process parameters. The measurement task plan is broken down into several sub-tasks to form an action queue; and the measurement task is executed according to the action queue. During the execution of the action queue, the detection process is continuously monitored and a task execution log is generated, structured measurement results are output, and the structured measurement results are sent to the local human-computer interaction module and / or a remote server.
[0009] Furthermore, the self-test process includes at least the following: using a serial sub-state machine method to perform self-tests on the power supply status, temperature status, attitude tilt angle status, sensor online status, storage status, real-time clock status, reagent balance status, filter head status, communication positioning status, human-machine interaction status, and modular expansion interface status of the device. If any self-test item fails, the system will prohibit entering the requested operating state and record the abnormal information.
[0010] Furthermore, the measurement task plan includes at least a set of water quality indicators to be tested, execution order, binding relationship of test tubes or liquid path resources, binding relationship of reagent bottles and peristaltic pumps, liquid path switching path, drainage path, automatic cleaning strategy, and merging measurement boundaries; the detection process of multiple water quality indicators to be tested in the measurement task plan is planned as a merged measurement task to be executed in the same test tube, and a cleaning action to perform cleaning on the liquid path, test tube, or sensor window is planned and inserted between the adjacent indicator detection steps of the merged measurement.
[0011] Furthermore, the step of breaking down the measurement task plan into several sub-tasks to form an action queue, and executing the measurement task according to the action queue, specifically includes: The measurement task plan is broken down into several ordered atomic actions that can be independently controlled and monitored, forming an action queue; The actuator control outlet sequentially executes the actions in the action queue, setting success criteria, failure criteria, and timeout for each action; the actuator control outlet is responsible for the actuator's resource allocation, mutual exclusion management, and safety constraint checks; the mutual exclusion management rules include: the same hydraulic circuit or the same physical actuator can only be exclusively used by one action at a time; After each action is performed, the actuator control output generates structured action execution feedback; the feedback includes at least execution success, execution failure, execution timeout, interruption status, actual execution amount, fluid circuit resources used, and cause of the abnormality.
[0012] Furthermore, in the step of controlling the outlet sequentially to execute the actions in the action queue via the actuator, and setting execution success criteria, execution failure criteria, and execution timeout for each action, when the action is a water inlet action, the execution success criteria is: the cumulative water inlet volume or liquid level change monitored by the flow meter and / or liquid level sensor reaches the target value; when the action is a titration action, the execution success criteria is: the number of steps, pulses, or cumulative delivery volume of the micro peristaltic pump used for titration reaches a preset threshold; when the action is a drainage action, the execution success criteria is: the drainage unit running time, cumulative drainage volume, or liquid level drop reaches a preset threshold.
[0013] Furthermore, the step of continuously monitoring the detection process and generating task execution logs and outputting structured measurement results during the execution of the action queue specifically includes: During the execution of the action queue, the detection process is continuously monitored, and monitoring data is continuously collected and processed through the status signals of flow meter, liquid level sensor, color sensor, temperature sensor, attitude sensor, communication positioning module and expansion interface; When the monitoring data meets the preset abnormal conditions, the currently executing action queue is immediately interrupted, and the relevant actuators are controlled to enter a safe state, while the fault event is recorded. Record complete task execution logs and output structured measurement results.
[0014] Furthermore, the method also includes: online upgrade; receiving upgrade data remotely or locally, performing firmware upgrades for the human-machine interaction module, main control processor, and / or detection parameters in a preset order, and performing a rollback if the upgrade fails.
[0015] Secondly, the present invention provides a detection and control system for a water quality analyzer, comprising: The input module is used to receive detection and control commands from the external command port, enter the system self-test access control state, and execute the preset system self-test process; The task planning module is used to generate a structured measurement task plan based on the received detection control commands and preset detection process parameters after the system self-checks. The execution module is used to break down the measurement task plan into several sub-tasks to form an action queue; and to execute the measurement task according to the action queue. The output module is used to continuously monitor the detection process and generate task execution logs during the execution of the action queue, output structured measurement results, and send the structured measurement results to the local human-computer interaction module and / or a remote server.
[0016] Thirdly, the present invention provides a computer 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 detection and control method of the water quality analyzer device described above.
[0017] Fourthly, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the detection and control method for a water quality analyzer device as described above.
[0018] Compared with the prior art, the present invention has the following beneficial effects: This invention discloses a detection and control method and related device for a water quality analyzer. Upon receiving a detection and control command, the system enters a self-inspection access state and executes a preset self-inspection process, enabling timely detection of potential system problems, early elimination of fault hazards, and ensuring stable system operation during subsequent testing. Then, based on the detection and control command, preset detection process parameters, and equipment resource configuration, a structured measurement task plan is generated and broken down into action queues. This allows the water quality analyzer's multi-channel titration peristaltic pump, inlet peristaltic pump, electromagnetic water separator, drain peristaltic pump, reagent compartment, pretreatment module, and automatic cleaning system to operate in an orderly and coordinated manner under unified resource arbitration, avoiding liquid path conflicts, reagent residues, and abnormal waste discharge. Furthermore, by sending test results and anomalies to a local human-machine interface module and / or a remote server, remote operation and maintenance and modular expansion are achieved. Finally, during the execution of the action queues, the detection process is continuously monitored and a task execution log is generated, enabling real-time monitoring of the detection progress and status, timely detection of anomalies, and timely implementation of corresponding measures, enhancing the traceability and reliability of the test results. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a schematic diagram of the system of the present invention; Figure 3 This is a schematic diagram of the computer device structure of the present invention. Detailed Implementation
[0021] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present application.
[0022] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0023] It should be understood that in the embodiments of this application, "at least one" means one or more, and "more than one" means two or more. "And / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the related objects before and after it are in an "or" relationship. "Contains A, B and / or C" means containing any one, two, or three of A, B, and C.
[0024] It should be understood that in the embodiments of this application, "B corresponding to A", "B corresponding to A", "A corresponds to B" or "B corresponds to A" means that B is associated with A, and B can be determined based on A. Determining B based on A does not mean that B is determined solely based on A; B can also be determined based on A and / or other information.
[0025] The detection and control method for a water quality analyzer provided by this invention can be executed by an electronic device, such as a terminal or a server. The terminal can be a smartphone, tablet, laptop, or other similar device. The server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. It is understood that this invention does not limit the specific entity executing the detection and control method for the water quality analyzer.
[0026] The technical solution of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments described below are used to explain the technical solution of this application and are not intended to limit actual use.
[0027] See Figure 1 This invention discloses a detection and control method for a water quality analyzer, the method specifically including the following steps: S1 receives detection and control commands from the external command port, enters the system self-test access control state, and executes the preset system self-test process; The self-test process includes at least the following: using a serial sub-state machine method to perform self-tests on the power supply status, temperature status, attitude tilt angle status, sensor online status, storage status, real-time clock status, reagent balance status, filter head status, communication positioning status, human-machine interaction status, and modular expansion interface status of the device. If any self-test item fails, the system will prohibit entering the requested operating state and record the abnormal information.
[0028] S2, after system self-testing, generates a structured measurement task plan based on the received detection control commands and preset detection process parameters; The measurement task plan includes at least the set of water quality indicators to be tested, the execution order, the binding relationship of test tubes or liquid channels, the binding relationship of reagent bottles and peristaltic pumps, the liquid channel switching path, the drainage path, the automatic cleaning strategy, and the boundary of merged measurements. The detection process of multiple water quality indicators to be tested in the measurement task plan is planned as a merged measurement task to be executed in the same test tube, and a cleaning action to perform cleaning on the liquid channel, test tube, or sensor window is planned and inserted between the adjacent indicator detection steps of the merged measurement.
[0029] S3, the measurement task plan is broken down into several sub-tasks to form an action queue; and the measurement task is executed according to the action queue. S301, the measurement task plan is decomposed into several ordered atomic actions that can be independently controlled and monitored, forming an action queue; S302, the actuator control output sequentially executes the actions in the action queue, and sets the success criteria, failure criteria and timeout for each action; the actuator control output is responsible for the actuator's resource allocation, mutual exclusion management and safety constraint checks. When the action is a water intake action, the success criterion is: the cumulative water intake volume or liquid level change monitored by the flow meter and / or liquid level sensor reaches the target value; the water intake action can be executed by at least 2 water intake peristaltic pumps, or it can be executed by calling the extended water intake channel according to the water intake expansion plate identification result, forming a closed loop control.
[0030] When the action is a titration action, at least 13 micro peristaltic pumps for titration are used as titration execution mechanisms. The success criterion is that the number of steps, pulses, or cumulative delivery volume of the micro peristaltic pumps for titration reaches a preset threshold. The action execution feedback includes the actual number of steps completed, the number of pulses, the cumulative delivery volume, and the identification of the reagent bottle used.
[0031] In the titration process corresponding to the total alkalinity detection index, a dropwise cyclic titration method is adopted. Each cycle includes at least the following steps: performing a single-drop quantitative titration, starting the stirrer, sampling through the color sensor, and determining whether the titration has reached the endpoint based on the sampled data. This process is repeated until the titration endpoint is reached. During the execution of the measurement task, when stirring or color detection is performed, the C value change of the color sensor can also be collected. The stirring uniformity, color reaction stability, or sensor window contamination status can be determined based on the C value change amplitude, stabilization time, or change trend.
[0032] The rules for mutual exclusion management include: the same liquid path, the same physical actuator, the same reagent bottle output path, the same reaction detection unit, or the same drainage path can only be exclusively used by one action at the same time.
[0033] S303, after executing each action, the actuator control output generates structured action execution feedback; the feedback includes at least the status of successful execution, execution failure, execution timeout, or interruption. The action execution feedback is used to drive decisions in subsequent processes, including continuing to execute the next action, retrying the current action, or transitioning to a fault handling process.
[0034] S4. During the execution of the action queue, the detection process is continuously monitored and a task execution log is generated, and structured measurement results are output.
[0035] S401, during the execution of the action queue, the detection process is continuously monitored. Monitoring data is continuously collected and processed through the status signals of the flow meter, liquid level sensor, color sensor, temperature sensor, attitude sensor, communication positioning module and expansion interface. The collected raw sensor data is filtered, calibrated, compensated and converted to units, and standardized sensor data and corresponding health status information are output. The health status includes at least offline, abnormal value, over-limit, insufficient balance, liquid path blockage, filter head to be maintained or communication abnormality.
[0036] S402, when the monitoring data meets the preset abnormal conditions, immediately interrupt the currently executing action queue, control the relevant actuators to enter the safe state, and record the fault event; S403 records complete task execution logs and outputs structured measurement results. Specifically, it receives system operating status changes, task execution progress, action execution feedback, sensor data, measurement results, location information, and remote command records via subscription, and writes them to storage media to form a traceable operation log. The log recording module writes session header information at the beginning of each measurement session and can upload it to a remote server via the 4G communication unit.
[0037] Preferably, it also includes an automatic cleaning control step: when the detection task ends, adjacent detection indicators are switched, abnormal interruption occurs, or a preset cleaning cycle is reached, the cleaning fluid storage tank, cleaning pump, pipeline connected to the cleaning fluid channel, and drainage unit are controlled to operate in coordination to perform automatic cleaning on the reaction tube, detection pipeline, and sensor window.
[0038] It should be noted that the method of the present invention is applied to a commercial water quality analyzer, which includes at least a multi-channel fluid drive unit, a liquid path switching unit, a reaction detection unit, a drainage unit, a reagent compartment module, a pretreatment module, a human-machine interaction module, a communication and positioning module, and a modular expansion interface. Specifically, as follows: The multi-channel fluid drive unit includes at least 13 micro peristaltic pumps for precise liquid addition and at least 2 peristaltic pumps for batch sample injection; the method includes assigning corresponding flow rate control mode, precision control mode and action execution sequence to each peristaltic pump according to the water quality index to be tested, reagent type and target liquid addition volume.
[0039] The liquid path switching unit includes at least 6 electromagnetic water distribution valves; the method includes determining the target detection channel according to the measurement task plan, controlling the electromagnetic water distribution valve to switch to the liquid path corresponding to the target detection channel, and triggering water inlet, titration or cleaning actions after the liquid path switching is completed.
[0040] The drainage unit includes at least four DC peristaltic pumps for drainage. The method includes, upon completion of reaction detection, cleaning, or abnormal interruption, controlling the corresponding DC peristaltic pumps to perform directional wastewater discharge according to the binding relationship between the target reaction detection unit and the wastewater output path. The liquid path controlled by the method sequentially includes an inlet peristaltic pump, an electromagnetic water distribution valve, a micro peristaltic pump for titration, the reaction detection unit, the drainage peristaltic pump, and their connecting pipelines. The actuator control outlet performs resource locking, action sequencing, and conflict detection based on the topology of the liquid path.
[0041] The reagent compartment module includes a reagent bottle rack for accommodating reagent bottles of various sizes, a liquid level sensor for monitoring reagent balance, and a reagent labeling device. The method includes reading the reagent balance and reagent labeling information, and establishing a binding relationship between the reagent bottle and the corresponding micro peristaltic pump for titration, detection index, and target detection channel. The reagent compartment module and the reaction detection compartment are integrated. The method includes prioritizing the use of the micro peristaltic pump for titration located close to the corresponding reagent bottle to perform the liquid addition action, thereby shortening the reagent delivery distance within the connecting tubing, reducing the dead volume in the liquid path, and improving the sample addition response speed.
[0042] The pretreatment module includes a filter head installed at the input end of the water sample to be tested; the method includes performing water sample pretreatment control before the water sample to be tested enters the reaction detection unit, and generating a filter head cleaning or replacement reminder based on the number of times the filter head is used, the inlet resistance, the flow rate change, or maintenance timing information.
[0043] The communication and positioning module includes a 4G communication unit and a GPS positioning module; the method includes uploading detection data, device status, fault events and device location information to a remote server, and receiving detection tasks, parameter configuration or maintenance instructions from the remote server.
[0044] The human-machine interaction module includes a capacitive touch screen; the method includes displaying the detection progress, detection results, equipment status, reagent balance, alarm information, and parameter setting interface through the capacitive touch screen, and receiving local detection task or maintenance task input.
[0045] The modular expansion interface includes a water inlet expansion board interface, which supports at least four water inlet expansion channels. The method includes identifying the connected water inlet expansion boards during the system self-test or task planning phase, reading the number and status of expansion channels, and incorporating the available expansion channels into the measurement task plan.
[0046] See Figure 2 This invention discloses a detection and control system for a water quality analyzer, comprising an input module, a task planning module, an execution module, and an output module, as detailed below: The input module receives detection and control commands from external command ports, local human-machine interaction modules, or remote servers, enters the system self-test access control state, and executes a preset system self-test process. This module processes system events according to event priority, including at least security events for immediate entry into a protection state and business events for process control. For example, when the attitude sensor detects that the device tilt angle exceeds a preset threshold, the control actuator unified control module stops the pump and closes the solenoid valve.
[0047] The task planning module generates a structured measurement task plan based on the received detection control commands, preset detection process parameters, and equipment resource configuration after the system self-checks. This helps reduce waiting time and repetitive operations during the detection process, improves the smoothness and coordination of the entire detection process, thereby shortening the detection cycle and increasing detection efficiency.
[0048] The execution module is used to break down the measurement task plan into several sub-tasks, forming an action queue; and to control the multi-channel fluid drive unit, liquid path switching unit, reaction detection unit, drainage unit, reagent tank module, pretreatment module, and automatic cleaning system to execute the measurement task according to the action queue; this module breaks down the detection process of each water quality index into an interruptible action queue and issues action requests in sequence; it maps the action requests to specific control operations and outputs structured action execution feedback, which includes at least execution success, execution failure, execution timeout, or interruption status; making each sub-task more explicit and specific, reducing the difficulty and error rate of task execution, and improving the accuracy and reliability of task execution.
[0049] The output module continuously monitors the detection process and generates task execution logs during the execution of the action queue, outputs structured measurement results, and sends these results to a local human-machine interaction module and / or a remote server. This improves the traceability of the detection data. Detailed information and measurement results from the detection process can be accessed at any time when needed, allowing for understanding of the data source and the detection process, ensuring the authenticity and reliability of the data.
[0050] Preferably, the system of the present invention further includes an online upgrade module, used to sequentially perform firmware upgrades for the human-machine interface terminal, main control processor, and / or detection parameters according to a preset order after the system locks into upgrade mode, and to perform rollback in case of upgrade failure. The modules of the system communicate with each other through a publish-subscribe mechanism, and interact decoupledly through topic messages. The online upgrade module supports upgrade data verification and rollback in case of upgrade failure. Through the collaborative work of its modules, the present invention achieves safe and stable system operation, scientific task planning, precise execution, remote operation and maintenance, and reliable result output, providing an efficient, accurate, and reliable solution for the field of water quality analysis, and has broad application prospects.
[0051] In one embodiment of the invention, see [link to embodiment]. Figure 3 A computer device is provided, comprising a processor and a memory. The memory stores a computer program, which includes program instructions. The processor executes the program instructions stored in the computer storage medium. The processor may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing and control core of the terminal, suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions from the computer storage medium to achieve a corresponding method flow or corresponding function. The processor described in this embodiment can be used in the operation of a detection and control method for a water quality analyzer.
[0052] This invention also provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device used to store programs and data. It is understood that the computer-readable storage medium here can include both the built-in storage medium in the computer device and extended storage media supported by the computer device. The computer-readable storage medium provides storage space that stores the terminal's operating system. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by a processor. These instructions can be one or more computer programs (including program code). It should be noted that the computer-readable storage medium here can be high-speed RAM or non-volatile memory, such as at least one disk storage device. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the detection and control method for a water quality analyzer device in the above embodiments.
[0053] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0054] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0055] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The function specified in one or more boxes.
[0056] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0057] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A detection and control method for a water quality analyzer, characterized in that, Includes the following steps: Upon receiving detection and control commands from an external command port, the system enters a self-test access control state and executes a preset system self-test process. After the system performs a self-test, it generates a structured measurement task plan based on the received detection control commands and preset detection process parameters. The measurement task plan is broken down into several sub-tasks to form an action queue; and the measurement task is executed according to the action queue. During the execution of the action queue, the detection process is continuously monitored and a task execution log is generated, structured measurement results are output, and the structured measurement results are sent to the local human-computer interaction module and / or a remote server.
2. The detection and control method for a water quality analyzer according to claim 1, characterized in that, The self-test process includes at least the following: using a serial sub-state machine method to perform self-tests on the power supply status, temperature status, attitude tilt angle status, sensor online status, storage status, real-time clock status, reagent balance status, filter head status, communication positioning status, human-machine interaction status, and modular expansion interface status of the device. If any self-test item fails, the system will prohibit entering the requested operating state and record the abnormal information.
3. The detection and control method for a water quality analyzer according to claim 1, characterized in that, The measurement task plan includes at least the set of water quality indicators to be tested, the execution order, the binding relationship of test tubes or liquid channels, the binding relationship of reagent bottles and peristaltic pumps, the liquid channel switching path, the drainage path, the automatic cleaning strategy, and the boundary of merged measurements. The detection process of multiple water quality indicators to be tested in the measurement task plan is planned as a merged measurement task to be executed in the same test tube, and a cleaning action to perform cleaning on the liquid channel, test tube, or sensor window is planned and inserted between the adjacent indicator detection steps of the merged measurement.
4. The detection and control method for a water quality analyzer according to claim 1, characterized in that, The step of breaking down the measurement task plan into several sub-tasks to form an action queue, and executing the measurement task according to the action queue, specifically includes: The measurement task plan is broken down into several ordered atomic actions that can be independently controlled and monitored, forming an action queue; The actuator control outlet sequentially executes the actions in the action queue, setting success criteria, failure criteria, and timeout for each action; the actuator control outlet is responsible for the actuator's resource allocation, mutual exclusion management, and safety constraint checks; the mutual exclusion management rules include: the same hydraulic circuit or the same physical actuator can only be exclusively used by one action at a time; After each action is performed, the actuator control output generates structured action execution feedback; the feedback includes at least execution success, execution failure, execution timeout, interruption status, actual execution amount, fluid circuit resources used, and cause of the abnormality.
5. The detection and control method for a water quality analyzer according to claim 4, characterized in that, In the step of controlling the outlet sequentially to execute the actions in the action queue via the actuator, and setting execution success criteria, execution failure criteria, and execution timeout for each action, when the action is a water inlet action, the execution success criteria are: the cumulative water inlet volume or liquid level change monitored by the flow meter and / or liquid level sensor reaches the target value; when the action is a titration action, the execution success criteria are: the number of steps, pulses, or cumulative delivery volume of the micro peristaltic pump used for titration reaches a preset threshold; when the action is a drainage action, the execution success criteria are: the drainage unit running time, cumulative drainage volume, or liquid level drop reaches a preset threshold.
6. The detection and control method for a water quality analyzer according to claim 1, characterized in that, The steps of continuously monitoring the detection process and generating task execution logs and outputting structured measurement results during the execution of the action queue specifically include: During the execution of the action queue, the detection process is continuously monitored, and monitoring data is continuously collected and processed through the status signals of flow meter, liquid level sensor, color sensor, temperature sensor, attitude sensor, communication positioning module and expansion interface; When the monitoring data meets the preset abnormal conditions, the currently executing action queue is immediately interrupted, and the relevant actuators are controlled to enter a safe state, while the fault event is recorded. Record complete task execution logs and output structured measurement results.
7. The detection and control method for a water quality analyzer according to claim 1, characterized in that, Also includes: Online upgrade; receive upgrade data remotely or locally, perform firmware upgrades for the human-machine interface module, main control processor, and / or detection parameters in a preset order, and perform rollback if the upgrade fails.
8. A detection and control system for a water quality analyzer, characterized in that, include: The input module is used to receive detection and control commands from the external command port, enter the system self-test access control state, and execute the preset system self-test process; The task planning module is used to generate a structured measurement task plan based on the received detection control commands and preset detection process parameters after the system self-checks. The execution module is used to break down the measurement task plan into several sub-tasks to form an action queue; and to execute the measurement task according to the action queue. The output module is used to continuously monitor the detection process and generate task execution logs during the execution of the action queue, output structured measurement results, and send the structured measurement results to the local human-computer interaction module and / or a remote server.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the detection and control method for a water quality analyzer device as described in any one of claims 1-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 detection and control method for a water quality analyzer device as described in any one of claims 1-7.