An intelligent water balance system

By distinguishing between continuous supply and demand and process-based water consumption, and combining process markers to identify water consumption, the problem of inaccurate identification of water balance imbalance in existing technologies has been solved, and stable liquid level regulation and water supply control have been achieved.

CN122264429APending Publication Date: 2026-06-23SHANGHAI PUDONG VEOLIA WATER CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI PUDONG VEOLIA WATER CO LTD
Filing Date
2026-03-26
Publication Date
2026-06-23

Smart Images

  • Figure CN122264429A_ABST
    Figure CN122264429A_ABST
Patent Text Reader

Abstract

This invention discloses an intelligent water balance system, specifically relating to the field of water supply scheduling and control. It includes: a sensor acquisition module for collecting the cumulative influent, effluent, and recycled water values ​​at the current calculation time and the previous fixed-value time, as well as the cumulative backwashing value, plant water consumption value, cumulative influent volume of the sedimentation tank, the liquid levels of four clear water tanks, and the operational status of the four clear water tanks, outputting the collected data according to the same scheduling cycle; and a communication aggregation module for reading the collected data from each PLC slave station into the PLC master station via Modbus TCP, writing it into the master station data area according to influent, effluent, recycled, backwashing, sludge discharge, plant use, liquid level, and operational status, and outputting the aggregated data. This invention distinguishes between continuous supply and demand and process-type water consumption based on the detection results of intelligent sensing elements, and only includes the effective water consumption after process closure in the water balance calculation and influent regulation, thus solving the problem that internal disturbances that have not yet closed the process are easily misjudged as external supply and demand imbalances.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water supply scheduling and control technology, and more specifically, to an intelligent water balance system. Background Technology

[0002] In the field of water balance scheduling for clear water tanks in waterworks, the mainstream practice in the industry is to solve the problems of stabilizing the liquid level in the clear water tanks and coordinating the overall water intake control of the plant. Typically, intelligent sensors such as flow meters and level gauges are used to collect operating parameters such as water intake, water output, and liquid level. These parameters are then combined with preset water balance relationships, upper and lower limits of liquid level, and adjustment rules to calculate the current deviation periodically and adjust the raw water intake accordingly. Taking a waterworks with multiple clear water tanks that are in a continuous water supply state as an example, there are not only changes in the operation status of the clear water tanks, but also continuous internal processes such as sludge discharge, backwashing, plant water consumption, and recycled water replenishment. Although some internal water consumption is continuously detected by the corresponding intelligent sensors, it still needs to be combined with process boundaries such as flow rate zeroing to complete effective measurement. Under such conditions, the system must complete the liquid level adjustment without interrupting the water supply and without disrupting stable operation. However, under this constraint, the mainstream practice will consistently expose a key flaw: when the liquid level deviates, the system often cannot distinguish whether the deviation is due to an imbalance in the actual supply and demand relationship of the entire plant or a short-term disturbance caused by an internal water consumption process that has not yet closed. As a result, transient effects that should have been confirmed after the process is over are directly included in the current scheduling judgment based on the data currently output by the smart sensor. This manifests as frequent correction of raw water volume, reverse amplification of liquid level fluctuations, and difficulty in maintaining the control effect in stable mode. The root cause is that the existing practice generally assumes that the water volume changes output by each smart sensor can be directly used as the basis for scheduling, without further distinguishing the difference in scheduling eligibility between continuous supply and demand and process-type water consumption. Therefore, the technical problem to be solved by this application is: how to accurately identify the effective water volume change that can truly represent the current water balance imbalance state based on the detection results of intelligent sensing elements under the condition of changes in the commissioning status of multiple clear water tanks and the continuous insertion of internal processes such as sludge discharge, backwashing, plant use and reuse, so as to avoid misjudging internal disturbances that have not yet closed the process as external supply and demand imbalances that need to be adjusted immediately. Summary of the Invention

[0003] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide an intelligent water balance system that distinguishes between continuous supply and demand and process-type water consumption based on the detection results of intelligent sensing elements, and only includes the effective water consumption after the process is closed in the water balance calculation and water intake regulation, thereby solving the problems mentioned in the background art.

[0004] To achieve the above objectives, the present invention provides the following technical solution: an intelligent water balance system, comprising: The sensor acquisition module is used to collect the cumulative values ​​of influent, effluent, and recycled water at the current calculation time and the previous fixed value time, as well as the cumulative values ​​of backwashing, plant water, sedimentation tank influent, liquid levels of the four clear water tanks, and the operational status of the four clear water tanks, and outputs the collected data according to the same scheduling cycle. The communication aggregation module is used to read the collected data from each PLC slave station into the PLC master station via ModbusTCP, write it into the master station data area according to water inlet, water outlet, reuse, backwash, sludge discharge, plant use, liquid level and commissioning status, and output the aggregated data. The process identification module is used to calculate the influent cycle volume, effluent cycle volume, and reuse cycle volume based on the cumulative difference between the current calculation time and the previous fixed value time according to the collected data. It determines the backwash water consumption based on the cumulative difference at the end of the backwash process, the plant water consumption based on the cumulative difference at the end of the plant use process, and the sludge discharge water consumption based on the number of times the cumulative display value of the influent is zeroed and the single sludge discharge volume in the sedimentation tank sludge discharge flow mode. It also determines the backwash water consumption, plant water consumption, and sludge discharge water consumption after the process ends as the closed-loop water consumption and outputs the continuous supply and demand and closed-loop water consumption. The liquid level limit module is used to switch the current upper and lower liquid level limits from 48 pre-stored upper and lower liquid level limits based on the current hour and minute, and output the current upper and lower liquid level limits.

[0005] In a preferred embodiment, it further includes: The balance calculation module is used to calculate the average liquid level based on the operation status and liquid level of the four clear water tanks, calculate the total bottom area based on the operation status and bottom area of ​​each tank, calculate the effective supply and demand difference based on the continuous supply and demand and the closed-loop water consumption, and calculate the predicted liquid level based on the average liquid level, total bottom area and effective supply and demand difference, and output the effective supply and demand difference and the predicted liquid level. The adjustment execution module is used to determine the target liquid level by adding the current liquid level accuracy to the current liquid level accuracy when the predicted liquid level is lower than the current liquid level lower limit and the effective supply-demand difference is not zero; and to determine the target liquid level by subtracting the liquid level accuracy from the current liquid level upper limit when the predicted liquid level is higher than the current liquid level upper limit and the effective supply-demand difference is not zero. It calculates the inlet water adjustment amount based on the liquid level difference between the target liquid level and the predicted liquid level, corrects the inlet water adjustment amount based on the single adjustment range and the total inlet water range, and then controls the inlet water valve to adjust the inlet water volume. It keeps the current inlet water volume unchanged when the predicted liquid level is between the current liquid level upper limit and the current liquid level lower limit or when there is an unfinished process, and outputs the scheduling result.

[0006] In a preferred embodiment, the sensing acquisition module includes: The cumulative values ​​of influent, effluent, and recycled water at the current calculation time and the previous fixed value time, as well as the cumulative values ​​of backwashing, plant water, influent cumulative display value of sedimentation tank sludge discharge flow mode, liquid levels of 4 clear water tanks, and the commissioning status of 4 clear water tanks are collected in the same scheduling cycle. Each detection value is written into the scheduling cycle identifier and source identifier, and the collected data is output. The system saves the cumulative values ​​of influent, effluent, and recycled water at the current calculation time and the previous fixed value time, as well as the cumulative values ​​of backwashing, plant water, and influent in the sedimentation tank sludge discharge flow mode. It also saves the current periodic sampling values ​​of the liquid levels of the four clear water tanks and the operational status of the four clear water tanks, and outputs the collected data corresponding to the scheduling cycle. The system synchronously collects start markers, end markers, and status change markers for the backwashing process, plant operation process, sludge discharge process, and clear water tank commissioning and switching process. The start markers, end markers, and status change markers are written into the corresponding collected data, and the collected data with process boundaries is output.

[0007] In a preferred embodiment, the communication aggregation module includes: Read the acquired data sequentially according to the ModbusTCP register addresses corresponding to the 9 PLC slave stations, and synchronously write the slave station identifier, register address and reading time for each piece of acquired data, and output the raw collected data. The original collected data is transferred to the corresponding data area of ​​the PLC master station according to water inlet, water outlet, reuse, backwash, sludge discharge, plant use, liquid level and commissioning status. The collected data whose reading time falls within the same scheduling cycle is written into the same period collection area, and the period collection data is output.

[0008] In a preferred embodiment, the communication aggregation module further includes: The detection values, scheduling cycle identifiers, source identifiers, start markers, end markers, and status change markers in the periodic collection data are bound to the same source identifier. The detection values ​​from the start marker to the end marker are continuously written into the same process collection area, and the process collection data is output. The process collection data is sorted according to the reading time. The detection values ​​after the end mark are written into the current collection data, and the detection values ​​without the end mark are retained in the current process collection area and carried over to the next scheduling cycle. The collection data is then output.

[0009] In a preferred embodiment, the process identification module includes: The current calculation time value and the previous fixed value time value are extracted from the cumulative influent, cumulative effluent and cumulative reclaimed water values ​​in the collected data according to the source identifier. The influent cycle quantity, effluent cycle quantity and reclaimed water cycle quantity are obtained by subtracting the previous fixed value time value from the current calculation time value. The backwash data, plant use data and sludge discharge data are divided into candidate process segments according to the start mark, end mark, state change mark and reading time, and the continuous supply and demand quantity and candidate process segments are output. For each candidate process segment, extract the cumulative value at the process start point, the cumulative value at the process end point, the cumulative sequence within the process, and the state sequence within the process. Subtract the cumulative value at the process start point from the cumulative value at the process end point to obtain the first water consumption. Sum the differences between adjacent cumulative values ​​within the process to obtain the second water consumption. The difference between the first and second water consumption, whether the cumulative sequence within the process is monotonically decreasing, whether the start and end markers each appear once, and whether the state change markers are closed at both ends constitute four consistency checks. Only candidate process segments that pass all four consistency checks are determined as closed process segments, and the backwash water consumption and plant water consumption are output.

[0010] In a preferred embodiment, the process identification module further includes: For the cumulative display value of the influent in the sludge discharge flow mode of the sedimentation tank, a time-sequence zeroing sequence is constructed according to the source identifier. The moment when the value changes from greater than zero to equal to zero is recorded as a candidate zeroing point. The candidate zeroing points are checked against the sludge discharge start mark, sludge discharge end mark and the change of the clear water tank's commissioning status during the same period. The candidate zeroing points that are after the start mark and before the end mark and do not fall into the commissioning switching shielding zone are retained as valid zeroing points. The sludge discharge water consumption is obtained by multiplying the number of valid zeroing points by the single sludge discharge amount and outputting the sludge discharge water consumption. The backwash water consumption, plant water consumption, and sludge discharge water consumption are written into the closed-loop water consumption according to the scheduling cycle in which the process ends. For candidate process segments that fail the four consistency checks or fail to complete the zero-point corresponding verification, the starting point cumulative value, the current last cumulative value, the current state sequence, and the current valid zero point are retained and continued to the next scheduling cycle for splicing. The aforementioned consistency check and zero-point corresponding verification are repeatedly performed on the newly added data after the splicing until the end mark appears and the closed-loop water consumption is stable, and then the closed-loop water consumption is output.

[0011] In a preferred embodiment, the liquid level limit module includes: Divide a 24-hour day into 48 time periods in 30-minute intervals. Multiply the current hour by 2 and add 1 when the current minute is greater than or equal to 30 to get the current time period number. Read the upper limit and lower limit values ​​of the liquid level corresponding to the current time period number and output the current candidate upper limit and lower limit values ​​of the liquid level. The current candidate liquid level upper limit is compared sequentially with the liquid level upper limit value of the previous time period and the liquid level upper limit value of the next time period. The current candidate liquid level lower limit is compared sequentially with the liquid level lower limit value of the previous time period and the liquid level lower limit value of the next time period. When the current candidate liquid level upper limit is between the liquid level upper limit values ​​of the two adjacent time periods and the current candidate liquid level lower limit is between the liquid level lower limit values ​​of the two adjacent time periods, the current candidate liquid level upper limit and the current candidate liquid level lower limit are output. When they are not between the liquid level upper limit and the current candidate liquid level lower limit, the previous output liquid level upper limit and the previous output liquid level lower limit corresponding to the current time period number are output. The current candidate upper and lower liquid levels are checked against the start, end, and status change markers of the backwashing process, plant operation process, sludge discharge process, and clear water tank commissioning and switching process. If a start marker exists in any process but no corresponding end marker appears, the upper and lower liquid levels output in the previous scheduling cycle remain unchanged. If a corresponding end marker appears in each process and there is no change in the clear water tank commissioning status, the current upper and lower liquid levels are output.

[0012] In a preferred embodiment, the balance calculation module includes: The operational values ​​of the four clear water tanks are defined as effective tank markers. The liquid levels of the clear water tanks corresponding to each effective tank marker are summed and divided by the number of effective tank markers to obtain the average liquid level. The number of effective tank markers is multiplied by the bottom area of ​​a single tank to obtain the total bottom area. The average liquid level and the total bottom area are then output. Add the influent cycle quantity and reuse cycle quantity in the continuous supply and demand quantity, add the effluent cycle quantity and the closure water consumption quantity, subtract the latter from the former to obtain the effective supply and demand difference, and write the closure water consumption quantity into the corresponding water consumption field according to backwash water consumption quantity, plant water consumption quantity and sludge discharge water consumption quantity, and output the effective supply and demand difference. Divide the effective supply-demand difference by the total bottom area to obtain the liquid level change. Add the liquid level change to the average liquid level to obtain the predicted liquid level. Compare the predicted liquid level with the actual liquid level at the end of the current scheduling cycle. If the two change in opposite directions, replace the average liquid level with the actual liquid level and recalculate the predicted liquid level. Output the effective supply-demand difference and the predicted liquid level.

[0013] In a preferred embodiment, the adjustment execution module includes: When the predicted liquid level is lower than the current lower limit and the effective supply-demand difference is not equal to zero, the target liquid level is obtained by adding the liquid level accuracy to the current lower limit. When the predicted liquid level is higher than the current upper limit and the effective supply-demand difference is not equal to zero, the target liquid level is obtained by subtracting the liquid level accuracy from the current upper limit. When the predicted liquid level is between the current lower limit and the current upper limit, the hold result is output. The liquid level difference is obtained by subtracting the predicted liquid level from the target liquid level. The liquid level difference is multiplied by the total bottom area and then divided by the time it takes for the target to arrive to obtain the required adjustment amount. When the absolute value of the required adjustment amount is less than the lower limit of a single adjustment, it is taken as zero to obtain the candidate adjustment amount. When the absolute value of the required adjustment amount is between the lower limit and the upper limit of a single adjustment, the required adjustment amount is taken to obtain the candidate adjustment amount. When the absolute value of the required adjustment amount is greater than the upper limit of a single adjustment, the upper limit of a single adjustment or the negative upper limit of a single adjustment is taken to obtain the candidate adjustment amount. The adjusted inflow rate is obtained by adding the current inflow rate to the candidate adjustment rate. If the adjusted inflow rate is less than the lower limit of the total inflow rate, the current inflow rate is taken as the lower limit of the total inflow rate. If the adjusted inflow rate is greater than the upper limit of the total inflow rate, the current inflow rate is taken as the upper limit of the total inflow rate. If the adjusted inflow rate is between the lower limit and the upper limit of the total inflow rate, the candidate adjustment rate is taken as the final adjustment rate. If there is an unfinished process or the output holds the result, the final adjustment rate is replaced with zero and the inflow valve is controlled to adjust the inflow rate according to the final adjustment rate. The scheduling result is then output.

[0014] The technical effects and advantages of this invention are as follows: By classifying the detection results of intelligent sensing elements into continuous supply and demand and process-type water consumption, and only including the corresponding water consumption in the scheduling judgment after the process is closed, the problem of misjudging internal disturbances that have not yet been closed as external supply and demand imbalance is relatively avoided, thereby suppressing the problem of frequent correction of raw water volume and amplification of liquid level fluctuations. By introducing start markers, end markers, and state change markers into the backwashing, plant use, and sludge discharge processes, and combining them with cumulative differences, zeroing times, and process intervals to complete closed-loop identification, the consistency of internal water consumption metering can be improved, and the accuracy of process water consumption data entering water balance calculation can be improved. By calculating the average liquid level and total bottom area of ​​the clear water tanks that are in operation, the liquid level representation object is kept consistent with the range of tanks that are actually involved in the regulation and storage, thereby reducing the interference of non-operational tanks on liquid level prediction and supply and demand judgment. By switching the upper and lower limits of the liquid level according to time periods, and keeping the liquid level limit value of the previous cycle unchanged when the process is not over or the operation status changes, the liquid level judgment benchmark can be better connected with the current operating status, and the judgment jump caused by the limit switching can be relatively alleviated. By calculating the water inflow adjustment based on the effective supply-demand difference, total bottom area, and target liquid level, and then correcting the execution amount by combining the single adjustment range and the total water inflow range, the adjustment result can simultaneously meet the liquid level recovery requirements and the on-site water inflow constraints, thereby improving the stability of the scheduling execution. Attached Figure Description

[0015] Figure 1 This is a schematic diagram of the system modules of the present invention.

[0016] Figure 2This is a flowchart of the water intake regulation and control process under steady-state mode according to the present invention.

[0017] Figure 3 This is a flowchart of the water inlet regulation and control process under the energy-saving mode of the present invention.

[0018] Figure 4 This is a schematic diagram of the stable mode liquid level limit of the present invention. Detailed Implementation

[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0020] Refer to the instruction manual appendix Figure 1-4 The present invention provides an intelligent water balance system, comprising: The sensor acquisition module is used to collect the cumulative values ​​of influent, effluent, and recycled water at the current calculation time and the previous fixed value time, as well as the cumulative values ​​of backwashing, plant water, sedimentation tank influent, liquid levels of the four clear water tanks, and the operational status of the four clear water tanks, and outputs the collected data according to the same scheduling cycle. In this implementation, the sensor acquisition module is used to uniformly form basic water balance data, rather than simply transmitting field signals. Since subsequent calculations will utilize the cumulative differences between the current calculation time and the previous fixed value time using the cumulative values ​​of influent, effluent, and recycled water, and will also utilize the cumulative values ​​of backwashing, plant water consumption, sedimentation tank sludge discharge flow mode influent cumulative display value, and the clear water tank operation status to identify whether the process water consumption has been closed, the time caliber unification, source object binding, and process boundary attachment are completed simultaneously during the acquisition phase. Specifically, the scheduling cycle set by the PLC master station is used as the unified data acquisition benchmark. During each scheduling cycle, various detection values ​​are collected simultaneously, and the collected results are written with a scheduling cycle identifier and a source identifier. This ensures that subsequent communication aggregation can be merged according to the same cycle, subsequent process identification can be traced according to the same source, and subsequent balance calculations can be compared and performed under the same time caliber. To avoid problems such as unclear sources of detection values, inconsistent value timing, and inability to determine whether the process has ended, this implementation method also records process start, process end, and status change information simultaneously during data collection. This is to distinguish between continuous supply and demand and process-based water consumption, and to further determine which detection results are eligible for scheduling judgment. This implementation process includes the following: First, the cumulative values ​​of influent, effluent, and recycled water at the current calculation time and the previous fixed value time, as well as the cumulative values ​​of backwashing, plant water, cumulative influent display value in sedimentation tank sludge discharge flow mode, liquid levels in the four clear water tanks, and the operational status of the four clear water tanks, are collected within the same scheduling cycle. Each detected value is written with a scheduling cycle identifier and a source identifier, and the collected data is output. Specifically, a unified scheduling cycle trigger time is set in the PLC master station. Upon the trigger time, the master station reads the cumulative values ​​of influent, effluent, and recycled water corresponding to the current calculation time and the previous fixed value time, and also reads the cumulative values ​​of backwashing, plant water, cumulative influent display value in sedimentation tank sludge discharge flow mode, liquid levels in the four clear water tanks, and the operational status of the four clear water tanks. The interval between the previous fixed value time and the current calculation time... The interval is set to a fixed time interval, such as 5 minutes. The subsequent process identification module calculates the cumulative difference between the current calculation time and the previous fixed value time, and converts it into continuous supply and demand according to the scheduling cycle. After reading, each detection value is written with a scheduling cycle identifier and a source identifier. The scheduling cycle identifier indicates the water balance cycle to which the detection value belongs, and the source identifier indicates the detection object and specific location to which the detection value belongs. For example, the cumulative influent value corresponds to the influent source identifier, the cumulative influent display value of the sedimentation tank sludge discharge flow mode corresponds to the sludge discharge source identifier, the liquid levels of the four clear water tanks correspond to the four liquid level source identifiers, and the operation status of the four clear water tanks corresponds to the four operation source identifiers. Each collection record formed in this way has a detection value, a scheduling cycle identifier, and a source identifier, and subsequent modules can directly call the corresponding data according to the source and cycle. Furthermore, the system saves the cumulative values ​​of influent, effluent, and recycled water at the current calculation time and the previous fixed value time, as well as the cumulative values ​​of backwashing, plant water, and influent in the sedimentation tank sludge discharge flow mode. It also saves the current cycle sampling values ​​for the liquid levels and operational status of the four clear water tanks, and outputs the collected data corresponding to the scheduling cycle. Specifically, after the current scheduling cycle is completed, the cumulative values ​​of influent, effluent, and recycled water are written in pairs to the corresponding storage fields according to the current calculation time and the previous fixed value time, respectively. This allows the subsequent process identification module to directly subtract the previous fixed value time from the current calculation time value to obtain the influent cycle amount, effluent cycle amount, and recycled water cycle amount. Similarly, the cumulative values ​​of backwashing, plant water, and recycled water are also saved. The cumulative water value and the cumulative influent value of the sedimentation tank sludge discharge flow mode are also saved according to the current calculation time value and the previous fixed value time value, so that the cumulative value at the beginning and end of the process can be extracted at the end of the process, and the backwash water consumption, plant water consumption and sludge discharge water consumption can be calculated accordingly. Correspondingly, the liquid level of the four clear water tanks and the operation status of the four clear water tanks only save the current period sampling value. Among them, the liquid level of the four clear water tanks is used for subsequent calculation of the average liquid level, and the operation status of the four clear water tanks is used to determine which tanks participate in the calculation of the average liquid level and the total bottom area. After this processing, different types of data enter the subsequent processing chain in a form corresponding to their own uses: the continuous supply and demand and process-type cumulative values ​​retain the two previous and previous value times, while the liquid level and operation status retain the current period sampling value. Simultaneously, start markers, end markers, and state change markers are collected for the backwashing process, plant operation process, sludge discharge process, and clear water tank commissioning and switching process. These markers are then written into the corresponding collected data, and the collected data with process boundaries is output. Specifically, the start and end markers for the backwashing process can be generated by backwashing equipment start / stop signals, backwashing control commands, or changes in backwashing process positions. The start and end markers for the plant operation process can be generated by the start / stop status of relevant plant equipment or valves. The start and end markers for the sludge discharge process can be generated by sludge discharge control signals, sludge discharge valve operating status, or sludge discharge program positions. The start and end markers for the clear water tank commissioning and switching process can be generated when the commissioning status changes from off to on, from on to off, or during inter-tank switching. State change markers are used to record the moments when the internal state of the process changes. They are generated by comparing the process state at the current sampling moment with the same process state at the previous sampling moment. When the two are inconsistent... When a state change marker is written into the current collection record, the start, end, and state change markers for the backwashing process, plant use process, and sludge discharge process are written into the corresponding cumulative values ​​or the collection data of the corresponding sludge discharge source, respectively. The start, end, and state change markers for the clear water tank commissioning and switching process are written into the collection data of the corresponding clear water tank commissioning state. In this way, when performing process identification in the future, the system does not need to find the process start and end points from the outside. Instead, it can directly divide the candidate process segments according to the process boundary information attached to the collection data and further determine whether a certain process has been closed. If a start marker has appeared in a certain scheduling cycle but no corresponding end marker has appeared, the process remains in an unfinished state in the current cycle, and the currently collected detection values ​​and process boundary information are retained to the next scheduling cycle so that the same process can be spliced ​​across cycles into a complete process interval in the future. This avoids prematurely including internal disturbances that have not yet been closed as effective water consumption in the scheduling judgment. Through the above processing, the data output by the sensor acquisition module is no longer a simple collection of field signals, but a data set with a unified scheduling cycle, a clear source object, a fixed value time correspondence, and process boundary information. The subsequent communication aggregation module can directly merge data according to the scheduling cycle and source identifier. The subsequent process identification module can directly calculate the continuous supply and demand based on the current calculation time value and the previous fixed value time value, and divide the process interval according to start and end markers. The subsequent balance calculation module can also call the clear water tank level and operation status for calculation under the same time caliber. This avoids data from different time values ​​being mistakenly merged into the same calculation caliber, and also avoids internal processes such as backwashing, plant use, sludge discharge, and operation switching being mistakenly treated as closed effective water consumption before they are completed. This lays the data foundation for subsequent control logic that only adjusts the actual imbalance and does not adjust unclosed internal disturbances. In practical applications, for example, at the beginning of a certain scheduling cycle, the PLC master station simultaneously reads the current calculation time and the previous fixed value time. The system collects the cumulative values ​​of influent, effluent, and recycled water, and reads the cumulative values ​​of backwashing, plant water, and influent influent in the sedimentation tank sludge discharge flow mode, as well as the liquid levels and operational status of the four clear water tanks. These values ​​are then uniformly written into the same scheduling cycle identifier. Subsequently, the cumulative values ​​are saved according to the current calculation time and the previous fixed value, respectively. The liquid levels and operational status of the four clear water tanks are saved as the current cycle sampling values. If the backwashing equipment changes from stopped to running within this cycle, a start marker is written into the corresponding backwashing data. If the sludge discharge flow mode completes one cumulative influent cycle and returns to zero, the zeroing record is retained in the corresponding sludge discharge data. If a clear water tank changes from being stopped to being operational, a status change marker is written into the corresponding operational status data. In the final collected data, each detection value carries a scheduling cycle identifier, a source identifier, and corresponding process boundary information. Subsequent modules can directly identify continuous supply and demand, identify closed-loop water consumption, and eliminate internal disturbances that have not yet closed the process based on this data.

[0021] The communication aggregation module is used to read the collected data from each PLC slave station into the PLC master station via ModbusTCP, write it into the master station data area according to water inlet, water outlet, reuse, backwash, sludge discharge, plant use, liquid level and commissioning status, and output the aggregated data. In this embodiment, the function of the communication aggregation module is to reorganize the collected data uploaded by each PLC slave station into aggregated data that can be directly called upon for subsequent process identification and balance calculation on the PLC master station side. Although the data output by the sensor acquisition module already contains scheduling cycle identifiers, source identifiers, and process boundary information, these data are still scattered in different PLC slave stations and different register addresses. If unified reading, classification and transfer, same-source binding, and cross-cycle continuation are not completed first, it will be impossible to stably identify continuous supply and demand, candidate process segments, and closed-loop water consumption. In specific implementation, the communication aggregation module first reads the collected data into the PLC master station according to the register address order of each PLC slave station, then transfers it to the master station data area according to the detection object category, and organizes data from the same source into the same cycle aggregation area within the same scheduling cycle. On this basis, it continues to form a process aggregation area according to the process boundary. Finally, the process data that has ended is written into the current aggregation data, and the process data that has not yet ended is retained to continue in the next scheduling cycle. The implementation process includes the following steps: The system reads the acquired data sequentially from the Modbus TCP register addresses of the nine PLC slave stations, synchronously writing the slave station identifier, register address, and read time to each piece of acquired data, and outputting the raw collected data. Specifically, the PLC master station establishes a communication connection with the nine PLC slave stations via Modbus TCP, and pre-configures a corresponding register address table for each slave station. This table records the register start address, register length, and object category of each acquired object within that slave station. Within each scheduling cycle, the master station initiates read requests sequentially according to the slave station number, and within each slave station, reads data sequentially in ascending order of register address, thus ensuring a fixed read order within the same scheduling cycle. Each read... Upon receiving a piece of data, the slave station identifier, register address, and read time are simultaneously written into that data. The slave station identifier distinguishes which PLC slave station the data originates from, the register address distinguishes which register location within that slave station the data originates from, and the read time is the system time when the PLC master station completes the read. Each record thus formed contains at least the detection value, scheduling cycle identifier, source identifier, slave station identifier, register address, and read time, thereby constituting the original collected data. The purpose of using register address-based sequential reading is to ensure that the order in which multiple data items within the same slave station enter the master station is consistent in each scheduling cycle, facilitating subsequent sorting and binding by read time and source identifier. After unified reading is completed, the raw collected data is transferred to the corresponding data area of ​​the PLC master station according to water inlet, water outlet, reuse, backwash, sludge discharge, plant use, liquid level, and commissioning status. Data collected within the same scheduling cycle is written to the same periodic collection area, and periodic collection data is output. Specifically, the PLC master station pre-divides the data into water inlet, water outlet, reuse, backwash, sludge discharge, plant use, liquid level, and commissioning status areas, with each area having a corresponding storage location set according to its source identifier. When a piece of raw collected data enters the master station, its object category is first determined based on the source identifier, and then it is written to the target storage location in the corresponding data area. For example, the cumulative influent value is written to the influent data area, the liquid levels of the four clear water tanks are written to the liquid level data area, and the operational status of the four clear water tanks is written to the operational status data area. During writing, the scheduling cycle identifier and reading time of the data are read simultaneously, and data whose reading time falls within the same scheduling cycle are written to the same cycle collection area. The same cycle collection area is established with the scheduling cycle identifier as the index, and the corresponding detection value and auxiliary fields are stored in the area according to the source identifier. After this processing, the collected data from different slave stations and different registers within the same scheduling cycle are merged into the same cycle collection area, and it is no longer necessary to search for data in the same cycle across slave stations, thereby ensuring that the subsequent modules call data according to the scheduling cycle with consistent caliber. After merging data within the same scheduling cycle, the detection values, scheduling cycle identifiers, source identifiers, start markers, end markers, and state change markers in the cycle-collected data are bound to the same source identifier. The detection values ​​from the start marker to the end marker are then continuously written into the same process collection area, and the process collection data is output. Specifically, using the source identifier as an index, all records under the same source identifier are extracted from the cycle collection area. These records are then arranged in ascending order by the read time, ensuring that the same source object forms continuous time-series records within the current and adjacent scheduling cycles. Subsequently, the detection values, scheduling cycle identifiers, source identifiers, start markers, end markers, and state change markers in each time-series record are bound to the corresponding data, ensuring that the detection result at each sampling time is associated with that time. The process boundary information is kept in the same record; if a start mark appears under a source identifier, the record is taken as the starting point of the process, and the detection values ​​that appear consecutively under the source identifier are written to the same process collection area in sequence; if an end mark appears later, the record with the end mark is taken as the end point of the process, and writing to the process collection area stops; if a state change mark appears between the start mark and the end mark, the state change mark and the detection value at the corresponding time are kept in the process collection area so that the subsequent process identification module can determine whether the internal state of the process is complete; the process collection area formed in this way represents the continuous detection data set of a source object in a certain process, and each process collection area retains complete start point, end point and intermediate state information; After forming the process aggregation area, the process aggregation data is sorted according to the reading time. Detection values ​​after the end marker are written into the current aggregation data, while detection values ​​without an end marker are retained in the current process aggregation area and carried over to the next scheduling cycle. The aggregation data is then output. Specifically, the records within each process aggregation area are again sorted from earliest to latest reading time to ensure that all detection values ​​within the same process maintain a unique time order. After sorting, if an end marker has appeared in a process aggregation area, the record corresponding to the end marker is taken as the end position of that process. Detection values ​​after that end position that still belong to the same scheduling cycle are written into the current aggregation data as the completed aggregation results directly called by subsequent modules within this scheduling cycle. If no end marker has appeared in a process aggregation area... If a process is marked as "closed" at the end of the current scheduling cycle, the detection value of the process is not written into the current collection data. Instead, the entire collection area of ​​the process is retained, and new records from the same source are added to the collection area when the next scheduling cycle arrives, so that the same unfinished process can continue across cycles. To avoid confusion when continuing across cycles, the starting scheduling cycle identifier, the current last read time, and the current last status information of the process collection area are retained when the process is continued to be saved. The next scheduling cycle will then continue to splice the process with the same source identifier. After this processing, the completed process can enter the current collection data so that the subsequent process identification module can directly calculate the water consumption. The process that has not yet ended remains in an unclosed state and will not be prematurely regarded as valid water consumption for the current scheduling judgment. Through the above processing, the communication aggregation module completes the conversion of slave station data into computable data of the master station. This reorganizes the collected data, which was originally scattered in different PLC slave stations and different registers, into directly callable aggregated data according to a unified scheduling cycle, a unified source object, and a unified process boundary. In this way, on the one hand, it ensures that continuous supply and demand, liquid level, and commissioning status can be extracted simultaneously under the same cycle caliber. On the other hand, it also ensures that process data such as backwashing, plant use, sludge discharge, and commissioning switching are only retained in the process aggregation area before the end mark appears, and will not enter the current aggregation data in advance. This provides a direct basis for subsequent identification of effective water consumption based on whether the process is closed. In practical applications: For example, nine PLC slave stations are responsible for collecting data on influent, effluent, backwashing, sludge discharge, liquid level, and operational status. Within a certain scheduling cycle, the PLC master station reads data from each slave station sequentially according to register address order, and writes the slave station identifier, register address, and read time for each data entry. Subsequently, the master station writes the cumulative influent value to the influent data area, the cumulative influent display value for the sludge discharge flow mode of the sedimentation tank to the sludge discharge data area, and the liquid levels and operational status of the four clear water tanks to the liquid level data area and operational status data area, respectively. Records whose times fall within the scheduling cycle are uniformly written into the corresponding cycle collection area; if the sludge discharge data has a start mark but no end mark in the current cycle, the sludge discharge data is continuously retained in the corresponding process collection area and is not written into the current collection data; if a backwash data has both a start mark and an end mark in the current cycle, the detection values ​​from the start mark to the end mark are written into the same process collection area, and the data after the end mark is written into the current collection data, so that the subsequent process identification module can directly calculate the backwash water consumption based on this.

[0022] The process identification module is used to calculate the influent cycle volume, effluent cycle volume, and reuse cycle volume based on the cumulative difference between the current calculation time and the previous fixed value time according to the collected data. It determines the backwash water consumption based on the cumulative difference at the end of the backwash process, the plant water consumption based on the cumulative difference at the end of the plant use process, and the sludge discharge water consumption based on the number of times the cumulative display value of the influent is zeroed and the single sludge discharge volume in the sedimentation tank sludge discharge flow mode. It also determines the backwash water consumption, plant water consumption, and sludge discharge water consumption after the process ends as the closed-loop water consumption and outputs the continuous supply and demand and closed-loop water consumption. In this embodiment, the process identification module is used to further divide the collected data into continuous supply and demand quantities that can be directly involved in water balance calculations and closed-loop water consumption quantities that are only allowed to be recorded after the process is closed. Specifically, influent, effluent, and reuse are continuous supply and demand quantities, and the corresponding periodic quantities are obtained by using the cumulative difference between the current calculation time and the previous fixed value time. Backwashing, plant use, and sludge discharge are process-type water consumption quantities, and they are only identified as closed-loop water consumption quantities and written into the corresponding scheduling cycle after the corresponding process has formed a complete process interval and completed the closure identification. The purpose of this processing is to retain internal disturbances that have not yet closed the process in the candidate process segment for continued observation, without directly participating in the current scheduling judgment, thereby avoiding misjudging the transient impact when the internal process is not yet completed as an external supply and demand imbalance that needs to be adjusted immediately. To ensure that the identification results are executable and verifiable, this embodiment provides clear calculation methods and connection rules for continuous supply and demand quantities, backwashing and plant use water consumption quantities, sludge discharge water consumption quantities, and cross-cycle continuation processing. The implementation process includes the following steps: First, the cumulative values ​​of influent, effluent, and reclaimed water in the collected data are extracted based on the source identifier, using the current calculation time value and the previous fixed value time value respectively. The influent cycle quantity, effluent cycle quantity, and reclaimed water cycle quantity are obtained by subtracting the previous fixed value time value from the current calculation time value. Backwash data, plant usage data, and sludge discharge data are then segmented into candidate process segments based on start markers, end markers, state change markers, and read times, outputting continuous supply and demand quantities and candidate process segments. Specifically, different detection objects are first distinguished by source identifiers. Then, under the same source identifier, the cumulative value corresponding to the current calculation time and the cumulative value corresponding to the previous fixed value time are extracted separately. The corresponding influent cycle quantity, effluent cycle quantity, and reclaimed water cycle quantity are obtained by subtracting the previous fixed value time value from the current calculation time value. If the current calculation time value is less than the previous fixed value time value, it indicates that the cumulative value has regressed. In this case, instead of directly taking the difference, the data corresponding to that source identifier is marked as cumulative. Abnormal data is retained until the next valid value is obtained and then re-paired to avoid miscalculating the instrument as a negative water consumption after resetting. For backwash data, plant usage data, and sludge discharge data, instead of directly subtracting the previous fixed value time from the current calculation time, all records under the same source identifier are first arranged in ascending order of reading time. Then, the start mark is used as the process start point, and the end mark is used as the process end point. The continuous records between the start mark and the end mark are used as a candidate process segment. If a state change mark appears between the start mark and the end mark, the corresponding record is included in the candidate process segment for subsequent verification of whether the internal state of the process is complete. If a start mark has appeared under a certain source identifier but no end mark has appeared, all data from the start mark to the current last record is temporarily designated as an unclosed candidate process segment and is retained until the next scheduling cycle. Through the above processing, continuous supply and demand and candidate process segments are separated in the same module. The former can directly participate in subsequent balance calculations, while the latter enters subsequent process verification. After segmenting the candidate process segments, the cumulative value at the process start point, the cumulative value at the process end point, the cumulative sequence within the process, and the state sequence within the process are extracted for each candidate process segment. The first water consumption is obtained by subtracting the cumulative value at the process start point from the cumulative value at the process end point. The second water consumption is obtained by summing the differences between adjacent cumulative values ​​within the process. Four consistency checks are performed: the difference between the first and second water consumptions, whether the cumulative sequence within the process is monotonically decreasing, whether the start and end markers each appear once, and whether the state change markers are closed. Only candidate process segments that pass all four consistency checks are identified as closed process segments, and the backwash water consumption and plant water consumption are output. The water consumption is used; specifically, for both the backwashing candidate process segment and the plant use candidate process segment, the cumulative value from the first record marked with a start mark is read as the cumulative value at the process start point, and the cumulative value from the last record marked with an end mark is read as the cumulative value at the process end point. The first water consumption is obtained by subtracting the cumulative value at the process start point from the cumulative value at the process end point. Simultaneously, the cumulative values ​​of all adjacent records within the candidate process segment are subtracted pairwise, and all differences are summed to obtain the second water consumption. The first water consumption reflects the cumulative difference between the beginning and end of the process, while the second water consumption reflects the sum of the cumulative differences between each segment within the process. Under normal circumstances, the two should be consistent; therefore, the difference between the two is used as... The first consistency check involves: 1) The cumulative sequence within the process must be monotonically non-decreasing; that is, the cumulative value of each adjacent record within the candidate process segment must be compared, and the cumulative value of the later record must not be less than the cumulative value of the earlier record. If a decrease occurs, it indicates an anomaly in the cumulative sequence within the process segment, and it is not considered a closed process segment. 2) The third consistency check requires that the start and end markers each appear once; that is, the same candidate process segment can only have one process start point and one process end point. If either marker is missing or there is a duplicate marker, it indicates that the process boundary is unclear, and it is not considered a closed process segment. 3) The fourth consistency check requires that the state change markers are closed at both ends. The specific criteria are as follows: the first state value in the state change marker is consistent with the first operating state after the start marker, the last state value is consistent with the last operating state before the end marker, and the state sequence after the start marker can be continuously connected to the state sequence before the end marker without any state breaks in between; only when all four consistency checks pass simultaneously is the candidate process segment determined as a closed process segment, and the first water consumption is taken as the backwash water consumption or plant water consumption corresponding to the closed process segment; if any one of the four consistency checks fails, the candidate process segment is not included in the closed water consumption, but its data is retained to continue into the next scheduling cycle; For the sludge discharge process, a time-sequenced zeroing sequence is constructed for the cumulative influent display value of the sludge discharge flow mode in the sedimentation tank according to the source identifier. The moment when the value changes from greater than zero to equal to zero is recorded as a candidate zeroing point. The candidate zeroing points are checked against the sludge discharge start mark, sludge discharge end mark, and clear water tank commissioning status changes during the same period. Candidate zeroing points that are after the start mark and before the end mark and do not fall into the commissioning switching shielding zone are retained as valid zeroing points. The sludge discharge water consumption is obtained by multiplying the number of valid zeroing points by the single sludge discharge volume and outputting the sludge discharge water consumption. In specific implementation, the cumulative influent display value of the sludge discharge flow mode in the sedimentation tank is first sorted in ascending order by source identifier and reading time. Adjacent records are compared one by one under the same source identifier. When the display value is greater than zero at the previous moment and equal to zero at the current moment, the current moment is recorded as a candidate zeroing point. This zeroing point indicates that the cumulative influent reaches the set sludge discharge volume and is then zeroed. Subsequently, a corresponding check is performed on each candidate zeroing point: First, the candidate zeroing point should be located after the sludge discharge start mark and before the sludge discharge end mark; Second, the candidate zeroing point should not fall within the commissioning switch shielding zone formed by the change in the commissioning status of the clear water tank; The commissioning switch shielding zone starts at the time corresponding to the commissioning status change mark and ends at the end of a complete scheduling cycle thereafter. Zeroing points are not retained within this interval to avoid the display value fluctuation caused by tank switching being mistakenly identified as sludge discharge completion; Third, if there are multiple candidate zeroing points in the same period, they are retained and checked according to the corresponding relationship; After the corresponding check, the retained candidate zeroing points are recorded as valid zeroing points, and the sludge discharge water consumption is obtained by multiplying the number of valid zeroing points by the single sludge discharge volume; After this processing, the sludge discharge water consumption directly corresponds to the cumulative influent zeroing behavior in the sludge discharge flow mode, rather than relying on instantaneous flow changes; After obtaining the backwash water consumption, plant water consumption, and sludge discharge water consumption, these are written into the closed-loop water consumption field according to the scheduling cycle in which the process ends. For candidate process segments that fail the four consistency checks or fail to complete the zero-point correspondence verification, the starting point cumulative value, current last cumulative value, current state sequence, and current valid zero-point are retained and extended to the next scheduling cycle for further splicing. The aforementioned consistency checks and zero-point correspondence verifications are repeated for newly added data after continuation splicing until an end marker appears and the closed-loop water consumption stabilizes, at which point the closed-loop water consumption is output. Specifically, for backwash closed-loop process segments and plant closed-loop process segments that have passed the four consistency checks, the scheduling cycle corresponding to the record where the end marker is located is used as the accounting cycle, and the water consumption corresponding to the process is written into the closed-loop water consumption field of that scheduling cycle. For sludge discharge processes that have completed the zero-point correspondence verification, the scheduling cycle in which the process ends is also used as the accounting cycle, and the sludge discharge water consumption is written into the same closed-loop water consumption field. If a selected process segment fails to pass the four consistency checks by the end of the current scheduling cycle, or if the sludge discharge process has not yet completed the zero-point verification, the closed-loop water consumption will not be written. Instead, the starting cumulative value, current last cumulative value, current state sequence, and current valid zero-point of the candidate process segment will be retained. In the next scheduling cycle, newly added records from the same source will be directly appended to the candidate process segment and spliced ​​together. After splicing, the aforementioned four consistency checks and zero-point verification will be re-executed until the candidate process segment shows an end marker, and the closed-loop water consumption calculated in this round is the same as the closed-loop water consumption calculated in the previous round of splicing under a unified metering precision. Only then will it be determined as the final closed-loop water consumption. The unified metering precision uses the decimal places of the on-site cumulative value. If the two results are consistent under this precision, the closed-loop water consumption is considered stable. The purpose of this process is to avoid premature accounting before the process is closed and to avoid changes in the closed-loop water consumption between adjacent calculations due to the existence of new data at the end of the process. Through the above processing, the process identification module identifies influent, effluent, and reuse as continuous supply and demand, and backwashing, plant use, and sludge discharge as closed-loop water consumption only recorded after the process is closed. It also avoids incorrectly including unclosed internal processes in the current scheduling cycle through cross-cycle continuation and repeated verification. This preserves the real-time reflection capability of continuous supply and demand on current water volume changes while ensuring that internal water consumption is only included in water balance calculations after boundaries are clearly defined and calculations are stable. This allows subsequent regulation to be based on real imbalances rather than transient disturbances. In practical applications, for example, if the cumulative influent value in a certain scheduling cycle is 12,500 cubic meters at the previous fixed value time and 12,620 cubic meters at the current calculation time, the difference between the two values ​​is used to obtain the influent change corresponding to the current value interval, and this is used to form the influent cycle quantity. Within the same time period, if a backwashing process begins in this cycle and ends in the next cycle, the system first divides the process into candidate process segments according to the start and end markers. The first water consumption is obtained by subtracting the cumulative value at the start of the process from the cumulative value at the end of the process. The second water consumption is obtained by summing the differences between the cumulative values ​​of each adjacent process. The backwash water consumption is written into the scheduling cycle where the end mark is located only when the two are consistent, the cumulative value does not regress, the start mark and the end mark each appear once, and the state change sequence is completely connected. For the sludge discharge process, if the cumulative display value of the influent in the sludge discharge flow mode of the sedimentation tank returns to zero after the start of sludge discharge, and the zero point is after the start mark of sludge discharge and before the end mark of sludge discharge and does not fall into the shielding area after the clear water tank is put into use, then the zero point is retained as a valid zero point. The sludge discharge water consumption is obtained by multiplying the number of valid zero points by the single sludge discharge volume. If the sludge discharge process does not have an end mark at the end of the current scheduling cycle, its start cumulative value, current last cumulative value, state sequence and valid zero point are retained until the next scheduling cycle. The closure water consumption is written into the closure water consumption after the process is closed and the closure water consumption is stable.

[0023] The liquid level limit module is used to switch the current liquid level upper limit and the current liquid level lower limit from 48 pre-stored liquid level upper limit values ​​and 48 liquid level lower limit values ​​according to the current hour and minute, and output the current liquid level upper limit and the current liquid level lower limit. In this embodiment, the function of the liquid level limit module is to provide the effective upper and lower limits of the liquid level for the current time period for subsequent liquid level prediction and influent adjustment. This module does not simply switch the limits according to the clock, but after reading the upper and lower limits of the liquid level by time period, it first checks the connection relationship between the current time period and the adjacent time period, and then combines the process boundaries of the backwashing process, plant operation process, sludge discharge process and clear water tank commissioning and switching process to determine whether the conditions for updating the liquid level limit are met in this cycle. The purpose of this processing is to avoid directly switching the liquid level limit when the internal process has not ended or the tank commissioning state is switching, and to prevent the liquid level judgment benchmark from jumping during the unclosed stage of the process, thereby affecting the subsequent identification of external supply and demand imbalance. The implementation process includes the following steps: First, the 24 hours of a day are divided into 48 time periods, each 30 minutes long. The current time period number is obtained by multiplying the current hour by 2 and adding 1 if the current minute is greater than or equal to 30. The upper and lower limits of the liquid level corresponding to this time period number are then read, and the current candidate upper and lower limits are output. Specifically, a liquid level limit table consisting of 48 sets of upper and lower limits is pre-established in the PLC master station. Each set of upper and lower limits corresponds to a 30-minute time period of the day. The time period numbers are consecutive: 00:00 to 00:29 corresponds to time period 0, 00:30 to 00:59 to time period 1, 01:00 to 01:29 to time period 2, and so on, up to 23:30. 23:59 corresponds to the 47th time period. During actual operation, the liquid level limit module reads the current time from the PLC system, extracts the current hour and minute, multiplies the current hour by 2 to obtain the basic sequence number, and adds 1 when the current minute is greater than or equal to 30 to obtain the current time period sequence number. For example, if the current time is 08:12, the current time period sequence number is 16; if the current time is 08:35, the current time period sequence number is 17. After obtaining the current time period sequence number, the upper and lower liquid level limits corresponding to that time period sequence number are read from the liquid level limit table and determined as the current candidate upper and lower liquid level limits, respectively. This ensures that the reading of the liquid level limit values ​​corresponds to the clock caliber in a fixed manner, so that each scheduling cycle obtains a candidate limit pair consistent with the current time period before entering the liquid level judgment. After completing the time period reading, the current candidate liquid level upper limit is compared sequentially with the liquid level upper limit values ​​of the previous and next time periods. Similarly, the current candidate liquid level lower limit is compared sequentially with the liquid level lower limit values ​​of the previous and next time periods. If both the current candidate liquid level upper and lower limits are within the range of the liquid level upper and lower limits of adjacent time periods, the current candidate liquid level upper and lower limits are output. Otherwise, the previously output liquid level upper and lower limits corresponding to the current time period number are output. In implementation, firstly, determine the previous and next time period numbers corresponding to the current time period number. When the current time period number is 0, the previous time period number is 47; when the current time period number is 47, the next time period number is 0, forming a closed time sequence for the entire day. Then, read the upper limit, lower limit, and upper and lower limits of the liquid level for the previous and next time periods, respectively, and compare them with the current candidate upper and lower limits of the liquid level. The comparison criteria are: if the current candidate upper limit of the liquid level is greater than or equal to the upper limit of the liquid level in the two adjacent time periods... If the current candidate liquid level upper limit is less than or equal to the larger of the upper limit values ​​of the two adjacent time periods, then the current candidate liquid level upper limit is considered to be between the upper limit values ​​of the two adjacent time periods. If the current candidate liquid level lower limit is greater than or equal to the smaller of the lower limit values ​​of the two adjacent time periods, and less than or equal to the larger of the lower limit values ​​of the two adjacent time periods, then the current candidate liquid level lower limit is considered to be between the lower limit values ​​of the two adjacent time periods. Only when both the current candidate liquid level upper limit and the current candidate liquid level lower limit meet the above conditions will the current candidate liquid level upper limit and the current candidate liquid level lower limit be directly output. If any candidate value does not meet the above conditions, the current candidate liquid level upper limit and the current candidate liquid level lower limit will be output directly. If the current time period is not updated, the liquid level limit will not be updated in the current scheduling cycle. Instead, the previously output upper and lower liquid level limits corresponding to the current time period number will be output. The previously output upper and lower liquid level limits refer to the upper and lower liquid level limits that the liquid level limit module has actually output in the previous scheduling cycle and participated in the subsequent adjustment judgment. The purpose of this processing is to avoid directly changing the current judgment benchmark when individual time period values ​​in the liquid level limit table are abnormal, the time period switching boundary changes abruptly, or the value entry is incorrect, so that the liquid level limit switching remains continuous with the adjacent time period. After completing the connection verification between adjacent time periods, the current candidate upper and lower liquid level limits are checked in conjunction with the start, end, and status change markers of the backwashing process, plant operation process, sludge discharge process, and clear water tank commissioning and switching process. If any process has a start marker but no corresponding end marker, the upper and lower liquid level limits output in the previous scheduling cycle remain unchanged. If all processes have corresponding end markers and there is no change in the clear water tank's commissioning status, the current upper and lower liquid level limits are output. Specifically, the liquid level limits... The value module reads the start marker, end marker, and status change marker corresponding to the backwashing process, plant operation process, sludge discharge process, and clear water tank commissioning / switching process within the current scheduling cycle, and checks them on a process-by-process basis. The checking rule is as follows: if a process has a start marker in the current cycle or a previous extended cycle, but has not yet shown a corresponding end marker by the end of the current cycle, then the process is considered not yet finished; if the clear water tank commissioning status changes from commissioning to decommissioning, from decommissioning to commissioning, or a switch between tanks within the current scheduling cycle, the check is performed on a process-by-process basis. If a change in the clear water tank's operational status is detected, it indicates a change in the clear water tank's status. As long as any of the four processes has not yet ended, or if a change in the clear water tank's operational status occurs within the current scheduling cycle, the liquid level limit module will not use the current candidate upper and lower liquid level limits, but will continue to maintain the upper and lower liquid level limits output in the previous scheduling cycle. Only when the backwashing process, plant operation process, and sludge discharge process have all shown corresponding end markers, and there is no change in the clear water tank's operational status within the current scheduling cycle, will the current candidate upper and lower liquid level limits be used. The lower limit is officially output as the current upper limit and the current lower limit of the liquid level. The reason for adopting this method is that backwashing, plant use, sludge discharge and the commissioning of the clear water tank will change the basis for interpreting the current liquid level change. When these processes are not closed or the tank structure is not stable, switching the liquid level limit value can easily confuse the transient changes brought about by the internal processes with the external supply and demand imbalance. Therefore, in these cases, keeping the liquid level limit value output in the previous scheduling cycle unchanged can keep the liquid level judgment benchmark stable. The liquid level limit value is updated after the process ends and the tank state returns to stability. Through the above processing, the upper and lower limits of the liquid level output by the liquid level limit module not only correspond to the current time period, but also undergo the connection check of adjacent time periods and process status check, thereby avoiding interference to subsequent adjustment judgment when the limit table switching and the internal process is not closed at the same time. This enables the comparison between the predicted liquid level and the liquid level limit to be based on a stable, continuous liquid level judgment benchmark that is suitable for the current working conditions, reducing misjudgments caused by sudden limit changes or incomplete processes. In practical applications: For example, if the current time is 08:35, the liquid level limit module first calculates the current time period number 17 based on the current hour (8) and minute (35). Then, it reads the upper and lower limits of the 17th group of liquid level values ​​from the liquid level limit table as the current candidate upper and lower limits. Subsequently, it reads the upper and lower limits of the 16th and 18th groups of liquid level values ​​and compares them with the current candidate upper and lower limits. If both the current candidate upper and lower limits are between the corresponding limits of two adjacent time periods, it indicates that the current time period limit is connected to the adjacent time period. Normal; Further check the process boundary information within this scheduling cycle. If it is found that the sludge discharge process has a start mark but no end mark in this cycle, the current candidate upper and lower liquid level limits will not take effect for the time being, and the upper and lower liquid level limits output in the previous scheduling cycle will continue to be used. If the backwashing process, plant use process and sludge discharge process have all ended in this cycle, and the commissioning status of the four clear water tanks has not changed, then the current candidate upper and lower liquid level limits will be output as the current upper and lower liquid level limits for subsequent prediction, comparison and adjustment.

[0024] The balance calculation module is used to calculate the average liquid level based on the operation status and liquid level of the four clear water tanks, calculate the total bottom area based on the operation status and bottom area of ​​each tank, calculate the effective supply and demand difference based on the continuous supply and demand and the closed-loop water consumption, and calculate the predicted liquid level based on the average liquid level, total bottom area and effective supply and demand difference, and output the effective supply and demand difference and the predicted liquid level. In this embodiment, the function of the balance calculation module is to uniformly convert the identified continuous supply and demand, closed-loop water consumption, clear water tank level, and clear water tank operation status into the actual water storage status and predicted level under the current scheduling cycle. The calculation of this module is based on two points: first, only clear water tanks in operation participate in the calculation of average level and total bottom area; second, only internal water consumption that has been closed in the process participates in the calculation of effective supply and demand difference. Through this processing, the level prediction can be based on the actual tank structure participating in the current regulation and the confirmed water volume changes, avoiding the incorrect inclusion of the liquid level of unused tanks or the water consumption of unclosed processes in the calculation, which would lead to the distortion of subsequent regulation judgments. The implementation process includes the following steps: First, the operational status of the four clear water tanks is defined as the effective tank markers. The liquid levels of the clear water tanks corresponding to each effective tank marker are summed and then divided by the number of effective tank markers to obtain the average liquid level. The number of effective tank markers is then multiplied by the bottom area of ​​a single tank to obtain the total bottom area. The average liquid level and the total bottom area are then output. In specific implementation, the operational status of the four clear water tanks is read first, and each clear water tank is checked to see if it is currently in operation. Clear water tanks with an operational status equal to "in operation" are marked as effective tanks, and an effective tank marker value of 1 is written to the corresponding position. Clear water tanks that are not in operation are marked as invalid tanks, and an effective tank marker value of 0 is written to the corresponding position. Then, the liquid levels of the four clear water tanks are read, and only the liquid levels of the clear water tanks with an effective tank marker value of 1 are extracted for summation. The sum of the liquid levels is divided by the number of effective tank markers to obtain the average liquid level. Here, the number of effective tank markers is four. The sum of the values; if the number of effective pool markers is greater than zero, the average liquid level is calculated as described above; if the number of effective pool markers is equal to zero, the average liquid level and total bottom area output in the previous scheduling cycle remain unchanged, and the predicted liquid level is not updated in the current scheduling cycle to avoid division by zero; the bottom area of ​​a single pool uses a pre-stored fixed area value. If the bottom areas of the four clear water pools are the same, the total bottom area is obtained by directly multiplying the number of effective pool markers by the bottom area of ​​a single pool; if the bottom areas of the four clear water pools are different, the bottom areas corresponding to each clear water pool with an effective pool marker value of 1 are summed to obtain the total bottom area; this scheme takes the example of four clear water pools having the same bottom area, so the total bottom area is obtained by multiplying the number of effective pool markers by the bottom area of ​​a single pool; after this processing, the average liquid level and total bottom area correspond to the set of clear water pools currently participating in regulation and storage, rather than calculating all pools together; After obtaining the current pool structure, the influent cycle quantity and reuse cycle quantity in the continuous supply and demand are added together, and the effluent cycle quantity and closed-loop water consumption are added together. The effective supply and demand difference is obtained by subtracting the latter from the former. The closed-loop water consumption is then written into the corresponding water consumption fields according to backwash water consumption, plant water consumption, and sludge discharge water consumption, and the effective supply and demand difference is output. In specific implementation, the influent cycle quantity, effluent cycle quantity, reuse cycle quantity, and closed-loop water consumption output by the process identification module are read first. The closed-loop water consumption is the total internal water consumption that has been identified by process closure and written into the current scheduling cycle. At the same time, the backwash water consumption, plant water consumption, and sludge discharge water consumption corresponding to the closed-loop water consumption are read and written into the backwash water consumption field, plant water consumption field, and sludge discharge water consumption field, respectively, so that the various water consumption components can be directly called in subsequent screen display, data traceability, or classification statistics. Subsequently, the influent cycle quantity, reuse cycle quantity, reuse cycle quantity, and sludge discharge water consumption are read together. The total inflow is obtained by adding the water cycle volume to the reuse cycle volume, and the total outflow is obtained by adding the outflow cycle volume to the closure water consumption. The effective supply-demand difference is then obtained by subtracting the latter from the former. This effective supply-demand difference represents the net increase or decrease in water volume that has been confirmed to enter the clear water tank system within the current scheduling cycle. When the effective supply-demand difference is greater than zero, it indicates that the effective water volume entering the clear water tank system within the current cycle is greater than the sum of the outflow and closure water consumption, and the liquid level has an upward trend. When the effective supply-demand difference is less than zero, it indicates that the sum of the outflow and closure water consumption within the current cycle is greater than the effective water volume entering the clear water tank system, and the liquid level has a downward trend. When the effective supply-demand difference is equal to zero, it indicates that the effective inflow and effective outflow are balanced within the current cycle. Here, the water consumption corresponding to the unclosed process is not included in the effective supply-demand difference, thus ensuring that the current balance judgment is based only on the data that has been confirmed to be closed. After the effective supply-demand difference is formed, the effective supply-demand difference is divided by the total bottom area to obtain the liquid level change. The liquid level change is added to the average liquid level to obtain the predicted liquid level. The predicted liquid level is then compared with the actual liquid level at the end of the current scheduling cycle. If the two change in opposite directions, the actual liquid level is used to replace the average liquid level, and the predicted liquid level is recalculated. The effective supply-demand difference and the predicted liquid level are then output. In specific implementation, the effective supply-demand difference is first divided by the total bottom area to obtain the liquid level change. The unit of the liquid level change is length, and its physical meaning is the net increase or decrease in water volume under the current total bottom area conditions within the current scheduling cycle. The calculated liquid level rise and fall are then calculated. The liquid level change is then added to the average liquid level to obtain the initial predicted liquid level. Here, the average liquid level represents the representative liquid level of the effective storage tanks participating in the current scheduling cycle. Therefore, the initial predicted liquid level reflects the liquid level that may be reached at the next moment under the combined effect of the current tank structure and the current effective supply-demand difference. After completing the initial prediction, the actual liquid level at the end of the current scheduling cycle is read. This actual liquid level is the average liquid level calculated using the same caliber from the liquid levels of the four operational clear water tanks at the last sampling point of the current scheduling cycle. The predicted liquid levels are then calculated separately. The direction of change relative to the average liquid level and the direction of change of the actual liquid level relative to the average liquid level: If the predicted liquid level is greater than the average liquid level, the predicted direction of change is upward; if the predicted liquid level is less than the average liquid level, the predicted direction of change is downward. If the actual liquid level is greater than the average liquid level, the actual direction of change is upward; if the actual liquid level is less than the average liquid level, the actual direction of change is downward. When the predicted direction of change is opposite to the actual direction of change, it indicates that the direction of liquid level change calculated solely based on the effective supply-demand difference is inconsistent with the direction of change of the actual liquid level at the end of the current cycle. In this case, the initially calculated predicted liquid level is not directly adopted. The average liquid level mentioned above is replaced by the actual liquid level at the end of the current scheduling cycle. Then, the liquid level change and the predicted liquid level are recalculated using the same effective supply-demand difference and the same total bottom area to obtain the corrected predicted liquid level. When the two change in the same direction, the predicted liquid level calculated in the first calculation remains unchanged. The purpose of this process is to correct the starting point of the prediction using the actual liquid level observed at the end of the current cycle without changing the calculation method of the current effective supply-demand difference, so that the predicted liquid level is closer to the current real water level. The final output effective supply-demand difference and predicted liquid level are used as the inputs of the subsequent adjustment execution module. Through the above processing, the balance calculation module first limits the range of the pools involved in the calculation, then limits the range of water consumption involved in the calculation, and finally completes the liquid level prediction based on this. The prediction starting point is then corrected using the actual liquid level at the end of the current scheduling cycle, ensuring that the output effective supply-demand difference and the predicted liquid level simultaneously possess structural, temporal, and volume correspondence. This avoids the influence of unused pools on the average liquid level and total bottom area, prevents water consumption during unclosed processes from prematurely entering the supply-demand difference calculation, and promptly corrects the prediction starting point when the predicted direction differs from the actual change direction, improving the accuracy of the predicted liquid level in relation to the current operating conditions. In practical applications: for example, if three out of four clear water pools are in operation and one is out of operation, the average liquid level is obtained by summing the liquid level values ​​of the three operational pools and dividing by 3, and then multiplying 3 by the bottom area of ​​a single pool to obtain... The total bottom area is used as the reference. If the inflow rate during the current scheduling cycle is 120 cubic meters, the reuse rate is 15 cubic meters, the outflow rate is 100 cubic meters, and the closure water consumption is 20 cubic meters, then the total inflow is 135 cubic meters, the total outflow is 120 cubic meters, and the effective supply-demand difference is 15 cubic meters. If the total bottom area is 300 square meters, the liquid level change is 0.05 meters. This is added to the average liquid level to obtain the initial predicted liquid level. If the actual liquid level recalculated based on the used pool at the end of the current scheduling cycle shows a decrease relative to the average liquid level, while the initial predicted liquid level shows an increase relative to the average liquid level, it indicates that the two changes are in opposite directions. In this case, the actual liquid level at the end of the current scheduling cycle is used to replace the average liquid level, and the predicted liquid level is recalculated based on the same effective supply-demand difference and total bottom area. After correction, the predicted liquid level is output for subsequent inflow regulation.

[0025] The adjustment execution module is used to determine the target liquid level by adding the liquid level precision to the current liquid level lower limit when the predicted liquid level is lower than the current liquid level lower limit and the effective supply-demand difference is not zero; and to determine the target liquid level by subtracting the liquid level precision from the current liquid level upper limit when the predicted liquid level is higher than the current liquid level upper limit and the effective supply-demand difference is not zero. It calculates the inlet water adjustment amount based on the liquid level difference between the target liquid level and the predicted liquid level, corrects the inlet water adjustment amount based on the single adjustment range and the total inlet water range, and then controls the inlet water valve to adjust the inlet water volume. It keeps the current inlet water volume unchanged when the predicted liquid level is between the current liquid level upper limit and the current liquid level lower limit or when there is an unfinished process, and outputs the scheduling result. In this embodiment, the function of the adjustment execution module is to generate the water inlet adjustment result for the cost scheduling cycle based on the predicted liquid level, the current upper limit of the liquid level, the current lower limit of the liquid level, the effective supply-demand difference, the total bottom area, and the current water inlet volume. The processing sequence is as follows: first, it is determined whether the predicted liquid level has deviated from the current lower limit or the current upper limit of the liquid level, and based on this, it is determined whether to generate a target liquid level; then, the required adjustment amount is calculated based on the liquid level difference between the target liquid level and the predicted liquid level, and candidate adjustment amounts are obtained according to the single adjustment range; finally, the final adjustment amount is determined by combining the total water inlet range, the unfinished process, and the holding result, and the water inlet valve is controlled to perform adjustment accordingly. The purpose of this process is to ensure that water inlet adjustment only occurs when the predicted liquid level has indeed exceeded the limit and the current effective supply-demand difference is not zero, and that adjustment is not performed when the internal process has not ended or the predicted liquid level is still between the current lower limit and the current upper limit of the liquid level. The implementation process includes the following steps: First, when the predicted liquid level is lower than the current lower limit and the effective supply-demand difference is not equal to zero, the target liquid level is obtained by adding the current lower limit to the liquid level accuracy. When the predicted liquid level is higher than the current upper limit and the effective supply-demand difference is not equal to zero, the target liquid level is obtained by subtracting the liquid level accuracy from the current upper limit. The result is maintained when the predicted liquid level is between the current lower and upper limits. Specifically, the predicted liquid level and effective supply-demand difference output by the balance calculation module are read first, followed by the current upper and lower limits output by the liquid level limit module. When the predicted liquid level is lower than the current lower limit and the effective supply-demand difference is not equal to zero, it indicates that the current prediction result is already below the allowable lower limit, and there is an actual net increase or decrease in water volume within the current scheduling period. In this case, the target liquid level is obtained by adding the current lower limit to the liquid level accuracy, ensuring that the target liquid level falls below the current liquid level. Above the current upper limit; when the predicted liquid level is greater than the current upper limit and the effective supply-demand difference is not equal to zero, it indicates that the current prediction result is already higher than the allowable upper limit of the liquid level, and there is an actual net increase or decrease in water volume within the current scheduling cycle. At this time, the target liquid level is obtained by subtracting the current upper limit of the liquid level from the liquid level accuracy, so that the target liquid level falls below the current upper limit of the liquid level; when the predicted liquid level is between the current lower limit and the current upper limit of the liquid level, it indicates that the current liquid level prediction result is still within the allowable range, and there is no need to generate a new target liquid level. At this time, the hold result is output; the liquid level accuracy uses the liquid level accuracy value set in the parameter panel. Its function is to avoid the target liquid level being directly taken as the current lower limit or the current upper limit of the liquid level, and to reduce the situation where the liquid level is repeatedly adjusted as soon as it touches the edge; the hold result can be represented by a one-bit hold flag. When the hold flag is valid, it means that no new water intake adjustment will be performed in this scheduling cycle; After generating the target liquid level, the predicted liquid level is subtracted from the target liquid level to obtain the liquid level difference. The liquid level difference is multiplied by the total bottom area and divided by the target arrival time to obtain the required adjustment amount. If the absolute value of the required adjustment amount is less than the lower limit of a single adjustment, it is taken as zero to obtain a candidate adjustment amount. If the absolute value of the required adjustment amount is between the lower limit and the upper limit of a single adjustment, the required adjustment amount is taken to obtain a candidate adjustment amount. If the absolute value of the required adjustment amount is greater than the upper limit of a single adjustment, the upper limit of the single adjustment or a negative upper limit of the single adjustment is taken to obtain a candidate adjustment amount. Specifically... In implementation, when the target liquid level has been generated in the previous step, the liquid level difference is obtained by subtracting the predicted liquid level from the target liquid level. A positive liquid level difference indicates that the inflow rate needs to be increased to raise the liquid level to the target level; a negative liquid level difference indicates that the inflow rate needs to be decreased to lower the liquid level to the target level. Subsequently, the liquid level difference is multiplied by the total bottom area to convert the liquid level difference into the amount of water that needs to be added or reduced, and then divided by the target arrival time to obtain the required inflow adjustment per unit time. The target arrival time is the target arrival time set by the current system. If the duration is 1 hour, the water volume to be replenished or reduced is evenly distributed over the hour. After obtaining the required adjustment amount, the lower and upper limits of the single adjustment are read. When the absolute value of the required adjustment amount is less than the lower limit, it indicates that the adjustment range is too small, and executing the adjustment has little significance for the control of the inlet valve. Therefore, zero is directly taken as the candidate adjustment amount. When the absolute value of the required adjustment amount is between the lower and upper limits of the single adjustment, it indicates that the adjustment range is within the allowable range of single adjustment. The required adjustment amount is directly taken as the candidate adjustment amount. When the absolute value of the required adjustment amount is greater than the upper limit, it indicates that the adjustment range calculated based on the current difference is too large and is not suitable for execution within a scheduling cycle. Therefore, the positive and negative directions of the required adjustment amount are retained. If the required adjustment amount is positive, the upper limit of the single adjustment is taken as the candidate adjustment amount. If the required adjustment amount is negative, the negative upper limit of the single adjustment is taken as the candidate adjustment amount. After this processing, the candidate adjustment amount reflects both the direction of the target liquid level deviation and the single adjustment capacity limit. After obtaining the candidate adjustment values, the current inflow rate is added to the candidate adjustment values ​​to obtain the adjusted inflow rate. If the adjusted inflow rate is less than the total inflow lower limit, the total inflow lower limit minus the current inflow rate is taken. If the adjusted inflow rate is greater than the total inflow upper limit, the total inflow upper limit minus the current inflow rate is taken. If the adjusted inflow rate is between the total inflow lower limit and the total inflow upper limit, the candidate adjustment value is taken as the final adjustment value. If there is an unfinished process or the output holds the result, the final adjustment value is replaced with zero, and the inflow valve is controlled to adjust the inflow rate according to the final adjustment value. The scheduling result is then output. In practice, the current inflow rate is first read, and then added to the candidate adjustment amount to obtain the adjusted inflow rate. Next, the lower and upper limits of the total inflow rate are read. If the adjusted inflow rate is less than the lower limit, it means that the total inflow rate after implementing the candidate adjustment amount will be lower than the minimum inflow rate allowed by the system. In this case, the candidate adjustment amount is not directly used; instead, the lower limit of the total inflow rate minus the current inflow rate is taken as the final adjustment amount. If the adjusted inflow rate is greater than the upper limit, it means that the total inflow rate after implementing the candidate adjustment amount will be higher than the maximum inflow rate allowed by the system. At this point, the final adjustment amount is obtained by subtracting the current influent volume from the upper limit of the total influent. If the adjusted influent volume is between the lower and upper limits of the total influent, it indicates that the candidate adjustment amount already meets the total influent range requirements, and the candidate adjustment amount is directly taken as the final adjustment amount. After obtaining the final adjustment amount, it is then checked whether there are any unfinished processes in the current scheduling cycle and whether the previous step has output a hold result. If there are unfinished processes, it indicates that internal processes such as backwashing, plant use, sludge discharge, or clear water tank commissioning and switching have not yet closed, and the current adjustment is not executed. The final adjustment amount is replaced with zero. If a hold result has already been output, it means that the predicted liquid level is still between the current lower limit and the current upper limit, and the final adjustment amount is also replaced with zero. Finally, the final adjustment amount is sent to the inlet valve control object. If the final adjustment amount is positive, the inlet valve opening is increased by the corresponding amount. If the final adjustment amount is negative, the inlet valve opening is decreased by the corresponding amount. If the final adjustment amount is zero, the current inlet valve opening remains unchanged, and the final adjustment amount, the adjusted inlet flow rate, and the valve execution status are output as the scheduling result. Through the above processing, the adjustment execution module first determines whether a target liquid level needs to be generated, then converts the liquid level deviation into executable candidate adjustment amounts, and finally determines the final adjustment amount by combining the total water intake range and the internal process status. This ensures that the water intake adjustment is based on the common premise that the liquid level exceeds the limit, a supply-demand difference exists, the total water intake range is allowed, and the internal process is closed. This avoids ineffective adjustment when the liquid level is still within the allowable range, and also avoids premature adjustment of the water intake when the process has not ended, thereby keeping the adjustment action consistent with the actual water balance state. In practical applications: For example, if the current lower limit of the liquid level is 2.50 meters, the current upper limit of the liquid level is 3.20 meters, the liquid level accuracy is 0.05 meters, and the predicted liquid level is 2.40 meters, then the adjustment execution module will determine the target liquid level as 2.55 meters; if the predicted liquid level is 3.30 meters, then the target liquid level will be determined as 3.15 meters; if the predicted liquid level is 2.80 meters, then the hold result will be directly output; furthermore, if the target liquid level is 2.55 meters, the predicted liquid level is 2.40 meters, the total bottom area is 300 square meters, and the target arrival time is 1 hour, then the liquid level difference is 0.15 meters, and the required adjustment amount is 0.15 × 300 ÷ 1 = 45 cubic meters per hour; if a single adjustment If the lower limit is 10 cubic meters per hour and the upper limit for a single adjustment is 30 cubic meters per hour, then the candidate adjustment amount is 30 cubic meters per hour. If the current inflow is 520 cubic meters per hour, the lower limit for total inflow is 500 cubic meters per hour, and the upper limit for total inflow is 540 cubic meters per hour, then the adjusted inflow is 550 cubic meters per hour, which is higher than the upper limit for total inflow. In this case, the final adjustment amount is changed to 540 minus 520, which is 20 cubic meters per hour. If the system detects that the sludge discharge process has started but not yet ended, then the final adjustment amount is replaced by zero, the inflow valve remains at its current opening, and the next scheduling cycle is re-evaluated after the sludge discharge process is completed.

[0026] Working Principle: This solution first utilizes intelligent sensors installed at the inlet, outlet, reuse, backwash, plant use, sludge discharge, liquid level, and clear water tank operation locations to collect water balance data related to the water plant periodically. Then, it filters out data truly eligible for scheduling from this data, finally deciding whether to adjust the inlet flow. Specifically, the intelligent sensors first output the cumulative inlet, outlet, and reuse water values ​​at the current calculation time and the previous fixed value time, as well as the cumulative backwash, plant use, and inlet water cumulative display values ​​in the sludge discharge flow mode of the sedimentation tank, the liquid levels of the four clear water tanks, and the operation status of the four clear water tanks. The system writes periodic identifiers, source identifiers, and boundary information such as process start, end, and status changes into these detected values, and collects this data from the PLC slave stations to the PLC master station. Subsequently, the inlet, outlet, and reuse are identified as continuous supply and demand, and the backwash, plant use, and sludge discharge are identified as continuous supply and demand. Sludge is identified as process-type water consumption. Only when the corresponding process has ended and the water consumption has been closed is this data allowed to enter the subsequent water balance calculation. After that, the system only calculates the liquid level and bottom area of ​​the clear water tank in operation to obtain the average liquid level and total bottom area. Then, it calculates the effective supply and demand difference and the predicted liquid level by combining the continuous supply and demand and the closed water consumption. It also judges whether the predicted liquid level exceeds the upper and lower limits of the liquid level corresponding to the current time period. If it does not exceed the limits, the current water inflow remains unchanged. If it exceeds the limits, the target liquid level is generated, the required adjustment amount is calculated, and then the single adjustment range, the total water inflow range, and whether there is an unfinished process are considered to finally determine whether to control the water inflow valve to perform regulation. In other words, this solution does not adjust as soon as a liquid level change is seen. Instead, it first uses data collected by intelligent sensing elements to determine whether the change has formed a verifiable real imbalance before deciding whether to adjust the water inflow. In practical scenarios, for example, during a certain period, a water plant is simultaneously supplying water normally while backwashing the filter and discharging sludge. At this time, the clear water level detected by the intelligent sensor may drop. Traditional methods might directly interpret this drop as a supply-demand imbalance and immediately increase the inflow. However, this solution first reads the start, end, and status change markers corresponding to the intelligent sensor to determine if the backwashing and sludge discharge processes have ended. If these processes are not yet complete, the system retains their corresponding water consumption as an incomplete process and does not directly include this detection result in the current scheduling judgment. Even if the water level fluctuates, the current inflow remains unchanged. Once the process completion signal from the intelligent sensor appears, the backwashing water consumption and sludge discharge water consumption are written as closed-loop water consumption into the water balance calculation, and the predicted water level and adjustment demand are recalculated. The sludge discharge water consumption is determined by combining the number of times the cumulative inflow display value of the sedimentation tank sludge discharge flow mode returns to zero with the amount of sludge discharged in a single instance.

[0027] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An intelligent water balance system, characterized in that, include: The sensor acquisition module is used to collect the cumulative values ​​of influent, effluent, and recycled water at the current calculation time and the previous fixed value time, as well as the cumulative values ​​of backwashing, plant water, sedimentation tank influent, liquid levels of the four clear water tanks, and the operational status of the four clear water tanks, and outputs the collected data according to the same scheduling cycle. The communication aggregation module is used to read the collected data from each PLC slave station into the PLC master station via ModbusTCP, write it into the master station data area according to water inlet, water outlet, reuse, backwash, sludge discharge, plant use, liquid level and commissioning status, and output the aggregated data. The process identification module is used to calculate the influent cycle volume, effluent cycle volume, and reuse cycle volume based on the cumulative difference between the current calculation time and the previous fixed value time according to the collected data. It determines the backwash water consumption based on the cumulative difference at the end of the backwash process, the plant water consumption based on the cumulative difference at the end of the plant use process, and the sludge discharge water consumption based on the number of times the cumulative display value of the influent is zeroed and the single sludge discharge volume in the sedimentation tank sludge discharge flow mode. It also determines the backwash water consumption, plant water consumption, and sludge discharge water consumption after the process ends as the closed-loop water consumption and outputs the continuous supply and demand and closed-loop water consumption. The liquid level limit module is used to switch the current upper and lower liquid level limits from 48 pre-stored upper and lower liquid level limits based on the current hour and minute, and output the current upper and lower liquid level limits.

2. The intelligent water balance system according to claim 1, characterized in that: Also includes: The balance calculation module is used to calculate the average liquid level based on the operation status and liquid level of the four clear water tanks, calculate the total bottom area based on the operation status and bottom area of ​​each tank, calculate the effective supply and demand difference based on the continuous supply and demand and the closed-loop water consumption, and calculate the predicted liquid level based on the average liquid level, total bottom area and effective supply and demand difference, and output the effective supply and demand difference and the predicted liquid level. The adjustment execution module is used to determine the target liquid level by adding the current liquid level accuracy to the current liquid level accuracy when the predicted liquid level is lower than the current liquid level lower limit and the effective supply-demand difference is not zero; and to determine the target liquid level by subtracting the liquid level accuracy from the current liquid level upper limit when the predicted liquid level is higher than the current liquid level upper limit and the effective supply-demand difference is not zero. It calculates the inlet water adjustment amount based on the liquid level difference between the target liquid level and the predicted liquid level, corrects the inlet water adjustment amount based on the single adjustment range and the total inlet water range, and then controls the inlet water valve to adjust the inlet water volume. It keeps the current inlet water volume unchanged when the predicted liquid level is between the current liquid level upper limit and the current liquid level lower limit or when there is an unfinished process, and outputs the scheduling result.

3. The intelligent water balance system according to claim 2, characterized in that: The sensing acquisition module includes: The cumulative values ​​of influent, effluent, and recycled water at the current calculation time and the previous fixed value time, as well as the cumulative values ​​of backwashing, plant water, influent cumulative display value of sedimentation tank sludge discharge flow mode, liquid levels of 4 clear water tanks, and the commissioning status of 4 clear water tanks are collected in the same scheduling cycle. Each detection value is written into the scheduling cycle identifier and source identifier, and the collected data is output. The system saves the cumulative values ​​of influent, effluent, and recycled water at the current calculation time and the previous fixed value time, as well as the cumulative values ​​of backwashing, plant water, and influent in the sedimentation tank sludge discharge flow mode. It also saves the current periodic sampling values ​​of the liquid levels of the four clear water tanks and the operational status of the four clear water tanks, and outputs the collected data corresponding to the scheduling cycle. The system synchronously collects start markers, end markers, and status change markers for the backwashing process, plant operation process, sludge discharge process, and clear water tank commissioning and switching process. The start markers, end markers, and status change markers are written into the corresponding collected data, and the collected data with process boundaries is output.

4. The intelligent water balance system according to claim 3, characterized in that: The communication aggregation module includes: Read the acquired data sequentially according to the ModbusTCP register addresses corresponding to the 9 PLC slave stations, and synchronously write the slave station identifier, register address and reading time for each piece of acquired data, and output the raw collected data. The original collected data is transferred to the corresponding data area of ​​the PLC master station according to water inlet, water outlet, reuse, backwash, sludge discharge, plant use, liquid level and commissioning status. The collected data whose reading time falls within the same scheduling cycle is written into the same period collection area, and the period collection data is output.

5. The intelligent water balance system according to claim 4, characterized in that: The communication aggregation module also includes: The detection values, scheduling cycle identifiers, source identifiers, start markers, end markers, and status change markers in the periodic collection data are bound to the same source identifier. The detection values ​​from the start marker to the end marker are continuously written into the same process collection area, and the process collection data is output. The process collection data is sorted according to the reading time. The detection values ​​after the end mark are written into the current collection data, and the detection values ​​without the end mark are retained in the current process collection area and carried over to the next scheduling cycle. The collection data is then output.

6. The intelligent water balance system according to claim 5, characterized in that: The process identification module includes: The current calculation time value and the previous fixed value time value are extracted from the cumulative influent, cumulative effluent and cumulative reclaimed water values ​​in the collected data according to the source identifier. The influent cycle quantity, effluent cycle quantity and reclaimed water cycle quantity are obtained by subtracting the previous fixed value time value from the current calculation time value. The backwash data, plant use data and sludge discharge data are divided into candidate process segments according to the start mark, end mark, state change mark and reading time, and the continuous supply and demand quantity and candidate process segments are output. For each candidate process segment, extract the cumulative value at the process start point, the cumulative value at the process end point, the cumulative sequence within the process, and the state sequence within the process. Subtract the cumulative value at the process start point from the cumulative value at the process end point to obtain the first water consumption. Sum the differences between adjacent cumulative values ​​within the process to obtain the second water consumption. The difference between the first and second water consumption, whether the cumulative sequence within the process is monotonically decreasing, whether the start and end markers each appear once, and whether the state change markers are closed at both ends constitute four consistency checks. Only candidate process segments that pass all four consistency checks are determined as closed process segments, and the backwash water consumption and plant water consumption are output.

7. The intelligent water balance system according to claim 6, characterized in that: The process identification module also includes: For the cumulative display value of the influent in the sludge discharge flow mode of the sedimentation tank, a time-sequence zeroing sequence is constructed according to the source identifier. The moment when the value changes from greater than zero to equal to zero is recorded as a candidate zeroing point. The candidate zeroing points are checked against the sludge discharge start mark, sludge discharge end mark and the change of the clear water tank's commissioning status during the same period. The candidate zeroing points that are after the start mark and before the end mark and do not fall into the commissioning switching shielding zone are retained as valid zeroing points. The sludge discharge water consumption is obtained by multiplying the number of valid zeroing points by the single sludge discharge amount and outputting the sludge discharge water consumption. The backwash water consumption, plant water consumption, and sludge discharge water consumption are written into the closed-loop water consumption according to the scheduling cycle in which the process ends. For candidate process segments that fail the four consistency checks or fail to complete the zero-point corresponding verification, the starting point cumulative value, the current last cumulative value, the current state sequence, and the current valid zero point are retained and continued to the next scheduling cycle for splicing. The aforementioned consistency check and zero-point corresponding verification are repeatedly performed on the newly added data after the splicing until the end mark appears and the closed-loop water consumption is stable, and then the closed-loop water consumption is output.

8. The intelligent water balance system according to claim 7, characterized in that: The liquid level limit module includes: Divide a 24-hour day into 48 time periods in 30-minute intervals. Multiply the current hour by 2 and add 1 when the current minute is greater than or equal to 30 to get the current time period number. Read the upper limit and lower limit values ​​of the liquid level corresponding to the current time period number and output the current candidate upper limit and lower limit values ​​of the liquid level. The current candidate liquid level upper limit is compared sequentially with the liquid level upper limit value of the previous time period and the liquid level upper limit value of the next time period. The current candidate liquid level lower limit is compared sequentially with the liquid level lower limit value of the previous time period and the liquid level lower limit value of the next time period. When the current candidate liquid level upper limit is between the liquid level upper limit values ​​of the two adjacent time periods and the current candidate liquid level lower limit is between the liquid level lower limit values ​​of the two adjacent time periods, the current candidate liquid level upper limit and the current candidate liquid level lower limit are output. When they are not between the liquid level upper limit and the current candidate liquid level lower limit, the previous output liquid level upper limit and the previous output liquid level lower limit corresponding to the current time period number are output. The current candidate upper and lower liquid levels are checked against the start, end, and status change markers of the backwashing process, plant operation process, sludge discharge process, and clear water tank commissioning and switching process. If a start marker exists in any process but no corresponding end marker appears, the upper and lower liquid levels output in the previous scheduling cycle remain unchanged. If a corresponding end marker appears in each process and there is no change in the clear water tank commissioning status, the current upper and lower liquid levels are output.

9. The intelligent water balance system according to claim 8, characterized in that: The balance calculation module includes: The operational values ​​of the four clear water tanks are defined as effective tank markers. The liquid levels of the clear water tanks corresponding to each effective tank marker are summed and divided by the number of effective tank markers to obtain the average liquid level. The number of effective tank markers is multiplied by the bottom area of ​​a single tank to obtain the total bottom area. The average liquid level and the total bottom area are then output. Add the influent cycle quantity and reuse cycle quantity in the continuous supply and demand quantity, add the effluent cycle quantity and the closure water consumption quantity, subtract the latter from the former to obtain the effective supply and demand difference, and write the closure water consumption quantity into the corresponding water consumption field according to backwash water consumption quantity, plant water consumption quantity and sludge discharge water consumption quantity, and output the effective supply and demand difference. Divide the effective supply-demand difference by the total bottom area to obtain the liquid level change. Add the liquid level change to the average liquid level to obtain the predicted liquid level. Compare the predicted liquid level with the actual liquid level at the end of the current scheduling cycle. If the two change in opposite directions, replace the average liquid level with the actual liquid level and recalculate the predicted liquid level. Output the effective supply-demand difference and the predicted liquid level.

10. The intelligent water balance system according to claim 9, characterized in that: The adjustment execution module includes: When the predicted liquid level is lower than the current lower limit and the effective supply-demand difference is not equal to zero, the target liquid level is obtained by adding the liquid level accuracy to the current lower limit. When the predicted liquid level is higher than the current upper limit and the effective supply-demand difference is not equal to zero, the target liquid level is obtained by subtracting the liquid level accuracy from the current upper limit. When the predicted liquid level is between the current lower limit and the current upper limit, the hold result is output. The liquid level difference is obtained by subtracting the predicted liquid level from the target liquid level. The liquid level difference is multiplied by the total bottom area and then divided by the time it takes for the target to arrive to obtain the required adjustment amount. When the absolute value of the required adjustment amount is less than the lower limit of a single adjustment, it is taken as zero to obtain the candidate adjustment amount. When the absolute value of the required adjustment amount is between the lower limit and the upper limit of a single adjustment, the required adjustment amount is taken to obtain the candidate adjustment amount. When the absolute value of the required adjustment amount is greater than the upper limit of a single adjustment, the upper limit of a single adjustment or the negative upper limit of a single adjustment is taken to obtain the candidate adjustment amount. The adjusted inflow rate is obtained by adding the current inflow rate to the candidate adjustment rate. If the adjusted inflow rate is less than the lower limit of the total inflow rate, the current inflow rate is taken as the lower limit of the total inflow rate. If the adjusted inflow rate is greater than the upper limit of the total inflow rate, the current inflow rate is taken as the upper limit of the total inflow rate. If the adjusted inflow rate is between the lower limit and the upper limit of the total inflow rate, the candidate adjustment rate is taken as the final adjustment rate. If there is an unfinished process or the output holds the result, the final adjustment rate is replaced with zero and the inflow valve is controlled to adjust the inflow rate according to the final adjustment rate. The scheduling result is then output.