Dosing control method and device, medium and electronic equipment in water treatment process
By using an underwater camera to capture floc images and water inlet parameters during the water treatment process to generate target text, and using neural networks to determine the dosage level, the problem of inaccurate dosage control is solved and a higher dosage is achieved. Control accuracy and data processing efficiency.
Patent Information
- Application Number
- CN202410743911.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-11
AI Technical Summary
Existing water treatment technology does not control the amount of chemical dosing accurately and cannot effectively deal with the problem of inaccurate chemical dosing caused by changes in incoming water quality.
By using an underwater camera to capture floc images in the flocculation tank, extract floc characteristics and generate text, combine the inlet water parameters (pH, temperature, turbidity, flow) to generate target text, and use neural networks to determine the target dosage level. Then control the dosage.
It improves the accuracy of dosing amount control, takes into account the comprehensive impact of floc images and water inlet parameters, improves data processing efficiency, and ensures the accuracy of the dosing process.
Smart Images

Figure CN118307108B_ABST
Abstract
Description
Background Art
[0002] Water treatment is the process of removing abnormal substances in water that are not necessary for production or life through physical, chemical, biological and other means. As an important link in the water treatment process, dosing plays a decisive role in the effect of water treatment.
[0003] At present, the dosage is controlled by manually analyzing the water intake, but this method has the problem of inaccurate dosage control.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The purpose of the present disclosure is to provide a dosing control method in a water treatment process, a dosing control device in a water treatment process, a computer-readable storage medium and an electronic device, thereby overcoming the problem of inaccurate dosing control in current water treatment at least to a certain extent.
[0006] According to a first aspect of the present disclosure, a method for controlling dosing in a water treatment process is provided, comprising: obtaining a floc image taken by an underwater camera in a flocculation tank, extracting floc features of the floc image, and generating a floc text containing the floc features; obtaining an inlet water parameter text, the inlet water parameter text comprising inlet water pH, inlet water temperature, inlet water turbidity and inlet water flow; splicing the floc text and the inlet water parameter text to generate a target text; determining a target dosing level corresponding to the target text; and controlling the dosing in the water treatment process according to the target dosing level.
[0007] Optionally, extracting floc features of the floc image and generating floc text containing the floc features includes: extracting the floc features of the floc image using a trained first neural network and converting the floc features into floc text; wherein the floc features include the shape, size and number per unit area of the flocs.
[0008] Optionally, the dosing control method also includes: acquiring a sample set, the sample set including a plurality of sample pairs, each sample pair including a floc sample image and a floc sample text corresponding to the floc sample image; extracting features of the floc sample image using a first neural network; extracting features of the floc sample text corresponding to the floc sample image using a bidirectional transformer; calculating the similarity between the features of the floc sample image and the features of the floc sample text, and executing a stochastic gradient descent algorithm based on the result of the similarity to update the parameters of the first neural network and the parameters of the bidirectional transformer; and determining the first neural network after parameter update using the sample set as the trained first neural network.
[0009] Optionally, obtaining the inlet water parameter text includes: obtaining the inlet water pH sent by the inlet water pH detection device; obtaining the inlet water temperature sent by the inlet water temperature detection device; obtaining the inlet water turbidity sent by the inlet water turbidity detection device; obtaining the inlet water flow sent by the inlet water flow detection device; sorting and splicing the inlet water pH, inlet water temperature, inlet water turbidity, and inlet water flow in a predetermined order to generate the inlet water parameter text.
[0010] Optionally, determining a target dosage level corresponding to a target text includes: inputting the target text into a trained second neural network to determine a target dosage level corresponding to the target text; wherein the second neural network includes an embedding layer, a feature extraction layer, and a fully connected layer; converting the target text into an initial feature matrix through the embedding layer; performing feature extraction on the initial feature matrix through the feature extraction layer to obtain an intermediate feature matrix; and mapping the intermediate feature matrix to the target dosage level through the fully connected layer.
[0011] Optionally, the target dosage level corresponds to a target dosage range; wherein, controlling the dosage in the water treatment process according to the target dosage level includes: determining the remaining dosage of the dosage station and the next dosage time; determining the time range when the dosage station is out of dosage according to the remaining dosage and the target dosage range; if the next dosage time is within the time range when the dosage station is out of dosage, then determining the target dosage corresponding to the time point of the next dosage time according to the time range when the dosage station is out of dosage, the next dosage time, and the target dosage range; and controlling the dosage equipment to add dosage according to the target dosage.
[0012] Optionally, obtaining a flocculation image taken by an underwater camera in the flocculation tank includes: sending a shooting instruction to the underwater camera in the flocculation tank at predetermined time intervals; obtaining a first candidate image set shot and fed back by the underwater camera in response to the shooting instruction; the shooting time interval between two consecutive images in the first candidate image set is greater than a time threshold; calculating the similarity between each candidate image in the first candidate image set, and eliminating one or more candidate images whose similarity is less than the similarity threshold from the first candidate image set to obtain a second candidate image set; determining the image quality of each candidate image in the second candidate image set; and selecting a candidate image with the best image quality from the second candidate image set as the flocculation image.
[0013] According to a second aspect of the present disclosure, a dosing control device in a water treatment process is provided, comprising: an image processing module, used to obtain a floc image taken by an underwater camera in a flocculation tank, extract floc features of the floc image, and generate a floc text containing the floc features; a parameter acquisition module, used to obtain an inlet water parameter text, the inlet water parameter text including inlet water pH, inlet water temperature, inlet water turbidity and inlet water flow; a text generation module, used to splice the floc text and the inlet water parameter text to generate a target text; a dosing level determination module, used to determine a target dosing level corresponding to the target text; and a dosing control module, used to control the dosing in the water treatment process according to the target dosing level.
[0014] Optionally, the image processing module is configured to perform: extracting floc features of the floc image using a trained first neural network, and converting the floc features into floc text; wherein the floc features include the shape, size and number per unit area of the flocs.
[0015] Optionally, the image processing module is further configured to perform: acquiring a sample set, the sample set comprising a plurality of sample pairs, each sample pair comprising a floc sample image and a floc sample text corresponding to the floc sample image; extracting features of the floc sample image using a first neural network; extracting features of the floc sample text corresponding to the floc sample image using a bidirectional transformer; calculating the similarity between the features of the floc sample image and the features of the floc sample text, and executing a stochastic gradient descent algorithm based on the result of the similarity to update the parameters of the first neural network and the parameters of the bidirectional transformer; and determining the first neural network after parameter update using the sample set as a trained first neural network.
[0016] Optionally, the parameter acquisition module is configured to execute: obtaining the inlet water pH sent by the inlet water pH detection device; obtaining the inlet water temperature sent by the inlet water temperature detection device; obtaining the inlet water turbidity sent by the inlet water turbidity detection device; obtaining the inlet water flow sent by the inlet water flow detection device; sorting and splicing the inlet water pH, inlet water temperature, inlet water turbidity, and inlet water flow in a predetermined order to generate an inlet water parameter text.
[0017] Optionally, the dosage level determination module is configured to perform: inputting the target text into a trained second neural network to determine a target dosage level corresponding to the target text; wherein the second neural network includes an embedding layer, a feature extraction layer and a fully connected layer; converting the target text into an initial feature matrix through the embedding layer; extracting features from the initial feature matrix through the feature extraction layer to obtain an intermediate feature matrix; and mapping the intermediate feature matrix to the target dosage level through the fully connected layer.
[0018] Optionally, the target dosage level corresponds to a target dosage range. In this case, the dosage control module is configured to perform: determining the remaining dosage of the dosage station and the next dosage time; determining the time range when the dosage station is out of dosage according to the remaining dosage and the target dosage range; if the next dosage time is within the time range when the dosage station is out of dosage, determining the target dosage corresponding to the time point of the next dosage time according to the time range when the dosage station is out of dosage, the next dosage time, and the target dosage range; and controlling the dosage device to add dosage according to the target dosage.
[0019] Optionally, the process of the image processing module acquiring the flocculation image taken by the underwater camera in the flocculation tank is configured to execute: sending a shooting instruction to the underwater camera in the flocculation tank at predetermined time intervals; acquiring a first candidate image set captured and fed back by the underwater camera in response to the shooting instruction; the shooting time interval between two consecutive images in the first candidate image set is greater than a time threshold; calculating the similarity between each candidate image in the first candidate image set, and eliminating one or more candidate images with a similarity less than a similarity threshold from the first candidate image set to obtain a second candidate image set; determining the image quality of each candidate image in the second candidate image set; and selecting a candidate image with the best image quality from the second candidate image set as the flocculation image.
[0020] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, any of the above-mentioned methods for controlling dosing in a water treatment process is implemented.
[0021] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; the processor is configured to implement any of the above-mentioned dosing control methods in a water treatment process by executing the executable instructions.
[0022] In the technical solutions provided in some embodiments of the present disclosure, on the one hand, the present disclosure controls the dosage of the drug by comprehensively analyzing the floc image, inlet water pH, inlet water temperature, inlet water turbidity and inlet water flow rate in the flocculation tank, comprehensively considering the influencing factors, thereby greatly improving the accuracy of the dosage control in the water treatment process; on the other hand, the present disclosure converts the floc image, inlet water pH, inlet water temperature, inlet water turbidity and inlet water flow rate into text form, and the unified form helps the computer to execute the data analysis process, thereby improving the data processing efficiency.
[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0025] Figure 1 The system architecture diagram of the drug addition control system according to the embodiment of the present disclosure is schematically shown.
[0026] Figure 2 A schematic diagram of a water treatment process according to an embodiment of the present disclosure is shown.
[0027] Figure 3 The flowchart schematically shows a method for controlling dosing in a water treatment process according to an exemplary embodiment of the present disclosure.
[0028] Figure 4 The schematic diagram shows the architecture of the second neural network of the embodiment of the present disclosure.
[0029] Figure 5 A block diagram of a drug dosing control device in a water treatment process according to an exemplary embodiment of the present disclosure is schematically shown.
[0030] Figure 6 A block diagram of an electronic device according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0031] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0032] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0033] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation. In addition, all the terms "first" and "second" below are only for the purpose of distinction and should not be used as limitations of the present disclosure.
[0034] In some technologies, the dosing control in the water treatment process only considers the relationship between the dosage and the influent volume, such as adding 15 grams of PAC (Poly Aluminum Chloride) per cubic meter of influent water. However, when the quality of the influent water changes, this dosing method will be inaccurate.
[0035] In order to at least solve the problem of inaccurate dosing control, the present disclosure provides a new dosing control solution in a water treatment process.
[0036] Figure 1 The system architecture diagram of the dosing control system according to the embodiment of the present disclosure is schematically shown. Figure 1 The dosing control system of the embodiment of the present disclosure may include a server 10, an inlet water pH (acidity and alkalinity) detection device 11, an inlet water temperature detection device 12, an inlet water turbidity detection device 13, an inlet water flow detection device 14, an underwater camera 15 and a dosing device 16.
[0037] The server 10 can be connected to the inlet water pH detection device 11, the inlet water temperature detection device 12, the inlet water turbidity detection device 13, the inlet water flow detection device 14, the underwater camera 15 and the dosing device 16 in a wired or wireless manner to transmit data or instructions.
[0038] In implementing the dosing control scheme of the embodiment of the present disclosure, first, on the one hand, the server 10 can obtain the inlet pH from the inlet pH detection device 11, the inlet temperature from the inlet temperature detection device 12, the inlet turbidity from the inlet turbidity detection device 13, and the inlet flow from the inlet flow detection device 14. It can be understood that the inlet pH, inlet temperature, inlet turbidity and inlet flow mentioned in the embodiment of the present disclosure all contain specific numerical values, that is, the server 10 obtains the inlet pH value, inlet temperature value, inlet turbidity value and inlet flow value. The server 10 can also sort and splice these data to generate an inlet parameter text. On the other hand, the server 10 obtains a flocculent image from the underwater camera 15, extracts the flocculent features of the flocculent image, and generates a flocculent text containing the flocculent features.
[0039] Next, the server 10 may splice the floc text and the water inlet parameter text to generate a target text, and determine a target dosage level corresponding to the target text.
[0040] Then, the server 10 may send a dosing control instruction to the dosing device 16 according to the target dosing amount level, so as to control the amount of medicine added by the dosing device 16 .
[0041] In order to more clearly illustrate the configuration position of the above equipment and the water treatment process described in the present disclosure, the following is combined with Figure 2 Provide explanation.
[0042] refer to Figure 2 The water treatment system targeted by the embodiment of the present disclosure may include a raw water tank 21, a flocculation tank 22, a sedimentation tank 23, a V-type filter tank 24 and a clean water tank 25. It can be understood that the raw water tank 21 corresponds to the influent, and the clean water tank 25 corresponds to the effluent.
[0043] The above-mentioned inlet water pH detection device 11, inlet water temperature detection device 12, inlet water turbidity detection device 13, and inlet water flow detection device 14 can be configured between the raw water tank 21 and the flocculation tank 22 to detect various inlet water parameters. The underwater camera 15 can be configured in the flocculation tank 22 to capture flocculent images. The dosing device 16 can also be configured between the raw water tank 21 and the flocculation tank 22. The present disclosure does not limit the specific location points and configuration methods of the inlet water pH detection device 11, the inlet water temperature detection device 12, the inlet water turbidity detection device 13, the inlet water flow detection device 14, the underwater camera 15, and the dosing device 16.
[0044] The following is a description of the dosing control method in the water treatment process according to the embodiment of the present disclosure.
[0045] Figure 3 The flowchart of the dosing control method in the water treatment process according to the exemplary embodiment of the present disclosure is schematically shown. Figure 3 , the dosing control method may include the following steps:
[0046] S30. Obtaining a floc image captured by an underwater camera in the flocculation tank, extracting floc features from the floc image, and generating a floc text containing the floc features.
[0047] In an exemplary embodiment of the present disclosure, an underwater camera is configured in the flocculation tank, for example, the underwater camera is installed on the inner wall of the flocculation tank. The underwater camera can take a flocculation image of water in the flocculation tank and send the flocculation image to a server.
[0048] According to some embodiments of the present disclosure, the underwater camera can automatically take pictures of the flocculent body and send them to the server, such as taking pictures at a fixed time or in response to the shooting control operation of the operator.
[0049] According to other embodiments of the present disclosure, first, the server may send a shooting instruction to the underwater camera in the flocculation tank every predetermined time period, wherein the predetermined time period may be 12 hours, 24 hours, 48 hours, etc., and the present disclosure does not limit the specific value of the predetermined time period.
[0050] Next, the server can obtain the first candidate image set captured and fed back by the underwater camera in response to the shooting instruction. It should be noted that the shooting time interval between two consecutive images in the first candidate image set is greater than the time threshold, thereby avoiding the problem of excessive similarity between consecutive images with a short time interval causing waste of resources in network transmission and subsequent analysis and calculation. Among them, the time threshold can be obtained based on experiments, and the present disclosure does not limit its specific value. In addition, the present disclosure does not limit the number of candidate images contained in the first candidate image set.
[0051] Subsequently, the server can calculate the similarity between each candidate image in the first candidate image set, and remove one or more candidate images whose similarity is less than the similarity threshold from the first candidate image set to obtain a second candidate image set. Due to the drastic fluctuations of the external environment or the water body, it may happen that individual candidate images are too different from other images. These images with too large differences cannot correctly reflect the actual floc state of the flocculation tank. Therefore, before specific analysis, these abnormal candidate images need to be removed. In addition, the present disclosure does not limit the number of candidate images included in the second candidate image set.
[0052] Then, the server can determine the image quality of each candidate image in the second candidate image set. The image quality evaluation index adopted by the present disclosure includes one or more of clarity, contrast, signal-to-noise ratio, and color. The present disclosure does not limit the process of determining the image quality. In addition, it should be noted that the image quality can be reflected by a quality score.
[0053] Finally, the server may select the candidate image with the best image quality from the second candidate image set as the flocculent image. In other words, the candidate image with the highest quality score is selected from the second candidate image set as the flocculent image for further processing by the server.
[0054] After acquiring the floc image, the server may extract floc features of the floc image and generate floc text containing the floc features. The floc features mentioned in the present disclosure include but are not limited to the shape, size and number per unit area of the flocs.
[0055] According to some embodiments of the present disclosure, the server can directly use feature extraction operators to extract floc features of floc images. Specifically, edge detection operators such as Sobel, Prewitt, Roberts, and Canny can be used to extract the edges of floc images, and the overall features of the floc images can be estimated to a certain extent from the edge information.
[0056] In addition, the floc features of the floc image can be extracted based on the histogram of oriented gradients (HOG).
[0057] According to some other embodiments of the present disclosure, the server may extract floc features of the floc image by using the trained first neural network, and convert the floc features into floc text.
[0058] The first neural network may be a convolutional neural network. The training process of the first neural network is described below.
[0059] First, the server may obtain a sample set, the sample set including a plurality of sample pairs, each sample pair including a floc sample image and a floc sample text corresponding to the floc sample image, wherein the floc sample text may be manually given.
[0060] Next, on the one hand, the server may use the first neural network to extract features of the floc sample image. On the other hand, the server may use a bidirectional transformer (BERT) to extract features of the floc sample text corresponding to the floc sample image.
[0061] Subsequently, the server may calculate the similarity between the features of the floc sample image and the features of the floc sample text, and execute a stochastic gradient descent algorithm based on the similarity result to update the parameters of the first neural network and the parameters of the bidirectional transformer.
[0062] By continuously using the sample set to update the parameters, the first neural network after the parameter update is determined as the above-mentioned trained first neural network.
[0063] It can be understood that in the example of obtaining the floc text by using a model processing method, the model may be a picture-generated text model.
[0064] S32. Obtaining an inlet water parameter text, where the inlet water parameter text includes inlet water pH, inlet water temperature, inlet water turbidity, and inlet water flow rate.
[0065] In an exemplary embodiment of the present disclosure, the inlet water parameter text may be a text obtained by sorting and concatenating the inlet water pH, inlet water temperature, inlet water turbidity, and inlet water flow rate in a predetermined order.
[0066] Specifically, the server can obtain the inlet water pH sent by the inlet water pH detection device, obtain the inlet water temperature sent by the inlet water temperature detection device, obtain the inlet water turbidity sent by the inlet water turbidity detection device, and obtain the inlet water flow sent by the inlet water flow detection device. Next, the server can sort and splice the inlet water pH, inlet water temperature, inlet water turbidity, and inlet water flow in a predetermined order to generate the inlet water parameter text mentioned in the embodiment of this disclosure. Among them, the above-mentioned detection devices can also be called detection meters, detection instruments, detection devices, etc.
[0067] The above predetermined order can be any combination of the above parameters, and the specific order disclosed herein is not limited. However, once the order is configured, the order is fixed. It should be understood that the order is specified to facilitate subsequent processing so that the computer can quickly identify the meaning of the text.
[0068] S34. Concatenate the floc text and the inlet parameter text to generate the target text.
[0069] In an exemplary embodiment of the present disclosure, splicing refers to a process of connecting the beginning and the end of a text to generate one text from two texts.
[0070] After the server determines the floc text and the water inlet parameter text respectively, the two can be spliced to generate the target text. The present disclosure does not limit the order of splicing the two, but for some embodiments of the present disclosure, as described above, similarly, once the order is configured, the order is fixed, which helps the computer to quickly recognize the meaning of the text later.
[0071] S36. Determine a target dosage level corresponding to the target text.
[0072] In an exemplary embodiment of the present disclosure, the dosage level can be expressed as, for example, level one, level two, level three, level four, level five, etc., corresponding to the dosage from high to low. In addition, the dosage level can also be expressed by numbers (such as 1, 2, 3, 4, 5, etc.) or letters (such as a, b, c, d, e, etc.), and whether the dosage is from high to low or from low to high can be pre-configured, and the present disclosure does not limit this.
[0073] The present disclosure refers to the dosage level corresponding to the target text as the target dosage level.
[0074] According to some embodiments of the present disclosure, the server may display the target text on an interface, and manually determine the dosage level corresponding to the target text. For example, the server may display the target text on a display screen, and the engineer may determine the dosage level based on experience after seeing the target text. The server responds to the engineer's confirmation operation to determine the target dosage level corresponding to the target text.
[0075] According to other embodiments of the present disclosure, the server may use a classification model to determine a target dosage level corresponding to the target text. Specifically, the server may input the target text into a trained second neural network, the output of the second neural network is the probability of each dosage level, and the dosage level with the highest probability is selected as the target dosage level. The embodiments of the present disclosure do not limit the training process of the second neural network.
[0076] refer to Figure 4 , the second neural network 40 may include an embedding layer 401, a feature extraction layer 402 and a fully connected layer 403.
[0077] First, the target text may be converted into an initial feature vector through the embedding layer 401. For example, the target text contains n words, each word can be represented as an m-dimensional vector, and the initial feature vector is an n×m initial feature vector.
[0078] Next, the initial feature matrix may be subjected to feature extraction by the feature extraction layer 402 to obtain an intermediate feature matrix. Specifically, the feature extraction layer 402 may include a plurality of convolution units, each of which may include a convolution layer and a pooling layer. Through continuous downsampling processing, important features of the target text are extracted, that is, an intermediate feature matrix is generated.
[0079] Subsequently, the intermediate feature matrix can be mapped to the target dosage level through the fully connected layer 403. The dropout function can be first processed to reduce overfitting, and then processed through the softmax activation function to obtain the probability of each dosage level, and the dosage level with the largest probability is selected as the target dosage level.
[0080] S38. Control the dosage of chemicals in the water treatment process according to the target dosage level.
[0081] According to some embodiments of the present disclosure, the dosage level corresponds to the device opening of the dosing device. The device opening refers to the opening of the dosing device. It can be understood that the larger the device opening configuration, the larger the dosing amount, and the smaller the device opening configuration, the smaller the dosing amount. In other words, each dosage level corresponds to a clear dosage value. In this case, the server can send a control instruction containing the target dosage level to the dosing device, and the dosing device responds to the control instruction to determine the dosage to be adjusted, and controls the device opening based on the dosage to achieve the adjustment of the dosage.
[0082] According to other embodiments of the present disclosure, the dosage level corresponds to the dosage range one by one, that is, each dosage level corresponds to a clear dosage range.
[0083] In this case, the server can determine the target dosage range corresponding to the target dosage level, select a target dosage from the target dosage range, and send a control instruction containing the target dosage to the dosing device so that the dosing device performs dosing control based on the target dosage.
[0084] Specifically, the server may randomly select an amount of medicine from the target amount of medicine range as the target amount of medicine; or select an intermediate value, a maximum value, or a minimum value in the target amount of medicine range as the target amount of medicine; or display the target amount of medicine range on an interface, and then respond to the engineer's selection operation to determine the target amount of medicine. The present disclosure does not limit this.
[0085] In addition, the present disclosure also provides a solution for automatically determining a target dosage in combination with the dosage of a dosage station, wherein the dosage station is used to store drugs.
[0086] First, the server can determine the remaining amount of medicine at the dosing station and the next time the medicine arrives. The remaining amount of medicine at the dosing station refers to the amount of medicine that can be added at the moment, and the next time the medicine arrives refers to the time from now when the next medicine will be delivered to the dosing station.
[0087] Next, the server can determine the time range when the dosing station is out of medicine based on the remaining amount of medicine in the dosing station and the target dosing amount range. It can be understood that the time when the dosing station is out of medicine refers to the time when the medicine in the dosing station is just finished. In view of the fact that the dosing is carried out according to the target dosing amount range, when the target dosing amount is a numerical range, the corresponding time when the dosing station is out of medicine is also a time range.
[0088] Subsequently, if the server determines that the next medication delivery time is within the time range when the medication station is out of medication, the server determines the target medication dosage corresponding to the time point of the next medication delivery time according to the time range when the medication station is out of medication, the next medication delivery time, and the target medication dosage range. Specifically, when the two ranges of time and dosage are known, the target medication dosage corresponding to the next medication delivery time can be determined by using the proportional relationship.
[0089] Then, the server can control the dosing equipment to add medicine according to the target dosage.
[0090] If there is a lot of remaining medicine at the dosing station and the next medicine will come quickly, resulting in the dosing station not running out of medicine, the server can determine the target dosing amount from the target dosing amount range according to one of the above selection strategies, and control the dosing equipment to add medicine according to the target dosing amount.
[0091] If the dosing station is out of medicine even if the dosing control is performed according to the minimum value within the target dosing amount range, the server can issue an alarm, and the engineer can manually enter the target dosing amount or advance the next time to deliver medicine. The alarm method includes but is not limited to SMS, email, audio, light, etc., and this disclosure does not limit this.
[0092] In addition, some embodiments of the present disclosure also provide a solution for predicting the trend of drug dosage based on the above-mentioned drug dosage control method.
[0093] Specifically, the server can obtain multiple target dosage levels determined within a period of time from the current time, perform regression processing on the multiple target dosage levels to predict the dosage trend in the next period of time, and feedback the trend to the drug purchasing personnel and water treatment process control personnel, so as to further analyze the causes of the trend and prepare in advance.
[0094] It should be noted that the drugs added in the exemplary drug addition control scheme of the present disclosure include but are not limited to PCA, PAM (Polyacrylamide, polyacrylamide), etc. The above drug addition control method can be applied to the mixture of one or more of these drugs to achieve drug dosage control.
[0095] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0096] Furthermore, this exemplary embodiment also provides a device for controlling the dosing of chemicals in a water treatment process.
[0097] Figure 5 The block diagram of the dosing control device in the water treatment process according to the exemplary embodiment of the present disclosure is schematically shown. Figure 5 The dosing control device 5 in the water treatment process according to an exemplary embodiment of the present disclosure may include an image processing module 51 , a parameter acquisition module 53 , a text generation module 55 , a dosing level determination module 57 and a dosing control module 59 .
[0098] Specifically, the image processing module 51 can be used to obtain the floc image taken by the underwater camera in the flocculation tank, extract the floc features of the floc image, and generate a floc text containing the floc features; the parameter acquisition module 53 can be used to obtain the inlet parameter text, which includes the inlet pH, inlet temperature, inlet turbidity and inlet flow rate; the text generation module 55 can be used to splice the floc text and the inlet parameter text to generate a target text; the dosage level determination module 57 can be used to determine the target dosage level corresponding to the target text; the dosage control module 59 can be used to control the dosage in the water treatment process according to the target dosage level.
[0099] According to an exemplary embodiment of the present disclosure, the image processing module 51 may be configured to perform: extracting floc features of the floc image using a trained first neural network, and converting the floc features into floc text; wherein the floc features include the morphology, size and number per unit area of the flocs.
[0100] According to an exemplary embodiment of the present disclosure, the image processing module 51 can also be configured to perform: acquiring a sample set, the sample set including a plurality of sample pairs, each sample pair including a floc sample image and a floc sample text corresponding to the floc sample image; extracting features of the floc sample image using a first neural network; extracting features of the floc sample text corresponding to the floc sample image using a bidirectional transformer; calculating the similarity between the features of the floc sample image and the features of the floc sample text, and executing a stochastic gradient descent algorithm based on the result of the similarity to update the parameters of the first neural network and the parameters of the bidirectional transformer; and determining the first neural network after the parameter update using the sample set as the trained first neural network.
[0101] According to an exemplary embodiment of the present disclosure, the parameter acquisition module 53 can be configured to perform: obtaining the inlet water pH sent by the inlet water pH detection device; obtaining the inlet water temperature sent by the inlet water temperature detection device; obtaining the inlet water turbidity sent by the inlet water turbidity detection device; obtaining the inlet water flow sent by the inlet water flow detection device; sorting and splicing the inlet water pH, inlet water temperature, inlet water turbidity, and inlet water flow in a predetermined order to generate an inlet water parameter text.
[0102] According to an exemplary embodiment of the present disclosure, the dosage level determination module 57 can be configured to perform: inputting the target text into a trained second neural network to determine the target dosage level corresponding to the target text; wherein the second neural network includes an embedding layer, a feature extraction layer and a fully connected layer; converting the target text into an initial feature matrix through the embedding layer; performing feature extraction on the initial feature matrix through the feature extraction layer to obtain an intermediate feature matrix; and mapping the intermediate feature matrix to the target dosage level through the fully connected layer.
[0103] According to an exemplary embodiment of the present disclosure, the target dosage level corresponds to the target dosage range. In this case, the dosage control module 59 can be configured to perform: determining the remaining dosage of the dosage station and the next drug delivery time; determining the time range of no drug at the dosage station according to the remaining dosage and the target dosage range; if the next drug delivery time is within the time range of no drug at the dosage station, determining the target dosage corresponding to the time point of the next drug delivery time according to the time range of no drug at the dosage station, the next drug delivery time, and the target dosage range; and controlling the dosage device to add drugs according to the target dosage.
[0104] According to an exemplary embodiment of the present disclosure, the process of the image processing module 51 acquiring the flocculation image taken by the underwater camera in the flocculation tank can be configured to execute: sending a shooting instruction to the underwater camera in the flocculation tank at predetermined time intervals; acquiring a first candidate image set shot and fed back by the underwater camera in response to the shooting instruction; the shooting time interval between two consecutive images in the first candidate image set is greater than a time threshold; calculating the similarity between each candidate image in the first candidate image set, and eliminating one or more candidate images whose similarity is less than the similarity threshold from the first candidate image set to obtain a second candidate image set; determining the image quality of each candidate image in the second candidate image set; and selecting the candidate image with the best image quality from the second candidate image set as the flocculation image.
[0105] Since the functional modules of the dosing control device in the water treatment process of the embodiment of the present disclosure are the same as those in the above method embodiment, they will not be described in detail here.
[0106] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.
[0107] The program product for implementing the above method according to the embodiment of the present disclosure can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto, and in this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0108] The program product may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical disk, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0109] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0110] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0111] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0112] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0113] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0114] Refer to the following Figure 6 The electronic device 600 according to this embodiment of the present disclosure is described below. The server described above may be configured in the form of the electronic device 600. Figure 6 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0115] like Figure 6 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include but are not limited to: the at least one processing unit 610, the at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), and a display unit 640.
[0116] The storage unit stores a program code, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of this specification. For example, the processing unit 610 can perform various steps of the dosing control method in the water treatment process of the embodiment of the present disclosure.
[0117] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .
[0118] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0119] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0120] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), one or more devices that enable a user to interact with the electronic device 600, and / or any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 660. Figure 6 As shown, the network adapter 660 communicates with other modules of the electronic device 600 via the bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0121] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes a number of instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0122] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0123] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0124] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing what is disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and embodiments are to be considered merely as exemplary, and the true scope and spirit of the present disclosure are indicated by the claims.
[0125] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for controlling dosing in a water treatment process, characterized in that: include: Acquire a floc image taken by an underwater camera in a flocculation tank, extract floc features of the floc image using a trained first neural network, and convert the floc features into floc text; wherein the floc features include the shape, size, and number per unit area of the flocs; Obtaining an inlet water parameter text, wherein the inlet water parameter text includes an inlet water pH, an inlet water temperature, an inlet water turbidity, and an inlet water flow rate; splicing the floc text and the water inlet parameter text to generate a target text; Inputting the target text into a trained second neural network to determine a target dosage level corresponding to the target text; wherein the second neural network includes an embedding layer, a feature extraction layer, and a fully connected layer; converting the target text into an initial feature matrix through the embedding layer; extracting features from the initial feature matrix through the feature extraction layer to obtain an intermediate feature matrix; and mapping the intermediate feature matrix to the target dosage level through the fully connected layer; Controlling the dosage of the drug in the water treatment process according to the target dosage level; The dosing control method also includes: Acquire a sample set, the sample set comprising a plurality of sample pairs, each of the sample pairs comprising a floc sample image and a floc sample text corresponding to the floc sample image; extracting features of the floc sample image using the first neural network; Extracting features of floc sample text corresponding to the floc sample image using a bidirectional transformer; Calculating the similarity between the features of the floc sample image and the features of the floc sample text, and executing a stochastic gradient descent algorithm based on the similarity result to update the parameters of the first neural network and the parameters of the bidirectional transformer; Determine the first neural network after parameter update using the sample set as the trained first neural network; The dosing control method also includes: Obtain multiple target dosage levels determined within a period of time from the current time, perform regression processing on the multiple target dosage levels to predict the dosage trend within a period of time thereafter, and feed back the trend to the drug purchasing personnel and the water treatment process control personnel.
2. The dosing control method according to claim 1, characterized in that: The text for obtaining water inlet parameters includes: Obtaining the inlet water pH sent by the inlet water pH detection device; Obtaining the inlet water temperature sent by the inlet water temperature detection device; Obtaining the inlet water turbidity sent by the inlet water turbidity detection device; Obtaining the water inlet flow rate sent by the water inlet flow rate detection device; The inlet water pH, the inlet water temperature, the inlet water turbidity, and the inlet water flow rate are sorted and concatenated in a predetermined order to generate the inlet water parameter text.
3. The dosing control method according to claim 1, characterized in that: The target dosage level corresponds to a target dosage range; wherein controlling the dosage in the water treatment process according to the target dosage level includes: Determine the remaining amount of medicine at the dosing station and the next time the medicine will arrive; Determine the time range when the dosing station is out of medicine according to the remaining medicine amount and the target dosing amount range; If the next medication delivery time is within the time range when the medication station is out of medication, then determine the target medication dosage corresponding to the time point of the next medication delivery time according to the time range when the medication station is out of medication, the next medication delivery time, and the target medication dosage range; The dosing device is controlled to add the drug according to the target dosage.
4. The dosing control method according to claim 1, characterized in that: The floc images captured by the underwater camera in the flocculation tank include: Sending shooting instructions to the underwater camera in the flocculation tank at predetermined time intervals; Acquire a first candidate image set captured and fed back by the underwater camera in response to the shooting instruction; the shooting time interval between two consecutively captured images in the first candidate image set is greater than a time threshold; Calculating the similarity between the candidate images in the first candidate image set, and removing one or more candidate images whose similarity is less than a similarity threshold from the first candidate image set to obtain a second candidate image set; determining an image quality of each candidate image in the second candidate image set; A candidate image with the best image quality is selected from the second candidate image set as the flocculation image.
5. A dosing control device in a water treatment process, characterized in that: include: An image processing module is used to obtain a floc image taken by an underwater camera in a flocculation tank, extract floc features of the floc image using a trained first neural network, and convert the floc features into floc text; wherein the floc features include the shape, size, and number per unit area of the flocs; A parameter acquisition module is used to acquire an inlet water parameter text, wherein the inlet water parameter text includes inlet water pH, inlet water temperature, inlet water turbidity and inlet water flow rate; A text generation module, used for splicing the floc text and the water inlet parameter text to generate a target text; A dosage level determination module is used to input the target text into a trained second neural network to determine a target dosage level corresponding to the target text; wherein the second neural network includes an embedding layer, a feature extraction layer and a fully connected layer; the target text is converted into an initial feature matrix through the embedding layer; the initial feature matrix is subjected to feature extraction through the feature extraction layer to obtain an intermediate feature matrix; the intermediate feature matrix is mapped to the target dosage level through the fully connected layer; A dosage control module, used to control the dosage in the water treatment process according to the target dosage level; The image processing module is also used to obtain a sample set, the sample set includes a plurality of sample pairs, each of the sample pairs includes a floc sample image and a floc sample text corresponding to the floc sample image; extract features of the floc sample image using the first neural network; extract features of the floc sample text corresponding to the floc sample image using a bidirectional transformer; calculate the similarity between the features of the floc sample image and the features of the floc sample text, and perform a stochastic gradient descent algorithm based on the result of the similarity to update the parameters of the first neural network and the parameters of the bidirectional transformer; determine the first neural network after the parameter update using the sample set as the trained first neural network; The dosing control device is also used to obtain multiple target dosing levels determined within a period of time from the current time, perform regression processing on the multiple target dosing levels to predict the trend of the dosing within a period of time thereafter, and feed back the trend to the drug purchasing personnel and the water treatment process control personnel.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for controlling the dosing of chemicals in a water treatment process according to any one of claims 1 to 4 is implemented.
7. An electronic device, characterized in that: include: processor; as well as, A memory, configured to store executable instructions of the processor; The processor is configured to implement the drug addition control method in the water treatment process according to any one of claims 1 to 4 by executing the executable instructions.
