Water plant coagulating sedimentation effect estimation method and system based on alumen ustum target tracking, medium and equipment

Through video processing technology based on target tracking of alum flower, the morphology and motion characteristics of alum flower are analyzed in real time, and the turbidity of the effluent of the sedimentation tank is estimated, which solves the problem of time delay adjustment of the dosing feedback during the coagulation and precipitation of the water plant, and achieves the effect of water quality stability and energy consumption optimization.

CN119580150APending Publication Date: 2025-03-07TSINGHUA UNIVERSITY +1

Patent Information

Application Number
CN202411625383.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-14
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

The existing water plants have problems with time delay adjustment during the coagulation and precipitation process, which leads to fluctuations in the coagulation and precipitation effect, making it difficult to achieve water quality stability and energy consumption optimization.

Method used

Using video processing technology based on alum flower target tracking, the large model of the video target tracking and the turbidity prediction model of the sedimentation tank effluent turbidity is used to collect and analyze the morphology and motion characteristics of the alum flower in real time, and estimate the turbidity of the effluent of the sedimentation tank, thereby optimizing the coagulant dosage.

Benefits of technology

It significantly alleviates the time lag problem of coagulation feedback regulation, improves the water quality stability of the sedimentation tank effluent, and reduces the frequency and economic cost of the filter backflush.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119580150A_ABST
    Figure CN119580150A_ABST
Patent Text Reader

Abstract

The invention relates to the field of water treatment and video treatment, and discloses a water plant coagulating sedimentation effect estimation method, system, medium and equipment based on alumen ustum target tracking, and the method comprises the following steps: collecting alumen ustum video images, and aligning online flow water quality instrument data with the alumen ustum video images; inputting the aligned online flow water quality instrument data and alumen ustum video images into a video target tracking large model, tracking each alumen ustum target, and constructing the form and motion characteristics of alumen ustum to obtain alumen ustum characteristic data; based on alumen ustum characteristic data and online flow water quality instrument data, a sedimentation tank effluent turbidity estimation model is trained; reading alumen ustum video streams and online instrument data on line, inputting the alumen ustum video streams and the online instrument data into the large video target tracking model, and estimating the effluent turbidity of the sedimentation tank through the effluent turbidity estimation model of the sedimentation tank. The risk that the adding amount of the coagulant is not adjusted in time can be reduced, the water quality stability of effluent of the sedimentation tank is improved, and the backwashing frequency and economic cost of the filter tank are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of water treatment and video processing, and in particular to a method, system, medium and equipment for predicting the coagulation and sedimentation effect of a water plant based on alum flower target tracking. Background Art

[0002] At present, tap water and surface water treatment plants generally use flocculation sedimentation water purification technology. Coagulant addition is a key link in the water production process. Good or bad control directly affects the effluent quality of the sedimentation tank, which in turn affects the filtration effect and backwashing frequency of the filter tank, and ultimately affects the energy consumption, self-use water rate and operation stability of the water plant. The coagulation process is affected by many factors and difficult to control. Changes in source water flow, turbidity, temperature, and pH will cause fluctuations in effluent turbidity.

[0003] The traditional empirical dosing method is to manually adjust the dosage by the staff on duty based on their personal work experience or by observing the formation of alum flowers in the flocculation tank. The dosage is adjusted only according to the influent flow and turbidity. There is a lack of feedback mechanism to adjust the dosage based on the feedback of the coagulation effect, and the coagulation and sedimentation effect is prone to significant fluctuations. Experienced operators can predict the coagulation and sedimentation effect by observing the alum flowers at the front end of the sedimentation tank, but the labor cost of manual continuous observation and adjustment is too high, and experience training also requires a high time cost.

[0004] The existing method is to automatically feedback the dosing effect based on the turbidity of the sedimentation tank effluent and adjust the coagulant dosage through the automatic control system. However, in the feedback adjustment, the effluent of the sedimentation tank has a hydraulic retention time of several hours from the dosing location. The longer the hydraulic retention time, the more complicated the process of the agent staying, diffusing, and chemically reacting in the water. The relationship between the turbidity of the sedimentation tank effluent and the inlet water quality is also more complicated, making it difficult to adjust the dosage in time according to the feedback of the dosing effect.

[0005] Artificial intelligence technology based on alum flower image recognition is committed to advancing the node of coagulation effect feedback to the front end of the sedimentation tank to significantly alleviate the large time lag problem in feedback regulation. This type of technology is based on the principle in professional knowledge that the larger the alum flower and the more saturated the shape, the better the coagulation effect. It evaluates the coagulation effect by performing image recognition on the alum flower. There are two types of image recognition methods: the whole image method (for example, patent publication number CN112101352A) and the target detection method (for example, patent publication number CN113688751A). The whole image method predicts the turbidity of the effluent from the sedimentation tank through the entire image. The shortcoming of this method is that it does not specifically identify the shape of each alum flower. The target detection method performs target detection on each image, identifies each alum flower in the image, and classifies its shape. The shortcoming of this method is that the cost of training data annotation is high and the application potential is limited; and only the static image features of the alum flower are processed, and the movement trajectory of the alum flower is not captured.

[0006] Therefore, how to effectively reduce the annotation cost of training data and fully explore the morphological and motion characteristics of alum flowers is crucial to improving the feedback ability of alum flowers on the coagulation effect. With the rapid development of artificial intelligence large model technology, there are large models that have been pre-trained for the target tracking task in the video, which provides a breakthrough in the coagulation and sedimentation effect prediction technology based on alum flower visual recognition. Summary of the invention

[0007] In view of the above problems, the purpose of the present invention is to provide a method, system, medium and equipment for predicting the coagulation and sedimentation effects of a water plant based on alum flower target tracking, which can significantly alleviate the time lag problem of coagulation dosing feedback adjustment, reduce the risk of untimely adjustment of coagulant dosage, improve the water quality stability of sedimentation tank effluent, and reduce the frequency and economic cost of filter backwashing.

[0008] To achieve the above-mentioned purpose, in the first aspect, the technical solution adopted by the present invention is: a method for estimating the coagulation and sedimentation effect of a water plant based on alum flower target tracking, which includes: collecting alum flower video images, and aligning online flow water quality meter data with the alum flower video images; inputting the aligned online flow water quality meter data and the alum flower video images into a video target tracking large model, tracking each alum flower target, constructing the morphology and motion characteristics of the alum flower, and obtaining alum flower feature data; training a sedimentation tank effluent turbidity estimation model based on the alum flower feature data and the online flow water quality meter data; reading the alum flower video stream and the online instrument data online and inputting them into the video target tracking large model, and then estimating the sedimentation tank effluent turbidity through the sedimentation tank effluent turbidity estimation model.

[0009] Furthermore, online instrument data should at least include the inlet water flow, turbidity, coagulant dosage flow, sedimentation tank liquid level, and sedimentation tank effluent turbidity data collected during the operation of the water supply plant's coagulation and sedimentation tank; when aligning the online flow and water quality instrument data with the alum flower video image, the time lag caused by the hydraulic retention time in the coagulation zone should be considered.

[0010] Furthermore, each alum flower target is tracked to construct the morphological and motion characteristics of the alum flower, including:

[0011] Use a large video target tracking model that has been trained;

[0012] For each captured alum flower video clip, a preset duration is captured and input into the video target tracking model to identify each alum flower and track its movement trajectory;

[0013] Estimate the length represented by each pixel of each captured alum flower video screen;

[0014] For each alum flower video clip, the number of alum flowers identified is counted, and the characteristics of each alum flower are calculated based on the length represented by each pixel; the characteristics of alum flowers include the average area of ​​alum flowers, the average roundness coefficient and the average sinking speed;

[0015] For each alum bloom video clip, the alum bloom removal rate is estimated based on the alum bloom characteristics.

[0016] Furthermore, for each alum bloom video clip, the alum bloom removal rate is estimated based on the characteristics of the alum bloom, including:

[0017] Calculate the interception sedimentation velocity u at the corresponding time of each alum flower video clip 0 ;

[0018] According to the theory of ideal sedimentation tank, the interception sedimentation velocity u 0 The average sinking speed of alum flower j in alum flower video clip i For comparison, if Then the alum flower j in the alum flower video clip i is considered to be able to be removed by precipitation; the estimated alum flower removal rate is obtained by the proportion of this alum flower to the total alum flowers.

[0019] Furthermore, based on the characteristics of alum flowers and the data of online flow and water quality instruments, a sedimentation tank effluent turbidity prediction model was trained, including:

[0020] Create a data set based on alum flower characteristic data and online flow and water quality instrument data;

[0021] Use time series forecasting machine learning models;

[0022] Set the initial hyperparameters of various models and set the loss function;

[0023] Divide all training data into training set, validation set and test set in chronological order;

[0024] Hyperparameter tuning was performed and a model for estimating turbidity of sedimentation tank effluent was obtained through training.

[0025] Furthermore, the alum flower video stream and online instrument data are read online and input into the video target tracking model, and the turbidity of the sedimentation tank effluent is estimated, including:

[0026] Run the large video target tracking model of Fanhua online;

[0027] The frequency τ″ of the sedimentation tank effluent turbidity prediction is set, and the characteristic time series input into the sedimentation tank effluent turbidity prediction model is obtained at this frequency; wherein the characteristic time series includes the time series with the instrument data length of l and the most recent l pieces of alum flower characteristic data;

[0028] Run the sedimentation tank effluent turbidity prediction model to obtain the sedimentation tank effluent turbidity prediction results.

[0029] Furthermore, the large model of alum flower target tracking is run online. Every preset time τ, the alum flower video of the first τ′ length period should be captured, the large model of alum flower video target tracking should be run, and one piece of alum flower feature data should be recorded.

[0030] In the second aspect, the technical solution adopted by the present invention is: a water plant coagulation and sedimentation effect prediction system based on alum flower target tracking, which includes: an acquisition module, which collects alum flower video images and aligns online flow water quality meter data with the alum flower video images; an alum flower tracking module, which inputs the aligned online flow water quality meter data and the alum flower video images into a video target tracking large model, tracks each alum flower target, constructs the morphology and motion characteristics of the alum flower, and obtains alum flower feature data; a model training module, which trains a sedimentation tank effluent turbidity prediction model based on the alum flower feature data and the online flow water quality meter data; an effect prediction module, which reads the alum flower video stream and the online instrument data online and inputs them into the video target tracking large model, and then estimates the sedimentation tank effluent turbidity through the sedimentation tank effluent turbidity prediction model.

[0031] In a third aspect, the technical solution adopted by the present invention is: a computer-readable storage medium storing one or more programs, wherein the one or more programs include instructions, and when the instructions are executed by a computing device, the computing device executes any one of the above methods.

[0032] In a fourth aspect, the technical solution adopted by the present invention is: a computing device, comprising: one or more processors, a memory and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any of the above methods.

[0033] The present invention adopts the above technical solution, which has the following advantages:

[0034] The present invention provides a method for predicting the coagulation and sedimentation effects of a water supply plant based on alum flower target tracking, which combines professional knowledge with data-driven modeling, and establishes a system perception mechanism that combines water quantity and quality data with alum flower visual information. The method can effectively predict the coagulation and sedimentation effects, and is especially suitable for the current situation of large time lag in the horizontal flow sedimentation tank of a water supply plant. It helps to significantly alleviate the time lag problem of coagulation dosing feedback adjustment, reduce the risk of untimely adjustment of coagulant dosage, improve the water quality stability of sedimentation tank effluent, and reduce the frequency and economic cost of filter backwashing. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] Figure 1 It is a flow chart of a method for estimating the coagulation and sedimentation effect of a water supply plant based on alum flower target tracking in an embodiment of the present invention;

[0036] Figure 2 It is a flow chart of a method for integrating and aligning online flow and water quality instrument data and alum flower video images in an embodiment of the present invention;

[0037] Figure 3 It is a schematic diagram of the installation position and method of the alum flower camera in the coagulation sedimentation tank according to an embodiment of the present invention;

[0038] Figure 4 It is a flow chart of a method for tracking each alum flower target and constructing alum flower morphology and motion characteristics in an embodiment of the present invention;

[0039] Figure 5 Schematic diagram of the target tracking effect of alum flower in an embodiment of the present invention;

[0040] Figure 6 is a flow chart of a method for training a sedimentation tank effluent turbidity prediction model in an embodiment of the present invention;

[0041] Figure 7 It is a flow chart of a method for online reading of data and estimating turbidity of effluent from a sedimentation tank in an embodiment of the present invention. DETAILED DESCRIPTION

[0042] In order to fully explore the morphology and movement characteristics of alum flowers, improve the feedback ability of alum flowers on coagulation effects, and solve the problems of high cost of existing training data annotation, the present invention provides a method, system, medium and equipment for estimating coagulation and sedimentation effects based on alum flower target tracking. The method includes: collecting and aligning online flow water quality instrument data and alum flower video images; tracking each alum flower target, constructing alum flower morphology and movement characteristics; training a sedimentation tank effluent turbidity estimation model; reading data online and estimating sedimentation tank effluent turbidity. It helps to significantly alleviate the time lag problem of coagulation dosing feedback adjustment, reduce the risk of untimely adjustment of coagulant dosage, improve the stability of water quality of sedimentation tank effluent, and reduce the frequency and economic cost of filter tank backwashing.

[0043] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution of the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings of the embodiment of the present invention. Obviously, the described embodiment is a part of the embodiment of the present invention, not all of the embodiments. Based on the described embodiment of the present invention, all other embodiments obtained by ordinary technicians in this field belong to the scope of protection of the present invention.

[0044] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0045] In one embodiment of the present invention, a method for estimating the coagulation and sedimentation effect of a water plant based on alum flower target tracking is provided. In this embodiment, Figure 1 As shown, the method comprises the following steps:

[0046] Step 110, collect the alum flower video image, and align the online flow and water quality meter data with the alum flower video image. In this embodiment, the alum flower video image collection device is installed to collect the alum flower video image.

[0047] Step 120, input the aligned online flow and water quality meter data and the alum flower video image into the video target tracking model, track each alum flower target, construct the morphology and motion characteristics of the alum flower, and obtain the alum flower characteristic data.

[0048] Step 130: Based on the alum floc characteristic data and the online flow water quality instrument data, a sedimentation tank effluent turbidity prediction model is trained.

[0049] Step 140, read the alum flower video stream and online instrument data online and input them into the video target tracking model, and then estimate the turbidity of the sedimentation tank effluent through the sedimentation tank effluent turbidity estimation model.

[0050] In the above embodiment, if Figure 2 As shown, it is a flow chart of an embodiment of collecting and aligning online flow and water quality meter data and alum flower video images in this embodiment, and the process includes the following steps.

[0051] Step 210: Install the alum flower video image acquisition device. The alum flower camera should be installed after the coagulation tank and at the front end of the sedimentation tank, placed horizontally and perpendicular to the water flow direction. Figure 3 As shown, the installation position and method of the alum flower camera in the coagulation sedimentation tank are schematically shown.

[0052] Preferably, the flower camera should be installed under the water surface, at least 15cm from the water surface. The resolution of the flower camera should not be lower than 480p; the frame rate should not be lower than 15fps to ensure the feasibility of flower target tracking; the focal length should be adjusted to the maximum proportion of the flower area in each flower video captured, and then fixed; the lens should be equipped with an electric cleaning brush to automatically clean the stains on the lens.

[0053] Step 220, collect the video image data of the alum flower. To minimize the storage space occupied, the online recording of the alum flower video image should be saved in a coding method with a higher compression rate, such as H265, VP9, ​​AV1, etc. It is understandable that the available storage space varies depending on the hardware conditions, and this embodiment does not limit the storage space occupied per unit time.

[0054] Step 230: Obtain online instrument data for training the sedimentation tank effluent turbidity estimation model. The online instrument data includes the inlet water flow, turbidity, coagulant addition flow, sedimentation tank level, and sedimentation tank effluent turbidity data collected when the coagulation sedimentation tank of the water supply plant is in operation. The data frequency must not be less than 1 item / 15 minutes, because these indicators are prone to change over time.

[0055] Preferably, this embodiment additionally collects and uses the inlet water temperature, pH, and residual chlorine data. It is understandable that the additional preferred online instrument data in this embodiment is data used for machine learning model training, which can be arbitrarily selected according to the actual instrument conditions and requirements on site, and this embodiment does not limit this.

[0056] Taking a water plant as an example, the plant recorded 261 days of online instrument data at a frequency of 1 minute / 1 data item. The data format is shown in Table 1.

[0057] Table 1 Online instrument data

[0058]

[0059]

[0060] Step 240: align the online flow and water quality instrument data with the alum bloom video image, taking into account the time lag caused by the hydraulic retention time in the coagulation zone.

[0061] The time interval τ between data used for model training is set to 5 to 20 minutes and is not less than the instrument monitoring time interval in step 230. Preferably, the time interval τ is set to 10 minutes in this embodiment. The hydraulic retention time in the coagulation zone is HRT 0 , intercept the average value of the alum flower video image and the PAC addition flow rate within the time interval τ at the time t, corresponding to t-HRT 0 The average value of other online flow and water quality instrument data (except sedimentation tank effluent turbidity) within the time interval τ at the time location.

[0062] For example, continue to take the water plant described in step 230 as an example. Based on the online instrument data of the water plant, characteristic data with a time interval of 10 minutes is constructed, as shown in Table 2.

[0063] Table 2 Online flow water quality instrument data after treatment

[0064]

[0065] In the above step 120, the method of tracking each alum flower target and constructing the alum flower morphology and motion characteristics is as follows: Figure 4 As shown, the method includes the following steps.

[0066] Step 410: select a large video target tracking model that has been trained, set the task type to automatic recognition, or set the prompt word "floc" or "floc", which is not limited in this embodiment.

[0067] Step 420: For each captured video clip of the alum flower, a preset duration (e.g., duration of τ′) is captured and input into the target tracking model to identify each alum flower, obtain a mask at each location of the identified alum flower, and track its motion trajectory. The running duration of the target tracking model shall not exceed τ-τ′; if the running duration of the target tracking model exceeds τ-τ′, reduce the value of τ′ and try again.

[0068] It is understandable that only the video of τ′ is intercepted because the large target tracking model requires a certain length of model running time. To ensure the consistency of the model running online, a part of the video is intercepted to reduce the computational cost and leave room for model running time.

[0069] For example, let's continue with the example of a water plant in step 230. A video with a duration of τ′=6 minutes is intercepted, and the target tracking model is input to identify each alum flower. The model runs for a total of 3 minutes, which does not exceed τ-τ ′ = 4 minutes. The effect of target tracking is as follows Figure 5 shown.

[0070] Step 430: Estimate the length k represented by each pixel of each intercepted alum flower video screen. The estimated length k represented by each pixel of each intercepted alum flower video screen is obtained by assuming the horizontal flow velocity of the water flow in an ideal sedimentation tank.

[0071] Assuming that the sedimentation tank is an ideal horizontal flow sedimentation tank, the water flow velocity is equal everywhere on the section of the sedimentation tank perpendicular to the water flow direction. For each alum flower video clip i, the horizontal flow velocity of the water flow is calculated as follows:

[0072]

[0073] In the formula, is the horizontal velocity of the water flow in the alum flower video clip i (mm / s), Q i is the average flow rate in the sedimentation tank in the alum flower video clip i (m 3 / s), H i is the average value of the sedimentation tank liquid level in the alum flower video clip i (m), and B is the width of the sedimentation tank (m).

[0074] For each alum flower video segment i, assuming that the horizontal movement speed of the alum flower is equal to the flow velocity of the water, the length represented by each pixel is:

[0075]

[0076] Where k is the length represented by each pixel (mm / px), t i,j is the duration (s) of each captured alum flower video frame in the alum flower video segment i when the alum flower j is identified, p x,i,jis the horizontal distance (px / s) that flower j moves in each captured flower video frame.

[0077] Step 440: for each alum flower video clip o, the number of alum flowers identified is counted, and the characteristics of each alum flower j are calculated, including the average area, average roundness coefficient and average sedimentation velocity of the alum flowers.

[0078] The roundness coefficient calculation formula is as follows:

[0079]

[0080] In the formula, φ i,j is the roundness coefficient of the flower j, S i,j is the area of ​​alum flower j (px×px), L i,j is the circumference of the alum flower (px).

[0081] The average sinking velocity is calculated as follows:

[0082]

[0083] In the formula, is the average sinking velocity of alum flower j (mm / s), t i,j ,y i,j are respectively the duration (s) of the alum flower j being tracked and the vertical sinking distance (px) of its geometric center.

[0084] It is understandable that since the flower camera has a fixed focal length setting, the flower petals that can be identified and tracked in the video are relatively close to the lens. Therefore, the size and sinking speed of the flower petals identified and tracked in each flower petal video frame captured can be compared, and the perspective problem of "near is big and far is small" can be ignored.

[0085] Step 450: For each alum flower video clip i, estimate the alum flower removal rate, wherein the estimated alum flower removal rate is obtained by the interception settling velocity in the ideal sedimentation tank theory.

[0086] Specifically, the following steps are included:

[0087] Calculate the interception sedimentation velocity at the corresponding time of each alum flower video segment i:

[0088]

[0089] In the formula, u 0 is the interception sedimentation velocity (mm / s), A 池 is the plane area of ​​the sedimentation tank (m 2 ).

[0090] According to the theory of ideal sedimentation tank, the interception sedimentation velocity u 0The average sinking speed of alum flower j in alum flower video clip i For comparison, if The alum bloom is considered to be removable by precipitation. The ratio of alum flocs to all alum flocs is the estimated alum floc removal rate.

[0091] For example, continue to take the water plant described in step 230 as an example. After tracking the alum flower target and constructing features, the relevant features obtained are shown in Table 3.

[0092] Table 3 Alum flower characteristic data

[0093]

[0094] In the above step 130, based on the alum flower characteristic data and the online flow water quality instrument data, the method for training the sedimentation tank effluent turbidity prediction model is as follows: Figure 6 As shown, the method includes the following steps.

[0095] Step 610: Create a data set.

[0096] Sort all the characteristic data of alum flowers and the data of online flow and water quality instruments in chronological order. Set a sliding window A with a length of l, i.e., a coverage time of lτ, and use the characteristic time series within the window as is a set of model input data, where n is the number of characteristic types. The characteristic types should at least include necessary online instrument data and floc characteristic data. Necessary online instrument data include inlet water flow, turbidity, coagulant addition flow, sedimentation tank level, and sedimentation tank effluent turbidity data collected when the coagulation and sedimentation tank of the water supply plant is in operation; floc characteristic data include floc number, average area, average roundness coefficient, average sedimentation velocity, and floc removal rate.

[0097] Assuming that the hydraulic retention time of the advection sedimentation tank is HRT, a sliding window B is taken after sliding window A. The center of this window is 1.5 km from the bottom of sliding window a. (i.e., Rounded to the nearest integer), the window radius is set to r, then the length of the sliding window B is 2r+1, and the coverage time is (2r+1)τ. For X i A set of model output data. Assuming the number of all data is M, the common training data, and get the input data set X = [X 1 ,X 2 ,…,X i ,…,X m ], and the corresponding output data set (i.e. label data, sedimentation tank effluent turbidity) Y = [Y1 ,Y 2 ,…,Y i ,…,Y m ], Among them, m is the number of training data, l is the time series length of the input feature, n is the number of feature types of the input model, 2r+1 is the estimated time series length of the sedimentation tank effluent turbidity, and r is the estimated radius length of the sedimentation tank effluent turbidity time series.

[0098] The principle of this step is that due to the large time lag of the sedimentation tank, the turbidity of the sedimentation tank effluent at one moment is related to the water quality of the incoming water, the amount of coagulant added, and the characteristics of the alum flocs at the front end of the sedimentation tank at multiple moments; the water quality of the incoming water, the amount of coagulant added, and the characteristics of the alum flocs at the front end of the sedimentation tank at one moment are related to the turbidity of the sedimentation tank effluent at multiple moments. Therefore, each prediction of the turbidity of the sedimentation tank effluent should be based on the characteristic time series X i Predict the corresponding sedimentation tank effluent turbidity time series Y for a period of time in the future i .

[0099] It can be understood that τ, l, and r can be regarded as hyperparameters that cannot be obtained through direct training. Different values ​​can be set to train the model, and the optimal value can be selected after comparison.

[0100] It is understandable that r should not be too long. It is recommended not to exceed Among them, HRT is the hydraulic retention time in the sedimentation tank.

[0101] For example, let's continue with a water plant in step 230. The input data features of the sedimentation tank effluent turbidity estimation model include inlet water flow, turbidity, pH, temperature, residual chlorine, PAC addition flow, liquid level, number of alum flocs, average alum floc area, average alum floc roundness coefficient, average alum floc settling speed, and alum floc removal rate, a total of 12 features. There are a total of M = 37541 data. The hydraulic retention time HRT of the water plant is 2 hours. Set the model input data duration to cover 1 hour, then l = 6. Take the time 2 hours after the end of the model input data as the center of the sliding window B, and take the radius The time range covered by sliding window B is 1 hour and 50 minutes to 2 hours and 10 minutes from the end of the model input data, that is, the model needs to predict the turbidity of the sedimentation tank effluent 1 hour and 50 minutes to 2 hours and 10 minutes each time. training data, and get the input data set X = [X 1 ,X 2 ,…,X i ,…,X 37523 ], and the corresponding output data set (i.e. label data, sedimentation tank effluent turbidity) Y = [Y 1 ,Y2 ,…,Y i ,…,Y 37523 ],

[0102] Step 620: Select a time series prediction machine learning model. Common time series prediction models include long short-term memory neural network models and Transformer models. The selected model should support input of time series containing multiple features and support prediction of a time series. You can try to train multiple models separately and select the optimal model after comparison.

[0103] Step 630: Set initial hyperparameters of multiple models and set a loss function. The loss function may be a mean square error loss function, which is not limited in this embodiment.

[0104] Step 640: Divide all training data into training set X in chronological order 训 and Y 训 , validation set X 验 and Y 验 , test set X 测 and Y 测 .

[0105] It is understandable that the ratio of the test set division can be determined according to the data volume, data quality and data distribution, and this embodiment does not limit this.

[0106] For example, continue to take the water plant described in step 230 as an example. Divide all training data into training sets in chronological order with a ratio of 3:1:1. and Validation set and Test Set and

[0107] Step 650, perform hyperparameter tuning. For each set of selected hyperparameters, the parameters in the machine learning model are iteratively optimized through the back propagation algorithm on the training set. After each training cycle, the feature data on the validation set is input into the model, and the predicted turbidity of the sedimentation tank effluent is output, which is compared with the label data (the measured turbidity of the sedimentation tank effluent), and the error is obtained through the loss function. When the loss function verified on the validation set no longer decreases after multiple training cycles, the training is stopped, and the model with the lowest loss function value on the validation set is taken as the final model obtained by training under the selected set of hyperparameters. Compare different models, and select the optimal set of hyperparameters and their corresponding models when the loss function is the lowest, which is the trained model.

[0108] In the above step 140, the method of reading the alum flower video stream and the online instrument data online and inputting the video target tracking model, and estimating the turbidity of the sedimentation tank effluent, such as Figure 7 As shown, the method includes the following steps.

[0109] Step 710, running the large model of flower target tracking online. Every time τ passes, the flower video of the first section of length τ′ should be intercepted, the large model of flower video target tracking should be run, and a piece of flower feature data should be recorded.

[0110] Step 720, set the frequency τ″ of the sedimentation tank effluent turbidity prediction. After a period of time of τ″, read the flow and water quality data of the online instrument in the past lτ period. Every time period τ, calculate the average value of the instrument data in this period to obtain a characteristic time series with a length of l. At the same time, take the most recent l pieces of alum flower characteristic data recorded in step 710, and together with the instrument data, form a time series input into the sedimentation tank effluent turbidity prediction model.

[0111] Step 730: Run the sedimentation tank effluent turbidity prediction model to obtain the 2r+1 sedimentation tank effluent turbidity prediction results within the future [HRT-rτ, HRT+rτ] time range. For the future (0, HRT-rτ) time range, take the data when the model has a prediction for the corresponding time as the prediction result.

[0112] In one embodiment of the present invention, a water plant coagulation and sedimentation effect prediction system based on alum flower target tracking is provided, which includes:

[0113] The acquisition module collects the video images of the alum flowers and aligns the online flow and water quality instrument data with the alum flowers video images;

[0114] The alum flower tracking module inputs the aligned online flow and water quality instrument data and the alum flower video images into the video target tracking model, tracks each alum flower target, constructs the morphology and motion characteristics of the alum flower, and obtains the alum flower feature data;

[0115] Model training module, based on alum flower characteristic data and online flow water quality instrument data, trains the sedimentation tank effluent turbidity estimation model;

[0116] The effect prediction module reads the alum flower video stream and online instrument data online and inputs them into the video target tracking model, and then estimates the turbidity of the sedimentation tank effluent through the sedimentation tank effluent turbidity prediction model.

[0117] In the above embodiment, the online instrument data should at least include the inlet water flow, turbidity, coagulant addition flow, sedimentation tank level, and sedimentation tank outlet turbidity data collected when the coagulation sedimentation tank of the water supply plant is in operation;

[0118] When aligning the online flow and water quality instrument data with the alum bloom video images, the time lag caused by the hydraulic retention time in the coagulation zone should be considered.

[0119] In the above embodiment, each alum flower target is tracked to construct the morphology and motion characteristics of the alum flower, including:

[0120] Use a large video target tracking model that has been trained;

[0121] For each captured alum flower video clip, a preset duration is captured and input into the video target tracking model to identify each alum flower and track its movement trajectory;

[0122] Estimate the length represented by each pixel of each captured alum flower video screen;

[0123] For each alum flower video clip, the number of alum flowers identified is counted, and the characteristics of each alum flower are calculated based on the length represented by each pixel; the characteristics of alum flowers include the average area of ​​alum flowers, the average roundness coefficient and the average sinking speed;

[0124] For each alum bloom video clip, the alum bloom removal rate is estimated based on the characteristics of the alum bloom.

[0125] In this embodiment, for each alum bloom video clip, the alum bloom removal rate is estimated according to the alum bloom characteristics, including:

[0126] Calculate the interception sedimentation velocity u at the corresponding time of each alum flower video clip 0 ;

[0127] According to the theory of ideal sedimentation tank, the interception sedimentation velocity u 0 The average sinking speed of alum flower j in alum flower video clip i For comparison, if Then the alum flower j in the alum flower video clip i is considered to be able to be removed by precipitation; The ratio of alum flocs (i.e., alum flocs that can be removed by precipitation in alum floc video clip i) to all alum flocs is used to obtain the estimated alum floc removal rate.

[0128] In the above embodiment, based on the alum flower characteristic data and the online flow water quality instrument data, the sedimentation tank effluent turbidity prediction model is trained, including:

[0129] Create a data set based on alum flower characteristic data and online flow and water quality instrument data;

[0130] Use time series forecasting machine learning models;

[0131] Set the initial hyperparameters of various models and set the loss function;

[0132] Divide all training data into training set, validation set and test set in chronological order;

[0133] Hyperparameter tuning was performed and a model for estimating turbidity of sedimentation tank effluent was obtained through training.

[0134] In the above embodiment, the alum flower video stream and online instrument data are read online and input into the video target tracking model, and the turbidity of the sedimentation tank effluent is estimated, including:

[0135] Run the large video target tracking model of Fanhua online;

[0136] The frequency τ″ of the sedimentation tank effluent turbidity prediction is set, and the characteristic time series input into the sedimentation tank effluent turbidity prediction model is obtained at this frequency; wherein the characteristic time series includes the time series with the instrument data length of l and the most recent l pieces of alum flower characteristic data;

[0137] Run the sedimentation tank effluent turbidity prediction model to obtain the sedimentation tank effluent turbidity prediction results.

[0138] In this embodiment, the alum flower target tracking large model is run online. Every preset time τ, the alum flower video of the first section of length τ′ is captured, the alum flower video target tracking large model is run, and an alum flower feature data is recorded.

[0139] The system provided in this embodiment is used to execute the above-mentioned method embodiments. Please refer to the above-mentioned embodiments for specific processes and detailed contents, which will not be repeated here.

[0140] In one embodiment of the present invention, a computing device is provided, which may be a terminal, and may include: a processor, a communication interface, a memory, a display screen, and an input device. Among them, the processor, the communication interface, and the memory communicate with each other through a communication bus. The processor is used to provide computing and control capabilities. The memory includes a non-volatile storage medium and an internal memory, and the non-volatile storage medium stores an operating system and a computer program. When the computer program is executed by the processor, the method in each of the above embodiments is implemented; the internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a management network, NFC (near field communication) or other technologies. The display screen may be a liquid crystal display screen or an electronic ink display screen, and the input device may be a touch layer covered on the display screen, or a key, trackball or touchpad provided on the housing of the computing device, or an external keyboard, touchpad or mouse, etc. The processor may call the logic instructions in the memory.

[0141] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0142] In one embodiment of the present invention, a computer program product is provided, wherein the computer program product includes a computer program stored on a non-transitory computer-readable storage medium, wherein the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the methods provided by the above-mentioned method embodiments.

[0143] In one embodiment of the present invention, a non-transitory computer-readable storage medium is provided, wherein the non-transitory computer-readable storage medium stores server instructions, and the computer instructions enable a computer to execute the methods provided in the above embodiments.

[0144] The above embodiment provides a computer-readable storage medium, whose implementation principle and technical effect are similar to those of the above method embodiment, and will not be repeated here.

[0145] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0146] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0147] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for estimating the coagulation and sedimentation effect of a water plant based on alum flower target tracking, characterized in that: include: Collect alum flower video images and align online flow and water quality instrument data with alum flower video images; Input the aligned online flow and water quality instrument data and the alum flower video image into the video target tracking model, track each alum flower target, construct the morphology and motion characteristics of the alum flower, and obtain the alum flower feature data; Based on the characteristics of alum flowers and the data of online flow and water quality instruments, a sedimentation tank effluent turbidity prediction model was trained; The alum flower video stream and online instrument data are read online and input into the video target tracking model, and then the turbidity of the sedimentation tank effluent is estimated through the sedimentation tank effluent turbidity estimation model.

2. The method for estimating the coagulation and sedimentation effect of a water plant based on alum flower target tracking as claimed in claim 1, characterized in that: Online instrument data should at least include the inlet water flow, turbidity, coagulant addition flow, sedimentation tank level, and sedimentation tank effluent turbidity data collected during the operation of the water supply plant's coagulation and sedimentation tank; When aligning online flow and water quality instrument data with alum bloom video images, the time lag caused by the hydraulic retention time in the coagulation zone should be considered.

3. The method for estimating the coagulation and sedimentation effect of a water plant based on alum flower target tracking as claimed in claim 1, characterized in that: Track each alum flower target and construct the morphological and motion characteristics of the alum flowers, including: Use a large video target tracking model that has been trained; For each captured alum flower video clip, a preset duration is captured and input into the video target tracking model to identify each alum flower and track its movement trajectory; Estimate the length represented by each pixel of each captured alum flower video screen; For each alum flower video clip, the number of alum flowers identified is counted, and the characteristics of each alum flower are calculated based on the length represented by each pixel; the characteristics of alum flowers include the average area of ​​alum flowers, the average roundness coefficient and the average sinking speed; For each alum bloom video clip, the alum bloom removal rate is estimated based on the alum bloom characteristics.

4. The method for estimating the coagulation and sedimentation effect of a water plant based on alum flower target tracking as claimed in claim 3, characterized in that: For each alum bloom video clip, the alum bloom removal rate is estimated based on the alum bloom characteristics, including: Calculate the interception sedimentation velocity u0 at the corresponding time of each alum flower video clip; According to the theory of ideal sedimentation tank, the interception sedimentation velocity u0 is equal to the average sedimentation velocity of alum flower j in alum flower video clip i. For comparison, if Then the alum flower j in the alum flower video clip i is considered to be able to be removed by precipitation; the estimated alum flower removal rate is obtained by the proportion of this alum flower to the total alum flowers.

5. The method for estimating the coagulation and sedimentation effect of a water plant based on alum flower target tracking as claimed in claim 1, characterized in that: Based on the characteristics of alum flocs and online flow and water quality instrument data, the sedimentation tank effluent turbidity prediction model is trained, including: Create a data set based on alum flower characteristic data and online flow and water quality instrument data; Use time series forecasting machine learning models; Set the initial hyperparameters of various models and set the loss function; Divide all training data into training set, validation set and test set in chronological order; Hyperparameter tuning was performed and a model for estimating turbidity of sedimentation tank effluent was obtained through training.

6. The method for estimating the coagulation and sedimentation effect of a water plant based on alum flower target tracking as claimed in claim 1, characterized in that: Online reading of alum flower video stream and online instrument data and input into the video target tracking model, and estimation of sedimentation tank effluent turbidity, including: Run the large video target tracking model of Fanhua online; The frequency τ″ of the sedimentation tank effluent turbidity prediction is set, and the characteristic time series input into the sedimentation tank effluent turbidity prediction model is obtained at this frequency; wherein the characteristic time series includes the time series with the instrument data length of l and the most recent l pieces of alum flower characteristic data; Run the sedimentation tank effluent turbidity prediction model to obtain the sedimentation tank effluent turbidity prediction results.

7. The method for estimating the coagulation and sedimentation effect of a water plant based on alum flower target tracking as claimed in claim 6, characterized in that: When running the alum flower target tracking model online, the alum flower video of the first τ′ length period should be captured every preset time τ, the alum flower video target tracking model should be run, and a piece of alum flower feature data should be recorded.

8. A water plant coagulation and sedimentation effect prediction system based on alum flower target tracking, characterized in that: include: The acquisition module collects the video images of the alum flowers and aligns the online flow and water quality instrument data with the alum flowers video images; The alum flower tracking module inputs the aligned online flow and water quality instrument data and the alum flower video images into the video target tracking model, tracks each alum flower target, constructs the morphology and motion characteristics of the alum flower, and obtains the alum flower feature data; Model training module, based on alum flower characteristic data and online flow water quality instrument data, trains the sedimentation tank effluent turbidity estimation model; The effect prediction module reads the alum flower video stream and online instrument data online and inputs them into the video target tracking model, and then estimates the turbidity of the sedimentation tank effluent through the sedimentation tank effluent turbidity prediction model.

9. A computer-readable storage medium storing one or more programs, characterized in that: The one or more programs include instructions, which, when executed by a computing device, cause the computing device to perform any one of the methods of claims 1 to 7.

10. A computing device, characterized in that: include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include instructions for executing any one of the methods described in claims 1 to 7.

Citation Information

Patent Citations

  • Underwater alumen usticum state recognition method and monitoring device, computer equipment and storage medium

    CN112101352A

  • Method and device for analyzing alumen ustum characteristics by using image recognition technology

    CN113688751A

Cited By

  • Water plant chemical dosing control method and system

    CN120463313A

  • Cascade control method and system for alum adding process of water plant

    CN120831903A

  • Visual identification-based alumen ustum detection dosing control method, system and equipment

    CN121635499A