A method and device for optimizing the dosage of a sewage coagulant based on coagulation characteristic classification

CN122369683APending Publication Date: 2026-07-10CHINA NAT PETROLEUM CORP +2
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies make it difficult to establish a clear relationship to optimize the dosage of coagulants, which leads to difficulties in predicting the coagulation effect. Furthermore, there is a non-linear relationship between the dosage of coagulants and the concentration of suspended solids (SS), making it difficult to control precisely.

Method used

By using a coagulation characteristic classification method, a pre-trained coagulation characteristic category prediction model is used, combined with the mapping relationship of optimal coagulant dosage, to optimize the coagulant dosage in wastewater treatment. The ensemble learning of multiple deep learning network models is adopted to alleviate the dependence on training parameters.

Benefits of technology

It enables intelligent optimization of coagulant dosage in wastewater treatment, improves the practicality of the algorithm in real-world scenarios, reduces the waste of training resources, and improves the prediction accuracy of coagulation effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122369683A_ABST
    Figure CN122369683A_ABST
Patent Text Reader

Abstract

The application discloses a sewage coagulant dosage optimization method and device based on coagulation characteristic classification. The method comprises the following steps: determining the mapping relationship between the coagulation characteristic category and the optimal coagulant dosage in advance based on the coagulant dosage and the SS concentration after coagulation of multiple water samples obtained through coagulation cup jar tests; inputting multiple images of a sample of sewage to be treated in a coagulation process into a coagulation characteristic category prediction model; determining the optimal coagulant dosage of the sewage to be treated based on the mapping relationship between the coagulation characteristic category and the optimal coagulant dosage and the coagulation characteristic category prediction result output by the model. The method realizes intelligent optimization of the sewage treatment coagulant dosage based on the mapping relationship between the coagulation characteristic category and the optimal coagulant dosage and by using the pre-trained coagulation characteristic category prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence and water treatment application technology, and in particular to a method and apparatus for optimizing the dosage of wastewater coagulants based on coagulation characteristics. Background Technology

[0002] Coagulation technology is a widely used treatment process in the treatment of industrial wastewater and other sewage. Simply put, the mechanism of coagulation technology is to add coagulants to sewage, causing colloidal substances in the sewage to coagulate and flocculate and separate, thereby purifying the sewage.

[0003] Coagulation effectiveness is typically characterized by the concentration of suspended particulate matter (SS) in the effluent. Optimizing coagulant dosage aims to reduce the SS concentration in industrial wastewater to or below the target concentration using the minimum amount of coagulant required. Summary of the Invention

[0004] The inventors discovered three challenges in selecting different dosages of coagulant based on the varying suspended solids (SS) concentration of the wastewater (raw water):

[0005] 1. It is difficult to establish a specific relationship between the amount of coagulant added and the concentration of suspended solids (SS) in the raw water.

[0006] The effect of adding coagulants to raw water on the treatment of suspended particulate matter is not only related to the concentration of suspended solids (SS) in the raw water, but also to various other factors such as chemical oxygen demand (COD), pH value, and temperature. Generally, SS concentration, COD value, pH value, and temperature are collectively referred to as water quality characteristics.

[0007] In other words, for raw water with the same suspended solids (SS) concentration but different other water quality characteristics, the minimum amount of coagulant required to reduce the SS concentration to below the target concentration through coagulation will be different.

[0008] In addition, due to the characteristics of water quality, the amount of coagulant required for raw water with high suspended solids (SS) concentration is often lower than that for raw water with low SS concentration.

[0009] 2. The relationship between coagulant dosage and effluent SS concentration is non-linear.

[0010] The function of coagulants is to destabilize colloids in water. However, the number of colloids that can be destabilized in water is limited under certain water quality characteristics. Therefore, some of the coagulants in excessive amounts cannot react and will become impurities in the water, increasing the suspended solids (SS) concentration. Thus, for the same raw water, it is not true that the more coagulant added, the lower the SS concentration after coagulation. In fact, this is a non-linear relationship.

[0011] 3. The relationship between the amount of coagulant added and the rate of decrease in SS concentration is non-linear.

[0012] The complex multi-factor reaction makes it difficult to establish a definite relationship between the amount of coagulant added and the rate of decrease in SS concentration for the same raw water.

[0013] The above three difficulties are due to the fact that the reaction mechanism between water quality characteristics and coagulants is very complex and difficult to study clearly. It is also difficult to establish a clear correspondence between water quality characteristics and coagulant dosage, which makes it very difficult to predict the coagulation effect.

[0014] In recent years, several coagulation effect prediction models based on machine learning algorithms have been proposed. In 2019, Hiroshi Yamamura used the AlexNet network to classify the coagulation effect of different water qualities in his paper "Dosage optimization of polyaluminum chloride by the application of convolutional neural network to the floc images captured in jar tests". In 2022, Arya G. Krishnan used an artificial neural network to predict the turbidity removal efficiency of PACl and Moringa Oleifera in water treatment plants in his paper "Artificial neural network modelling approach for the prediction of turbidity removal efficiency of PACl and Moringa Oleifera in water treatment plants". Also in 2022, Guocheng Zhu used tensor graphs to identify the pollution levels of different water samples in his paper "A flocculation tensor to monitor water quality using a deep learning model". While these techniques have all classified and predicted the coagulation effect of different water samples, they have not addressed how the prediction results guide the control of coagulant dosage.

[0015] In order to at least partially solve the technical problems existing in the prior art, the inventors made this invention, which provides a method and device for optimizing the dosage of sewage coagulant based on coagulation characteristic classification through specific implementation methods. Based on the mapping relationship between coagulation characteristic category and optimal coagulant dosage, and using a pre-trained coagulation characteristic category prediction model, intelligent optimization of the dosage of coagulant for sewage treatment is achieved.

[0016] In a first aspect, embodiments of the present invention provide a method for optimizing the dosage of wastewater coagulants based on coagulation characteristics, comprising:

[0017] The coagulation process of the wastewater sample is input into the coagulation characteristic category prediction model. Based on the coagulation characteristic category prediction results output by the model and the pre-determined mapping relationship between the coagulation characteristic category and the optimal amount of coagulant, the optimal amount of coagulant for the wastewater to be treated is determined.

[0018] The mapping relationship between the coagulation characteristic category and the optimal dosage of coagulant is based on the pre-determined coagulant dosage and SS concentration after coagulation of multiple water samples obtained through coagulation cup tank tests; wastewater with the same coagulation characteristic category has the same optimal coagulant dosage.

[0019] Optionally, based on the coagulant dosage and post-coagulation SS concentration of multiple water samples obtained through coagulation cup tests, the mapping relationship between coagulation characteristic categories and optimal coagulant dosage is determined, including:

[0020] Several groups of water samples were collected, and each group of water samples was divided into several parts. For each part of the water sample, the amount of coagulant and the concentration of SS after coagulation were obtained through coagulation cup tank test. The amount of coagulant was different for each part of the water sample in the same group.

[0021] For each group of water samples, the optimal amount of coagulant for the water sample is determined by the arithmetic sequence method based on the target concentration, the amount of coagulant used for each water sample, and the SS concentration after coagulation.

[0022] Based on the optimal dosage of coagulant, each group of water samples was classified into coagulation characteristic categories, and the optimal dosage of coagulant corresponding to each coagulation characteristic category was determined, thus obtaining the mapping relationship between the coagulation characteristic category and the optimal dosage of coagulant.

[0023] Optionally, the prediction model for the coagulation property category is pre-established in the following manner:

[0024] Several water samples were collected, and for each water sample, multiple frames of images of the coagulation process were obtained through coagulation cup experiments.

[0025] Each frame of image and the corresponding coagulation characteristic category are treated as a sample to obtain a sample set;

[0026] The specified learning model is trained using the sample set to obtain a prediction model for coagulation property categories.

[0027] Optionally, the coagulation cup test includes a first stirring stage, a second stirring stage, and a settling stage in sequence, wherein the stirring speed in the first stirring stage is greater than the stirring speed in the second stirring stage.

[0028] The multi-frame images during the coagulation process include multi-frame images of the first stirring stage, multi-frame images of the second stirring stage, and multi-frame images of the settling stage.

[0029] Optionally, training a specified learning model using the sample set to obtain a prediction model for the coagulation property category includes:

[0030] The fusion learning model is trained using the sample set to obtain a coagulation characteristic category prediction model. The fusion learning model includes multiple deep learning network models and ensemble algorithms.

[0031] Optionally, the fusion learning model includes the AlexNet network model, the LeNet network model, and the VGG16 network model.

[0032] Optionally, the AlexNet network model includes an 11-layer neural network, comprising 5 convolutional layers, 3 max-pooling layers, and 3 fully connected layers.

[0033] The LeNet network model consists of a 7-layer neural network, including 2 convolutional layers, 2 pooling layers, and 3 fully connected layers;

[0034] The VGG16 network model includes 20 sub-layers, including two conv3-64 sub-layers in the first convolutional layer, two conv3-128 sub-layers in the second convolutional layer, three conv3-256 sub-layers in the third convolutional layer, three conv3-512 sub-layers in the fourth convolutional layer, three conv3-512 sub-layers in the fifth convolutional layer, two FC4096 sub-layers, one FC1024 sub-layer, and four max-pooling sub-layers.

[0035] Optionally, training the fusion learning model using the sample set to obtain the coagulation characteristic category prediction model includes:

[0036] Using the aforementioned sample set, a fusion learning model is trained through cross-sampling to obtain a prediction model for concrete property categories.

[0037] Optionally, the step of training a fusion learning model using the sample set through cross-sampling to obtain a confounding characteristic category prediction model includes:

[0038] The samples in the sample set are divided into different subsets according to their different coagulation characteristics.

[0039] Training samples are extracted from each subset according to a set ratio to obtain a training set and a validation set.

[0040] Set the number of rounds, batch size, and learning rate for model training. Each round of model training includes: for each deep learning network model, inputting the training set into the model for forward propagation to obtain a prediction output, determining the update gradient based on the loss value of the output, updating the model weights based on the update gradient, and determining the model prediction performance using the validation set.

[0041] Return to the previous step and extract training samples from each subset according to the set ratio to obtain the training set and the validation set, until the preset training termination condition is reached.

[0042] Optionally, setting the number of training epochs, batch size, and learning rate of the model includes:

[0043] The model training rounds are set to 20-50, the batch size to 32, and the learning rate to 0.0001.

[0044] Secondly, embodiments of the present invention provide a wastewater coagulant dosage optimization device based on coagulation characteristic classification, the device including a mapping relationship determination module, a prediction model establishment module and a coagulant dosage optimization module;

[0045] The mapping relationship determination module is used to predetermine the mapping relationship between coagulation characteristic category and optimal coagulation dosage based on the coagulation dosage and SS concentration after coagulation of multiple water samples obtained through coagulation cup tank tests; wastewater with the same coagulation characteristic category has the same optimal coagulation dosage.

[0046] The coagulant dosage optimization module is used to input multiple frames of images of the wastewater sample during the coagulation process into the coagulation characteristic category prediction model established by the prediction model establishment module. Based on the coagulation characteristic category prediction results output by the model and the mapping relationship between the coagulation characteristic category and the optimal coagulant dosage determined by the mapping relationship determination module, the optimal coagulant dosage for the wastewater to be treated is determined.

[0047] Thirdly, embodiments of the present invention provide a computer storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-mentioned wastewater coagulant dosage optimization method based on coagulation characteristic classification.

[0048] Fourthly, embodiments of this disclosure provide a server, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described method for optimizing wastewater coagulant dosage based on coagulation characteristics classification.

[0049] The beneficial effects of the above-described technical solutions provided in the embodiments of the present invention include at least the following:

[0050] (1) The wastewater coagulant dosage optimization method based on coagulation characteristic classification provided in this embodiment of the invention creatively proposes a coagulation characteristic category classification scheme that can reflect the optimal dosage of coagulant. The coagulation characteristic category is determined in advance based on the optimal dosage of coagulant, and a mapping relationship between the coagulation characteristic category and the optimal dosage of coagulant is established. Based on the mapping relationship between the coagulation characteristic category and the optimal dosage of coagulant, a pre-trained coagulation characteristic category prediction model is used to realize intelligent optimization of wastewater treatment coagulant dosage.

[0051] (2) The wastewater coagulant dosage optimization method based on coagulation characteristic classification provided in this embodiment of the invention can effectively alleviate the dependence of deep models on training parameters and improve the practicality of the algorithm in real-world scenarios through the integrated learning of multiple deep learning network models; at the same time, it can effectively alleviate the problems of training resource waste, poor training effect and difficulty in hyperparameter design.

[0052] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings.

[0053] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0054] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0055] Figure 1 This is a flowchart illustrating the determination of the mapping relationship between coagulation characteristic categories and the optimal dosage of coagulant in Embodiment 2 of the present invention.

[0056] Figure 2 Flowchart for establishing the prediction model of coagulation characteristic categories in Embodiment 3 of the present invention;

[0057] Figure 3 This is a diagram illustrating the multi-model structure and integration method in Embodiment 3 of the present invention;

[0058] Figure 4 This is a flowchart illustrating the training of the fusion learning model using cross-sampling in Embodiment 3 of the present invention;

[0059] Figure 5 This is a flowchart illustrating the technical process of training and predicting the coagulation characteristic category prediction model in Embodiment 3 of the present invention.

[0060] Figure 6This is a schematic diagram of the wastewater coagulant dosage optimization device based on coagulation characteristics in an embodiment of the present invention. Detailed Implementation

[0061] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0062] It should be understood that the terminology used in this invention is merely for describing particular embodiments and is not intended to limit the invention. Furthermore, with respect to numerical ranges in this invention, it should be understood that each intermediate value between the upper and lower limits of the range is also specifically disclosed. Every smaller range between any stated value or intermediate value within a stated range, and any other stated value or intermediate value within said range, is also included in this invention. The upper and lower limits of these smaller ranges may be independently included or excluded from the range.

[0063] Unless otherwise stated, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. While only preferred methods and materials have been described herein, any methods and materials similar or equivalent to those described herein may be used in the implementation or testing of this invention. All references to this specification are incorporated by way of citation to disclose and describe methods and / or materials associated with those references. In the event of any conflict with any incorporated reference, the content of this specification shall prevail.

[0064] The inventors discovered in their work that although it is difficult to establish a direct correlation between water quality characteristics and the amount of coagulant added, the various differences in water quality characteristics will ultimately be reflected in the aggregates and flocs formed. Therefore, studying the coagulation effect from the perspective of aggregates and flocs is a feasible approach.

[0065] 1. If raw water is classified using various water quality parameters, then any raw water with different parameters is considered completely different. However, during coagulation, some raw waters, despite having different water quality parameters, exhibit the same coagulation characteristics. This means that adding the same dosage of coagulant will produce the same coagulation effect (i.e., the same SS concentration in the effluent). Such waters are referred to as raw water with identical coagulation characteristics. Therefore, based on the coagulation characteristics during coagulation, raw water can be classified according to dosage to determine the optimal coagulant dosage.

[0066] 2. Although the relationship between coagulant dosage and coagulation effect is generally non-linear, that is:

[0067] a. The coagulation effect does not continuously improve with increasing dosage, but may even worsen;

[0068] b. The relationship between dosage and raw water SS concentration is not necessarily true that the higher the raw water SS concentration, the more coagulant is needed; in fact, the opposite may be true.

[0069] However, the inventors also discovered that the above nonlinearity is a qualitative description from a broad perspective. When limited to a smaller range of variation, the relationship between the amount of coagulant added and the coagulation effect still largely conforms to a linear relationship.

[0070] Based on the above findings, the inventors conducted further research and development, resulting in this invention. This invention provides a method and apparatus for optimizing wastewater coagulant dosage based on coagulation characteristics, achieving intelligent optimization of coagulant dosage in wastewater treatment.

[0071] Example 1

[0072] Embodiment 1 of the present invention provides a method for optimizing the dosage of coagulant in wastewater based on coagulation characteristic classification. The method includes inputting multiple frames of images of a sample of wastewater to be treated during the coagulation process into a coagulation characteristic category prediction model, and determining the optimal dosage of coagulant in the wastewater to be treated based on the coagulation characteristic category prediction results output by the model and the pre-determined mapping relationship between the coagulation characteristic category and the optimal dosage of coagulant.

[0073] Furthermore, the coagulation process includes a first stirring stage, a second stirring stage, and a settling stage, arranged in order of time. The stirring speed in the first stirring stage is greater than that in the second stirring stage. The multi-frame images in the coagulation process include multi-frame images of the first stirring stage, the second stirring stage, and the settling stage.

[0074] For an understanding of coagulation characteristic categories, please refer to the above introduction. Different raw water coagulation characteristic categories will lead to different optimal coagulant dosages. Conversely, raw water with the same coagulation characteristic category will have similar SS concentrations after treatment with the same coagulant dosage; that is, wastewater with the same coagulation characteristic category has the same optimal coagulant dosage.

[0075] The mapping relationship between the above coagulation characteristic categories and the optimal dosage of coagulant is based on the pre-determined dosage of coagulant and SS concentration after coagulation of multiple water samples obtained through coagulation cup tank tests. The specific determination process is described in Example 2. The establishment of the coagulation characteristic category prediction model is described in Example 3.

[0076] The wastewater coagulant dosage optimization method based on coagulation characteristic classification provided in Embodiment 1 of this invention creatively proposes a coagulation characteristic category classification scheme that can reflect the optimal dosage of coagulant. The coagulation characteristic category is determined in advance based on the optimal dosage of coagulant, and a mapping relationship between the coagulation characteristic category and the optimal dosage of coagulant is established. Based on the mapping relationship between the coagulation characteristic category and the optimal dosage of coagulant, a pre-trained coagulation characteristic category prediction model is used to realize intelligent optimization of coagulant dosage in wastewater treatment.

[0077] Example 2

[0078] Embodiment 2 of the present invention provides a method for determining the mapping relationship between coagulation characteristic category and optimal coagulant dosage, see [link to documentation]. Figure 1 As shown, it includes the following steps:

[0079] Step S11: Collect several groups of water samples, divide each group of water samples into several parts, and for each part of water sample, obtain the amount of coagulant and the SS concentration after coagulation through coagulation cup tank test. The amount of coagulant in each part of the same group of water samples is different.

[0080] Based on experience, the coagulation characteristics category, i.e. the optimal dosage of coagulant, is predicted. Several groups of water samples are selected, and water samples with different coagulation characteristics, i.e. the required optimal dosage of coagulant, are selected as much as possible.

[0081] Step S12: For each group of water samples, based on the target concentration, the amount of coagulant used in each water sample, and the SS concentration after coagulation, determine the optimal amount of coagulant used in the water sample using the arithmetic sequence method.

[0082] As previously discussed, although the relationship between coagulant dosage and coagulation effect is generally non-linear, within a small range of variation, the relationship between coagulant dosage and coagulation effect, i.e., between coagulant dosage and SS concentration, still largely conforms to a linear relationship. Therefore, the optimal coagulant dosage for a water sample can be determined using the arithmetic progression method.

[0083] Step S13: Divide each group of water samples into coagulation characteristic categories according to the optimal dosage of coagulant, determine the optimal dosage of coagulant for each coagulation characteristic category, and obtain the mapping relationship between coagulation characteristic category and optimal dosage of coagulant.

[0084] Specifically, the optimal dosage of coagulant in a water sample can be divided into multiple intervals, and water samples with optimal coagulant dosages within the same interval can be grouped into a category with the same coagulation characteristics. Based on multiple optimal coagulant dosages for the same category of water samples, the optimal coagulant dosage corresponding to that coagulation characteristic category can be determined by taking the maximum or average value of multiple optimal coagulant dosages.

[0085] Example 3

[0086] Embodiment 3 of the present invention provides a method for establishing a prediction model for coagulation property categories, see [link to documentation]. Figure 2 As shown, it includes the following steps:

[0087] Step S21: Collect several water samples, and for each water sample, obtain multiple frames of images of the coagulation process through a coagulation cup test.

[0088] The water samples here need to include water samples of each coagulation characteristic category. Ideally, the proportion of water samples of each coagulation characteristic category should not differ significantly.

[0089] Therefore, based on the water samples collected in Example 2, further water samples can be collected to establish the coagulation characteristic category prediction model. For example, each set of water samples used in determining the mapping relationship between coagulation characteristic categories and the optimal dosage of coagulant can be divided into two sets. One set is used to determine the mapping relationship between coagulation characteristic categories and the optimal dosage of coagulant, and the other set is used to establish the sample set for training the coagulation characteristic category prediction model. In this way, each water sample in this example has parallel samples, and its coagulation characteristic category can be obtained.

[0090] Optionally, multiple frames of images of each water sample required in this embodiment during the coagulation process can also be obtained directly during the coagulation cup test in Example 2.

[0091] Step S22: Take each frame of image and the corresponding coagulation characteristic category as a sample to obtain a sample set.

[0092] Step S23: Train the specified learning model using the sample set to obtain the prediction model for the concrete property category.

[0093] A fusion learning model can be trained using a sample set to obtain a prediction model for concrete property categories.

[0094] Fusion learning models include multiple deep learning network models and ensemble algorithms.

[0095] Specifically, a fusion learning model can include AlexNet, LeNet, and VGG16 network models, along with ensemble algorithms. Taking the ensemble of three models as an example, the multi-model structure and ensemble method are as follows: Figure 3 As shown.

[0096] Furthermore, after multiple experiments and optimizations, the structure of each deep learning network model can be set as follows:

[0097] (1) AlexNet network model

[0098] The AlexNet network model consists of 11 neural network layers, including 5 convolutional layers, 3 max-pooling layers, and 3 fully connected layers. The specific parameters of each layer are shown in Table 1.

[0099] Table 1 AlexNet Network Model Structure

[0100]

[0101]

[0102] (2) LeNet network model

[0103] The LeNet network model consists of 7 layers: 2 convolutional layers, 2 pooling layers, and 3 fully connected layers. The specific parameters of each layer are shown in Table 2.

[0104] Table 2 LeNet Network Model Structure Table

[0105] Layer_Name Kernel_Size Kernel_Num Padding Stride Input_shape Output_shape Conv1 5 16 [1,2] 1 [3,120,120] [48,55,55] Maxpool1 2 None 0 2 [48,55,55] [48,27,27] Conv2 5 32 [2,2] 1 [48,27,27] [128,27,27] Maxpool2 2 None 0 2 [128,27,27] [128,13,13] FC1 2048 None None None 2048*1 vector FC2 2048 None None None 2048*1 vector FC3 2048 None None None 2048*1 vector

[0106] (3) VGG16 network model

[0107] The VGG16 network model consists of 20 sub-layers, including two conv3-64 sub-layers in the first convolutional layer, two conv3-128 sub-layers in the second convolutional layer, three conv3-256 sub-layers in the third convolutional layer, three conv3-512 sub-layers in the fourth convolutional layer, three conv3-512 sub-layers in the fifth convolutional layer, two FC4096 sub-layers, one FC1024 sub-layer, and four max-pooling sub-layers. The specific parameters of each layer are shown in Table 3.

[0108] Table 3 VGG16 Network Model Structure

[0109]

[0110]

[0111] Ensemble algorithms for fusion learning models can employ majority voting:

[0112] The label categories of the input data are {c1, c2, ..., c...} k In the prediction results of multiple CNN networks for the predicted sample x, the most numerous category c is... i As the final classification category, i.e., H(x) = c i .

[0113] In some embodiments, a fusion learning model is trained using a sample set through cross-sampling to obtain a prediction model for coagulation property categories. See [link to details]. Figure 4As shown, it includes:

[0114] Step S41: Divide the samples in the sample set into different subsets according to their different coagulation characteristics.

[0115] Step S42: Extract training samples from each subset according to a set ratio to obtain the training set and the validation set.

[0116] Step S43: Set the number of rounds, batch size, and learning rate for model training. Each round of model training includes: for each deep learning network model, input the training set into the model for forward propagation to obtain a prediction output, determine the update gradient based on the loss value of the output, update the model weights based on the update gradient, and determine the model prediction performance using the validation set.

[0117] The number of training epochs for the model can be set to 20-50, the batch size to 32, and the learning rate to 0.0001.

[0118] Step S44: Determine whether the preset training termination condition has been met.

[0119] The training termination condition can be either reaching a preset number of training iterations or achieving a set accuracy requirement for prediction accuracy.

[0120] Furthermore, the prediction accuracy can be determined by using an ensemble algorithm to obtain the integrated output result based on the output results of each deep learning network model on the input validation set, and then using the integrated output result and the label data of the samples in the validation set to determine the prediction accuracy of the model.

[0121] If step S44 is determined to be yes, proceed to step S45; if step S44 is determined to be no, return to proceed to step S42.

[0122] Step S45: Terminate training and obtain the prediction model for concrete property categories.

[0123] Specifically, the establishment of the prediction model and the prediction process can be found in [link to relevant documentation]. Figure 5 As shown, the labeled dataset is divided into a training set and a sample set. After the model training is completed, new data is input into the final model to obtain the prediction results.

[0124] The method for establishing a prediction model for coagulation characteristics provided in Embodiment 3 of this invention can effectively alleviate the dependence of deep models on training parameters and improve the practicality of the algorithm in real-world scenarios through the integrated learning of multiple deep learning network models. At the same time, it can effectively alleviate the problems of wasted training resources, poor training results, and difficulty in hyperparameter design.

[0125] Example 4

[0126] Embodiment 4 of the present invention provides a specific application of a wastewater coagulant dosage optimization method based on coagulation characteristics classification, comprising the following steps:

[0127] 1. Five groups of water samples were collected, and each group of water samples was divided into five parts. The first four parts were about 2L each, denoted as the j-th part of the i-th group, i = 1, 2, 3, 4, 5, j = 1, 2, 3, 4; the fifth part of the water sample was about 10L.

[0128] Steps 2-10 are performed using the first four water samples from each group.

[0129] 2. A coagulation data acquisition system consisting of a reaction vessel, water quality probe, camera, agitator, and light box is used to collect coagulation data.

[0130] Preferably, the reaction vessel is made of acrylic material with a volume of 2L. The water quality probes include SS concentration probe, COD probe, pH probe and temperature probe. The camera is a CCD industrial camera. The stirrer is a manual knob speed-adjustable type. The light box is a three-sided enclosed type, lined with silver reflective paper and equipped with light strips to form a stable light source.

[0131] 3. Pour the first sample of water from group 1 into the reaction vessel and add coagulant at a dosage of M.

[0132] Preferably, the coagulant is PAC, and the dosage is 20 ml / L.

[0133] 4. Conduct the reaction experiment, which consists of three parts: rapid stirring, slow stirring, and standing.

[0134] Preferably, the fast stirring speed is 200 rpm and the stirring time is 120 s; the slow stirring speed is 30 rpm and the stirring time is 600 s; the static stirring speed is 0 rpm and the static time is 1200 s.

[0135] 5. From the start of the rapid stirring stage to the end of the settling stage, the camera captures images of the mixture in the reaction vessel.

[0136] The preferred acquisition frequency is 1fps, and the shooting area is 2cm*2cm.

[0137] 6. After settling, collect water quality parameter data.

[0138] Preferred parameters include SS concentration, COD, pH value, and water temperature.

[0139] 7. Store the image data from steps 3-5 of the experiment, labeling them as 1-1.

[0140] 8. Select 2 to 4 water samples from Group 1 respectively, repeat steps 3 to 5, store the corresponding image data, and label them to obtain data labeled as 1-2, 1-3, and 1-4.

[0141] 9. Select water samples from groups 2 to 5 respectively, repeat steps 3-6, store the corresponding image data, and label them to obtain data labeled as 2-1, 2-2, 2-3, 2-4, 3-1, 3-2, 3-3, 3-4, 4-1, 4-2, 4-3, 4-4, 5-1, 5-2, 5-3, 5-4.

[0142] 10. Divide the 20 labeled data sets into 5 categories based on SS concentration.

[0143] 11. The fifth portion of the first group of water samples was further divided into five portions to obtain the SS concentrations corresponding to different coagulant dosages. The minimum dosage b1…b(T) for the target SS concentration X after sedimentation in the first group of water samples was obtained by using the difference series method.

[0144] Preferably, within the same group, the largest b(max) is selected as the optimal dosage b1_best for that group.

[0145] 12. Select groups 2 to 5 and repeat step 11 to obtain the above b(max2) to b(max5), which are the corresponding optimal dosages b2_best to b(5)_best.

[0146] 13. Form an optimal dosage mapping table.

[0147] Table 4. Mapping relationship between coagulation property categories and optimal coagulant dosage.

[0148] Raw water classification 1 2 … 5 Optimal dosage b1_best b2_best … b(5)_best

[0149] 14. Store the five types of image data in five folders according to the projection mapping table, and name the folders 1, 2, 3, 4 and 5 respectively.

[0150] 15. Perform a 3-fold cross partitioning on the 5 classes of data to obtain a training set and a validation set, with a ratio of 4:1 between the training set and the validation set.

[0151] 16. Data Training: Input the training and validation sets into the fusion learning model integrating multiple neural network models. Set the number of epochs, batch size, and learning rate for computation. Optimal epochs are 20-50, batch size is 32, and learning rate is 0.0001. Each training epoch includes the following steps:

[0152] 1) Data loading and preprocessing: Load a batch of data from the training dataset and preprocess the data, which may include data denoising, augmentation, inversion and other operations to ensure data quality and consistency.

[0153] 2) Forward Propagation: The current batch of input data (such as images, text, etc.) is passed to the neural network model. The data is propagated forward through various layers of the model (such as convolutional layers, pooling layers, fully connected layers, etc.). A predicted output is typically generated in the last layer of the model.

[0154] 3) Calculate the loss: Use the cross-entropy loss function to calculate the error (loss) between the model's predicted output and the actual label.

[0155] 4) Backpropagation: Based on the calculated loss value, the gradient is calculated using a backpropagation algorithm (such as the chain rule). The gradient represents the contribution of each weight in the model to the loss value, that is, how much changing a certain weight can affect the loss value.

[0156] 5) Update weights: Use the Adam optimizer to update the model weights based on the calculated gradients.

[0157] 6) Evaluation and Validation: After each epoch, the model's performance can be evaluated using the validation set and the accuracy.

[0158] 7) Voting Integration: The three networks proceed sequentially according to steps 1)-6) above, voting on their accuracy to obtain the accuracy of the integrated model.

[0159] The label categories of the input data are {c1, c2, ..., c...} k In the prediction results of the three CNN networks for the predicted sample x, the category c with the largest number of occurrences is... i As the final classification category, i.e., H(x) = c i

[0160] 8) Iteration and Adjustment: Repeat the above steps (data loading, forward propagation, loss calculation, back propagation, weight update, evaluation and verification, voting ensemble) until the preset number of epochs is reached or other stopping conditions are met.

[0161] 17. Repeat steps 15 and 16 until the preset number of training sessions is reached.

[0162] 18. After training, save the parameters of the three models as a pth format file.

[0163] 19. For new image data, load the pth format file for classification prediction to obtain the raw water classification corresponding to the image data.

[0164] 20. Find the optimal dosage corresponding to the raw water category in the dosage mapping table.

[0165] 21. Input the optimal dosage into the input terminal of the dosing pump control system.

[0166] Based on the inventive concept of this invention, embodiments of this invention also provide a wastewater coagulant dosage optimization device based on coagulation characteristics classification, see [link to relevant documentation]. Figure 6 As shown, it includes a mapping relationship determination module 61, a prediction model establishment module 62, and a coagulant dosage optimization module 63.

[0167] The coagulant dosage optimization module 63 is used to input multi-frame images of the wastewater sample during the coagulation process into the coagulation characteristic category prediction model established by the prediction model establishment module 62. Based on the coagulation characteristic category prediction results output by the model and the mapping relationship between the coagulation characteristic category and the optimal coagulant dosage determined in advance by the mapping relationship determination module 61, the optimal coagulant dosage of the wastewater to be treated is determined.

[0168] The mapping relationship determination module 61 is used to predetermine the mapping relationship between coagulation characteristic category and optimal coagulation dosage based on the coagulation dosage and SS concentration after coagulation of multiple water samples obtained through coagulation cup tank test; wastewater with the same coagulation characteristic category has the same optimal coagulation dosage.

[0169] In some embodiments, the mapping relationship determination module 61, based on the coagulant dosage and SS concentration after coagulation of multiple water samples obtained through coagulation cup tank tests, determines the mapping relationship between coagulation characteristic categories and optimal coagulant dosage, for the purpose of:

[0170] Several groups of water samples were collected, and each group was divided into several subgroups. For each subgroup, the coagulant dosage and the suspended solids (SS) concentration after coagulation were obtained through coagulation cup tests. The coagulant dosage was different for each subgroup within the same group. For each group of water samples, the optimal coagulant dosage was determined using an arithmetic progression method based on the target concentration, the coagulant dosage for each subgroup, and the SS concentration after coagulation. Based on the optimal coagulant dosage, each group of water samples was classified into coagulation characteristic categories, and the optimal coagulant dosage corresponding to each coagulation characteristic category was determined, thus obtaining the mapping relationship between the coagulation characteristic category and the optimal coagulant dosage.

[0171] In some embodiments, the prediction model building module 62 is used to pre-build a coagulation characteristic category prediction model in the following manner: collect several water samples, and for each water sample, obtain multiple frames of images during the coagulation process through a coagulation cup test; take each frame of image and the coagulation characteristic category corresponding to the image as a sample to obtain a sample set; use the sample set to train a specified learning model to obtain a coagulation characteristic category prediction model.

[0172] In some embodiments, the prediction model building module 62, which trains a specified learning model using the sample set to obtain a prediction model for the coagulation property category, is used for:

[0173] The fusion learning model is trained using the sample set to obtain a coagulation characteristic category prediction model. The fusion learning model includes multiple deep learning network models and ensemble algorithms.

[0174] In some embodiments, the prediction model building module 62, which uses the sample set to train a fusion learning model to obtain a coagulation characteristic category prediction model, is used for:

[0175] Using the aforementioned sample set, a fusion learning model is trained through cross-sampling to obtain a prediction model for concrete property categories.

[0176] In some embodiments, the prediction model building module 62, which uses the sample set to train a fusion learning model through cross-sampling to obtain a concrete characteristic category prediction model, is used for:

[0177] The samples in the sample set are divided into different subsets according to different coagulation characteristics; training samples are extracted from each subset according to a set ratio to obtain a training set and a validation set; the number of rounds, batch size, and learning rate of model training are set, and each round of model training includes: for each deep learning network model, the training set is input into the model for forward propagation to obtain a prediction output, the update gradient is determined based on the loss value of the output, the model weights are updated based on the update gradient, and the model prediction performance is determined using the validation set; the process of extracting training samples from each subset according to a set ratio to obtain a training set and a validation set is repeated until a preset training termination condition is reached.

[0178] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0179] Based on the inventive concept of the present invention, embodiments of the present invention also provide a computer storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-mentioned wastewater coagulant dosage optimization method based on coagulation characteristic classification.

[0180] Based on the inventive concept of this invention, this embodiment of the invention also provides a server, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the above-mentioned method for optimizing the dosage of wastewater coagulant based on coagulation characteristics classification.

[0181] Unless otherwise specifically stated, terms such as processing, calculation, operation, determination, display, etc., may refer to the actions and / or processes of one or more processing or computing systems or similar devices that represent the manipulation and conversion of data representing physical (e.g., electronic) quantities within the registers or memory of the processing system into other data similarly representing physical quantities within the memory, registers, or other such information storage, transmission, or display devices of the processing system. Information and signals can be represented using any of a variety of different techniques and methods. For example, data, instructions, commands, information, signals, bits, symbols, and chips mentioned throughout the above description can be represented by voltage, current, electromagnetic waves, magnetic fields or particles, light fields or particles, or any combination thereof.

[0182] It should be understood that the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process may be rearranged without departing from the scope of this disclosure. The appended method claims provide elements of various steps in an exemplary order and are not intended to limit the scope to the specific order or hierarchy described.

[0183] In the detailed description above, various features are combined together in a single embodiment to simplify this disclosure. This approach to disclosure should not be construed as reflecting an intention that embodiments of the claimed subject matter require more features than those stated in each claim. Rather, as reflected in the appended claims, the invention is presented with fewer features than all of the features in a single disclosed embodiment. Therefore, the appended claims are hereby clearly incorporated into the detailed description, wherein each claim stands alone as a preferred embodiment of the invention.

[0184] Those skilled in the art will also understand that the various illustrative logic blocks, modules, circuits, and algorithm steps described in conjunction with the embodiments herein can be implemented as electronic hardware, computer software, or a combination thereof. To clearly illustrate the interchangeability between hardware and software, the various illustrative components, blocks, modules, circuits, and steps described above are generally described in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints imposed on the overall system. Those skilled in the art can implement the described functionality in alternative ways for each specific application; however, such implementation decisions should not be construed as departing from the scope of this disclosure.

[0185] The steps of the methods or algorithms described in conjunction with the embodiments herein can be directly embodied in hardware, software modules executed by a processor, or a combination thereof. The software modules can reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium well known in the art. An exemplary storage medium is connected to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. The ASIC can reside in a user terminal. Alternatively, the processor and storage medium can exist as discrete components in the user terminal.

[0186] For software implementation, the techniques described in this application can be implemented using modules (e.g., procedures, functions, etc.) that perform the functions described in this application. This software code can be stored in memory units and executed by a processor. The memory units can be implemented within the processor or outside the processor; in the latter case, they are communicatively coupled to the processor via various means, as is well known in the art.

[0187] The foregoing description includes examples of one or more embodiments. It is certainly impossible to describe all possible combinations of components or methods in order to describe the above embodiments, but those skilled in the art will recognize that further combinations and arrangements of the various embodiments are possible. Therefore, the embodiments described herein are intended to cover all such changes, modifications, and variations that fall within the scope of the appended claims. Furthermore, the term "comprising" as used in the specification or claims is interpreted in a manner similar to the term "including," as interpreted when used as a conjunction in the claims. Additionally, the use of any term "or" in the specification of the claims is intended to mean "non-exclusive or."

Claims

1. A method for optimizing wastewater coagulant dosage based on coagulation characteristics, characterized in that, include: The coagulation process of the wastewater sample is input into the coagulation characteristic category prediction model. Based on the coagulation characteristic category prediction results output by the model and the pre-determined mapping relationship between the coagulation characteristic category and the optimal amount of coagulant, the optimal amount of coagulant for the wastewater to be treated is determined. The mapping relationship between the coagulation characteristic category and the optimal dosage of coagulant is based on the pre-determined coagulant dosage and SS concentration after coagulation of multiple water samples obtained through coagulation cup tank tests; wastewater with the same coagulation characteristic category has the same optimal coagulant dosage.

2. The method as described in claim 1, characterized in that, Based on the coagulant dosage and post-coagulation SS concentration of multiple water samples obtained through coagulation cup tests, the mapping relationship between coagulation characteristic categories and optimal coagulant dosage was determined, including: Several groups of water samples were collected, and each group of water samples was divided into several parts. For each part of the water sample, the amount of coagulant and the concentration of SS after coagulation were obtained through coagulation cup tank test. The amount of coagulant was different for each part of the water sample in the same group. For each group of water samples, the optimal amount of coagulant for the water sample is determined by the arithmetic sequence method based on the target concentration, the amount of coagulant used for each water sample, and the SS concentration after coagulation. Based on the optimal dosage of coagulant, each group of water samples was classified into coagulation characteristic categories, and the optimal dosage of coagulant corresponding to each coagulation characteristic category was determined, thus obtaining the mapping relationship between the coagulation characteristic category and the optimal dosage of coagulant.

3. The method as described in claim 1, characterized in that, The prediction model for coagulation property categories is pre-established in the following manner: Several water samples were collected, and for each water sample, multiple frames of images of the coagulation process were obtained through coagulation cup experiments. Each frame of image and the corresponding coagulation characteristic category are treated as a sample to obtain a sample set; The specified learning model is trained using the sample set to obtain a prediction model for coagulation property categories.

4. The method as described in claim 3, characterized in that, The coagulation cup test includes a first stirring stage, a second stirring stage, and a settling stage, arranged in order of time. The stirring speed in the first stirring stage is greater than the stirring speed in the second stirring stage. The multi-frame images during the coagulation process include multi-frame images of the first stirring stage, multi-frame images of the second stirring stage, and multi-frame images of the settling stage.

5. The method as described in claim 3, characterized in that, The step of training a specified learning model using the sample set to obtain a prediction model for coagulation property categories includes: The fusion learning model is trained using the sample set to obtain a coagulation characteristic category prediction model. The fusion learning model includes multiple deep learning network models and ensemble algorithms.

6. The method as described in claim 5, characterized in that, The fusion learning model includes the AlexNet network model, the LeNet network model, and the VGG16 network model.

7. The method as described in claim 6, characterized in that, The AlexNet network model consists of 11 neural network layers, including 5 convolutional layers, 3 max pooling layers, and 3 fully connected layers. The LeNet network model consists of a 7-layer neural network, including 2 convolutional layers, 2 pooling layers, and 3 fully connected layers; The VGG16 network model includes 20 sub-layers, including two conv3-64 sub-layers in the first convolutional layer, two conv3-128 sub-layers in the second convolutional layer, three conv3-256 sub-layers in the third convolutional layer, three conv3-512 sub-layers in the fourth convolutional layer, three conv3-512 sub-layers in the fifth convolutional layer, two FC4096 sub-layers, one FC1024 sub-layer, and four max-pooling sub-layers.

8. The method as described in claim 5, characterized in that, The step of training a fusion learning model using the sample set to obtain a prediction model for coagulation property categories includes: Using the aforementioned sample set, a fusion learning model is trained through cross-sampling to obtain a prediction model for concrete property categories.

9. The method as described in claim 8, characterized in that, The step of training a fusion learning model using the sample set through cross-sampling to obtain a prediction model for coagulation property categories includes: The samples in the sample set are divided into different subsets according to their different coagulation characteristics. Training samples are extracted from each subset according to a set ratio to obtain a training set and a validation set. Set the number of rounds, batch size, and learning rate for model training. Each round of model training includes: for each deep learning network model, inputting the training set into the model for forward propagation to obtain a prediction output, determining the update gradient based on the loss value of the output, updating the model weights based on the update gradient, and determining the model prediction performance using the validation set. Return to the previous step and extract training samples from each subset according to the set ratio to obtain the training set and the validation set, until the preset training termination condition is reached.

10. The method as described in claim 9, characterized in that, The settings for the number of training epochs, batch size, and learning rate of the model include: The model training rounds are set to 20-50, the batch size to 32, and the learning rate to 0.0001.

11. A wastewater coagulant dosage optimization device based on coagulation characteristics classification, characterized in that, It includes a mapping relationship determination module, a prediction model establishment module, and a coagulant dosage optimization module; The mapping relationship determination module is used to predetermine the mapping relationship between coagulation characteristic category and optimal coagulation dosage based on the coagulation dosage and SS concentration after coagulation of multiple water samples obtained through coagulation cup tank tests; wastewater with the same coagulation characteristic category has the same optimal coagulation dosage. The coagulant dosage optimization module is used to input multiple frames of images of the wastewater sample during the coagulation process into the coagulation characteristic category prediction model established by the prediction model establishment module. Based on the coagulation characteristic category prediction results output by the model and the mapping relationship between the coagulation characteristic category and the optimal coagulant dosage determined by the mapping relationship determination module, the optimal coagulant dosage for the wastewater to be treated is determined.

12. A computer storage medium, characterized in that, The computer storage medium stores computer-executable instructions, which, when executed by a processor, implement the wastewater coagulant dosage optimization method based on coagulation characteristic classification as described in any one of claims 1 to 11.

13. A server, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the wastewater coagulant dosage optimization method based on coagulation characteristic classification as described in any one of claims 1 to 11.