Water quality treatment device control method, system, apparatus, and storage medium

By using a neural network model to predict turbidity, combined with historical water treatment samples and flocculation process duration, precise control of flocculant dosage was achieved, improving the stability of effluent quality and the real-time performance of turbidity adjustment.

CN119143256BActive Publication Date: 2026-06-12CEIEC ELECTRIC TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CEIEC ELECTRIC TECH
Filing Date
2024-08-06
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

The existing water treatment system uses a relatively simple method for adding flocculants, which makes it impossible to accurately control the amount of flocculant added, resulting in poor stability of the effluent quality.

Method used

By using a turbidity prediction model based on a neural network model, the effluent turbidity is predicted using historical water quality treatment samples and the water quality treatment time required for the flocculation process. The dosage of flocculant is then adjusted based on the predicted effluent turbidity and the actual effluent turbidity.

🎯Benefits of technology

It improves the accuracy of flocculant dosage control and the stability of effluent water quality, solves the problem of lag in flocculant dosage adjustment, and realizes real-time adjustment and stability of effluent turbidity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119143256B_ABST
    Figure CN119143256B_ABST
Patent Text Reader

Abstract

The application provides a water quality treatment device control method, system, equipment and storage medium, the method comprises the following steps: data acquisition is carried out to water quality treatment device based on the water quality treatment duration required by flocculation process, and a plurality of flocculant dosing quantities and a plurality of sets of target water inlet data from the first time to the second time are obtained, the duration from the first time to the second time is the water quality treatment duration; based on the plurality of sets of target water inlet data and the plurality of flocculant dosing quantities, the effluent turbidity is predicted by using a turbidity prediction model, and the predicted effluent turbidity is obtained; based on the predicted effluent turbidity and the actual effluent turbidity of the water quality treatment device at the second time, the dosing quantity of the flocculant of the water quality treatment device is feedback adjusted. In the embodiment, the accuracy and stability of the predicted effluent turbidity are improved, the flocculant dosing quantity control accuracy is improved, the actual effluent turbidity can be ensured to be maintained near the required effluent turbidity, and the effluent water quality stability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of water treatment technology, and in particular to a water treatment device control method, system, equipment, and storage medium. Background Technology

[0002] Flocculants remove tiny suspended solids from water. In water treatment processes, flocculant dosage is crucial, as it directly affects the amount of colloids and turbidity in the effluent, thus influencing its turbidity. Current water treatment systems typically rely on personnel's experience to judge the influent water quality and determine the flocculant dosage; or they use a pre-set effluent turbidity value as a target and adjust the dosage based on the actual effluent turbidity. However, both of these methods have relatively simple flocculant dosage logic, making precise control of the dosage impossible. This results in significant variations in effluent quality and poor effluent quality stability. Summary of the Invention

[0003] This invention provides a water treatment device control method, system, equipment, and storage medium to solve the problem that existing flocculant dosing methods are relatively simple and cannot accurately control the amount of flocculant added, resulting in poor stability of effluent water quality.

[0004] In a first aspect, embodiments of this application provide a method for controlling a water treatment device, including:

[0005] Data was collected from the water treatment device based on the water treatment time required for the flocculation process, and multiple sets of target influent data and multiple flocculant dosages were obtained from the first moment to the second moment. The duration from the first moment to the second moment is the water treatment time.

[0006] Based on multiple sets of target influent data and multiple flocculant dosages, the turbidity of the effluent is predicted using a turbidity prediction model. The predicted effluent turbidity is obtained by training a neural network model based on multiple historical water treatment samples of the water treatment device at different historical times and water treatment duration.

[0007] Based on the predicted effluent turbidity and the actual effluent turbidity of the water treatment device at the second moment, the dosage of flocculant in the water treatment device is adjusted by feedback.

[0008] Secondly, embodiments of this application provide a water treatment system, including a water treatment device and a control device, wherein the control device is used for:

[0009] Data was collected from the water treatment device based on the water treatment time required for the flocculation process, and multiple sets of target influent data and multiple flocculant dosages were obtained from the first moment to the second moment. The duration from the first moment to the second moment is the water treatment time.

[0010] Based on multiple sets of target influent data and multiple flocculant dosages, the turbidity of the effluent is predicted using a turbidity prediction model. The predicted effluent turbidity is obtained by training a neural network model based on multiple historical water treatment samples of the water treatment device at different historical times and water treatment duration.

[0011] Based on the predicted effluent turbidity and the actual effluent turbidity of the water treatment device at the second moment, the dosage of flocculant in the water treatment device is adjusted by feedback.

[0012] Thirdly, embodiments of this application provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the above-described water treatment device control method.

[0013] Fourthly, embodiments of this application provide a readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described water treatment device control method.

[0014] In one scheme provided by the aforementioned water treatment device control method, system, equipment, and storage medium, data is collected from the water treatment device based on the water treatment time required for the flocculation process. This yields multiple sets of target influent data and multiple flocculant dosages at a first and second time point, with the duration from the first to the second time point being the water treatment time. Then, based on the multiple sets of target influent data and multiple flocculant dosages, an effluent turbidity prediction model is used to predict the effluent turbidity. The predicted effluent turbidity is obtained from the predicted effluent turbidity. The turbidity prediction model is a neural network model trained on multiple historical water treatment samples from different historical times and the water treatment time. Finally, based on the predicted effluent turbidity and the actual effluent turbidity of the water treatment device at the second time point, the flocculant dosage of the water treatment device is adjusted using feedback. In this embodiment, a high-precision turbidity prediction model is trained using historical water treatment samples and the water treatment time required for the flocculation process. Multiple sets of target influent data and flocculant dosage within the water treatment time prior to the second moment are used as input. The turbidity prediction model is then used to predict the effluent turbidity, ensuring that the predicted effluent turbidity at the second moment is close to the historically predicted effluent turbidity. This improves the accuracy and stability of the predicted effluent turbidity. Furthermore, based on the predicted and actual effluent turbidity at the second moment, the flocculant dosage is adjusted using feedback. This allows for rapid adjustment of the flocculant dosage to meet the water treatment requirements, improving the accuracy of flocculant dosage control and ensuring that the actual effluent turbidity remains near the required effluent turbidity, thus enhancing the stability of the effluent water quality. Attached Figure Description

[0015] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of a water treatment system according to one embodiment of the present invention;

[0017] Figure 2 yes Figure 1 A schematic diagram of a greywater treatment device;

[0018] Figure 3 This is a schematic flowchart of a water treatment device control method according to an embodiment of the present invention;

[0019] Figure 4 yes Figure 3 A schematic diagram of the implementation process of step S30;

[0020] Figure 5 yes Figure 3 A schematic diagram of the implementation process of step S40;

[0021] Figure 6 This is a schematic diagram of the process for obtaining multiple historical water quality treatment samples in one embodiment of the present invention;

[0022] Figure 7 yes Figure 1 A schematic diagram of the structure of the central control device;

[0023] Figure 8 A schematic diagram of the structure of an electronic device according to one embodiment of the present invention. Detailed Implementation

[0024] 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, not all, of the embodiments of the present invention. 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.

[0025] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. It should also be understood that, as used in this specification and the appended claims, the term "and / or" refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0026] Furthermore, in the description of this invention and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0027] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of the invention include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0028] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0029] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0030] The water treatment device control method provided in this embodiment of the invention can be applied to, for example... Figure 1 The water treatment system shown includes a water treatment device and a control device, wherein the water treatment device communicates with the control device via cables or a network.

[0031] like Figure 2As shown, the water treatment device includes a raw water pump, a raw water equalization tank, a flocculation reaction tank, a sedimentation tank, a filter tank, a clear water tank, a water supply pump, and a sludge treatment device connected sequentially by pipelines, as well as a sludge treatment device connected to the sedimentation tank. The controller draws water (inlet water) from the water source to the raw water equalization tank via the raw water pump. Flocculant is then added at the outlet of the raw water equalization tank, causing flocculation in the flocculation reaction tank. The water is then discharged to the sedimentation tank for sedimentation. The treated water from the sedimentation tank is then discharged to the filter tank for filtration. After filtration, the entire water treatment process is complete, and the filtered clear water is discharged to the clear water tank, which is subsequently supplied to users via the water supply pump. The sludge that settles in the sedimentation tank is discharged to the sludge treatment device for sludge treatment. The separated sludge is compressed and then centrally removed. The treated water from the separated sludge may be returned to the flocculation reaction tank for further flocculation and sedimentation for reuse. Specifically, an influent data acquisition device is installed at the measuring point at the outlet of the raw water regulating tank to collect influent data, and a turbidity measuring device is installed at the measuring point at the outlet of the filter tank or the inlet of the clear water tank to measure the turbidity of the effluent from the water treatment device.

[0032] It's important to understand that current flocculant dosing methods typically rely on personnel's experience to judge the influent water quality and determine the flocculant dosage manually. This manual method, dependent on human experience and skill level, easily leads to under- or over-dosing, resulting in unstable or substandard turbidity in the effluent (from the filtration tank). Some water plants use programmable logic controllers (PLCs) for automatic flocculant control, but this usually involves setting a target effluent turbidity value and adjusting the flocculant dosage based on the actual effluent turbidity. This flocculant dosing logic is simple and crude. It is evident that the flocculant addition logic of both methods is relatively simple, making it impossible to precisely control the flocculant dosage, resulting in significant differences in effluent water quality and poor effluent water quality stability. Furthermore, in PLC control, the actual effluent turbidity compared with the target effluent turbidity value is usually the effluent turbidity after flocculant addition and a certain reaction time. This leads to a lag in the control of flocculant dosage and low accuracy.

[0033] To solve the above problems, in this embodiment, as follows: Figure 2As shown, a turbidity prediction model is obtained by training a neural network model based on multiple historical water treatment samples at different historical times and the water treatment time required for the flocculation process. The water treatment time required for the flocculation process is the calibrated water treatment time of the water treatment device. In actual use, the control device collects data from the water treatment device based on the water treatment time, obtaining multiple sets of target influent data and multiple flocculant dosages at the first and second times. The duration from the first to the second time is the water treatment time. Then, based on the multiple sets of target influent data and multiple flocculant dosages, the turbidity prediction model is used to predict the effluent turbidity at the second time, obtaining the predicted effluent turbidity at the second time. Finally, based on the predicted effluent turbidity and the actual effluent turbidity at the second time in the water treatment device, the water treatment device is controlled to adjust the flocculant dosage through feedback.

[0034] Taking the first moment as the moment before the first moment and the second moment as the current moment as an example, in actual use, the control device collects data from the water treatment device based on the water treatment time, obtaining multiple sets of target influent data and multiple flocculant dosages from the first moment to the current moment; then, based on the multiple sets of target influent data and multiple flocculant dosages, the turbidity prediction model is used to predict the effluent turbidity, obtaining the predicted effluent turbidity at the current moment; finally, based on the predicted effluent turbidity at the current moment and the actual effluent turbidity at the current moment, the water treatment device is controlled to adjust the flocculant dosage through feedback.

[0035] In this embodiment, a high-precision turbidity prediction model is trained using historical water treatment samples and the water treatment time required for the flocculation process. Multiple sets of target influent data and flocculant dosage within the water treatment time prior to the second moment are used as input. The turbidity prediction model is then used to predict the effluent turbidity, ensuring that the predicted effluent turbidity at the second moment is close to the predicted effluent turbidity at its most recent historical moment. This improves the accuracy and stability of the predicted effluent turbidity. Furthermore, based on the actual effluent turbidity at the second moment, the flocculant dosage is adjusted using feedback. This allows for rapid adjustment of the flocculant dosage to meet the water treatment requirements, improving the accuracy of flocculant dosage control and ensuring that the actual effluent turbidity remains near the target effluent turbidity, thus enhancing the stability of the effluent water quality.

[0036] Furthermore, by using the target influent data from the water treatment time before the second time step to the second time step for effluent turbidity prediction, the predicted effluent turbidity will take into account the water treatment time. Therefore, when adjusting the flocculant dosage, the actual effluent turbidity and the predicted effluent turbidity at the same time step can be used for feedback adjustment, enabling real-time adjustment of the flocculant dosage, rather than using the actual effluent turbidity for a period after the second time step. This solves the problem of lag in existing flocculant dosage adjustment methods. The adjustment method in this embodiment is more timely and accurate, further improving the accuracy of flocculant dosage and thus further improving the stability of effluent water quality.

[0037] In this embodiment, the water treatment system includes a water treatment device and a control device. The specific structure of the water treatment device is only for illustrative purposes. In other embodiments, the water treatment system may also include other necessary devices. The water treatment device may also include other necessary devices, such as flocculant dosing equipment, i.e., automated dosing equipment. The control device may be a controller, such as an electronic control unit, or it may be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices.

[0038] In one embodiment, such as Figure 3 As shown, a control method for a water treatment device is provided, which is applied to... Figure 1 Taking the control device in the middle as an example, the following steps are included:

[0039] S10: Turbidity prediction model obtained through pre-training.

[0040] In the process of treating tap water (wastewater) in a water treatment device, a turbidity prediction model needs to be trained in advance so that the model can be called later to predict the turbidity of the effluent.

[0041] The turbidity prediction model is a neural network model trained using multiple historical water treatment samples from the water treatment plant at different historical times, and the water treatment time required for the flocculation process. The water treatment time required for the flocculation process is the time from the addition of flocculant to the completion of water filtration in the filter tank within the water treatment plant; this treatment time is usually a pre-calibrated value of the water treatment plant. Training the model using multiple real historical water treatment samples from the water treatment plant and the water treatment time required for the flocculation process can improve the prediction accuracy of the turbidity prediction model.

[0042] S20: Data is collected from the water treatment device based on the water treatment time to obtain multiple sets of target influent data and multiple flocculant dosages at the first and second time points.

[0043] During water treatment, the control device needs to collect influent data based on the water treatment duration to obtain target influent data at the first and second time points, resulting in multiple sets of target influent data at different times. It also needs to collect data on the actual flocculant dosage used by the water treatment device to obtain the flocculant dosage from the first to the second time point, resulting in multiple flocculant dosages at different times. The duration from the first to the second time point represents the water treatment duration.

[0044] It should be understood that, during the operation of the water treatment system, the second moment in this embodiment refers to each control node of the control device, that is, the current moment of the control device during its operation.

[0045] For example, the control device can collect target influent data from the water treatment device using an influent acquisition device, obtaining target influent data at different times. Then, using the water treatment duration as a time window and the second time point (the current time) as the starting position, a sliding time window algorithm is used to extract target influent data from different times before the second time point. This allows for the rapid extraction of data within a single time window (water treatment duration), i.e., all target influent data from the first time point to the second time point. Target influent data from the same time point are then grouped together to obtain multiple sets of target influent data, a simple and convenient process. Similarly, using the water treatment duration as a time window and the second time point as the starting position, a sliding time window algorithm is used to extract flocculant dosage data from different times before the second time point, obtaining multiple flocculant dosages from the first time point to the second time point, also simple and convenient.

[0046] S30: Based on multiple sets of target influent data and multiple flocculant dosages, the turbidity of the effluent is predicted using a turbidity prediction model to obtain the predicted effluent turbidity.

[0047] Then, the control device needs to use a turbidity prediction model to predict the effluent turbidity based on multiple sets of target influent data and multiple flocculant dosages within the water treatment time before the second time step, and obtain the predicted effluent turbidity corresponding to the second time step.

[0048] For example, the target influent data and flocculant dosage at different times can be directly input into the turbidity prediction model to predict the effluent turbidity and obtain the predicted effluent turbidity at the second time point, which is simple and convenient.

[0049] S40: Based on the predicted effluent turbidity and the actual effluent turbidity of the water treatment device at the second moment, the dosage of flocculant in the water treatment device is adjusted by feedback.

[0050] After the water treatment device is controlled to add flocculant, the control device needs to adjust the amount of flocculant added at the second time (or the second time and subsequent times) based on the predicted effluent turbidity and the actual effluent turbidity of the water treatment device at the second time.

[0051] For example, the control device can collect the real-time effluent turbidity of the water treatment device, and then, using the predicted effluent turbidity as the target and the actual effluent turbidity at a second moment as feedback, control the dosing equipment of the water treatment device to adjust the flocculant dosage. Specifically, when the actual effluent turbidity is greater than the predicted effluent turbidity, the flocculant dosage is increased; when the actual effluent turbidity is less than the predicted effluent turbidity, the flocculant dosage is decreased; when the actual effluent turbidity is equal to the predicted effluent turbidity, no adjustment is needed, ensuring the stability of the effluent turbidity.

[0052] In this embodiment, a high-precision turbidity prediction model is trained using historical water quality treatment samples and the water quality treatment time required for the flocculation process. Multiple sets of target influent data and flocculant dosage within the water quality treatment time prior to the second moment are used as inputs. The turbidity prediction model is used to predict the effluent turbidity, making the predicted effluent turbidity similar to the historical predicted effluent turbidity, thus improving the accuracy and stability of the predicted effluent turbidity. Furthermore, based on the target predicted effluent turbidity and the actual effluent turbidity at the second moment, the flocculant dosage is adjusted in feedback. This allows for rapid adjustment of the flocculant dosage to meet the water quality treatment requirements, improving the accuracy of flocculant dosage control and ensuring that the actual effluent turbidity remains near the target effluent turbidity, thereby improving the stability of the effluent water quality. Furthermore, by using the actual effluent turbidity and the predicted effluent turbidity at the same time for feedback adjustment, the flocculant dosage can be adjusted in real time, which solves the problem of lag in the existing flocculant dosage adjustment method. The adjustment method in this embodiment is more timely and accurate, further improving the accuracy of flocculant dosage and thus further improving the stability of effluent water quality.

[0053] In one embodiment, such as Figure 4 As shown, in step S30, based on multiple sets of target influent data and multiple flocculant dosages, the turbidity of the effluent is predicted using a turbidity prediction model to obtain the predicted effluent turbidity. This specifically includes the following steps:

[0054] S31: Based on the target influent data at the second moment in the water treatment device, the dosage prediction model is used to predict the flocculant dosage and obtain the predicted dosage at the second moment.

[0055] It's important to understand that when collecting data from water treatment devices based on treatment duration, since no flocculant was actually added at the second moment (the current moment), the flocculant dosage at that moment cannot be collected; only historical dosage data can be obtained. Therefore, it's necessary to use the target influent data at the second moment to predict the flocculant dosage, and use the prediction result as the predicted dosage for the second moment to improve the data input for subsequent turbidity prediction models.

[0056] The control device needs to acquire a pre-trained dosing prediction model, which is a prediction model obtained by deep learning an extreme gradient boosting tree classifier based on historical influent data and historical flocculant dosage from multiple historical water quality treatment samples.

[0057] After obtaining multiple sets of target influent data from the water treatment device, the control device needs to determine the target influent data for the second time moment from the multiple sets of target influent data, and then use the dosage prediction model to predict the flocculant dosage to obtain the predicted dosage.

[0058] S32: Based on multiple sets of target influent data, multiple flocculant dosages, and the predicted dosage at the second time point, the turbidity of the effluent is predicted using a turbidity prediction model to obtain the predicted effluent turbidity.

[0059] After obtaining the predicted dosage, the control device uses a turbidity prediction model to predict the effluent turbidity based on multiple sets of target influent data, multiple flocculant dosages, and the predicted dosage at the second time point, thus obtaining the predicted effluent turbidity at the second time point. That is, the predicted dosage is used as the flocculant dosage at the second time point, thereby obtaining multiple flocculant dosages from the first time point to the second time point. Then, the target influent data and flocculant dosage at the same time point are combined into a data pair, and data pairs from different time points are input together into the turbidity prediction model to predict the effluent turbidity, obtaining the predicted effluent turbidity.

[0060] In one embodiment, before using the turbidity prediction model to predict the effluent turbidity, it is necessary to determine whether there are any abnormal flocculant dosages among the multiple flocculant dosages from a preset historical time to a second time. If the flocculant dosage is a null value, a value of 0, or an outlier (i.e., a sudden change or a value greater than the calibration value), it indicates that the flocculant dosage is abnormal. When an abnormal flocculant dosage is found among the multiple flocculant dosages, based on the target influent data at the time of the abnormal flocculant dosage, the dosage prediction model is used to predict the flocculant dosage, obtaining the corresponding predicted dosage. This predicted dosage is then used to replace the abnormal flocculant dosage, thus obtaining the multiple flocculant dosages after treatment. Finally, based on multiple sets of target influent data, the multiple flocculant dosages after treatment, and the predicted dosage at the second time, the turbidity prediction model is used to predict the effluent turbidity, obtaining the predicted effluent turbidity.

[0061] In this embodiment, based on the target influent data at the second time point in the water treatment device, the flocculant dosage is predicted using a dosage prediction model to obtain the predicted dosage. Then, based on multiple sets of target influent data, multiple flocculant dosages, and the predicted dosage at the second time point, the effluent turbidity is predicted using a turbidity prediction model to obtain the predicted effluent turbidity. The process of predicting effluent turbidity using the turbidity prediction model is refined. By inputting the predicted dosage from the dosage prediction model along with multiple flocculant dosages from the previous water treatment period into the turbidity prediction model, the predicted effluent turbidity at the second time point can be predicted more accurately.

[0062] In one embodiment, step S31, which involves predicting the flocculant dosage based on the target influent data at the second moment in the water treatment device using a dosage prediction model to obtain the predicted dosage at the second moment, specifically includes the following steps:

[0063] S311: Standardize the target water inflow data at the second time point to obtain the standard water inflow data at the second time point.

[0064] It's important to understand that when training a drug dosage prediction model, the training data needs to be standardized to unify data from different scales into the same scale. This avoids the impact of differences in feature metrics and value ranges on data analysis and improves the accuracy of the trained model. In other words, to ensure the model can successfully identify data, the input data for the drug dosage prediction model needs to be standardized.

[0065] In other words, the target influent data at the second moment needs to be standardized to obtain the standardized target influent data at the second moment, i.e., the standard influent data. The target influent data may include multiple influent parameters such as influent flow rate, influent pH, influent temperature, influent dissolved oxygen, influent turbidity, and chemical oxygen demand. The standard influent data includes the standardized influent flow rate, influent pH, influent temperature, influent dissolved oxygen, influent turbidity, and chemical oxygen demand.

[0066] Specifically, this involves obtaining the preset mean and standard deviation of each influent parameter in the target influent data. These preset mean and standard deviation are calculated by averaging and standardizing each influent parameter across all historical influent data from multiple historical water quality treatment samples during the training of the dosage prediction model. Then, based on the preset mean and standard deviation of each influent parameter, standardization processing is performed on each influent parameter in the target influent data to obtain standardized influent data including multiple standardized parameters.

[0067] The standardization process is performed using the following formula:

[0068] z = (x - mean) / std;

[0069] Where z represents the standardized influent parameters, i.e., the influent parameters in the standard influent data; x represents the influent parameters of the target influent data; mean represents the preset mean of the influent parameters; and std represents the preset standard deviation of the influent parameters.

[0070] In other embodiments, the preset mean and preset standard deviation of the influent parameters can also be a pre-calibrated constant.

[0071] S312: Input the standard influent data at the second moment into the dosing prediction model to make a prediction and obtain the initial predicted dosing.

[0072] After obtaining the standard influent data at the second time point, the standard influent data at the second time point is input into the dosage prediction model to predict the flocculant dosage and obtain the initial predicted dosage at the second time point.

[0073] S313: Perform destandardization on the initial predicted dosage to obtain the predicted dosage.

[0074] After obtaining the initial predicted dosage for the second time step, it is necessary to destandardize the initial predicted dosage for the second time step to obtain the predicted dosage for the second time step. Specifically, it is necessary to obtain a preset mean and standard deviation of the dosage. These preset mean and standard deviation are obtained by averaging and calculating the standard deviation of all historical flocculant dosages in multiple historical water quality treatment samples during the training of the dosage prediction model. Then, based on these preset mean and standard deviation, the initial predicted dosage is destandardized to obtain the predicted dosage for the second time step.

[0075] The predicted dosage at the second time point is calculated using the following formula, which is the formula for inverse standardization:

[0076] x = z * std + mean;

[0077] Where x represents the predicted dosage at the second time point; z represents the initial predicted dosage at the second time point; mean represents the preset mean dosage; and std represents the preset standard deviation of the dosage.

[0078] When training the dosage prediction model, the mean and standard deviation of the dosage in the training data are destandardized to ensure that the processing standards of the model input and output are consistent, thereby further improving the accuracy of the predicted dosage.

[0079] In this embodiment, the target influent data at the second time moment is standardized to obtain standard influent data at the second time moment. Then, the standard influent data at the second time moment is input into the dosage prediction model to predict the flocculant dosage, thus obtaining the initial predicted dosage at the second time moment. The initial predicted dosage at the second time moment is then destandardized to obtain the predicted dosage at the second time moment. This embodiment clarifies the specific process of using the dosage prediction model to predict the predicted dosage at the second time moment. Standardizing the model input first can improve the prediction accuracy, and then destandardizing the model output can restore the predicted dosage to the true data representation, thereby improving the accuracy of the predicted dosage.

[0080] In one embodiment, step S32, which involves using a turbidity prediction model to predict the effluent turbidity based on multiple sets of target influent data, multiple flocculant dosages, and the predicted dosage at the second time point, specifically includes the following steps:

[0081] S321: Standardize the data in each target influent data to obtain multiple sets of standard influent data, and standardize the predicted dosage and the dosage of each flocculant at the second time point to obtain multiple standard flocculant dosages.

[0082] The control device needs to standardize each data point (i.e., each influent parameter) in each set of target influent data to obtain multiple sets of standard influent data. Each set of target influent data includes multiple influent parameters such as influent flow rate, influent pH, influent temperature, influent dissolved oxygen, and influent turbidity (and chemical oxygen demand). Therefore, each set of standard influent data includes standardized influent flow rate, influent pH, influent temperature, influent dissolved oxygen, and influent turbidity (and chemical oxygen demand).

[0083] Specifically, it is necessary to obtain the preset mean and preset standard deviation of each influent parameter in the target influent data. These preset mean and standard deviation are obtained by averaging and calculating the standard deviation of each influent parameter from all historical influent data across multiple historical water quality treatment samples during the training of the turbidity prediction model. Then, based on the preset mean and preset standard deviation of each influent parameter, standardization is performed on each influent parameter in each set of target influent data to obtain standardized influent data for multiple influent parameters. This process is repeated across all target influent data sets to obtain multiple sets of standardized influent data.

[0084] Simultaneously, the predicted dosage and flocculant dosage at the second time point are standardized to obtain multiple standard flocculant dosages. Specifically, a preset mean and standard deviation of the dosage need to be obtained. These preset mean and standard deviations are calculated by averaging and standardizing the historical dosages of all flocculants in multiple historical water quality treatment samples during the training of the turbidity prediction model. Then, based on these preset mean and standard deviations, the predicted dosage and flocculant dosage at the second time point are standardized to obtain multiple standard flocculant dosages.

[0085] The calculation formulas for each influent parameter and each standard flocculant dosage in each set of standard influent data can be found in the calculation formulas for the standardized treatment described above, and will not be repeated here.

[0086] S322: Input multiple sets of standard influent data and multiple standard flocculant dosages into the turbidity prediction model to predict the effluent turbidity and obtain the initial predicted turbidity.

[0087] Then, multiple sets of standard influent data and multiple standard flocculant dosages are input into the turbidity prediction model to predict the effluent turbidity and obtain the initial predicted turbidity at the second time point.

[0088] S323: Perform denormalization on the initial predicted turbidity to obtain the predicted effluent turbidity.

[0089] After obtaining the initial predicted turbidity at the second time point, the initial predicted turbidity at the second time point is destandardized to obtain the predicted effluent turbidity at the second time point. This requires obtaining a preset turbidity mean and standard deviation. These preset turbidity mean and standard deviation are obtained by averaging and calculating the standard deviation of all historical effluent turbidities from multiple historical water quality treatment samples during the training of the turbidity prediction model.

[0090] The predicted effluent turbidity is calculated using the following formula:

[0091] x = z * std + mean;

[0092] Where x represents the predicted effluent turbidity; z represents the initial predicted turbidity; mean represents the preset turbidity mean; and std represents the preset turbidity standard deviation.

[0093] When training the turbidity prediction model, the mean and standard deviation of the dosage of the training data are destandardized to ensure that the processing standards of the model input and output are consistent, thereby further improving the accuracy of the predicted effluent turbidity.

[0094] In this embodiment, multiple sets of standard influent data are obtained by standardizing the data in each target influent. The predicted dosage and the dosage of each flocculant are then standardized to obtain multiple standard flocculant dosages. These multiple sets of standard influent data and multiple standard flocculant dosages are then input into a turbidity prediction model to predict effluent turbidity, obtaining an initial predicted turbidity. The initial predicted turbidity is then de-standardized to obtain the predicted effluent turbidity. This clarifies the specific process of obtaining the predicted effluent turbidity. Standardizing the model input first improves prediction accuracy, and then de-standardizing the model output restores the predicted effluent turbidity to a true data representation, thus improving the accuracy of the predicted effluent turbidity.

[0095] In one embodiment, such as Figure 5 As shown, in step S40, based on the predicted effluent turbidity and the actual effluent turbidity of the water treatment device at the second moment, the dosage of flocculant in the water treatment device is adjusted by feedback. This specifically includes the following steps:

[0096] S41: When the actual effluent turbidity at the second moment meets the water quality treatment requirements, the predicted dosage is adjusted based on the deviation between the predicted effluent turbidity and the actual effluent turbidity.

[0097] In this embodiment, after obtaining the predicted effluent turbidity and the actual effluent turbidity of the water treatment device at the second time, it is necessary to determine whether the actual effluent turbidity at the second time meets the water treatment requirements. For example, the water treatment requirements stipulate that the effluent turbidity of the water treatment device must be within a certain turbidity range. If the actual effluent turbidity at the second time is within this turbidity range, then it is determined that the actual effluent turbidity at the second time meets the water treatment requirements; if the actual effluent turbidity at the second time is not within this turbidity range, then it is determined that the actual effluent turbidity at the second time does not meet the water treatment requirements.

[0098] When determining that the actual effluent turbidity at the second moment meets the water quality treatment requirements, it is necessary to obtain the predicted dosage at the second moment. The predicted dosage is the dosage obtained by predicting the flocculant dosage based on the target influent data at the second moment using a dosage prediction model. Then, based on the deviation between the predicted effluent turbidity and the actual effluent turbidity, the predicted dosage at the second moment is adjusted to obtain the adjusted predicted dosage.

[0099] When it is determined that the actual effluent turbidity at the second moment does not meet the water quality treatment requirements, a pre-calibrated target effluent turbidity needs to be obtained. This target effluent turbidity is within the aforementioned turbidity range required by the water quality treatment device. This target effluent turbidity can be the minimum or median value within the turbidity range. Then, based on the deviation between the predicted effluent turbidity and the target effluent turbidity, the predicted dosage at the second moment is adjusted to obtain the adjusted predicted dosage.

[0100] The process involves adjusting the predicted dosage by determining whether the absolute value of the deviation between the predicted effluent turbidity and the actual effluent turbidity (target effluent turbidity) at the second time point is greater than a preset value. If it is, when the predicted effluent turbidity is greater than the actual effluent turbidity (target effluent turbidity) at the second time point, a certain dosage is added to the predicted dosage to obtain the adjusted predicted dosage. The increased dosage increases as the absolute value of the deviation increases. When the predicted effluent turbidity is less than the actual effluent turbidity (target effluent turbidity) at the second time point, a certain dosage is reduced to obtain the adjusted predicted dosage. The reduced dosage decreases as the absolute value of the deviation increases. This process ensures that the adjusted predicted dosage is closer to the flocculant dosage corresponding to the actual effluent turbidity (target effluent turbidity) at the second time point, thus guaranteeing the stability of the effluent turbidity and reducing the cost of flocculant dosing.

[0101] S43: Based on the adjusted predicted dosage, multiple sets of target influent data and multiple flocculant dosages, the turbidity prediction model is used to re-predict the effluent turbidity until the absolute value of the deviation is less than the preset value. Then, the adjusted predicted dosage is output as the target dosage.

[0102] After adjusting the predicted dosage for the second time step, based on the adjusted predicted dosage, multiple sets of target influent data, and multiple flocculant dosages, the turbidity prediction model is used to re-predict the effluent turbidity to obtain a new predicted effluent turbidity. Then, the deviation between the new predicted effluent turbidity and the actual effluent turbidity (or target effluent turbidity) is judged. When the absolute value of the deviation is greater than the preset value (e.g., 0, 0.1, 0.2), steps S42-S43 are repeated, that is, the dosage needs to be adjusted based on the adjusted predicted dosage to obtain the adjusted predicted dosage. Then, the turbidity prediction model is used to re-predict the effluent turbidity until the absolute value of the deviation is less than or equal to the preset value. At this point, the adjustment is stopped, and the latest adjusted predicted dosage is output as the target dosage.

[0103] S44: Use the target dosage as the actual flocculant dosage at the second moment to control the flocculant addition of the water treatment device.

[0104] After obtaining the target dosage, the control device needs to use the target dosage as the actual flocculant dosage at the second moment to control the water treatment device to add flocculant.

[0105] In this embodiment, when the actual effluent turbidity at the second time moment meets the water quality treatment requirements, the predicted dosage is adjusted based on the deviation between the predicted effluent turbidity and the actual effluent turbidity. Based on the adjusted predicted dosage, multiple sets of target influent data, and multiple flocculant dosages, the effluent turbidity is predicted again using the turbidity prediction model until the absolute value of the deviation is less than the preset value. Then, the adjusted predicted dosage is output as the target dosage, and the target dosage is used as the actual flocculant dosage at the second time moment to control the water quality treatment device to add flocculant. Based on the deviation between the predicted effluent turbidity and the actual effluent turbidity, the predicted dosage is adjusted and iterated until the absolute value of the deviation is less than the preset value. The adjusted predicted dosage is then output as the target dosage to control the flocculant addition in the water treatment device. This ensures that the current flocculant dosage is consistent with or close to the dosage corresponding to the actual effluent turbidity at the second moment, thus making the subsequent effluent turbidity consistent with or close to the current effluent turbidity. Ultimately, this achieves the goal of saving flocculant while maintaining stable effluent turbidity.

[0106] In one embodiment, to ensure the effectiveness of subsequent model training and improve the prediction accuracy of the turbidity prediction model and the dosage prediction model, it is necessary to preprocess the historical data collected at each measuring point in the water treatment device to obtain multiple historical water treatment samples from different historical times. These samples are then used for training to derive the turbidity prediction model and the dosage prediction model. Specifically, as... Figure 6 As shown, multiple historical water quality treatment samples were obtained in the following manner:

[0107] S01: Acquire historical data from various measuring points in the water treatment device and perform standardized processing to obtain influent water quality data, historical flocculant dosage, and historical effluent turbidity at different historical times.

[0108] This requires first setting up multiple measuring points within the water treatment device, so that water quality data can be collected at these points using water quality acquisition devices. For example... Figure 2 As shown, measuring points can be set at the inlet or outlet of the raw water equalization tank to collect influent data using a water quality acquisition device. Alternatively, measuring points can be set at the inlet of the flocculation reaction tank to collect the actual flocculant dosage using a flocculant measuring device, which is more accurate. The amount of flocculant added can also be directly obtained from the control device. Measuring points can also be set at the filter outlet or the clear water tank inlet to collect the actual effluent turbidity of the water treatment device using a turbidity measuring device. During the operation of the water treatment device, data from all the above measuring points needs to be collected and stored in real time for subsequent use, such as model training, model updates, and data analysis.

[0109] When model training or updating is required, historical data from various monitoring points in the water treatment device are acquired. This historical data includes influent monitoring data, flocculant dosage, and effluent turbidity at different historical times. Then, the historical data from different historical times is cleaned to remove zero values, null values, and outliers, resulting in deeply cleaned historical data for different historical times, i.e., influent monitoring data, flocculant dosage, and effluent turbidity at different historical times. Outliers can be detected and identified using algorithms such as box plots and Local Outlier Factor (LOF).

[0110] Then, the influent measurement data, flocculant dosage, and effluent turbidity at different historical times after cleaning were standardized to obtain influent water quality data, historical flocculant dosage, and historical effluent turbidity at different historical times. Standardization can unify data of different magnitudes into the same magnitude, avoiding the impact of differences in the measurement and value range of features on data analysis, and improving the convenience of subsequent data processing and the effectiveness of model training.

[0111] Specifically, parameters in the influent measurement data at different historical times were standardized to obtain influent water quality data at different historical times. Similarly, the flocculant dosage at different historical times was standardized to obtain historical flocculant dosage at different historical times, and the effluent turbidity at different historical times was standardized to obtain historical effluent turbidity at different historical times. The standardization process is described above and will not be repeated here.

[0112] S02: Target influent parameters are filtered from the influent water quality data at different historical times to obtain historical influent data at different historical times.

[0113] Then, it is necessary to screen the influent water quality data at different historical times to obtain the target influent parameters. The target influent parameters are the influent parameters that affect the flocculant dosage and / or effluent turbidity.

[0114] During data collection, numerous influent parameters are collected in the influent water quality data. Some parameters (target influent parameters) may be strongly correlated with the flocculant dosage and / or effluent turbidity, while others may have little impact on the flocculant dosage and / or effluent turbidity. To avoid model overfitting and improve model training performance, it is necessary to remove some unnecessary influent parameters (influent parameters other than the target influent parameters) from the influent water quality data and retain the target influent parameters in the influent water quality data, thereby obtaining historical influent data at different historical moments.

[0115] The target influent parameters can be influent parameters calibrated based on historical experience, such as influent flow rate, influent temperature, and influent turbidity. In other embodiments, to improve data accuracy, correlation analysis can be performed on each influent parameter in the influent water quality data with flocculant dosage and effluent turbidity to determine the target influent parameters that can affect flocculant dosage and / or effluent turbidity. Then, target influent parameters can be screened, retaining the target influent parameters from the influent water quality data and removing other influent parameters to obtain historical influent data at different historical moments.

[0116] For example, influent water quality data include influent flow rate, influent pH value, influent temperature, influent dissolved oxygen, influent turbidity, chemical oxygen demand (COD), total phosphorus in influent, total nitrogen in influent, and residual chlorine in influent.

[0117] Based on influent water quality data, historical flocculant dosage, and historical effluent turbidity at different historical moments, correlation analysis was performed on each influent parameter and flocculant dosage to obtain the correlation degree between each influent parameter and flocculant dosage. Correlation analysis was also performed on each influent parameter and effluent turbidity to obtain the correlation degree between each influent parameter and effluent turbidity. The correlation analysis data includes the correlation degree between each influent parameter and flocculant dosage in the influent water quality data, and / or the correlation degree between each influent parameter and effluent turbidity. The correlation degree ranges from [0, 1], with larger values ​​indicating stronger correlations.

[0118] Based on historical data verification and analysis, the correlation between parameters that significantly impact the model must be 0.7 or higher. According to the correlation between each influent parameter and the flocculant dosage, influent parameters with a correlation greater than or equal to 0.7 include influent flow rate, influent pH, influent temperature, influent dissolved oxygen, influent turbidity, and chemical oxygen demand (COD). Therefore, target parameters can include influent flow rate, influent pH, influent temperature, influent dissolved oxygen, influent turbidity, and COD. Similarly, based on the correlation between each influent parameter and effluent turbidity, influent parameters with a correlation greater than or equal to 0.7 include influent flow rate, influent pH, influent temperature, influent dissolved oxygen, influent turbidity, and COD. Therefore, target parameters can include influent flow rate, influent pH, influent temperature, influent dissolved oxygen, and influent turbidity.

[0119] Based on the correlation between each influent parameter and the flocculant dosage, and the correlation between each influent parameter and the effluent turbidity, it can be seen that the correlation between the three influent parameters—total phosphorus, total nitrogen, and residual chlorine—and the flocculant dosage and effluent turbidity is less than 0.2, and the correlation between chemical oxygen demand (COD) and effluent turbidity is less than 0.3.

[0120] If the dosage prediction model and the turbidity prediction model are trained using the same sample data, then the total phosphorus, total nitrogen, residual chlorine, and chemical oxygen demand (COD) in the influent water quality data can be removed to obtain historical influent data. That is, historical influent data at different historical moments include influent flow rate, pH, temperature, dissolved oxygen, turbidity, and other data.

[0121] To improve the accuracy of the dosage prediction model, the dosage prediction model and the turbidity prediction model can be trained using different sample data. Specifically, the total phosphorus, total nitrogen, residual chlorine, and chemical oxygen demand (COD) in the influent water quality data can be removed to obtain first historical influent data at different historical moments. This first historical influent data can then be used to train the turbidity prediction model. Similarly, the total phosphorus, total nitrogen, and residual chlorine in the influent water quality data can be removed to obtain second historical influent data at different historical moments. This second historical influent data can then be used to train the dosage prediction model.

[0122] S03: Combine the historical influent data, historical flocculant dosage, and historical effluent turbidity at the same historical moment into a single historical water quality treatment sample to obtain multiple historical water quality treatment samples.

[0123] After obtaining historical influent data at different historical moments, the historical influent data, historical flocculant dosage, and historical effluent turbidity at the same historical moment are combined into a historical water quality treatment sample, resulting in multiple historical water quality treatment samples.

[0124] In one embodiment, the historical influent data includes first historical influent data and second historical influent data. After obtaining historical influent data at different historical moments, the first historical influent data, historical flocculant dosage, and historical effluent turbidity at the same historical moment are combined into a single historical water quality treatment sample to obtain multiple first historical water quality treatment samples for training the turbidity prediction model. Similarly, the first historical influent data, historical flocculant dosage, and historical effluent turbidity at the same historical moment are combined into a single historical water quality treatment sample to obtain multiple second historical water quality treatment samples for training the dosage prediction model. The historical influent data in the first historical water quality treatment sample includes influent flow rate, influent pH, influent temperature, influent dissolved oxygen, and influent turbidity. The historical influent data in the second historical water quality treatment sample includes influent flow rate, influent pH, influent temperature, influent dissolved oxygen, influent turbidity, and chemical oxygen demand (COD). Different model training data were determined based on different correlation analysis structures, which improved the accuracy of historical water quality treatment samples and enabled the training of more accurate dosage prediction models and turbidity prediction models.

[0125] In this embodiment, historical data from various measuring points in the water treatment device are acquired and cleaned to filter out zero values, null values, and outliers, resulting in influent water quality data, historical flocculant dosage, and historical effluent turbidity at different historical times. The influent water quality data from different historical times are then filtered for target influent parameters, which are those influent parameters affecting flocculant dosage and / or effluent turbidity. The historical influent data, historical flocculant dosage, and historical effluent turbidity from the same historical time are combined into a single historical water quality treatment sample, resulting in multiple historical water quality treatment samples. This clarifies the preprocessing steps for multiple historical water quality treatment samples, ensuring their accuracy and improving model training performance, thereby enhancing the prediction accuracy of the turbidity prediction model and the flocculant dosage prediction model.

[0126] In one embodiment, step S02, which involves filtering the influent water quality data at different historical times to obtain historical influent data at different historical times, specifically includes the following steps:

[0127] S021: Conduct data correlation analysis on influent water quality data, flocculant dosage and effluent turbidity values ​​at different historical moments, and screen influent parameters in the initial influent water quality data based on the correlation analysis data to obtain target influent parameters that meet the correlation requirements.

[0128] Specifically, based on influent water quality data, historical flocculant dosage, and historical effluent turbidity at different historical moments, correlation analysis was performed on each influent parameter and flocculant dosage to obtain correlation analysis data. This data included the correlation between each influent parameter and flocculant dosage in the influent water quality data, and / or the correlation between each influent parameter and effluent turbidity. Then, based on the correlation analysis data, the influent parameters in the initial influent water quality data were screened to obtain target influent parameters that met the correlation requirements.

[0129] Specifically, the steps include the following:

[0130] S0221: Based on the historical flocculant dosage and influent water quality data at different historical moments, determine the first correlation coefficient between each influent parameter and the flocculant dosage.

[0131] Based on the flocculant dosage and influent water quality data at different historical moments, the correlation between each influent parameter and the flocculant dosage in the influent water quality data is calculated to determine the correlation degree between each influent parameter and the flocculant dosage, i.e., to determine the first correlation coefficient between each influent parameter and the flocculant dosage. The correlation degree ranges from [0, 1], with larger values ​​indicating stronger correlation.

[0132] S0222: Based on historical effluent turbidity and influent water quality data at different historical moments, determine the second correlation coefficient between each influent parameter and effluent turbidity.

[0133] Based on historical effluent turbidity and influent water quality data at different historical moments, the correlation between each influent parameter and effluent turbidity in the influent water quality data is calculated to determine the correlation degree between each influent parameter and effluent turbidity, that is, to determine the second correlation coefficient between each influent parameter and flocculant dosage.

[0134] S0223: Based on the first correlation coefficient and the second correlation coefficient, all influent parameters are screened to obtain target influent parameters with a correlation coefficient greater than a preset threshold.

[0135] Then, based on the first and second correlation coefficients, all influent parameters are screened to obtain target influent parameters with correlation coefficients (correlation strengths) greater than a preset threshold (0.5, 0.6, or 0.7). Specifically, influent parameters whose correlation coefficients (both the first and second correlation coefficients) are greater than the preset threshold are identified as target influent parameters; that is, target influent parameters are those whose correlation coefficients (both the first and second correlation coefficients) are greater than the preset threshold. Taking the intersection of these two coefficients as the target influent parameter simplifies subsequent data processing.

[0136] For example, influent water quality data may include influent flow rate, influent pH value, influent temperature, influent dissolved oxygen, influent turbidity, chemical oxygen demand (COD), influent total phosphorus (total phosphorus content in the influent), influent total nitrogen (total nitrogen content in the influent), and influent residual chlorine (residual chlorine content in the influent). Based on historical data validation analysis, the correlation coefficient of parameters that have a significant impact on the model should be 0.7 or higher. According to the correlation coefficient (i.e., the first correlation coefficient) between each influent parameter and the flocculant dosage, influent parameters with a correlation coefficient greater than or equal to 0.7 include influent flow rate, influent pH, influent temperature, influent dissolved oxygen, influent turbidity, and chemical oxygen demand (COD). Accordingly, based on the correlation coefficients (i.e., the second correlation coefficients) between each influent parameter and effluent turbidity, influent parameters with a correlation coefficient greater than or equal to 0.7 include influent flow rate, influent pH, influent temperature, influent dissolved oxygen, influent turbidity, and chemical oxygen demand (COD). However, based on the correlation coefficients (i.e., the first correlation coefficients) between each influent parameter and flocculant dosage, and the correlation coefficients (i.e., the second correlation coefficients) between each influent parameter and effluent turbidity, the correlation coefficients between influent total phosphorus, influent total nitrogen, and influent residual chlorine and flocculant dosage and effluent turbidity are all less than 0.2, and the correlation coefficient between COD and effluent turbidity is less than 0.3.

[0137] That is, the first correlation coefficient and the second correlation coefficient, and the influent parameters whose correlation coefficients are both greater than the preset threshold, include: influent flow rate, influent pH, influent temperature, influent dissolved oxygen, and influent turbidity. In other words, the target influent parameters include influent flow rate, influent pH, influent temperature, influent dissolved oxygen, and influent turbidity.

[0138] In other embodiments, the target influent parameters may include a first target influent parameter and a second target influent parameter. That is, the first target influent parameter is obtained by determining influent parameters whose correlation coefficients (correlation degrees) in the first correlation coefficient are all greater than a first preset threshold; the second target influent parameter is obtained by determining influent parameters whose correlation coefficients (correlation degrees) in the second correlation coefficient are all greater than a second preset threshold. The first preset threshold and the second preset threshold may be consistent or different. For example, the first target influent parameter may include influent flow rate, influent pH, influent temperature, influent dissolved oxygen, influent turbidity, and chemical oxygen demand (COD); the second target influent parameter may include influent flow rate, influent pH, influent temperature, influent dissolved oxygen, and influent turbidity.

[0139] S023: Based on the target influent parameters, the historical influent data at different historical times are filtered to obtain the historical influent data at different historical times.

[0140] Then, based on the target influent parameters, the historical influent data at different historical moments are filtered to obtain the historical influent data at different historical moments.

[0141] For example, if the dosage prediction model and the turbidity prediction model are trained using the same sample data, and the influent parameters with correlation coefficients greater than a preset threshold are selected as the target influent parameters, including influent flow rate, influent pH, influent temperature, influent dissolved oxygen, and influent turbidity, then from the influent water quality data at different historical times, the total phosphorus, total nitrogen, residual chlorine, and chemical oxygen demand can be removed, while the influent flow rate, pH, temperature, dissolved oxygen, and turbidity can be retained, thus obtaining historical influent data at different historical times. That is, historical influent data at different historical times includes data such as influent flow rate, pH, temperature, dissolved oxygen, and turbidity.

[0142] In other embodiments, the target influent parameters may include a first target influent parameter and a second target influent parameter. When filtering historical influent data at different historical times based on the target influent parameters, the first target influent parameter is used to filter the historical influent data at different historical times, removing total phosphorus, total nitrogen, and residual chlorine, and retaining influent flow rate, pH, temperature, dissolved oxygen, turbidity, and chemical oxygen demand, thus obtaining the first historical influent data at different historical times; simultaneously, the second target influent parameter is used to filter the historical influent data at different historical times, removing total phosphorus, total nitrogen, residual chlorine, and chemical oxygen demand, and retaining influent flow rate, pH, temperature, dissolved oxygen, and turbidity, thus obtaining the second historical influent data at different historical times.

[0143] In other words, the historical influent data includes first and second historical influent data, which differ in size. Subsequently, a dosage prediction model can be trained based on the first historical influent data, and a turbidity prediction model can be trained based on the second historical influent data. By using different sample data for model training, the prediction accuracy of the dosage prediction model can be improved.

[0144] In this embodiment, by performing data correlation analysis on influent water quality data, flocculant dosage and effluent turbidity value, and filtering influent parameters in the influent water quality data based on the correlation analysis data, target influent parameters that meet the correlation requirements are obtained. Then, based on the target influent parameters, parameter filtering is performed on historical influent data at different historical times to obtain historical influent data at different historical times. This can obtain more accurate model training data and improve the model training effect.

[0145] In one embodiment, before step S31 or S41, i.e., before predicting the flocculant dosage using the dosage prediction model and obtaining the preset dosage, a neural network model needs to be trained based on multiple historical water quality treatment samples from different historical times to obtain the dosage prediction model, so that the flocculant dosage can be predicted subsequently using the dosage prediction model. Before step S31, the turbidity prediction model is trained in the following way:

[0146] S301: Extract data from multiple historical water quality treatment samples at different historical moments to obtain training sample groups at different historical moments. The training sample groups include historical influent data and historical flocculant dosage at the same historical moment.

[0147] After preprocessing historical data collected from various monitoring points in the water treatment device, multiple historical water quality treatment samples at different historical times were obtained. Each historical water quality treatment sample included historical influent data, historical flocculant dosage, and historical effluent turbidity. Then, data extraction was performed on multiple historical water quality treatment samples at different historical times to obtain training sample groups for different historical times. The training sample groups included historical influent data and historical flocculant dosage at the same historical time.

[0148] In one embodiment, the training sample group includes the first historical influent data and historical flocculant dosage at the same historical moment, improving the data diversity and accuracy of the training sample group, thereby enhancing the model training effect. Specifically, the historical influent data in the historical water quality treatment samples includes influent flow rate, influent pH, influent temperature, influent dissolved oxygen, influent turbidity, and chemical oxygen demand (COD). In other embodiments, the historical influent data in the historical water quality treatment samples may also include influent flow rate, influent pH, influent temperature, influent dissolved oxygen, and influent turbidity.

[0149] S302: Input the historical influent data from the training sample group into the extreme gradient boosting tree classifier to predict the flocculant dosage, obtain the predicted flocculant dosage, and determine the model loss value based on the predicted flocculant dosage and the historical flocculant dosage in the training sample group.

[0150] After obtaining training sample groups at different historical moments, the historical influent data of one training sample group is input into an extreme gradient boosting tree classifier to predict the flocculant dosage. The predicted flocculant dosage is obtained, and the model loss value is determined based on the predicted flocculant dosage and the historical flocculant dosage in the training sample group.

[0151] The model loss value is determined based on the predicted flocculant amount and the historical flocculant dosage in the training sample group. This includes: determining the difference between the predicted flocculant amount and the corresponding historical flocculant dosage as the prediction bias; when the prediction bias is less than or equal to the hyperparameters set by the extreme gradient boosting tree classifier, the model loss value is calculated using the mean squared error function; when the prediction bias is greater than the hyperparameters set by the extreme gradient boosting tree classifier, the model loss value is calculated using the mean absolute error.

[0152] In other words, the model loss value is calculated as follows:

[0153]

[0154] Where x is the predicted flocculant amount; y is the corresponding historical flocculant dosage, i.e., the historical flocculant dosage in the training sample group; h(x,y) is the prediction bias, i.e., the difference between x and y; δ is the hyperparameter of the extreme gradient boosting tree classifier, and the value of δ is set as needed; L δ (h(x,y)) is the model loss value.

[0155] In other embodiments, the model loss value can also be calculated in other ways, such as directly calculating the edit distance between the predicted flocculant amount and the historical flocculant dosage in the training sample group as the model loss value.

[0156] S303: When the model loss value does not meet the convergence requirement, update and iterate the parameters of the extreme gradient boosting tree classifier based on the remaining historical inflow data until the model loss value meets the convergence requirement. Output the parameters of the converged extreme gradient boosting tree classifier to obtain the dosage prediction model.

[0157] After obtaining the model loss value, if the model loss value does not meet the convergence requirement, the parameters of the extreme gradient boosting tree classifier are updated and iterated based on the remaining historical water inflow data. That is, S302 to S303 are repeated until the model loss value meets the convergence requirement. The parameters of the converged extreme gradient boosting tree classifier are then output to obtain the drug dosage prediction model.

[0158] Specifically, if the model loss value is less than or equal to the preset loss value, or if the number of training iterations reaches the preset number, the model loss value is considered to meet the convergence requirement. Conversely, if the model loss value is greater than the preset loss value, and the number of training iterations has not reached the preset number, the model loss value is considered to have failed to meet the convergence requirement.

[0159] In this embodiment, data is extracted from multiple historical water quality treatment samples at different historical moments to obtain training sample groups for different historical moments. Then, the historical influent data from the training sample groups is input into an extreme gradient boosting tree classifier to predict flocculant dosage, obtaining the predicted flocculant dosage. Based on the predicted flocculant dosage and the historical flocculant dosage in the training sample groups, the model loss value is determined. If the model loss value does not meet the convergence requirement, the parameters of the extreme gradient boosting tree classifier are updated iteratively based on the remaining historical influent data until the model loss value meets the convergence requirement. The converged parameters of the extreme gradient boosting tree classifier are then output, resulting in the dosage prediction model. This clarifies the training process of the dosage prediction model, using historical influent data and corresponding historical flocculant dosages for training, thus improving the accuracy of the dosage prediction model.

[0160] In one embodiment, before step S30, i.e., before using the turbidity prediction model to predict effluent turbidity, a neural network model needs to be trained based on multiple historical water quality treatment samples from different historical times to obtain the turbidity prediction model, so that it can be used for subsequent effluent turbidity prediction. Before step S30, i.e., before using the turbidity prediction model to predict effluent turbidity, the turbidity prediction model is trained as follows:

[0161] SA11: Obtain multiple historical water quality treatment samples at different historical moments.

[0162] After preprocessing historical data collected from various measuring points in the water treatment device, multiple historical water quality treatment samples at different historical times are obtained. These historical water quality treatment samples include historical influent data, historical flocculant dosage, and historical effluent turbidity. Historical influent data includes influent flow rate, influent pH, influent temperature, influent dissolved oxygen, and influent turbidity.

[0163] S12: Using the water treatment time as the time window, a sliding time window algorithm is used to perform sliding sampling on historical influent data and historical flocculant dosage at different historical moments to obtain multiple sample input data sets.

[0164] Then, using a sliding time window algorithm, the historical influent data and historical flocculant dosage at different historical moments are sampled within a time window of the water treatment time required for the flocculation reaction process, resulting in multiple sequentially ordered sample input data sets. Each sample input data set includes historical influent data, historical flocculant dosage, and historical effluent turbidity within a preset time period. The start times of the multiple sample input data sets increase sequentially, and the duration corresponding to each preset time period is the water treatment time.

[0165] For example, multiple sample input data sets include n sample input data sets: first sample input data set, second sample input data set, ..., nth sample input data set. Then, the first sample input data set includes historical influent data and historical flocculant dosage from historical time h to historical time h+t; the second sample input data set includes historical influent data and historical flocculant dosage from historical time h+1 to historical time (h+1)+t; ..., the nth sample input data set includes historical influent data and historical flocculant dosage from historical time h+n-1 to historical time (h+n-1)+t. t is the water treatment time required for the flocculation reaction process.

[0166] S13: Input the sample input data set into the preset network to predict the effluent turbidity, obtain the predicted effluent turbidity value, and determine the total loss value based on the predicted effluent turbidity value and the historical effluent turbidity at the end time in the sample input data set.

[0167] After obtaining multiple sample input data sets, one sample input data set is input into a preset network to predict the effluent turbidity and obtain the predicted effluent turbidity value. Based on the predicted effluent turbidity value and the historical effluent turbidity at the end time in the sample input data set, the total loss value is determined.

[0168] Considering that both the Mean Absolute Error (MAE) and Mean-Square Error (MSE) functions have their advantages and disadvantages in calculating the total loss, MAE is insensitive to outliers but is very unstable at extreme points, with a very large gradient near these points. MSE, on the other hand, gradually decreases the gradient near extreme points to obtain accurate extrema, but is sensitive to outliers. Therefore, a parameterized robust loss function (Huber Loss) is used to calculate the total loss of the predefined network. The Huber Loss function combines the advantages of MAE and MSE, enhancing the robustness of MSE to outliers while using MAE to reduce the impact of outliers, avoiding excessive sensitivity of the model to extreme data, reducing the negative impact of outliers on model training, and improving the model's prediction accuracy.

[0169] The total loss value is determined based on the predicted effluent turbidity and the historical effluent turbidity at the end time in the sample input data set. This includes: determining the difference between the predicted effluent turbidity and the historical effluent turbidity at the end time as the prediction deviation; when the prediction deviation is less than or equal to the hyperparameters set in the preset network, the total loss value is calculated using the mean square error function; when the prediction deviation is greater than the hyperparameters set in the preset network, the total loss value is calculated using the mean absolute error.

[0170] In other words, the total loss value is calculated as follows:

[0171]

[0172] Where x is the predicted effluent turbidity; y is the actual effluent turbidity, i.e., the historical effluent turbidity at the end of the sample input data set; h(x,y) is the prediction bias, i.e., the difference between x and y; δ is the hyperparameter of the preset network, and the value of δ is set as needed; L δ (h(x,y)) represents the total loss value.

[0173] In other embodiments, the total loss value can also be calculated in other ways, such as by directly calculating the edit distance between the predicted effluent turbidity and the historical effluent turbidity at the end of the sample input data set as the total loss value.

[0174] S05: When the total loss value does not meet the convergence requirement, iteratively train the parameters of the preset network based on the remaining sample input data group until the total loss value meets the convergence requirement, and output the parameters of the preset network after convergence to obtain the turbidity prediction model.

[0175] After obtaining the total loss value, if the total loss value does not meet the convergence requirement, the parameters of the preset network are iteratively trained based on the remaining sample input data group, that is, the above steps S12 to S13 are repeated until the total loss value meets the convergence requirement. The parameters of the preset network after convergence are then output to obtain the turbidity prediction model.

[0176] Specifically, if the total loss value is less than or equal to the preset loss value, or if the number of training iterations reaches the preset number, the total loss value is determined to meet the convergence requirement. Conversely, if the total loss value is greater than the preset loss value, and the number of training iterations has not reached the preset number, the total loss value is determined to not meet the convergence requirement.

[0177] In this embodiment, multiple historical water quality treatment samples from different historical moments are obtained. These samples include historical influent data, historical flocculant dosage, and historical effluent turbidity. Using the water quality treatment time required for the flocculation reaction process as a time window, a sliding time window algorithm is employed to sample the historical influent data and historical flocculant dosage at different historical moments, resulting in multiple sample input data sets. These sample input data sets are then input into a preset network for effluent turbidity prediction, yielding predicted effluent turbidity values. Based on the predicted effluent turbidity values ​​and the historical effluent turbidity at the end of the sample input data sets, the total loss value is determined. If the total loss value does not meet the convergence requirement, the parameters of the preset network are iteratively trained based on the remaining sample input data sets until the total loss value meets the convergence requirement. The converged parameters of the preset network are then output, resulting in the turbidity prediction model. This clarifies the training process of the turbidity prediction model, using multiple sample input data sets as input for training, thus improving the accuracy of the turbidity prediction model.

[0178] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0179] In one embodiment, a control device is provided, which corresponds one-to-one with the water treatment device control method described in the above embodiments. For example... Figure 7 As shown, the parameter aggregation device includes a data acquisition module 701, a prediction module 702, and a control module 703. Detailed descriptions of each functional module are as follows:

[0180] The data acquisition module 701 is used to collect data from the water treatment device based on the water treatment time required by the flocculation process, and obtain multiple sets of target influent data and multiple flocculant dosages from the first moment to the second moment. The time from the first moment to the second moment is the water treatment time.

[0181] The prediction module 702 is used to predict the effluent turbidity based on multiple sets of target influent data and multiple flocculant dosages using a turbidity prediction model. The turbidity prediction model is a neural network model trained on multiple historical water treatment samples of the water treatment device at different historical times and water treatment duration.

[0182] The control module 703 is used to control the dosage of flocculant in the water treatment device by feedback adjustment based on the predicted effluent turbidity and the actual effluent turbidity of the water treatment device at the second moment.

[0183] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0184] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0185] This application also provides an electronic device, such as... Figure 8 As shown, the electronic device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor. When the processor executes the computer program, it implements the steps in any of the above method embodiments, or when the processor executes the computer program, it implements the functions of each module / unit in the above device embodiments.

[0186] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.

[0187] Those skilled in the art will understand that Figure 8 The electronic device described is merely an example and does not constitute a limitation on the electronic device. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.

[0188] The aforementioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0189] The memory can be an internal storage unit of the electronic device, such as a hard drive or RAM. The memory can also be an external storage device of the electronic device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory can include both internal and external storage units of the electronic device.

[0190] This application also provides a readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0191] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.

[0192] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0193] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0194] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0195] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0196] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0197] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A control method for a water treatment device, characterized in that, include: Data is collected from the water treatment device based on the water treatment time required for the flocculation process, and multiple sets of target influent data and multiple flocculant dosages are obtained from the first time to the second time. The duration from the first time to the second time is the water treatment time, and the second time is the current time. Based on multiple sets of target influent data and multiple flocculant dosages, the turbidity of the effluent is predicted using a turbidity prediction model to obtain the predicted effluent turbidity. The turbidity prediction model is a neural network model trained on multiple historical water treatment samples of the water treatment device at different historical times and the water treatment duration. Based on the predicted effluent turbidity and the actual effluent turbidity of the water treatment device at the second time, the dosage of the flocculant in the water treatment device is controlled by feedback adjustment, including: when the actual effluent turbidity at the second time meets the water treatment requirements, adjusting the predicted dosage based on the deviation between the predicted effluent turbidity and the actual effluent turbidity, wherein the predicted dosage is obtained by predicting the flocculant dosage using a dosage prediction model based on the target influent data at the second time; based on the adjusted predicted dosage, multiple sets of target influent data, and multiple flocculant dosages, re-predicting the effluent turbidity using the turbidity prediction model until the absolute value of the deviation is less than a preset value, outputting the adjusted predicted dosage as the target dosage; and using the target dosage as the actual flocculant dosage at the second time to control the water treatment device to add flocculant. The turbidity prediction model is trained as follows: multiple historical water quality treatment samples at different historical times are obtained, including historical influent data, historical flocculant dosage, and historical effluent turbidity; using the water quality treatment duration as a time window, a sliding time window algorithm is used to slide sample the historical influent data and historical flocculant dosage at different historical times to obtain multiple sample input data groups. Each sample input data group includes the historical influent data, historical flocculant dosage, and historical effluent turbidity within a preset time period. The start times of the multiple sample input data groups increase sequentially, and the duration corresponding to each preset time period is the water quality treatment duration. The sample input data set is input into a preset network to predict the effluent turbidity, thereby obtaining the predicted effluent turbidity value. Based on the predicted effluent turbidity value and the historical effluent turbidity at the end time in the sample input data set, the total loss value is determined. If the total loss value does not meet the convergence requirement, the parameters of the preset network are iteratively trained based on the remaining sample input data set until the total loss value meets the convergence requirement. The converged parameters of the preset network are then output to obtain the turbidity prediction model.

2. The water treatment device control method as described in claim 1, characterized in that, The step of predicting effluent turbidity using a turbidity prediction model based on multiple sets of target influent data and multiple flocculant dosages, includes: Based on the target influent data at the second time point, the flocculant dosage is predicted using a dosage prediction model to obtain the predicted dosage at the second time point. The dosage prediction model is a prediction model obtained by deep learning based on multiple historical water quality treatment samples. Based on multiple sets of target influent data, multiple flocculant dosages, and the predicted dosage at the second time point, the turbidity prediction model is used to predict the effluent turbidity, thereby obtaining the predicted effluent turbidity.

3. The water treatment device control method as described in claim 2, characterized in that, The method involves using the turbidity prediction model to predict the effluent turbidity based on multiple sets of target influent data, multiple flocculant dosages, and the predicted dosage at the second time point, to obtain the predicted effluent turbidity, including: The data in each of the target influent data are standardized to obtain multiple sets of standard influent data. The predicted dosage and the dosage of each of the flocculants are also standardized to obtain multiple standard flocculant dosages. Multiple sets of the standard influent data and multiple standard flocculant dosages are input into the turbidity prediction model to predict the effluent turbidity and obtain the initial predicted turbidity. The initial predicted turbidity is denormalized to obtain the predicted effluent turbidity.

4. The water treatment device control method as described in claim 1, characterized in that, Multiple historical water quality treatment samples were obtained in the following manner: Historical data collected from each measuring point in the water treatment device are obtained and standardized to obtain influent water quality data, historical flocculant dosage and historical effluent turbidity at different historical times. The influent water quality data at different historical moments are filtered for target influent parameters to obtain historical influent data at different historical moments. The target influent parameters are influent parameters that affect the flocculant dosage and / or the effluent turbidity. By combining the historical influent data, the historical flocculant dosage, and the historical effluent turbidity at the same historical moment into a single historical water quality treatment sample, multiple historical water quality treatment samples can be obtained.

5. The water treatment device control method as described in claim 4, characterized in that, The process of filtering the influent water quality data at different historical times to obtain historical influent data at different historical times includes: A data correlation analysis was performed on the influent water quality data, the historical dosage of the flocculant, and the historical effluent turbidity. Based on the correlation analysis data, the influent parameters in the influent water quality data were screened to obtain the target influent parameters that meet the correlation requirements. Based on the target influent parameters, the influent water quality data at different historical times are filtered to obtain the historical influent data at different historical times.

6. A water treatment system, characterized in that, The device includes a water treatment apparatus and a control device, the control device being used to perform the method according to any one of claims 1-5, and the control device being further used to: Data is collected from the water treatment device based on the water treatment time required for the flocculation process, and multiple sets of target influent data and multiple flocculant dosages are obtained from the first time to the second time. The duration from the first time to the second time is the water treatment time, and the second time is the current time. Based on multiple sets of target influent data and multiple flocculant dosages, the turbidity of the effluent is predicted using a turbidity prediction model to obtain the predicted effluent turbidity. The turbidity prediction model is a neural network model trained on multiple historical water treatment samples of the water treatment device at different historical times and the water treatment duration. Based on the predicted effluent turbidity and the actual effluent turbidity of the water treatment device at the second time, the dosage of the flocculant in the water treatment device is controlled by feedback adjustment, including: when the actual effluent turbidity at the second time meets the water treatment requirements, adjusting the predicted dosage based on the deviation between the predicted effluent turbidity and the actual effluent turbidity, wherein the predicted dosage is obtained by predicting the flocculant dosage using a dosage prediction model based on the target influent data at the second time; based on the adjusted predicted dosage, multiple sets of target influent data, and multiple flocculant dosages, re-predicting the effluent turbidity using the turbidity prediction model until the absolute value of the deviation is less than a preset value, outputting the adjusted predicted dosage as the target dosage; and using the target dosage as the actual flocculant dosage at the second time to control the water treatment device to add flocculant.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the water treatment device control method as described in any one of claims 1 to 5.

8. A readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the water treatment device control method as described in any one of claims 1 to 5.