Sewage treatment method, system and readable storage medium
Through image processing and model prediction technology, the dosing plan for sewage treatment is adjusted in real time, solving the problems of long treatment time and unstable turbidity caused by manual judgment, and achieving fast, stable sewage treatment effects and cost reduction.
Patent Information
- Application Number
- CN202211527952.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-01
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2042-12-01
AI Technical Summary
In the existing sewage treatment system, the dosing method based on manual visual judgment and experience-based decision-making results in long sewage treatment time, untimely feedback and unstable dosing amount, leading to long water discharge time and poor turbidity.
Image processing technology is used to obtain sewage surface images, and a dosing plan is constructed using water turbidity and type prediction models. The dosing plan is adjusted in real time through inlet flow rate correction until the preset turbidity threshold is reached.
Rapid feedback and adaptive adjustment are achieved, the stability and efficiency of the dosing plan are improved, and the waste of drugs and processing costs are reduced.
Smart Images

Figure CN115849530B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of sewage treatment, and in particular relates to a sewage treatment method, system and readable storage medium. Background Art
[0002] In the process of sewage treatment, the dosing link plays a vital role and directly determines the effect and cost of sewage treatment.
[0003] At present, in the sewage treatment systems used in metallurgy, chemical industry, electric power and environmental engineering, manual treatment of quantitative sewage in the sewage pool by adding chemicals is generally adopted through visual judgment and experience-based decision-making. This process will lead to the shortcomings of long sewage treatment time, untimely feedback and unstable dosage of chemicals, resulting in long water discharge time and poor turbidity of the water discharge. Summary of the Invention
[0004] The present invention provides a sewage treatment method, system and readable storage medium, which are used to solve the technical problems of long sewage treatment time, untimely feedback and unstable dosage caused by manual visual judgment and experience-based decision-making to treat a certain amount of sewage in a sewage pool by adding chemicals.
[0005] In a first aspect, the present invention provides a sewage treatment method, comprising: obtaining a first sewage surface image of a sewage pool to be treated at a current moment; inputting the sewage surface image into a preset water turbidity prediction model and a preset type prediction model to obtain a first predicted turbidity of the sewage pool to be treated at a current moment and a first sewage type of the sewage pool to be treated at a current moment respectively; judging whether the first predicted turbidity is greater than a first preset threshold; if the first predicted turbidity is greater than the preset threshold, constructing a first dosing scheme based on the first predicted turbidity and the first sewage type, wherein the first dosing scheme includes a dosing type, a dosing amount and a dosing interval; obtaining a water inlet flow rate of the sewage pool to be treated at a current moment, revising the first dosing scheme based on the water inlet flow rate, and treating the sewage in the sewage pool to be treated according to the revised first dosing scheme to obtain a second predicted turbidity of the sewage pool to be treated at a certain moment; judging the Whether the second predicted turbidity is less than the first predicted turbidity and whether the turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than a second preset threshold, wherein the turbidity change rate is the ratio of the change in the predicted turbidity within the time interval T to the time interval T; if the second predicted turbidity is less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is not greater than the second preset threshold, then reacquire a second sewage surface image at a certain moment in the sewage pool to be treated, and analyze the second sewage surface image according to a preset type prediction model to obtain the second sewage type at a certain moment in the sewage pool to be treated; update the first dosing plan according to the second sewage type to obtain a second dosing plan, and treat the sewage in the sewage pool to be treated according to the second dosing plan until the predicted turbidity of the sewage pool to be treated at the cutoff time is no greater than the first preset threshold.
[0006] Furthermore, the updating of the first dosing scheme according to the second sewage type to obtain a second dosing scheme includes: taking the intersection of the second sewage type and the first sewage type to obtain a first target sewage type, wherein the first target sewage type only includes sewage types that are common to the second sewage type and the first sewage type; retaining only the dosing types and dosing amounts associated with the target sewage type in the first dosing scheme to obtain a second dosing scheme.
[0007] Furthermore, the treating of the sewage in the sewage pool to be treated according to the second dosing scheme until the predicted turbidity of the sewage pool to be treated at the cutoff time is no greater than the first preset threshold value includes: after the sewage in the sewage pool to be treated is treated by the second dosing scheme, judging whether the water inlet flow rate of the sewage pool to be treated at a moment is zero; if it is zero, reacquiring a third sewage surface image of the sewage pool to be treated at a moment, and analyzing the third sewage surface image according to a preset type prediction model to obtain the third sewage type of the sewage pool to be treated at a moment; taking the union of the third sewage type and the second sewage type to obtain a second target sewage type, wherein the second target sewage type includes the third sewage type and all sewage types in the second sewage type; adding the dosing type and dosing amount associated with the second target sewage type to the second dosing scheme to obtain a third dosing scheme, and treating the sewage in the sewage pool to be treated according to the third dosing scheme.
[0008] Furthermore, the obtaining of the first sewage surface image of the sewage in the sewage pool to be treated at the current moment includes: obtaining the first sewage image of the sewage in the sewage pool to be treated at the current moment; grayscale processing the first sewage image based on a weighted grayscale method to obtain the first sewage surface image.
[0009] Furthermore, the sewage surface image is input into a preset water turbidity prediction model to obtain the first predicted turbidity of the sewage pool to be treated at the current moment, specifically including: obtaining the training parameters of the sewage treatment pool over a period of time, and constructing a model training set based on the training parameters, wherein the training parameters include image parameters, water quality parameters, dosing scheme, and water turbidity; using the model training set to train the XGBoost model to obtain a water turbidity prediction model; inputting the sewage surface image into the water turbidity prediction model to obtain the first predicted turbidity of the sewage pool to be treated at the current moment.
[0010] Furthermore, the sewage surface image is input into a preset type prediction model to obtain the first sewage type of the sewage pool to be treated at the current moment, specifically including: performing sewage feature recognition on the sewage surface image to obtain a feature recognition result of the sewage image; performing feature clustering based on the feature recognition result of the sewage image to obtain at least one feature clustering cluster, and calling the parameter range corresponding to the at least one feature clustering cluster to calculate the parameter average within each feature clustering cluster; sending each of the parameter averages to the constructed type prediction model for classification processing to obtain the first sewage type of the sewage pool to be treated at the current moment.
[0011] Furthermore, after determining whether the second predicted turbidity is less than the first predicted turbidity and whether the turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than a second preset threshold, the method also includes: if the second predicted turbidity is not less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is not greater than the second preset threshold, then reacquiring a second sewage surface image of the sewage pool to be treated at a certain moment, and analyzing the second sewage surface image according to a preset type prediction model to obtain the second sewage type of the sewage pool to be treated at a certain moment; if the second predicted turbidity is less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than the second preset threshold, then continuing to treat the sewage in the sewage pool to be treated according to the revised first dosing plan.
[0012] In a second aspect, the present invention provides a sewage treatment system, comprising: an acquisition module configured to acquire a first sewage surface image at a current moment in a sewage pool to be treated; an output module configured to input the sewage surface image into a preset water turbidity prediction model and a preset type prediction model, and respectively obtain a first predicted turbidity of the sewage pool to be treated at a current moment and a first sewage type of the sewage pool to be treated at a current moment; a first judgment module configured to judge whether the first predicted turbidity is greater than a first preset threshold; a construction module configured to construct a first dosing scheme based on the first predicted turbidity and the first sewage type if the first predicted turbidity is greater than the preset threshold, wherein the first dosing scheme includes a dosing type, a dosing amount, and a dosing interval; a correction module configured to acquire a water inlet flow rate at a current moment in the sewage pool to be treated, correct the first dosing scheme based on the water inlet flow rate, and treat the sewage in the sewage pool to be treated according to the corrected first dosing scheme to obtain a second dosing scheme of the sewage pool to be treated at a certain moment. Predicted turbidity; a second judgment module, configured to judge whether the second predicted turbidity is less than the first predicted turbidity and whether the turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than a second preset threshold, wherein the turbidity change rate is the ratio of the change in the predicted turbidity within the time interval T to the time interval T; an analysis module, configured to re-acquire a second sewage surface image of the sewage pool to be treated at a certain moment if the second predicted turbidity is less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is not greater than the second preset threshold, and analyze the second sewage surface image according to a preset type prediction model to obtain the second sewage type of the sewage pool to be treated at a certain moment; an updating module, configured to update the first dosing plan according to the second sewage type to obtain a second dosing plan, and treat the sewage in the sewage pool to be treated according to the second dosing plan until the predicted turbidity of the sewage pool to be treated at the cutoff time is not greater than the first preset threshold.
[0013] In a third aspect, an electronic device is provided, comprising: at least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the sewage treatment method of any embodiment of the present invention.
[0014] In a fourth aspect, the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor executes the steps of the sewage treatment method of any embodiment of the present invention.
[0015] The sewage treatment method and system of the present application have the following beneficial effects:
[0016] 1. By determining whether the second predicted turbidity is less than the first predicted turbidity and whether the turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than a second preset threshold, a preliminary analysis of the current sewage type can be performed, thereby adaptively adjusting the dosing plan, solving the problem of a certain agent in the dosing plan not reacting with the sewage, causing the agent to become a pollutant;
[0017] 2. By retaining only the types and amounts of chemicals associated with the first target sewage type, it is possible to prevent the current sewage type from reacting with the remaining chemicals previously added, thereby reducing the phenomenon that the staff are prone to excessive addition of chemicals through visual judgment and experience-based decision-making due to the reaction time between chemicals (coagulants and / or flocculants) and sewage. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1 A flow chart of a sewage treatment method provided by one embodiment of the present invention;
[0020] Figure 2 A flowchart of a sewage treatment method according to a specific embodiment of the present invention is provided;
[0021] Figure 3 A structural block diagram of a sewage treatment system provided by one embodiment of the present invention;
[0022] Figure 4It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0024] To make the purpose, technical solutions and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0025] In the description of this specification, the terms "include", "including", "have", "contain", etc. are all open terms, which mean including but not limited to. The descriptions with reference to the terms "one embodiment", "a specific embodiment", "some embodiments", "for example", etc. mean that the specific features, structures or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures or characteristics described can be combined in a suitable manner in any one or more embodiments or examples. The order of steps involved in each embodiment is used to schematically illustrate the implementation of the present application, and the order of steps therein is not limited and can be appropriately adjusted as needed.
[0026] An embodiment of the present invention provides a sewage treatment method. The execution subject of the method can be, but is not limited to, at least one of user terminals such as a mobile phone, a tablet computer, a personal computer (PC), etc. that can be configured to execute the method provided by the embodiment of the present invention, or the execution subject of the method can also be an operating system or an application (Application, APP), or the execution subject of the method can also be a server, etc.
[0027] In one application scenario, workers need to complete the treatment of 10 tons of domestic sewage within 5 hours. They must discharge all 10 tons of sewage into a treatment pool through sewage pipes within 4 hours. At this time, workers need to add chemicals to the treatment pool based on visual judgment and experience. Since it takes a lot of time to discharge all 10 tons of sewage into the treatment pool, and because the chemicals (coagulants and / or flocculants) have to react with the sewage, it is easy to fail to complete the sewage treatment within the specified time.
[0028] In another application scenario, workers need to complete the treatment of 10 tons of domestic sewage within 5 hours. The sewage is discharged into the sewage pool to be treated through the sewage pipe. The workers add corresponding reagents (coagulants and / or flocculants) according to the discharged sewage. During this process, the workers need to continuously add reagents according to the real-time inflow of sewage. Because the reagents (coagulants and / or flocculants) have a reaction time with the sewage, the workers' visual judgment and experience-based decision-making methods may make it easy for them to over-add reagents, resulting in the sewage turbidity may not decrease or decrease slowly.
[0029] Based on the above application scenarios, in the sewage treatment process, if a fixed amount of sewage is treated, it is easy to fail to complete the sewage treatment within the specified time. If real-time treatment is performed when the sewage is discharged, due to the reaction time between the chemicals (coagulants and / or flocculants) and the sewage, the staff will easily add excessive chemicals through visual judgment and experience-based decision-making, resulting in the sewage turbidity may not decrease or decrease slowly.
[0030] See also Figure 1 , which shows a flow chart of a sewage treatment method of the present application.
[0031] like Figure 1 As shown, in step S101, a first sewage surface image of the sewage in the sewage pool to be treated at the current moment is obtained.
[0032] In this embodiment, a first sewage image of the sewage pool to be treated at the current moment is acquired in real time by a camera, and the first sewage image is grayed based on a weighted graying method to obtain the first sewage surface image.
[0033] Step S102: input the sewage surface image into a preset water turbidity prediction model and a preset type prediction model to obtain a first predicted turbidity of the sewage pool to be treated at the current moment and a first sewage type of the sewage pool to be treated at the current moment.
[0034] In this embodiment, the image representation varies due to the varying turbidity of the water. Particles in the sewage scatter the light from the light source, creating a blurred image. Different turbidities produce varying degrees of blurring, so the turbidity of the water can be determined based on the image. Specifically, the following steps are performed: Training parameters for the sewage treatment tank over a period of time are obtained, and a model training set is constructed based on the training parameters, where the training parameters include image parameters, water quality parameters, dosing schedule, and water turbidity; the model training set is used to train the XGBoost model to obtain a water turbidity prediction model; and the sewage surface image is input into the water turbidity prediction model to obtain the first predicted turbidity of the sewage tank to be treated at the current moment.
[0035] Specifically, sewage features are identified on the sewage surface image to obtain feature recognition results of the sewage image; feature clustering is performed based on the feature recognition results of the sewage image to obtain at least one feature clustering cluster, and the parameter range corresponding to at least one feature clustering cluster is called to calculate the average parameter in each feature clustering cluster; each parameter average is sent to the constructed type prediction model for classification processing to obtain the first sewage type of the sewage pool to be treated at the current moment.
[0036] It should be noted that by performing feature recognition on the sewage surface image, features that differ from normal water are marked and the pixel range of the sewage feature is determined. The pixel range of the sewage feature is clustered, with different ranges grouped into different clusters. The average pixel value of the parameter range of each cluster is determined for each cluster. The feature color is then determined based on the pixel value, and the feature type is preliminarily determined.
[0037] Step S103: determining whether the first predicted turbidity is greater than a first preset threshold.
[0038] Step S104: If the first predicted turbidity is greater than a preset threshold, a first dosing plan is constructed based on the first predicted turbidity and the first sewage type, wherein the first dosing plan includes a dosing type, a dosing amount, and a dosing interval.
[0039] In this embodiment, the dosing plan, i.e., the type of chemical added to the wastewater, the dosage, and the timing of chemical addition, all affect the turbidity of the water. Therefore, the turbidity of the water can be determined based on the dosing plan. The dosing plan includes the type of chemical and the dosing interval; specifically, the chemical types include coagulants and flocculants, and the dosing interval includes the dosing interval for coagulants and the dosing interval for flocculants.
[0040] Step S105, obtaining the current inlet flow rate of the sewage pool to be treated, revising the first dosing scheme based on the inlet flow rate, and treating the sewage in the sewage pool to be treated according to the revised first dosing scheme to obtain a second predicted turbidity of the sewage pool to be treated at a certain moment.
[0041] In this embodiment, the water inlet flow rate of the sewage pool to be treated at the current moment is obtained, and the amount of sewage flowing into the sewage pool to be treated per unit time is calculated based on the diameter of the water inlet pipe, and the dosage in the first dosing scheme is adjusted based on the amount of sewage flowing into the sewage pool to be treated per unit time.
[0042] Step S106: Determine whether the second predicted turbidity is less than the first predicted turbidity and whether the turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than a second preset threshold, wherein the turbidity change rate is the ratio of the change in the predicted turbidity within the time interval T to the time interval T.
[0043] In this embodiment, if the second predicted turbidity is not less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is not greater than the second preset threshold, the second sewage surface image at a certain moment in the sewage pool to be treated is reacquired, and the second sewage surface image is analyzed according to the preset type prediction model to obtain the second sewage type at a certain moment in the sewage pool to be treated; if the second predicted turbidity is less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than the second preset threshold, the sewage in the sewage pool to be treated continues to be treated according to the revised first dosing scheme.
[0044] Step S107: If the second predicted turbidity is less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is not greater than a second preset threshold, then the second sewage surface image of the sewage pool to be treated at a certain moment is reacquired, and the second sewage surface image is analyzed according to the preset type prediction model to obtain the second sewage type of the sewage pool to be treated at a certain moment.
[0045] In this embodiment, if the second predicted turbidity is less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is not greater than the second preset threshold, it means that the current first dosing scheme can purify the sewage, but it may be because the type of the current sewage has changed, and a certain agent in the first dosing scheme has not reacted with the sewage, causing the certain agent to become a pollutant. At this time, the second sewage surface image at a certain moment in the sewage pool to be treated is re-acquired, and the second sewage surface image is analyzed according to the preset type prediction model to obtain the second sewage type at a certain moment in the sewage pool to be treated.
[0046] Step S108: Update the first dosing plan according to the second sewage type to obtain a second dosing plan, and treat the sewage in the sewage pool to be treated according to the second dosing plan until the predicted turbidity of the sewage pool to be treated at the deadline is no greater than the first preset threshold, wherein the deadline is the last moment of the sewage treatment time limit.
[0047] In summary, the method of this embodiment, by replacing the manual dosing judgment and empirical dosing determination in the traditional sewage treatment process, can not only effectively reduce manpower input, but also quickly provide feedback on changes in water quality, and reduce drug costs as much as possible while ensuring the quality of the effluent. By judging whether the second predicted turbidity is less than the first predicted turbidity and whether the turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than the second preset threshold, it can perform a preliminary analysis of the current sewage type, thereby adaptively adjusting the dosing plan, solving the problem that a certain agent in the dosing plan does not react with the sewage, making a certain agent a pollutant.
[0048] See also Figure 2 , which shows a flow chart of a sewage treatment method according to a specific embodiment of the present application.
[0049] like Figure 2 As shown, the sewage treatment method specifically includes the following steps:
[0050] Step S201: Intersect the second sewage type with the first sewage type to obtain a first target sewage type, wherein the first target sewage type only includes sewage types common to the second sewage type and the first sewage type;
[0051] Step S202 : retaining only the dosing types and dosing amounts associated with the target sewage type in the first dosing scheme to obtain a second dosing scheme.
[0052] In this embodiment, the first target sewage type is obtained by intersecting the second sewage type with the first sewage type, and the second dosing scheme is obtained by retaining only the dosing types and dosing amounts associated with the first target sewage type in the first dosing scheme.
[0053] For example, the second sewage type is Class A, Class B and Class C, and the second sewage type is Class A, Class B and Class D. The intersection of the second sewage type and the first sewage type is taken, and the target sewage types are Class A and Class B. At this time, the dosing types in the second dosing plan are dosing types A and Class B associated with Class A and Class B.
[0054] The method of this embodiment, by retaining only the types and amounts of added chemicals associated with the first target sewage type, can ensure that there is no sewage type currently reacting with the remaining chemicals added previously, thereby reducing the phenomenon that the staff are prone to excessive addition of chemicals through visual judgment and experience-based decision-making due to the reaction time between the chemicals (coagulants and / or flocculants) and the sewage.
[0055] In some optional embodiments, the sewage treatment method further comprises the following steps:
[0056] Step S301, after the sewage in the sewage pool to be treated is treated by the second dosing scheme, determining whether the water inlet flow rate of the sewage pool to be treated is zero at a moment;
[0057] Step S302: If the value is zero, a third sewage surface image of the sewage pool to be treated at a certain moment is obtained again, and the third sewage surface image is analyzed according to a preset type prediction model to obtain the third sewage type of the sewage pool to be treated at a certain moment;
[0058] Step S303: Taking the union of the third sewage type and the second sewage type to obtain a second target sewage type, wherein the second target sewage type includes the third sewage type and all sewage types in the second sewage type;
[0059] Step S304: Add the dosing type and dosing amount associated with the second target sewage type to the second dosing scheme to obtain a third dosing scheme, and treat the sewage in the sewage pool to be treated according to the third dosing scheme.
[0060] In this embodiment, by judging whether the water inlet flow rate of the sewage pool to be treated at a moment is zero, it can be determined whether all the sewage to be treated flows into the sewage pool to be treated. If it is zero, that is, all the sewage to be treated flows into the sewage pool to be treated. At this time, the third sewage surface image of the sewage pool to be treated at a moment is re-acquired, and the third sewage surface image is analyzed according to a preset type prediction model to obtain the third sewage type of the sewage pool to be treated at a moment. The third sewage type and the second sewage type are taken as the union to obtain the second target sewage type. The dosing type and dosing amount associated with the second target sewage type are added to the second dosing plan to obtain a third dosing plan, and the sewage in the sewage pool to be treated is treated according to the third dosing plan.
[0061] For example, a sewage pipe discharges all 10 tons of sewage into a sewage pool to be treated within 4 hours. At this time, the sewage surface image of the sewage pool to be treated at the 4th hour is re-acquired and analyzed according to the preset type prediction model to obtain the third sewage type (Class A, Class B, Class C, Class D, and Class E) of the sewage pool to be treated at the 4th moment. The third sewage type (Class A, Class B, Class C, Class D, and Class E) is taken as the union with the second sewage type (Class A, Class B, Class D) to obtain the second target sewage type (Class A, Class B, Class C, Class D, and Class E). The dosing type and dosage associated with the second target sewage type are added to the second dosing plan to obtain a third dosing plan (Class A, Class B, Class C, Class D, and Class E). The sewage in the sewage pool to be treated is treated according to the third dosing plan.
[0062] Since part of Class A, Class B, Class C, and Class D sewage has been consumed in the first four hours, when the third dosing plan is adjusted to the 4th hour, (Class A, Class B, Class C, Class D, and Class E), the dosage of Class A, Class B, Class C, and Class D will be greatly reduced, thereby shortening the reaction time of the reagents (coagulants and / or flocculants) and sewage in the last hour, thereby completing the sewage treatment within the expected time.
[0063] See also Figure 3 , which shows a structural block diagram of a sewage treatment system of the present application.
[0064] like Figure 3 As shown, the sewage treatment system 200 includes an acquisition module 210 , an output module 220 , a first judgment module 230 , a construction module 240 , a correction module 250 , a second judgment module 260 , an analysis module 270 and an update module 280 .
[0065] Among them, the acquisition module 210 is configured to obtain a first sewage surface image of the sewage in the sewage pool to be treated at the current moment; the output module 220 is configured to input the sewage surface image into a preset water turbidity prediction model and a preset type prediction model to obtain the first predicted turbidity of the sewage pool to be treated at the current moment and the first sewage type of the sewage pool to be treated at the current moment respectively; the first judgment module 230 is configured to judge whether the first predicted turbidity is greater than a first preset threshold; the construction module 240 is configured to construct a first dosing plan based on the first predicted turbidity and the first sewage type if the first predicted turbidity is greater than the preset threshold, wherein the first dosing plan includes the dosing type, dosing amount and dosing interval; the correction module 250 is configured to obtain the water inlet flow rate of the sewage pool to be treated at the current moment, correct the first dosing plan based on the water inlet flow rate, and treat the sewage in the sewage pool to be treated according to the corrected first dosing plan to obtain the second predicted turbidity of the sewage pool to be treated at a certain moment; the second judgment module 260 is configured To determine whether the second predicted turbidity is less than the first predicted turbidity and whether the turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than a second preset threshold, wherein the turbidity change rate is the ratio of the change in the predicted turbidity within the time interval T to the time interval T; the analysis module 270 is configured to re-acquire a second sewage surface image of the sewage pool to be treated at a certain moment if the second predicted turbidity is less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is not greater than the second preset threshold, and analyze the second sewage surface image according to a preset type prediction model to obtain the second sewage type of the sewage pool to be treated at a certain moment; the updating module 280 is configured to update the first dosing plan according to the second sewage type to obtain a second dosing plan, and treat the sewage in the sewage pool to be treated according to the second dosing plan until the predicted turbidity of the sewage pool to be treated at a deadline is not greater than the first preset threshold, wherein the deadline is the last moment of the sewage treatment time limit.
[0066] It should be understood that Figure 3 Modules and references documented in Figure 1 Therefore, the operations and features described above for the method and the corresponding technical effects also apply to Figure 3 The modules in it will not be described in detail here.
[0067] In other embodiments, embodiments of the present invention further provide a computer-readable storage medium having a computer program stored thereon, wherein when the program instructions are executed by a processor, the processor is caused to execute the sewage treatment method in any of the above method embodiments;
[0068] As an embodiment, the computer-readable storage medium of the present invention stores computer-executable instructions, and the computer-executable instructions are configured as follows:
[0069] Acquire a first sewage surface image of the sewage in the sewage pool to be treated at the current moment;
[0070] Inputting the sewage surface image into a preset water turbidity prediction model and a preset type prediction model to obtain a first predicted turbidity of the sewage pool to be treated at the current moment and a first type of sewage in the sewage pool to be treated at the current moment respectively;
[0071] Determining whether the first predicted turbidity is greater than a first preset threshold;
[0072] If the first predicted turbidity is greater than a preset threshold, constructing a first dosing plan based on the first predicted turbidity and the first sewage type, wherein the first dosing plan includes a dosing type, a dosing amount, and a dosing interval;
[0073] Obtaining a current inlet flow rate of the sewage pool to be treated, revising the first dosing scheme based on the inlet flow rate, and treating the sewage in the sewage pool to be treated according to the revised first dosing scheme to obtain a second predicted turbidity of the sewage pool to be treated at a certain moment;
[0074] Determining whether the second predicted turbidity is less than the first predicted turbidity and whether a turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than a second preset threshold, wherein the turbidity change rate is a ratio of a change in the predicted turbidity within a time interval T to the time interval T;
[0075] If the second predicted turbidity is less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is not greater than a second preset threshold, then reacquiring a second sewage surface image at a certain moment in the sewage pool to be treated, and analyzing the second sewage surface image according to a preset type prediction model to obtain the second sewage type in the sewage pool to be treated at a certain moment;
[0076] The first dosing scheme is updated according to the second sewage type to obtain a second dosing scheme, and the sewage in the sewage pool to be treated is treated according to the second dosing scheme until the predicted turbidity of the sewage pool to be treated at the deadline is no greater than a first preset threshold, wherein the deadline is the last moment of the limited sewage treatment time.
[0077] The computer-readable storage medium may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function; the data storage area may store data generated based on the use of the sewage treatment system. Furthermore, the computer-readable storage medium may include high-speed random access memory and may also include storage, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the computer-readable storage medium may optionally include storage remote from the processor, and such remote storage may be connected to the sewage treatment system via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0078] Figure 4 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 4 As shown, the device includes: a processor 310 and a memory 320. The electronic device may also include: an input device 330 and an output device 340. The processor 310, the memory 320, the input device 330 and the output device 340 may be connected via a bus or other means. Figure 4 The example of a bus connection is shown. Memory 320 is the aforementioned computer-readable storage medium. Processor 310 executes the various functional applications and data processing of the server by running the non-volatile software programs, instructions, and modules stored in memory 320, thereby implementing the sewage treatment method of the aforementioned method embodiment. Input device 330 can receive input digital or character information and generate key signal input related to user settings and function control of the sewage treatment system. Output device 340 can include a display device such as a display screen.
[0079] The electronic device can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0080] As an embodiment, the electronic device is applied to a sewage treatment system and is used for a client, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0081] Acquire a first sewage surface image of the sewage in the sewage pool to be treated at the current moment;
[0082] Inputting the sewage surface image into a preset water turbidity prediction model and a preset type prediction model to obtain a first predicted turbidity of the sewage pool to be treated at the current moment and a first type of sewage in the sewage pool to be treated at the current moment respectively;
[0083] Determining whether the first predicted turbidity is greater than a first preset threshold;
[0084] If the first predicted turbidity is greater than a preset threshold, constructing a first dosing plan based on the first predicted turbidity and the first sewage type, wherein the first dosing plan includes a dosing type, a dosing amount, and a dosing interval;
[0085] Obtaining a current inlet flow rate of the sewage pool to be treated, revising the first dosing scheme based on the inlet flow rate, and treating the sewage in the sewage pool to be treated according to the revised first dosing scheme to obtain a second predicted turbidity of the sewage pool to be treated at a certain moment;
[0086] Determining whether the second predicted turbidity is less than the first predicted turbidity and whether a turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than a second preset threshold, wherein the turbidity change rate is a ratio of a change in the predicted turbidity within a time interval T to the time interval T;
[0087] If the second predicted turbidity is less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is not greater than a second preset threshold, then reacquiring a second sewage surface image at a certain moment in the sewage pool to be treated, and analyzing the second sewage surface image according to a preset type prediction model to obtain the second sewage type in the sewage pool to be treated at a certain moment;
[0088] The first dosing scheme is updated according to the second sewage type to obtain a second dosing scheme, and the sewage in the sewage pool to be treated is treated according to the second dosing scheme until the predicted turbidity of the sewage pool to be treated at the deadline is no greater than a first preset threshold, wherein the deadline is the last moment of the limited sewage treatment time.
[0089] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement the hardware: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0090] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
[0091] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.
Claims
1. A sewage treatment method, characterized in that: include: Acquire a first sewage surface image of the sewage in the sewage pool to be treated at the current moment; Inputting the sewage surface image into a preset water turbidity prediction model and a preset type prediction model to obtain a first predicted turbidity of the sewage pool to be treated at the current moment and a first type of sewage in the sewage pool to be treated at the current moment respectively; Determining whether the first predicted turbidity is greater than a first preset threshold; If the first predicted turbidity is greater than a preset threshold, constructing a first dosing plan based on the first predicted turbidity and the first sewage type, wherein the first dosing plan includes a dosing type, a dosing amount, and a dosing interval; Obtaining a current inlet flow rate of the sewage pool to be treated, revising the first dosing scheme based on the inlet flow rate, and treating the sewage in the sewage pool to be treated according to the revised first dosing scheme to obtain a second predicted turbidity of the sewage pool to be treated at a certain moment; Determining whether the second predicted turbidity is less than the first predicted turbidity and whether a turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than a second preset threshold, wherein the turbidity change rate is a ratio of a change in the predicted turbidity within a time interval T to the time interval T; If the second predicted turbidity is less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is not greater than a second preset threshold, then reacquiring a second sewage surface image at a certain moment in the sewage pool to be treated, and analyzing the second sewage surface image according to a preset type prediction model to obtain the second sewage type in the sewage pool to be treated at a certain moment; The first dosing scheme is updated according to the second type of sewage to obtain a second dosing scheme, and the sewage in the sewage pool to be treated is treated according to the second dosing scheme until the predicted turbidity of the sewage pool to be treated at a cutoff time is not greater than a first preset threshold value, wherein the cutoff time is the last time when the sewage treatment time is limited, wherein the updating of the first dosing scheme according to the second type of sewage to obtain the second dosing scheme includes: Intersecting the second sewage type with the first sewage type to obtain a first target sewage type, wherein the first target sewage type only includes sewage types that are common to the second sewage type and the first sewage type; In the first dosing scheme, only the dosing types and dosing amounts associated with the target sewage type are retained to obtain a second dosing scheme.
2. A sewage treatment method according to claim 1, characterized in that: Treating the sewage in the sewage pool to be treated according to the second dosing scheme until the predicted turbidity of the sewage pool to be treated at the cutoff time is no greater than the first preset threshold comprises: After the sewage in the sewage pool to be treated is treated by the second dosing scheme, determining whether the water inlet flow rate of the sewage pool to be treated is zero at a moment; If it is zero, then reacquire the third sewage surface image of the sewage pool to be treated at the first moment, and analyze the third sewage surface image according to the preset type prediction model to obtain the third sewage type of the sewage pool to be treated at the first moment; Taking the union of the third sewage type and the second sewage type to obtain a second target sewage type, wherein the second target sewage type includes the third sewage type and all sewage types in the second sewage type; The type and amount of dosing associated with the second target sewage type are added to the second dosing scheme to obtain a third dosing scheme, and the sewage in the sewage pool to be treated is treated according to the third dosing scheme.
3. A sewage treatment method according to claim 1, characterized in that: The step of obtaining a first sewage surface image of the sewage in the sewage pool to be treated at the current moment includes: Acquire a first sewage image of the sewage pool to be treated at the current moment; The first sewage image is grayscaled based on a weighted grayscale method to obtain the first sewage surface image.
4. A sewage treatment method according to claim 1, characterized in that: in, Inputting the sewage surface image into a preset water turbidity prediction model to obtain a first predicted turbidity of the sewage pool to be treated at the current moment specifically includes: Obtaining training parameters of the sewage treatment pool over a period of time, and constructing a model training set based on the training parameters, wherein the training parameters include image parameters, water quality parameters, dosing scheme, and water turbidity; The XGBoost model is trained using the model training set to obtain a water turbidity prediction model; The sewage surface image is input into a water turbidity prediction model to obtain a first predicted turbidity of the sewage pool to be treated at the current moment.
5. A sewage treatment method according to claim 1, characterized in that: in, The sewage surface image is input into a preset type prediction model to obtain the first sewage type of the sewage pool to be treated at the current moment, specifically including: Performing sewage feature recognition on the sewage surface image to obtain a feature recognition result of the sewage image; Performing feature clustering based on the feature recognition result of the sewage image to obtain at least one feature clustering cluster, calling the parameter range corresponding to the at least one feature clustering cluster, and calculating the average number of parameters in each feature clustering cluster; The average value of each parameter is sent to the constructed type prediction model for classification processing to obtain the first sewage type of the sewage pool to be treated at the current moment.
6. A sewage treatment method according to claim 1, characterized in that: After determining whether the second predicted turbidity is less than the first predicted turbidity and whether a turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than a second preset threshold, the method further includes: If the second predicted turbidity is not less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is not greater than a second preset threshold, then reacquiring a second sewage surface image at a certain moment in the sewage pool to be treated, and analyzing the second sewage surface image according to a preset type prediction model to obtain the second sewage type in the sewage pool to be treated at a certain moment; If the second predicted turbidity is less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than a second preset threshold, the sewage in the sewage pool to be treated continues to be treated according to the revised first dosing plan.
7. A sewage treatment system, characterized in that: include: An acquisition module configured to acquire a first sewage surface image of the sewage in the sewage pool to be treated at a current moment; an output module configured to input the sewage surface image into a preset water turbidity prediction model and a preset type prediction model to respectively obtain a first predicted turbidity of the sewage pool to be treated at a current moment and a first type of sewage in the sewage pool to be treated at a current moment; a first judging module, configured to judge whether the first predicted turbidity is greater than a first preset threshold; a construction module configured to construct a first dosing plan based on the first predicted turbidity and the first sewage type if the first predicted turbidity is greater than a preset threshold, wherein the first dosing plan includes a dosing type, a dosing amount, and a dosing interval; a correction module configured to obtain a current inlet flow rate of the sewage pool to be treated, correct the first dosing scheme based on the inlet flow rate, and treat the sewage in the sewage pool to be treated according to the corrected first dosing scheme to obtain a second predicted turbidity of the sewage pool to be treated at a certain moment; a second determination module configured to determine whether the second predicted turbidity is less than the first predicted turbidity and whether a turbidity change rate between the second predicted turbidity and the first predicted turbidity is greater than a second preset threshold, wherein the turbidity change rate is a ratio of a change in the predicted turbidity within a time interval T to the time interval T; an analysis module configured to, if the second predicted turbidity is less than the first predicted turbidity and the turbidity change rate between the second predicted turbidity and the first predicted turbidity is not greater than a second preset threshold, reacquire a second sewage surface image of the sewage pool to be treated at a certain moment, and analyze the second sewage surface image according to a preset type prediction model to obtain the second sewage type of the sewage pool to be treated at a certain moment; An updating module is configured to update the first dosing scheme according to the second sewage type to obtain a second dosing scheme, and treat the sewage in the sewage pool to be treated according to the second dosing scheme until the predicted turbidity of the sewage pool to be treated at a cutoff time is not greater than a first preset threshold, wherein the cutoff time is the last time of the sewage treatment time limit, and the updating of the first dosing scheme according to the second sewage type to obtain the second dosing scheme includes: Intersecting the second sewage type with the first sewage type to obtain a first target sewage type, wherein the first target sewage type only includes sewage types that are common to the second sewage type and the first sewage type; In the first dosing scheme, only the dosing types and dosing amounts associated with the target sewage type are retained to obtain a second dosing scheme.
8. An electronic device, characterized in that: include: At least one processor, and a memory communicatively connected to the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Sewage treatment method
CN111268780A