Dosing control method, device, product and plant in water treatment processes
By selecting suitable dosing dosage prediction features through a water quality classification model and combining regression and classification models for dosing dosage prediction, the problem of low accuracy and efficiency in dosing dosage prediction in existing technologies is solved, achieving higher prediction accuracy and lower computational complexity.
Patent Information
- Application Number
- CN202510906852.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-07-02
AI Technical Summary
In existing technologies, the same model is difficult to adapt to different water quality requirements, resulting in low accuracy in predicting chemical dosage, and the model has a large computational load and low efficiency.
The target water quality category is determined by the influent water quality classification model, and the corresponding dosing dosage prediction feature is selected. The dosing dosage prediction is then performed by combining the dosing dosage regression and classification prediction models, which reduces the complexity of the model input and improves the accuracy and efficiency of the prediction.
It improves the accuracy of chemical dosage prediction under different water quality environments, reduces the computational load of the model, and enhances the reliability and efficiency of chemical dosage prediction.
Smart Images

Figure CN120398235B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of water treatment technology, and more specifically, to a dosing control method, a dosing control device, a computer program product, and an electronic device in a water treatment process. Background Technology
[0002] Water treatment is the process of regulating raw water through physical, chemical, or biological means to meet the water quality standards required for a specific purpose. This includes processes such as adding chemicals to raw water to remove impurities and make it drinkable for residents. Chemical dosing is a crucial step in the water treatment process, as it determines the final quality of the effluent.
[0003] In related technologies, machine learning models can be used to process influent parameters, floc images, etc., to predict and control the dosage of chemicals. However, these technologies use the same model for all types of water to be treated, making it difficult for the same model to adapt to different water quality requirements. In scenarios with significant water quality fluctuations, the prediction accuracy is low. Furthermore, these technologies typically combine all the features for predicting dosage to achieve water quality prediction; obviously, the more features there are, the greater the computational demand on the model, and the lower the prediction efficiency.
[0004] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this disclosure is to provide a method, apparatus, computer program product, and electronic equipment for controlling chemical dosing in a water treatment process, thereby improving the accuracy and efficiency of chemical dosing control in the water treatment process to at least a certain extent.
[0006] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0007] According to a first aspect of this disclosure, a method for controlling chemical dosing in a water treatment process is provided, comprising: acquiring influent parameters; determining a target water quality category to which the influent parameters belong based on an influent water quality classification model; determining a first dosing prediction feature and a second dosing prediction feature associated with the target water quality category from dosing prediction features based on a preset mapping relationship, wherein the dosing prediction features include one or more of influent parameter features, floc features, and effluent parameter features; inputting the feature value of the first dosing prediction feature into a dosing regression prediction model in a preset dosing prediction model corresponding to the target water quality category, and obtaining a first dosing prediction value based on the output of the dosing regression prediction model; inputting the feature value of the second dosing prediction feature into a dosing classification prediction model in a preset dosing prediction model corresponding to the target water quality category, and obtaining a first dosing prediction level based on the output of the dosing classification prediction model; determining a target dosing prediction value based on the overlap relationship between the first dosing prediction value and the first dosing prediction level, and controlling the dosing amount in the water treatment process based on the target dosing prediction value.
[0008] According to a second aspect of this disclosure, a dosing control device for a water treatment process is provided, comprising: a target water quality category determination module configured to acquire influent parameters and determine the target water quality category to which the influent parameters belong based on an influent water quality classification model; a dosing dosage prediction feature determination module configured to determine a first dosing dosage prediction feature and a second dosing dosage prediction feature associated with the target water quality category from dosing dosage prediction features according to a preset mapping relationship, wherein the dosing dosage prediction features include one or more of influent parameter features, floc features, and effluent parameter features; and a first prediction module configured to input the feature value of the first dosing dosage prediction feature into the target water quality category. In the dosing regression prediction model of the preset dosing prediction model corresponding to the water quality category, a first dosing prediction value is obtained based on the output of the dosing regression prediction model; the second prediction module is configured to input the feature value of the second dosing prediction feature into the dosing classification prediction model of the preset dosing prediction model corresponding to the target water quality category, and obtain a first dosing prediction level based on the output of the dosing classification prediction model; the dosing control module is configured to determine a target dosing prediction value based on the overlap relationship between the first dosing prediction value and the first dosing prediction level, and control the dosing amount in the water treatment process based on the target dosing prediction value.
[0009] According to a third aspect of this disclosure, a computer program product comprising instructions is provided, which, when run on a computer, causes the computer to perform the steps of the dosing control method in the water treatment process as described in the first aspect.
[0010] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the dosing control method in the water treatment process as described in the first aspect of the above embodiments.
[0011] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the one or more processors to implement the dosing control method in a water treatment process as described in the first aspect of the above embodiments.
[0012] As can be seen from the above technical solutions, the dosing control method in the water treatment process, the dosing control device in the water treatment process, and the computer program product and electronic device for implementing the dosing control method in the water treatment process in the exemplary embodiments of this disclosure have at least the following advantages and positive effects:
[0013] In some embodiments of the present disclosure, the influent water quality is classified based on water quality parameters to obtain the target water quality category to which the influent parameters belong. Then, a first dosing prediction feature and a second dosing prediction feature associated with the target water quality category are selected from all dosing prediction features. The first dosing prediction feature and the second dosing prediction feature are then input into the dosing regression prediction model and the dosing classification prediction model corresponding to the target water quality category, respectively, to obtain a first dosing prediction value and a first dosing prediction level. Based on the overlap between the first dosing prediction value and the first dosing prediction level, the target dosing prediction value is determined, and the dosing control in the water treatment process is performed based on the target dosing prediction value. Compared with related technologies, this disclosure has several advantages. First, it allows for the use of corresponding dosage prediction models for different water quality categories, thereby improving the accuracy of dosage prediction under varying water quality conditions. Second, by classifying water quality, this disclosure allows for the selection of appropriate dosage prediction features based on water quality characteristics, eliminating the need to use all dosage prediction features. This reduces the input complexity of the dosage prediction model, thereby reducing computational load and improving the efficiency of dosage prediction. Third, this disclosure uses both a dosage classification prediction model and a dosage regression prediction model for dosage prediction. The classification model can validate the prediction results of the regression model, thus improving the reliability of the predicted dosage value.
[0014] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0015] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0016] Figure 1 This diagram illustrates a flow chart of a chemical dosing control method in a water treatment process according to an exemplary embodiment of the present disclosure.
[0017] Figure 2 This diagram illustrates a water treatment system according to an exemplary embodiment of the present disclosure;
[0018] Figure 3 This diagram illustrates a flowchart of a method for determining an influent water quality classification model according to an exemplary embodiment of this disclosure.
[0019] Figure 4 This diagram illustrates a flowchart of a method for determining a preset dosage prediction model according to an exemplary embodiment of the present disclosure.
[0020] Figure 5 This diagram illustrates a flowchart of a method for determining a target dosage prediction value based on overlap relationships according to an exemplary embodiment of this disclosure.
[0021] Figure 6 This diagram illustrates a process flow chart of a method for controlling dosing based on a predicted target dosage value, according to an exemplary embodiment of this disclosure.
[0022] Figure 7 This diagram illustrates the composition of a dosing control device in a water treatment process according to an exemplary embodiment of the present disclosure.
[0023] Figure 8 A schematic diagram of the structure of an electronic device in an exemplary embodiment of this disclosure is shown. Detailed Implementation
[0024] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.
[0025] The terms “a,” “an,” “the,” and “the” are used in this specification to indicate the presence of one or more elements / components / etc.; the terms “including” and “having” are used to indicate an open-ended inclusion and to mean that there may be other elements / components / etc. in addition to the listed elements / components / etc.; the terms “first” and “second” are used only as markings and are not a limitation on the number of objects.
[0026] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.
[0027] In related technologies, the same dosage prediction features and models are used to predict dosage for any water quality. For example, all dosage-related features are concatenated to form a single dosage prediction feature, which is then used to train the model. The trained model then uses this concatenated feature to predict dosage. Clearly, a single model is difficult to adapt to different water quality scenarios, and its prediction accuracy is low in situations with significant water quality fluctuations. Furthermore, concatenating all dosage prediction features increases the model's input complexity, thus increasing its computational burden and leading to low prediction efficiency.
[0028] In order to solve at least one or more of the above problems, this disclosure provides a chemical dosing control scheme in a water treatment process.
[0029] For example, Figure 1 This invention illustrates a dosing control method in a water treatment process according to an exemplary embodiment of the present disclosure, with reference to... Figure 1 The method may include:
[0030] Step S110: Obtain the influent parameters and determine the target water quality category to which the influent parameters belong based on the influent water quality classification model;
[0031] Step S120: Based on a preset mapping relationship, determine the first and second dosing prediction features associated with the target water quality category from the dosing prediction features. The dosing prediction features include one or more of the following: influent parameter features, floc features, and effluent parameter features.
[0032] Step S130: Input the feature value of the first dosage prediction feature into the dosage regression prediction model in the preset dosage prediction model corresponding to the target water quality category, and obtain the first dosage prediction value according to the output of the dosage regression prediction model.
[0033] Step S140: Input the feature value of the second dosage prediction feature into the dosage classification prediction model in the preset dosage prediction model corresponding to the target water quality category, and obtain the first dosage prediction level according to the output of the dosage classification prediction model;
[0034] Step S150: Based on the overlap between the first predicted dosage value and the first predicted dosage level, determine the target predicted dosage value, and control the dosage in the water treatment process based on the target predicted dosage value.
[0035] Figure 1 Compared with related technologies, the technical solution provided in the illustrated embodiment has several advantages. First, it allows for the use of corresponding dosage prediction models for different water quality categories, thereby improving the accuracy of dosage prediction under different water quality conditions. Second, by classifying water quality, it allows for the selection of appropriate dosage prediction features based on water quality characteristics, eliminating the need to use all dosage prediction features for dosage prediction, thus reducing the input complexity of the dosage prediction model, reducing the computational load of the model, and improving the efficiency of dosage prediction. Third, it uses both a dosage classification prediction model and a dosage regression prediction model for dosage prediction, whereby the classification model can verify the prediction results of the regression model, thereby improving the reliability of the determined dosage prediction value.
[0036] Below, we will first provide a detailed explanation of the specific implementation method of "step S110, obtaining influent parameters and determining the target water quality category to which the influent parameters belong based on the influent water quality classification model".
[0037] To more clearly illustrate the water treatment process disclosed herein, let's first combine... Figure 2 To illustrate. For example, Figure 2 A schematic diagram of a water treatment system according to an exemplary embodiment of this disclosure is shown. (Reference) Figure 2 The water treatment system may include an inlet tank 21, a flocculation tank 22, a sedimentation tank 23, a filtration tank 24, and an outlet tank 25. The inlet tank 21 regulates the incoming water volume and buffers sudden changes in raw water quality. The flocculation tank 22 adds flocculants, such as polyaluminum chloride, to the water, destabilizing fine suspended particles, colloids, and other impurities, causing them to aggregate into larger flocs for subsequent sedimentation and separation. The sedimentation tank 23 uses gravity to allow the large flocs formed in the flocculation tank to settle to the bottom, achieving solid-liquid separation and removing most suspended solids, silt, and other impurities from the water. The filtration tank 24 uses filter media, such as quartz sand and activated carbon, to further remove residual fine suspended particles, colloids, bacteria, and other impurities from the water, improving water clarity and transparency to achieve higher water quality standards. The effluent tank 25 is used to store the treated clean water, providing a stable water supply for the water use process. At the same time, the treated water can also be monitored in the effluent tank 25, such as by testing indicators like pH, turbidity, and suspended solids, to ensure that the effluent water quality meets relevant standards and usage requirements.
[0038] For example, influent parameter detection equipment, such as influent pH detection equipment, influent temperature detection equipment, influent turbidity detection equipment, and influent flow rate detection equipment, can be configured between the influent tank 21 and the flocculation tank 22. An underwater camera can be configured in the flocculation tank 22 to capture images of the flocs and obtain their characteristics. An underwater camera can also be configured in the sedimentation tank 23 to capture videos of floc sedimentation. A dosing pump can be configured between the influent tank 21 and the flocculation tank 22 to add flocculant to the water.
[0039] In one exemplary embodiment, the influent parameters may include influent pH value, influent flow rate, influent turbidity, and influent temperature. As mentioned earlier, influent parameter detection devices such as influent pH value detection devices, influent flow rate detection devices, influent turbidity detection devices, and influent temperature detection devices can be installed between the influent tank and the flocculation tank. These influent parameter detection devices can send the detected influent parameters to a server. Different influent parameters characterize different water qualities to be treated, so the water quality can be classified according to the influent parameters to determine the target water quality category corresponding to the water to be treated.
[0040] For example, Figure 3 This diagram illustrates a flowchart of a method for determining an influent water quality classification model according to an exemplary embodiment of this disclosure. (Refer to...) Figure 3The method may include steps S310 to S330. Wherein:
[0041] In step S310, historical water inflow parameters are obtained, and the historical water inflow parameters are subjected to the first clustering.
[0042] For example, historical influent parameters can be collected, such as historical pH values, influent flow rates, historical influent turbidity, and historical influent temperatures at the same historical moment. These parameters are then spliced together to generate historical influent parameters. Next, a clustering algorithm, such as K-means clustering, is used to perform the first clustering of the historical influent parameters. Here, the K value represents the number of clusters. The K value can be determined based on test results; for example, different initial K values can be given, and then the K value with the best test results can be selected as the final K value. Alternatively, the K value can be manually determined according to requirements.
[0043] In step S320, water quality parameters of different categories are determined based on the clustering results of the first cluster, water quality category labels are added to the water quality parameters of different categories, and a water quality category training dataset is generated.
[0044] For example, each cluster category in the clustering results of the first cluster can be treated as a single water quality category, thereby identifying different water quality categories and adding corresponding water quality category labels to different water quality parameters. The water quality category label can be a marker, such as "first category" or "second category," or it can be a marker related to water quality characterization, such as "high turbidity, low temperature water" or "low turbidity, high pH water." This exemplary embodiment does not impose any special limitations on this.
[0045] In step S330, a machine learning model is trained based on the water quality category training dataset to obtain an influent water quality classification model.
[0046] In one exemplary implementation, the machine learning model in step S330 can be any machine learning model capable of classification, such as a support vector machine model. It should be noted that the purpose of the machine learning model in step S330 is to classify water quality, so it can be obtained by training a simple classification model such as a support vector machine.
[0047] Through steps S310 to S330 described above, an influent water quality classification model can be obtained. Therefore, when chemical dosage prediction is required, the current influent parameters can be input into the water quality classification model. The model determines the current influent water quality category, and based on this category, the appropriate chemical dosage prediction features and model can be determined.
[0048] In one exemplary embodiment, influent parameters, floc images, and effluent parameters can be collected periodically, and then the relevant data can be sent to a server. The server processes the received data according to the method of this disclosure to obtain the target dosage prediction value, so as to predict and control the dosage periodically.
[0049] The following is a detailed description of the specific implementation of "Step S120, determining the first and second dosing prediction features associated with the target water quality category from the dosing prediction features according to the preset mapping relationship".
[0050] In one exemplary implementation, a preset mapping relationship is used to characterize a first correlation between first dosage prediction features used in the dosage regression prediction model corresponding to different water quality categories, and a second correlation between second dosage prediction features used in the dosage classification prediction model corresponding to different water quality categories. In other words, the preset mapping relationship is related to the preset dosage prediction model corresponding to different water quality categories.
[0051] For example, Figure 4 This diagram illustrates a flowchart of a method for determining a preset dosage prediction model according to an exemplary embodiment of this disclosure. (See reference...) Figure 4 The method may include steps S410 to S460.
[0052] In step S410, each single dosage prediction feature is used as the first candidate dosage prediction feature.
[0053] In one exemplary embodiment, the dosage prediction characteristics may include one or more of floc characteristics, influent parameter characteristics, and effluent parameter characteristics. Dosage prediction characteristics can be understood as features related to the dosage and used to reflect or influence the dosage. Of course, dosage prediction characteristics may also include other dosage-related features, and this exemplary embodiment does not impose any special limitations on this.
[0054] For example, the first candidate dosing prediction feature includes three features: floc characteristics, influent parameter characteristics, and effluent parameter characteristics. That is, each first candidate dosing prediction feature is a single type of feature.
[0055] In one exemplary embodiment, floc characteristics can be determined using floc images captured by a camera. For example, an underwater camera is installed in the flocculation tank, mounted on the inner wall of the tank. The camera captures images of the flocs in the water within the tank and sends these images to a server. Upon receiving the images, the server performs feature extraction processing to obtain the floc characteristics. These characteristics may include floc area distribution features, the number of flocs per unit area, and the average particle size of the flocs.
[0056] For example, a floc recognition model can be pre-trained to extract floc features. For instance, a large number of historical floc images can be pre-collected, and then these images can be manually labeled to mark the outline or boundary of each floc in the image, the corresponding floc area and particle size, and the number of flocs in the image, which serve as training data.
[0057] A machine learning model is trained using training data to identify the outline or boundary of flocs in an image, as well as the area of each floc, and to count the number of flocs in the image based on the identification results. Alternatively, an existing object detection model can be fine-tuned using training data to train it to detect and identify flocs, thus obtaining a floc identification model. This model can accurately identify flocs in images containing them, determining their area, particle size, and the number of flocs in the image. The identification results are then analyzed to obtain floc features. For example, the area distribution of the identified flocs (e.g., the proportion of different areas), the average particle size of all flocs to obtain the average particle size, and the number of flocs per unit area based on the number of flocs in the image and the actual scene area indicated by the image. Of course, floc features can include other features, such as floc morphology and edge sharpness, which are not specifically limited in this exemplary embodiment.
[0058] In one exemplary embodiment, the influent parameters include influent pH value, influent flow rate, influent turbidity, and influent temperature. As mentioned above, influent parameter detection devices such as influent pH value detection devices, influent flow rate detection devices, influent turbidity detection devices, and influent temperature detection devices can be installed between the influent tank and the flocculation tank. These influent parameter detection devices can send the detected influent parameters to a server, and the server can obtain the influent parameter characteristics based on the data sent by these influent parameter detection devices.
[0059] In one exemplary embodiment, the effluent parameters include effluent turbidity, effluent pH, and effluent suspended solids content. For example, effluent parameter detection devices such as effluent turbidity detection devices, effluent pH detection devices, and effluent suspended solids content detection devices can be configured in the effluent tank. These effluent parameter detection devices detect the effluent parameter characteristics and can send the detected effluent parameter characteristics to a server.
[0060] In step S420, the single dosage feature is combined to generate a combined dosage feature. Based on the splicing result of multiple dosage prediction features in the combined dosage feature, a second candidate dosage prediction feature is generated.
[0061] For example, the aforementioned single dosage characteristics can be combined in different ways. Combined dosage characteristics are generated based on the results of all combinations, meaning each combined dosage characteristic includes at least two predicted dosage characteristics. For instance, floc characteristics and influent parameter characteristics can be combined into one combined dosage characteristic, as can floc characteristics and effluent parameter characteristics. All combined dosage characteristics can be characterized by the splicing result of their multiple predicted dosage characteristics. The splicing order can be customized as needed, but once determined, it is fixed. That is, each second candidate dosage prediction characteristic is the splicing result of at least two first candidate dosage prediction characteristics.
[0062] In step S430, candidate dosing amount prediction features are generated based on the first candidate dosing amount prediction features and the second candidate dosing amount prediction features.
[0063] For example, the set of all first candidate drug dosage prediction features and second candidate drug dosage prediction features is the candidate drug dosage prediction feature.
[0064] In step S440, for any water quality category, a first number of candidate classification prediction models are obtained. For any candidate classification prediction model, the candidate classification prediction model is trained according to the prediction features of each candidate dosage. A second number of candidate dosage classification prediction models are obtained based on the training results of the first number of candidate classification prediction models. The dosage classification prediction model corresponding to the water quality category is determined from the second number of candidate dosage classification prediction models.
[0065] For example, for any water quality category, the feature values of the influent parameter characteristics, the feature values of the floc features corresponding to the floc image, and the feature values of the effluent parameter characteristics, as well as the correct dosage value under the influent parameters, can be obtained based on the influent parameters for that water quality category. The dosage level to which this correct dosage value belongs among different dosage levels corresponding to each candidate dosage prediction feature can then be determined. Here, the correct dosage value can be understood as the dosage that, under this feature value, enables the effluent water quality to reach the preset standard.
[0066] In one exemplary implementation, different dosage levels corresponding to each candidate dosage prediction feature can be predetermined. Different dosage levels correspond to different dosage ranges.
[0067] For example, the method for determining different dosage levels corresponding to any candidate dosage prediction feature includes: collecting historical data of the candidate dosage prediction feature, clustering the collected historical data, and determining the different dosage prediction levels corresponding to the candidate dosage prediction feature based on the dosage indicated by the historical data in each cluster category in the clustering results.
[0068] For example, the relationship between the dosage levels of different dosage levels corresponding to different cluster categories can be determined based on the mean dosage values indicated by historical data in each cluster category in the clustering results; and the dosage range indicated by the dosage level corresponding to the cluster category can be determined based on the minimum and maximum dosage values indicated by historical data in the cluster category.
[0069] Taking cluster category 3 as an example, each cluster category corresponds to a level, and there are a total of 3 levels. The average correct dosage value corresponding to the historical data in cluster category 1 is c1, the average correct dosage value corresponding to the historical data in cluster category 2 is c2, and the average correct dosage value corresponding to the historical data in cluster category 3 is c3. The order of c1, c2, and c3 is c1 < c2 < c3. Therefore, cluster category 1 corresponds to the first dosage level, cluster category 2 corresponds to the second dosage level, and cluster category 3 corresponds to the third dosage level. The dosage level of the first dosage level is less than that of the second dosage level, and the dosage level of the second dosage level is less than that of the third dosage level. For example, the first dosage level is the low dosage level, the second dosage level is the medium dosage level, and the third dosage level is the high dosage level.
[0070] For example, the dosage range indicated by a dosage level can be determined based on the minimum and maximum dosage values indicated by historical data in the cluster corresponding to each dosage level. For instance, if a dosage level has 100 historical data points, each corresponding to a dosage value, the interval between the minimum and maximum values of these 100 dosage values is the dosage range indicated by that dosage level.
[0071] Taking the first, second, and third dosage levels mentioned above as examples, the dosage ranges corresponding to the dosage levels determined by clustering results may have overlapping intervals between the dosage ranges indicated by different dosage levels. In this case, manual verification and adjustment can be performed to ensure that the dosage ranges of adjacent dosage levels are continuous and non-overlapping. Alternatively, the dosage ranges corresponding to the dosage levels obtained from clustering results can be used as the initial dosage ranges, and adjusted according to the first preset rule to obtain the final dosage ranges corresponding to the dosage levels.
[0072] For example, the first preset rule may include: when there is an overlapping interval between the dosage ranges indicated by adjacent dosage levels, the overlapping interval is used as a buffer zone. That is, the dosage within the buffer zone belongs to both adjacent dosage levels simultaneously, while the dosage in the non-overlapping portion belongs to its respective dosage level. In other words, the dosage range indicated by each dosage level consists of the non-overlapping interval plus the buffer zone. Thus, during data labeling, historical data with dosage values falling within the buffer zone will have two labels for their dosage levels. Subsequently, during prediction, the final output result is selected based on class confidence; for example, a confidence level greater than 0.9 is used for the final predicted class. This minimizes the problem of low prediction accuracy caused by unreasonable division of dosage level intervals.
[0073] For example, the first preset rule may also include: dividing the overlapping interval equally and allocating it to the dosage range indicated by the adjacent dosage level, that is, dividing the overlapping interval into 2 by the median of the overlapping interval, the final dosage range corresponding to the lower level in the adjacent dosage level is the minimum value in its corresponding initial dosage range to the median of the overlapping interval, and the final dosage range corresponding to the higher level in the adjacent dosage level is the median of the overlapping interval to the maximum value in its corresponding initial dosage range.
[0074] Similarly, if the initial dosage ranges corresponding to adjacent dosage levels are not continuous, the second preset rule can be used to adjust them to obtain the final dosage range.
[0075] For example, the second preset rule may include: using the range between the initial dosage ranges corresponding to adjacent dosage levels as a buffer zone, where the buffer zone simultaneously belongs to the adjacent dosage level. Similarly, in this way, when labeling data, the dosage levels of historical data whose dosage values fall within the buffer zone will have two labels.
[0076] For example, the second preset rule may also include: using the interval between the initial dosage ranges corresponding to adjacent dosage levels as a buffer zone, dividing the buffer zone in half using the median value of the buffer zone, and allocating it to the adjacent dosage level. That is, the final dosage range corresponding to the lower dosage level among adjacent dosage levels is the minimum value in its corresponding initial dosage range to the median value in the buffer zone, and the final dosage range corresponding to the higher dosage level among adjacent dosage levels is the median value in the buffer zone to the maximum value in the initial dosage range corresponding to that dosage level.
[0077] In one exemplary approach, if the dosage ranges indicated by non-adjacent dosage levels overlap (e.g., the dosage ranges corresponding to the low and high dosage levels mentioned above overlap), the K value is adjusted, and clustering is performed again. The dosage level is then re-determined based on the clustering results. Alternatively, the dosage ranges indicated by the intermediate dosage level between non-adjacent dosage levels can be adjusted to ensure that there is no overlap. For example, the lowest value of the intermediate dosage level can be used as the upper limit of the lower dosage level among the non-adjacent dosage levels, and the highest value of the intermediate dosage level can be used as the lower limit of the higher dosage level among the non-adjacent dosage levels.
[0078] Adjusting the initial dosage range based on the above method can ensure the rationality of the initial dosage range and ensure that the initial dosage range is continuous without any gaps. In this way, the target dosage prediction value can be determined in subsequent steps based on the overlap between the first dosage prediction value and the first dosage prediction level.
[0079] Taking a specific water quality category 1 as an example, the historical data corresponding to each candidate dosage feature under water quality category 1 can be clustered using the method described above. This generates dosage ranges for different dosage levels corresponding to each candidate dosage prediction feature under that water quality category. That is, candidate dosage prediction feature 1 under water quality category 1 corresponds to a dosage range for different dosage levels, and candidate dosage prediction feature 1 under water quality category 2 corresponds to a dosage range for different dosage levels, and so on.
[0080] In one exemplary implementation, the dosage range indicated by the same dosage level under the same candidate dosage prediction feature for different water quality categories can be the same or different. For example, if each candidate dosage prediction feature under each water quality category includes three dosage levels: low, medium, and high, the dosage range indicated by the low-level dosage of candidate dosage prediction feature 1 under water quality category 1 and the dosage range indicated by the low-level dosage of candidate dosage prediction feature 1 under water quality category 2 can be the same or different, depending on the specific clustering results.
[0081] Based on the dosage range indicated by different dosage levels corresponding to each candidate dosage prediction feature under each water quality category, the dosage level to which the correct dosage value corresponding to the historical data of each candidate dosage prediction feature under that water quality category belongs is determined, thereby generating the first label training set corresponding to the candidate dosage prediction feature under that water quality category.
[0082] For any candidate dosing dosage prediction feature in any water quality category, a first number of candidate classification prediction models can be trained based on the first label training set corresponding to the candidate dosing dosage prediction feature, thereby obtaining the candidate dosing dosage classification prediction model corresponding to each candidate dosing dosage prediction feature.
[0083] Taking the candidate dosing dosage prediction features as an example, which include 7 features and have a first quantity of 3, each candidate dosing dosage prediction feature can be trained to obtain 3 candidate dosing dosage classification prediction models. For any water quality category, a total of 21 candidate dosing dosage classification prediction models can be obtained.
[0084] For example, for a specific water quality category, these 21 candidate dosage classification prediction models can be tested, and the candidate model with the best test results can be selected as the dosage classification prediction model corresponding to that water quality category. Alternatively, the prediction speed and accuracy of these 21 models can be tested using a test dataset, and the candidate model with the best overall prediction speed and accuracy can be selected as the dosage classification prediction model corresponding to that water quality category.
[0085] In step S450, for any water quality category, a third number of candidate regression prediction models are obtained. For any candidate regression prediction model, the candidate regression prediction model is trained according to the prediction features of each candidate dosage. A fourth number of candidate dosage regression prediction models are obtained based on the training results of the third number of candidate regression prediction models. The dosage regression prediction model corresponding to the water quality category is determined from the fourth number of candidate dosage regression prediction models.
[0086] For example, the specific implementation of step S450 can be found in the relevant description of step S440, and will not be repeated here. Unlike step S440, in step S450, the labels in the label training dataset are the correct dosage values.
[0087] In step S460, a preset dosage prediction model corresponding to the water quality category is obtained based on the dosage classification prediction model and dosage regression prediction model corresponding to the water quality category.
[0088] For example, the preset dosage prediction model for each water quality category consists of a dosage regression prediction model and a dosage classification prediction model corresponding to that water quality category.
[0089] Through the above steps S410 to S460, a corresponding preset dosage classification prediction model can be generated for each water quality category. The preset dosage classification prediction model for each water quality category is selected after training the model with multiple different candidate dosage prediction features. Therefore, the input of the final determined dosage prediction model is the dosage prediction feature suitable for predicting the water quality category.
[0090] Based on this, for example, the method for determining the preset mapping relationship includes: obtaining the first training feature indicated by the dosage regression prediction model corresponding to each water quality category and the second training feature indicated by the dosage classification prediction model corresponding to each water quality category; generating the preset mapping relationship according to the correspondence between the water quality category and the first training feature and the water quality category and the second training feature.
[0091] For example, if the training feature used by the dosing dosage classification prediction model for a certain water quality category 1 is the floc feature, then the first training feature for water quality category 1 is the floc feature. If the training feature used by the dosing dosage regression prediction model for water quality category 1 is a composite feature composed of the floc feature and the influent parameter feature, then the second training feature for water quality category 1 is a composite feature composed of the floc feature and the influent parameter feature. The database can then store a mapping relationship such as "water quality category 1, first dosing dosage prediction feature is floc feature, second dosing dosage prediction feature is a composite feature composed of the floc feature and the influent parameter feature".
[0092] The following is a detailed description of the specific implementation of "step S130, inputting the feature value of the first dosage prediction feature into the dosage regression prediction model in the preset dosage prediction model corresponding to the target water quality category, and obtaining the first dosage prediction value according to the output of the dosage regression prediction model".
[0093] In one exemplary implementation, the feature value of the dosing prediction feature can be understood as the specific numerical value of each feature determined at the sampling time, such as the influent temperature value, the influent pH value, etc.
[0094] For example, the current feature value corresponding to the first dosage prediction feature can be input into the dosage regression prediction model corresponding to the target water quality category to obtain the first dosage prediction value.
[0095] The following is a detailed description of the specific implementation of "step S140, inputting the feature value of the second dosing dosage prediction feature into the dosing dosage classification prediction model in the preset dosing dosage prediction model corresponding to the target water quality category, and obtaining the first dosing dosage prediction level based on the output of the dosing dosage classification prediction model".
[0096] For example, the current feature value corresponding to the second dosage prediction feature can be input into the dosage classification prediction model corresponding to the target water quality category to obtain the first dosage prediction level.
[0097] The following is a detailed description of the specific implementation method of "step S150, determining the target dosage prediction value based on the overlap relationship between the first dosage prediction value and the first dosage prediction level, and controlling the dosage in the water treatment process based on the target dosage prediction value".
[0098] For example, the overlap between the first dosage prediction value and the first dosage prediction level may include the first dosage prediction value belonging to the dosage range indicated by the first dosage prediction level or the first dosage prediction value not belonging to the dosage range indicated by the first dosage prediction level.
[0099] For example, Figure 5 This diagram illustrates a flowchart of a method for determining a predicted target dosage based on overlap relationships, according to an exemplary embodiment of this disclosure. (See reference...) Figure 5 The method may include steps S510 to S540. Wherein:
[0100] In step S510, it is determined whether the predicted value of the first dosage is within the first dosage range indicated by the first dosage prediction level. If it is, proceed to step S520; otherwise, proceed to step S530.
[0101] In one exemplary embodiment, the database pre-stores dosage ranges corresponding to different dosage prediction characteristics and dosage levels. For clarity, the dosage ranges stored in the database are referred to as the first dosage range, and the dosage range obtained after adjusting the dosage ranges in the database is referred to as the second dosage range.
[0102] In step S520, the first predicted dosage value is determined as the target predicted dosage value.
[0103] For example, when the predicted value of the first dosage is within the range of the first dosage indicated by the first dosage prediction level, it means that the predicted value of the first dosage is consistent with the prediction result of the first dosage prediction level. That is, the dosage values predicted by different types of models are consistent, which means that the predicted value of the first dosage is reliable. Therefore, the predicted value of the first dosage can be directly determined as the predicted value of the target dosage.
[0104] In step S530, the water flow rate and water turbidity detected at multiple detection points during the process from the raw water point to the inlet water point are obtained. If the water flow rate is greater than a first preset value and / or the water turbidity is greater than a second preset value, the first dosage range indicated by the first dosage prediction level is adjusted according to historical experience to obtain the second dosage range.
[0105] Normally, the prediction results of different types of models should be consistent. When the prediction results of different types of models are inconsistent, the prediction results of the models need to be re-evaluated.
[0106] For example, this disclosure uses dosage prediction levels to constrain and verify the predicted dosage values, thereby ensuring the reliability and accuracy of the determined target dosage prediction values. Therefore, the classification of dosage levels has a crucial impact on the prediction results. When the prediction results of the classification prediction model and the regression prediction model are inconsistent, it can be considered whether there has been a sudden change in the current water quality, such as a sudden change in influent turbidity. The dosage range of each predetermined dosage level may not cover the current water quality change, thus leading to the inconsistency between the prediction results of the classification prediction model and the regression prediction model. Therefore, in this disclosure, when the first dosage prediction value does not fall within the first dosage range indicated by the first dosage prediction level, the first dosage range indicated by the predetermined first dosage prediction level can be dynamically adjusted to meet more complex emergencies as much as possible and improve the accuracy of dosage prediction.
[0107] In one exemplary embodiment, multiple detection points can be set between the raw water point and the inlet point to determine whether a sudden change in water quality has occurred due to a change in weather or other unforeseen events. Here, the raw water point refers to the source of the water to be treated in the water treatment system. For example, if the water treatment system treats water from a reservoir, then the reservoir is the raw water point. The inlet point refers to the inlet of the inlet pool in the water treatment system.
[0108] For example, multiple detection points can be set intermittently between the raw water point and the inlet water point. Each detection point is equipped with a turbidity meter and a flow meter. The turbidity meter and flow meter can detect whether there are sudden changes in turbidity or flow rate. When the flow rate detected by the flow meter is greater than a first preset value and / or the flow rate detected by the turbidity meter is greater than a second preset value, it is determined that there is a sudden change in water quality, and the first dosage range indicated by the first dosage prediction level can be adjusted.
[0109] The first and second preset values can be determined according to requirements, and this exemplary embodiment does not impose any special limitations on them. For example, the first preset value can be the maximum value of the influent flow rate of all influent parameter features in the training data multiplied by a coefficient greater than 1.
[0110] For example, the range of the first dosage indicated by the first dosage prediction level corresponding to the second dosage prediction feature can be adjusted based on historical experience. Taking the second dosage prediction value as an influent parameter feature as an example, the similarity between the current influent parameter feature value and the historical influent parameter feature values stored in the database can be calculated. Multiple historical influent parameter feature values similar to the current influent parameter feature value can be selected, and the interval between the minimum and maximum values of the historical dosage values corresponding to these multiple historical influent parameter feature values can be used as the range of the second dosage indicated by the first dosage prediction level corresponding to the influent parameter feature.
[0111] In step S540, the target dosage prediction value is determined based on the overlap between the second dosage range and the first dosage prediction value.
[0112] For example, one implementation of step S540 may include: when the first predicted dosage value is within the range of the second dosage, determining the first predicted dosage value as the target predicted dosage value; when the first predicted dosage value is not within the range of the second dosage, determining the target predicted dosage value based on the minimum value between the first predicted dosage value and the first dosage range indicated by the first dosage prediction level. In this way, the dosage can be initially adjusted and controlled based on the target predicted dosage value, and subsequently... Figure 6 The method shown determines whether further adjustments are needed, thereby allowing for timely adjustments to the dosage while avoiding excessive dosage that could cause secondary pollution to the water.
[0113] It should be noted that the above-mentioned adjustment of the first dosage range indicated by the first dosage prediction level to the second dosage range is only used in this comparison. The database still stores the first dosage range, and the first dosage range in the database will still be used for determination when predicting the dosage value next time.
[0114] In this disclosure, different types of models can be used to predict drug dosage. The prediction results of different types of models can be mutually verified and constrained, thereby improving the accuracy and reliability of the predicted drug dosage.
[0115] For example, Figure 6 This diagram illustrates a process flow chart of a method for controlling dosing based on a predicted target dosage value, according to an exemplary embodiment of this disclosure.
[0116] For example, Figure 6 This diagram illustrates a flow chart of a method for controlling pesticide dosing based on a predicted target dosage, according to an exemplary embodiment of this disclosure. (Refer to...) Figure 6 The method may include steps S610 to S660. Wherein:
[0117] In step S610, the dosing pump is controlled to perform the dosing operation in the water treatment process according to the first target dosing amount indicated by the target dosing amount prediction value.
[0118] In one exemplary embodiment, the dosing pump can control the dosage by frequency. There is a mapping relationship between the frequency of the dosing pump and the dosage. The dosing pump frequency corresponding to the predicted value of the target dosage can be determined based on the mapping relationship. The frequency is then sent to the dosing pump via instruction to control the dosing pump to perform the dosing operation at the specified frequency.
[0119] In step S620, in response to the detection of a decrease in water turbidity in the sedimentation tank and the first occurrence of a turbidity difference between adjacent sampling times being less than a third preset value, the radar device and video acquisition device acting on the sedimentation tank are activated simultaneously.
[0120] For example, after the dosing pump operates to add chemicals according to the predicted target dosage, the dosing effect can be detected by monitoring the state of the flocs in the sedimentation tank, thereby monitoring whether the predicted target dosage is appropriate and determining whether the dosage needs to be adjusted based on the monitoring results.
[0121] In one exemplary embodiment, while sending a dosing control command to the dosing pump, an activation control command can also be sent to the turbidity detector in the sedimentation tank to activate the turbidity detector in the sedimentation tank and obtain the turbidity in the sedimentation tank through the turbidity detector.
[0122] When the turbidity of the water in the sedimentation tank is detected by the turbidity meter to be decreasing and the difference in turbidity between adjacent sampling times is less than the third preset value for the first time, an activation control command is sent to the radar device and video acquisition device acting on the sedimentation tank.
[0123] For example, when the turbidity of the water in the sedimentation tank shows a decreasing trend and stabilizes for the first time, it indicates that the flocs in the sedimentation tank have begun to settle. At this time, the effect of chemical dosing can be determined by the settling speed of the flocs.
[0124] For example, in this disclosure, the settling velocity of flocs can be measured simultaneously using radar and video to ensure the accuracy of the settling velocity determination. Therefore, the radar and video need to measure the settling velocity of flocs in the same area within the same time period, so the radar device and video acquisition device can be activated simultaneously. At the same time, the installation locations of the radar device and video acquisition device need to be strategically arranged to ensure that their effective ranges overlap to the greatest extent possible. This ensures that the radar device and video acquisition device measure the settling velocity of flocs in the same area, facilitating accurate subsequent fusion.
[0125] In step S630, the first average settling velocity of the flocs in the sedimentation tank during a first preset time period is measured by a radar device.
[0126] In one exemplary implementation, the first preset time period can be determined based on the radar turn-on time and the first preset duration. That is, the first preset time period is the time period within the first preset duration after the radar is turned on. For example, if the first preset time period is 2 minutes, the first preset time period is 2 minutes after the radar is turned on.
[0127] For example, a radar device can emit electromagnetic waves into a sedimentation tank. The flocs in the tank reflect these waves, and the radar receives them. According to the Doppler effect, the frequency of the reflected wave changes as the target object moves relative to the radar. If the target object moves towards the radar, the frequency of the reflected wave increases; if the target object moves away from the radar, the frequency decreases. The change in frequency is proportional to the speed of the target object. By measuring the frequency difference between the emitted and reflected waves—the Doppler shift—and combining this with the radar system parameters, the radar can determine the speed of the target object.
[0128] For example, radar signals can be filtered to avoid interference from water surface fluctuations. After filtering, the gain of signals in different areas can be adjusted according to the intensity distribution of the radar signals, facilitating subsequent analysis. Next, the time-domain radar signal can be converted into a frequency-domain signal, and the spectral distribution of the signal can be obtained through Fourier transform. Extrema points are then identified in the spectrum, with different extrema points corresponding to the reflected signals of flocs at different velocities. The velocity of each extrema point is determined based on its reflection frequency, and the velocities of all extrema points are weighted and averaged to obtain the average settling velocity of the flocs within the detection range during this measurement. The weight of the velocity at each extrema point can be determined based on its energy; the higher the energy of the extrema point, the greater its weight. By weighting the velocities of different extrema points, the average settling velocity is obtained.
[0129] In one exemplary embodiment, the average settling velocity of the flocs within the detection range can be measured multiple times using radar signals within a first preset time period. The average settling velocity measured multiple times within the first preset time period is then averaged again to obtain the first average settling velocity of the flocs in the sedimentation tank within the first preset time period.
[0130] In one exemplary embodiment, the radar device can also be used to measure the separation interface between water and sludge at the bottom of the sedimentation tank, and determine whether to perform sludge discharge from the sedimentation tank based on the height of the separation interface. For example, through continuous floc settling, sludge gradually accumulates at the bottom of the sedimentation tank. The radar device can determine the sludge-water separation interface based on the different electromagnetic wave reflection characteristics of different media, thereby obtaining the height of the sludge interface. When the height of the sludge interface reaches a preset height, an alarm device can be triggered to remind the sedimentation tank to perform a sludge discharge operation, preventing excessive sludge accumulation from affecting the sedimentation effect.
[0131] In other words, in this disclosure, the radar device installed in the sedimentation tank can be used to measure the settling velocity of flocs and to remind the sedimentation tank to discharge wastewater. In this way, by reusing the radar device, the water treatment effect can be improved while the hardware cost in the water treatment process can be reduced.
[0132] In step S640, the video acquisition device acquires video of the sedimentation tank within the first preset time period, performs floc target tracking and video depth estimation on the video, and determines the second average settling velocity of the flocs in the sedimentation tank within the first preset time period based on the results of floc target tracking and video depth estimation.
[0133] For example, the video of flocs can be sampled to obtain a sequence of floc image frames. Then, in the first frame of the floc image frame sequence, all flocs are detected using a target detection algorithm. In the second and subsequent floc image frames, a multi-target tracking algorithm is used to track the flocs detected in the first frame. The two-dimensional pixel coordinates of the same floc in each floc image frame are determined based on the target tracking results. Simultaneously, video depth estimation can be performed on the floc image frame sequence. Based on the video depth estimation results, the depth value of the same floc in each floc image frame is determined. Using camera calibration parameters, the pixel coordinates and depth values of the flocs are converted into a three-dimensional spatial position in the world coordinate system. The position component in the floc settling direction is extracted from this three-dimensional spatial position. The settlement displacement of the floc is determined based on the absolute value of the difference between this position component in the current frame and the reference frame. The settlement velocity between the current frame and the reference frame is obtained based on this settlement displacement and the time interval between the current frame and the reference frame. The average settling velocity of the flocs within the first preset time period is obtained based on the average settling velocity between each current frame and the reference frame. The second average settling velocity of the flocs within the first preset time period is obtained based on the average settling velocity of each successfully tracked floc within the first preset time period.
[0134] The reference frame for the current frame can be a flocculent image frame located before the current frame and separated from the current frame by N frames. N is determined based on experience or requirements, such as N being 1, N being 2, or N being 0, etc. This exemplary embodiment does not impose any special limitations on this. N being 0 means that the reference frame for the current frame is the frame preceding the current frame.
[0135] In step S650, the first average settlement velocity and the second average settlement velocity are fused to obtain the target average settlement velocity.
[0136] In one exemplary embodiment, the first average settlement velocity and the second average settlement velocity can be fused according to a first weight corresponding to the first average settlement velocity and a second weight corresponding to the second average settlement velocity to obtain the target average settlement velocity. The first weight and the second weight can be determined based on requirements and experience, and this exemplary embodiment does not impose any special limitations on them.
[0137] In step S660, the first target dosage is adjusted according to the difference between the target average settling velocity and the preset settling velocity to obtain the second target dosage, and the dosing pump is controlled to perform the dosing operation in the water treatment process according to the second target dosage.
[0138] In one exemplary embodiment, the preset settling velocity is determined based on the floc settling velocity corresponding to the target effluent quality of the sedimentation tank. The target effluent quality may include effluent quality that meets expected requirements, and can be customized according to needs; this exemplary embodiment does not impose any special limitations on this.
[0139] For example, a preset settling velocity can be determined based on the correspondence between historical settling velocities and effluent water quality. For instance, the settling velocity and corresponding effluent water quality calculated each time can be recorded to obtain first recorded data. Then, second recorded data that meets the target effluent water quality can be selected from the first recorded data, and the preset settling velocity can be determined based on the settling velocity in the second recorded data.
[0140] For example, the preset settlement velocity can be determined based on the average settlement velocity in the second recorded data, or the preset settlement velocity range can be determined based on the interval formed by the minimum and maximum settlement velocities in the second recorded data. That is, the preset settlement velocity can also be a range. When the preset settlement velocity is a range, if the target average settlement velocity falls within that range, it is considered that there is no difference between the target average settlement velocity and the preset settlement velocity, and no adjustment of the dosage is needed. If the target average settlement velocity is less than the minimum value of the preset settlement velocity range and the absolute value of the difference from the minimum value is greater than a fourth preset value, then the first adjustment strategy is executed; if the target average settlement velocity is greater than the maximum value of the preset settlement velocity range and the absolute value of the difference from the maximum value is greater than a fourth preset value, then the second adjustment strategy is executed. If the preset settlement velocity is a specific value, and the target average settlement velocity is less than the preset settlement velocity and the absolute value of the difference between the target average settlement velocity and the preset settlement velocity is greater than the fourth preset value, then the first adjustment strategy is executed; if the target average settlement velocity is greater than the preset settlement velocity and the absolute value of the difference between the target average settlement velocity and the preset settlement velocity is greater than the fourth preset value, then the second adjustment strategy is executed.
[0141] In one exemplary implementation, the first adjustment strategy includes: increasing the current dosage of the dosing pump according to a preset increase ratio coefficient. For example, the preset increase ratio coefficient can be greater than 1, such as 1.05. In this way, the value obtained by multiplying the current dosage by 1.05 each time is determined as the new dosage. After dosing again, the target average settling velocity is re-determined according to the above method, and then it is determined whether adjustment is needed again. This process is repeated until the difference between the newly determined target average settling velocity and the preset settling velocity meets the preset condition, at which point the adjustment stops.
[0142] In one exemplary embodiment, the second adjustment strategy includes: reducing the current dosage of the dosing pump according to a preset reduction ratio coefficient. For example, the preset reduction ratio coefficient can be less than 1, such as 0.95. In this way, the value obtained by multiplying the current dosage by 0.95 each time is determined as the new dosage. After dosing again, the target average settling velocity is re-determined according to the above method, and it is then determined whether adjustment is needed again. This process is repeated until the difference between the newly determined target average settling velocity and the preset settling velocity meets the preset condition, at which point the adjustment stops.
[0143] In other words, if the flocs settle quickly after the addition of the drug, it means that the dosage of the drug is large, causing the flocs to further aggregate and form larger flocs, which may accelerate the settling speed. If the flocs settle slowly, it means that the dosage of the drug is small.
[0144] Among them, the preset conditions include that the absolute value of the difference between the target average settlement velocity and the preset settlement velocity is less than the fourth preset value.
[0145] In one exemplary implementation, the dosage at which the adjustment is stopped can be correlated with the characteristics of influent parameters, floc characteristics, and effluent water quality parameters to generate an updated database. Based on this updated database, the various models in the preset dosage prediction model are periodically updated.
[0146] Through steps S610 to S660 described above, the settling velocity of the flocs can be determined in multiple ways, improving the accuracy of the floc settling velocity determination. Based on the floc settling velocity, the treatment effect of the predicted target dosage can be judged, and the dosage can be adjusted according to the judgment result for more accurate dosage control. At the same time, adjusting the dosage based on the floc condition during the sedimentation stage can improve the timeliness of dosage adjustment.
[0147] In this disclosure, dosage prediction models for different water quality categories can be predetermined. Furthermore, each dosage prediction model is selected after training based on different training features, thereby identifying suitable dosage prediction features and models for different water quality categories, improving the accuracy and efficiency of dosage prediction for various water qualities. In addition, the method of this disclosure improves the accuracy of dosage control, thereby reducing the degree of manual intervention in the dosing process and achieving a higher degree of automation in the water treatment process.
[0148] Furthermore, it should be noted that the above figures are merely illustrative representations of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0149] Furthermore, exemplary embodiments of this disclosure also provide a dosing control device for a water treatment process. (See reference...) Figure 7 As shown, the dosing control device in the water treatment process includes the following program modules: a target water quality category determination module 710, configured to acquire influent parameters and determine the target water quality category to which the influent parameters belong based on an influent water quality classification model; a dosing prediction feature determination module 720, configured to determine a first dosing prediction feature and a second dosing prediction feature associated with the target water quality category from dosing prediction features according to a preset mapping relationship, wherein the dosing prediction features include one or more of influent parameter features, floc features, and effluent parameter features; and a first prediction module 730, configured to input the feature value of the first dosing prediction feature into the target water quality category. In the corresponding preset dosage prediction model, a dosage regression prediction model is used to obtain a first dosage prediction value based on the output of the dosage regression prediction model; a second prediction module 740 is configured to input the feature value of the second dosage prediction feature into the dosage classification prediction model in the preset dosage prediction model corresponding to the target water quality category, and obtain a first dosage prediction level based on the output of the dosage classification prediction model; a dosing control module 750 is configured to determine a target dosage prediction value based on the overlap relationship between the first dosage prediction value and the first dosage prediction level, and control the dosage in the water treatment process based on the target dosage prediction value.
[0150] In one exemplary embodiment, the determination method of the influent water quality classification model includes: obtaining historical influent parameters and performing a first clustering on the historical influent parameters; determining different categories of water quality parameters based on the clustering results, adding water quality category labels to the different categories of water quality parameters, and generating a water quality category training dataset; training a machine learning model based on the water quality category training dataset to obtain the influent water quality classification model.
[0151] In one exemplary embodiment, the method for determining the preset dosage prediction model corresponding to any water quality category includes: using each single dosage prediction feature as a first candidate dosage prediction feature; combining the single dosage features to generate a combined dosage feature; generating a second candidate dosage prediction feature based on the splicing result of multiple dosage prediction features in the combined dosage feature; generating candidate dosage prediction features based on the first candidate dosage prediction feature and the second candidate dosage prediction feature; obtaining a first number of candidate classification prediction models for any water quality category; training the candidate classification prediction model for each candidate dosage prediction feature based on each candidate dosage prediction feature for any candidate classification prediction model; and obtaining the desired dosage prediction model based on the training results of the first number of candidate classification prediction models. A second set of candidate dosage classification prediction models is used to determine the dosage classification prediction model corresponding to the water quality category from the second set of candidate dosage classification prediction models. For any water quality category, a third set of candidate regression prediction models is obtained. For any candidate regression prediction model, the candidate regression prediction model is trained according to the prediction features of each candidate dosage. A fourth set of candidate dosage regression prediction models is obtained based on the training results of the third set of candidate regression prediction models. The dosage regression prediction model corresponding to the water quality category is determined from the fourth set of candidate regression prediction models. Based on the dosage classification prediction model and the dosage regression prediction model corresponding to the water quality category, a preset dosage prediction model corresponding to the water quality category is obtained.
[0152] In one exemplary embodiment, the method for determining the preset mapping relationship includes: obtaining a first training feature indicated by the dosage regression prediction model corresponding to each water quality category and a second training feature indicated by the dosage classification prediction model corresponding to each water quality category; and generating the preset mapping relationship based on the correspondence between the water quality category and the first training feature and the water quality category and the second training feature.
[0153] In one exemplary embodiment, determining the target dosage prediction value based on the overlap between the first dosage prediction value and the first dosage prediction level includes: when the first dosage prediction value is within the first dosage range indicated by the first dosage prediction level, determining the first dosage prediction value as the target dosage prediction value; when the first dosage prediction value is not within the first dosage range indicated by the first dosage prediction level, acquiring the water flow rate and water turbidity detected at multiple detection points from the raw water point to the inlet water point; when the water flow rate is greater than a first preset value and / or the water turbidity is greater than a second preset value, adjusting the first dosage range indicated by the first dosage prediction level based on historical experience to obtain a second dosage range; and determining the target dosage prediction value based on the overlap between the second dosage range and the first dosage prediction value.
[0154] In one exemplary embodiment, determining the target dosage prediction value based on the overlap between the second dosage range and the first dosage prediction value includes: when the first dosage prediction value is within the second dosage range, determining the first dosage prediction value as the target dosage prediction value; when the first dosage prediction value is not within the second dosage range, determining the target dosage prediction value based on the minimum value between the first dosage prediction value and the first dosage range indicated by the first dosage prediction level.
[0155] In one exemplary embodiment, controlling the dosage in the water treatment process according to the predicted dosage value includes: controlling the dosing pump to perform a dosing operation in the water treatment process according to a first dosage indicated by the predicted dosage value; in response to detecting a decrease in turbidity in the sedimentation tank and the first occurrence that the turbidity difference between adjacent sampling times is less than a third preset value, simultaneously activating a radar device and a video acquisition device acting on the sedimentation tank; measuring the first average settling velocity of flocs in the sedimentation tank within a first preset time period using the radar device; and acquiring video of the sedimentation tank within the first preset time period using the video acquisition device, and processing the video... Floc target tracking and video depth estimation are performed. Based on the results of floc target tracking and video depth estimation, the second average settling velocity of the flocs in the sedimentation tank within a first preset time period is determined. The first average settling velocity and the second average settling velocity are fused to obtain the target average settling velocity. Based on the difference between the target average settling velocity and the preset settling velocity, the first dosage is adjusted to obtain the second dosage. The dosing pump is controlled to perform the dosing operation in the water treatment process according to the second dosage. The preset settling velocity is determined based on the floc settling velocity corresponding to the target effluent quality of the sedimentation tank.
[0156] The specific details of each part of the above-mentioned device have been described in detail in the method section of the implementation plan. For any undisclosed details, please refer to the implementation plan of the method section, and therefore will not be repeated here.
[0157] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0158] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.
[0159] An exemplary embodiment of this disclosure also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the dosing control method in the above-described water treatment process.
[0160] In one implementation, the computer program product can be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The readable storage medium can be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory, hard disk drive (HDD), solid-state drive (SSD), etc. For example, the computer program product can be implemented as a non-volatile storage medium storing a computer program, such as read-only memory, NAND flash memory, etc.
[0161] In one implementation, the computer program product can be an intangible product containing a computer program. For example, the computer program product can be implemented as a virtual digital product, such as an executable file, installation package, or other digital file storing the computer program.
[0162] Computer program code can be written in one or more programming languages. Examples of programming languages include C, Java, C++, and Python. Program code can execute entirely on the user's computing device, partially on the user's computing device, or as a standalone software package. It can also execute partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, such as a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via an internet connection provided by a mobile network operator).
[0163] Computer programs can be carried or transmitted via signals such as electricity, magnetism, light, electromagnetic radiation, and infrared radiation. Electronic devices can convert signals carrying computer programs into digital signals, thereby running the computer programs. When a computer program runs on an electronic device, its code is used to cause the electronic device to execute (more specifically, to execute by the processor of the electronic device) the method steps of various exemplary embodiments of this disclosure, such as the dosing control method in the water treatment process described above.
[0164] Exemplary embodiments of this disclosure also provide an electronic device, which may include a processor and a memory. The memory stores executable instructions of the processor, such as a computer program. The processor executes the executable instructions to perform the method steps of various exemplary embodiments of this disclosure. Furthermore, the electronic device may also include a display for displaying a graphical user interface.
[0165] The following is for reference. Figure 8 The electronic device is illustrated by way of a general-purpose computing device. It should be understood that... Figure 8 The electronic device 800 shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0166] like Figure 8 As shown, the electronic device 800 may include: a processor 810, a memory 820, a bus 830, an I / O (input / output) interface 840, a network adapter 850, and a display 860.
[0167] The memory 820 may include volatile memory, such as RAM 821 and cache unit 822, and may also include non-volatile memory, such as ROM 823. The memory 820 may also include one or more program modules 824, including but not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. For example, program module 824 may include the modules described above.
[0168] The processor 810 may include one or more processing units, such as an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor, and / or an NPU (Neural-Network Processing Unit).
[0169] The processor 810 can be used to execute executable instructions stored in the memory 820, such as the dosing control method in the water treatment process described above.
[0170] Bus 830 is used to connect different components of electronic device 800 and may include data bus, address bus and control bus.
[0171] Electronic device 800 can communicate with one or more external devices 900 (such as keyboard, mouse, external controller, etc.) through I / O interface 840.
[0172] Electronic device 800 can communicate with one or more networks via network adapter 850. For example, network adapter 850 can provide mobile communication solutions such as 3G / 4G / 5G, or wireless communication solutions such as wireless LAN, Bluetooth, and near-field communication. Network adapter 850 can communicate with other modules of electronic device 800 via bus 830.
[0173] The electronic device 800 can display a graphical user interface via a display 860, such as an interface for displaying the predicted dosage.
[0174] although Figure 8As not shown in the diagram, other hardware and / or software modules may also be configured in the electronic device 800, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0175] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.
[0176] As can be seen from the above, the technical solutions disclosed herein can be implemented as methods, apparatus, systems, computer program products, storage media, electronic devices, etc. Those skilled in the art will understand that various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which may be referred to as "circuit," "module," or "system," respectively.
[0177] It should be understood that this disclosure is not limited to the specific methods, steps, or structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. Those skilled in the art will readily conceive of other embodiments based on the specific implementations provided in this disclosure. Therefore, the specific implementations provided in this disclosure are merely exemplary, and the scope and spirit of this disclosure are indicated by the claims, and should cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary technical means in the art not disclosed in this disclosure.
Claims
1. A method for controlling chemical dosing in a water treatment process, characterized in that, include: Obtain the influent parameters and determine the target water quality category to which the influent parameters belong based on the influent water quality classification model; According to the preset mapping relationship, the first dosing prediction feature and the second dosing prediction feature associated with the target water quality category are determined from the dosing prediction features. The dosing prediction features include one or more of the following: influent parameter features, floc features and effluent parameter features. The feature value of the first dosage prediction feature is input into the dosage regression prediction model in the preset dosage prediction model corresponding to the target water quality category, and the first dosage prediction value is obtained according to the output of the dosage regression prediction model. The feature value of the second dosage prediction feature is input into the dosage classification prediction model in the preset dosage prediction model corresponding to the target water quality category, and the first dosage prediction level is obtained according to the output of the dosage classification prediction model. Based on the overlap between the first predicted dosage value and the first predicted dosage level, a target predicted dosage value is determined, and the dosage in the water treatment process is controlled based on the target predicted dosage value. The step of determining the target dosage prediction value based on the overlap between the first dosage prediction value and the first dosage prediction level includes: when the first dosage prediction value is within the first dosage range indicated by the first dosage prediction level, determining the first dosage prediction value as the target dosage prediction value; when the first dosage prediction value is not within the first dosage range indicated by the first dosage prediction level, acquiring the water flow rate and water turbidity detected at multiple detection points from the raw water point to the inlet water point; when the water flow rate is greater than a first preset value and / or the water turbidity is greater than a second preset value, adjusting the first dosage range indicated by the first dosage prediction level based on historical experience to obtain a second dosage range; when the first dosage prediction value is within the second dosage range, determining the first dosage prediction value as the target dosage prediction value; when the first dosage prediction value is not within the second dosage range, determining the target dosage prediction value based on the minimum value between the first dosage prediction value and the first dosage range indicated by the first dosage prediction level.
2. The method according to claim 1, characterized in that, The method for determining the influent water quality classification model includes: Obtain historical inflow parameters and perform the first clustering of historical inflow parameters; Based on the clustering results, water quality parameters of different categories are determined, water quality category labels are added to the water quality parameters of different categories, and a water quality category training dataset is generated. A machine learning model is trained based on the water quality category training dataset to obtain the influent water quality classification model.
3. The method according to claim 1, characterized in that, The methods for determining the preset dosage prediction model for any water quality category include: Each single dosage prediction feature was used as the first candidate dosage prediction feature; The single dosage feature is combined to generate the combined dosage feature. Based on the splicing result of multiple dosage prediction features in the combined dosage feature, a second candidate dosage prediction feature is generated. Candidate drug dosage prediction features are generated based on the first candidate drug dosage prediction features and the second candidate drug dosage prediction features; For any water quality category, a first number of candidate classification prediction models are obtained. For any candidate classification prediction model, the candidate classification prediction model is trained according to the prediction features of each candidate dosage. A second number of candidate dosage classification prediction models are obtained based on the training results of the first number of candidate classification prediction models. The dosage classification prediction model corresponding to the water quality category is determined from the second number of candidate dosage classification prediction models. For any water quality category, a third number of candidate regression prediction models are obtained. For any candidate regression prediction model, the candidate regression prediction model is trained according to the prediction features of each candidate dosage. A fourth number of candidate dosage regression prediction models are obtained based on the training results of the third number of candidate regression prediction models. The dosage regression prediction model corresponding to the water quality category is determined from the fourth number of candidate dosage regression prediction models. Based on the dosage classification prediction model and dosage regression prediction model corresponding to the water quality category, a preset dosage prediction model corresponding to the water quality category is obtained.
4. The method according to claim 3, characterized in that, The methods for determining the preset mapping relationship include: Obtain the first training feature indicated by the dosage regression prediction model for each water quality category and the second training feature indicated by the dosage classification prediction model for each water quality category; The preset mapping relationship is generated based on the correspondence between the water quality category and the first training feature, and between the water quality category and the second training feature.
5. The method according to any one of claims 1 to 4, characterized in that, The control of chemical dosage in the water treatment process based on the predicted target dosage includes: The dosing pump is controlled to perform the dosing operation in the water treatment process according to the predicted target dosing amount; In response to the detection of a decrease in water turbidity in the sedimentation tank and the first occurrence of a turbidity difference between adjacent sampling times being less than the third preset value, the radar device and video acquisition device acting on the sedimentation tank are activated simultaneously. The radar device measures the first average settling velocity of flocs in the sedimentation tank during a first preset time period. The video acquisition device acquires video of the sedimentation tank during the first preset time period, performs floc target tracking and video depth estimation on the video, and determines the second average settling velocity of the flocs in the sedimentation tank during the first preset time period based on the results of floc target tracking and video depth estimation. The first average settlement velocity and the second average settlement velocity are fused together to obtain the target average settlement velocity; Based on the difference between the target average settling velocity and the preset settling velocity, the first dosage is adjusted to obtain the second dosage, and the dosing pump is controlled to perform the dosing operation in the water treatment process according to the second dosage. The preset settling velocity is determined based on the floc settling velocity corresponding to the target effluent quality of the sedimentation tank.
6. A dosing control device for a water treatment process, characterized in that, include: The target water quality category determination module is configured to acquire influent parameters and determine the target water quality category to which the influent parameters belong based on the influent water quality classification model. The dosing dosage prediction feature determination module is configured to determine, according to a preset mapping relationship, a first dosing dosage prediction feature and a second dosing dosage prediction feature associated with the target water quality category from the dosing dosage prediction features. The dosing dosage prediction features include one or more of influent parameter features, floc features, and effluent parameter features. The first prediction module is configured to input the feature value of the first dosage prediction feature into the dosage regression prediction model in the preset dosage prediction model corresponding to the target water quality category, and obtain the first dosage prediction value based on the output of the dosage regression prediction model. The second prediction module is configured to input the feature value of the second dosage prediction feature into the dosage classification prediction model in the preset dosage prediction model corresponding to the target water quality category, and obtain the first dosage prediction level based on the output of the dosage classification prediction model; The dosing control module is configured to determine a target dosing prediction value based on the overlap between the first dosing prediction value and the first dosing prediction level, and control the dosing amount in the water treatment process based on the target dosing prediction value. The step of determining the target dosage prediction value based on the overlap between the first dosage prediction value and the first dosage prediction level includes: when the first dosage prediction value is within the first dosage range indicated by the first dosage prediction level, determining the first dosage prediction value as the target dosage prediction value; when the first dosage prediction value is not within the first dosage range indicated by the first dosage prediction level, acquiring the water flow rate and water turbidity detected at multiple detection points from the raw water point to the inlet water point; when the water flow rate is greater than a first preset value and / or the water turbidity is greater than a second preset value, adjusting the first dosage range indicated by the first dosage prediction level based on historical experience to obtain a second dosage range; when the first dosage prediction value is within the second dosage range, determining the first dosage prediction value as the target dosage prediction value; when the first dosage prediction value is not within the second dosage range, determining the target dosage prediction value based on the minimum value between the first dosage prediction value and the first dosage range indicated by the first dosage prediction level.
7. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method described in any one of claims 1 to 5.
8. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to implement the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Coagulation clarification tank accurate dosing method and system based on machine learning and image recognition
CN118579911A
Automatic controlling system for amount of optimal coagulant injection based on machine learning, and method for the same
KR1020230168714A