Sewage treatment method, system and device based on neural network model and medium
Through the method based on neural network model, the sewage water quality parameters are monitored in real time, and a combination of dissolved gas volume and hydraulic residence time is generated and evaluated, which solves the problem of waste of medicines and water effluent in traditional sewage treatment, and real-time regulation and cost optimization are achieved.
Patent Information
- Application Number
- CN202510741380.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-05
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-06-05
AI Technical Summary
The dosage of medicines in traditional sewage treatment methods is difficult to adapt to dynamic fluctuations in water quality, resulting in waste of drugs or the total phosphorus concentration of effluent water exceeds the standard, and it is difficult to achieve real-time regulation and cost optimization.
Using a neural network model-based method, the sewage water quality parameters are monitored in real time, and a combination of dissolved gas and hydraulic residence time is generated. The trained neural network model predicts the minimum dosage, and costs are evaluated to select the most economical treatment plan.
Accurate prediction and real-time regulation of the dosage of agents are achieved, ensuring that the total phosphorus concentration in the effluent meets the requirements while reducing the cost of sewage treatment.
Smart Images

Figure CN120247207A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of sewage treatment, and particularly to a sewage treatment method, system, device and medium based on a neural network model. Background Technique
[0002] In recent years, with the strict implementation of environmental protection regulations in China, the phosphorus discharge limit of the effluent from sewage treatment plants has become increasingly stringent (for example, the total phosphorus (TP) in the surface water class III standard ≤ 0.05 mg / L). Currently, mainly chemicals (coagulants or flocculants) are added to the coagulation tank. After coagulation, the water meets the dissolved air water, and the bubbles collide and adhere to the insoluble phosphate suspended solids in the water, forming bubble-suspended solid clusters. The density of the bubble-suspended solid clusters is less than that of water, and they will float to the water surface, thus realizing solid-liquid separation and removing the insoluble phosphorus in the water.
[0003] In traditional sewage treatment methods, the chemical addition method uses a fixed ratio addition method, that is, the addition coefficient is set based on experience. The addition coefficient set by experience is obtained based on past fixed conditions and operation experience, and cannot adapt to the dynamic fluctuations of water quality (such as a sharp increase in flow during the rainy season or the impact of industrial wastewater), which easily leads to the risk of chemical waste rate or the exceeding standard of the effluent TP concentration; in addition, it relies on offline detection of the effluent TP concentration for chemical addition adjustment, and the adjustment delay is significant, making it difficult to meet real-time regulation; and traditional sewage treatment methods aim to ensure that the effluent TP concentration meets the requirements, without considering the sewage treatment cost.
[0004] How to achieve accurate prediction and real-time regulation of the chemical dosage, and how to reduce the sewage treatment cost on the premise of ensuring that the effluent total phosphorus concentration meets the requirements are problems that need to be solved by those skilled in the art. Summary of the Invention
[0005] The purpose of the present application is to provide a sewage treatment method, system, device and medium based on a neural network model, which is used to solve the problems that traditional sewage treatment is prone to the risk of chemical waste rate or the exceeding standard of the effluent TP concentration, is difficult to meet real-time regulation, and does not consider the sewage treatment cost.
[0006] To solve the above technical problems, the present application provides a sewage treatment method based on a neural network model, including:
[0007] Obtain the water quality parameters of the current sewage in real time, and the water quality parameters at least include the influent total phosphorus concentration and the effluent total phosphorus concentration limit;
[0008] Generate different combinations of the dissolved air volume and the hydraulic retention time to obtain several treatment plans;
[0009] Input the water quality parameters and each treatment plan into a trained preset neural network model to obtain the minimum chemical dosage corresponding to each treatment plan;
[0010] Calculate the sewage treatment cost of each treatment plan based on each treatment plan and the corresponding minimum chemical dosage, and use the treatment plan corresponding to the lowest sewage treatment cost as the target plan, so as to apply the target gas dissolution amount, target hydraulic retention time, and target minimum chemical dosage corresponding to the target plan for sewage treatment.
[0011] In a feasible embodiment, before inputting the water quality parameters and each treatment plan into a trained preset neural network model to obtain the minimum chemical dosage corresponding to each treatment plan, it further includes:
[0012] Obtain historical data; wherein, the historical data includes the historical total phosphorus concentration in the effluent, and the corresponding historical total phosphorus concentration in the influent, historical gas dissolution amount, historical hydraulic retention time, and historical chemical dosage corresponding to the historical total phosphorus concentration in the effluent; wherein, the historical total phosphorus concentration in the effluent is less than or equal to the effluent total phosphorus concentration limit.
[0013] Calculate the total phosphorus concentration removal rate according to the historical total phosphorus concentration in the influent and the historical total phosphorus concentration in the effluent.
[0014] Construct a five-dimensional input vector including the total phosphorus concentration removal rate, the historical total phosphorus concentration in the influent, the historical gas dissolution amount, the historical hydraulic retention time, and the historical chemical dosage.
[0015] Input the five-dimensional input vector into a neural network architecture for training to obtain the preset neural network model.
[0016] In a feasible embodiment, before calculating the total phosphorus concentration removal rate according to the historical total phosphorus concentration in the influent and the historical total phosphorus concentration in the effluent, it further includes:
[0017] Separate the historical data into feature data and target variables; wherein, the feature data includes the historical total phosphorus concentration in the influent, the historical total phosphorus concentration in the effluent, the historical gas dissolution amount, and the historical hydraulic retention time, and the target variable is the historical chemical dosage.
[0018] Perform standardization processing on each feature data so that the mean of each feature data is 0 and the standard deviation is 1.
[0019] In a feasible embodiment, before inputting the five-dimensional input vector into a neural network architecture for training, it further includes:
[0020] Create a two-layer fully connected network, use the ReLU activation function and a linear node for the output layer, and integrate the L2 regularization and Dropout techniques to construct the neural network architecture; wherein, the loss function of the neural network architecture uses the Huber loss.
[0021] In a feasible embodiment, after inputting the five-dimensional input vector into a neural network architecture for training to obtain the preset neural network model, the following steps are further included:
[0022] Adding hard coding corresponding to the dosing amount limit to the preset neural network model;
[0023] Correspondingly, after inputting the water quality parameters and each treatment plan into the trained preset neural network model to obtain the minimum dosing amount corresponding to each treatment plan, the following steps are further included:
[0024] If the minimum dosing amount does not meet the dosing amount limit;
[0025] Re-inputting the input vector corresponding to the minimum dosing amount into the preset neural network model for learning until the minimum dosing amount meets the dosing amount limit.
[0026] In a feasible embodiment, calculating the sewage treatment cost of each treatment plan based on each treatment plan and the minimum dosing amount corresponding to each treatment plan includes:
[0027] Determining the gas dissolution amount corresponding to each treatment plan;
[0028] Determining the power corresponding to the gas dissolution amount according to a power model including the relationship between the gas dissolution amount and power;
[0029] Calculating the electricity cost corresponding to each treatment plan according to the power, treatment time, electricity unit price, and the total amount of sewage treated corresponding to the treatment time;
[0030] Calculating the chemical agent cost according to the minimum dosing amount corresponding to each treatment plan;
[0031] Calculating the sewage treatment cost corresponding to each treatment plan according to the electricity cost and the chemical agent cost.
[0032] The present application further provides a sewage treatment system applied to the sewage treatment method based on a neural network model, including: a dosing pump, a first TP sensor, a second TP sensor, a coagulation tank, a flotation tank, a reservoir, a micro-nano flotation device, and a control device;
[0033] The chemical dosing pump is connected to the water inlet of the coagulation tank. The water outlet of the coagulation tank is connected to the water inlet of the flotation tank. The water outlet of the flotation tank is connected to the reservoir. The micro-nano flotation device is respectively connected to the flotation tank and the reservoir. The first TP sensor is arranged on the water inlet pipeline of the coagulation tank. The second TP sensor is arranged on the water outlet pipeline of the reservoir. The control device is respectively connected to the chemical dosing pump, the first TP sensor, the second TP sensor and the micro-nano flotation device. The first TP sensor is used to obtain the total phosphorus concentration of the influent in real time.
[0034] The present application also provides a sewage treatment device based on a neural network model, including:
[0035] An acquisition module, configured to acquire the water quality parameters of the current sewage in real time, where the water quality parameters at least include the total phosphorus concentration of the influent and the total phosphorus concentration limit of the effluent;
[0036] A generation module, configured to generate different combinations of the gas dissolution amount and the hydraulic retention time to obtain a number of treatment schemes;
[0037] A prediction module, configured to input the water quality parameters and each of the treatment schemes into a trained preset neural network model to obtain the minimum chemical dosage corresponding to each of the treatment schemes;
[0038] A calculation module, configured to calculate the sewage treatment cost of each of the treatment schemes based on each of the treatment schemes and the minimum chemical dosage corresponding to each of the treatment schemes, and use the treatment scheme corresponding to the lowest sewage treatment cost as the target scheme, so as to apply the target gas dissolution amount, the target hydraulic retention time and the target minimum chemical dosage corresponding to the target scheme for sewage treatment.
[0039] The present application also provides a sewage treatment device based on a neural network model, including a memory for storing a computer program;
[0040] A processor, configured to implement the steps of the sewage treatment method based on the neural network model when executing the computer program.
[0041] The present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the sewage treatment method based on the neural network model are implemented.
[0042] A sewage treatment method based on a neural network model provided by this application can obtain the latest information of sewage in a timely manner by real-time monitoring of water quality parameters such as the total phosphorus concentration of the influent. This means that the input data of the preset neural network model always reflects the current actual working conditions, rather than making predictions based on outdated or fixed data, thus ensuring the timeliness and accuracy of the chemical dosage prediction. Moreover, by using the preset neural network model to predict the chemical dosage, the lag of adding chemicals after traditional offline detection of the total phosphorus concentration of the effluent is eliminated, and real-time regulation can be achieved. By generating different combinations of the gas dissolution amount and the hydraulic retention time, several treatment schemes are obtained. Each treatment scheme corresponds to a different minimum chemical dosage. Cost evaluation and comparison are carried out under multiple possible operating conditions. On the premise of ensuring that the sewage treatment effect meets the total phosphorus concentration limit of the effluent, the treatment scheme corresponding to the lowest sewage treatment cost is used as the target scheme. This decision-making method based on cost optimization can select the most economical operating scheme among many feasible schemes, thereby effectively reducing the sewage treatment cost on the premise of ensuring that the total phosphorus concentration of the effluent meets the requirements.
[0043] The beneficial effects of a sewage treatment system, a sewage treatment device based on a neural network model, and a medium provided by this application correspond to the method, and the effects are as above. Brief Description of the Drawings
[0044] In order to more clearly illustrate the embodiments of this application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0045] Figure 1 It is a flowchart of a sewage treatment method based on a neural network model provided by an embodiment of this application;
[0046] Figure 2 It is a structure diagram of a sewage treatment system provided by an embodiment of this application;
[0047] Figure 3 It is a structure diagram of a sewage treatment device based on a neural network model provided by an embodiment of this application;
[0048] Figure 4 It is a structure diagram of another sewage treatment device based on a neural network model provided by an embodiment of this application. Detailed Embodiments
[0049] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the protection scope of the present application.
[0050] The core of the present application is to provide a sewage treatment method, system, device and medium based on a neural network model, which is used to realize the accurate prediction and real-time regulation of the chemical dosage, and how to reduce the sewage treatment cost on the premise of ensuring that the total phosphorus concentration of the effluent meets the requirements.
[0051] In order to enable those skilled in the art to better understand the solution of the present application, the following will further describe the present application in detail in conjunction with the accompanying drawings and specific implementation manners.
[0052] Figure 1 The flowchart of a sewage treatment method based on a neural network model provided for the embodiments of the present application is as Figure 1 shown. The sewage treatment method based on the neural network model includes:
[0053] S10: Obtain the water quality parameters of the current sewage in real time, and the water quality parameters at least include the influent total phosphorus concentration and the effluent total phosphorus concentration limit.
[0054] S11: Generate different combinations of the gas dissolution amount and the hydraulic retention time to obtain several treatment plans.
[0055] S12: Input the water quality parameters and each treatment plan into the trained preset neural network model to obtain the minimum chemical dosage corresponding to each treatment plan.
[0056] S13: Calculate the sewage treatment cost of each treatment plan based on each treatment plan and the minimum chemical dosage corresponding to each treatment plan, and use the treatment plan corresponding to the minimum sewage treatment cost as the target plan, so as to apply the target gas dissolution amount, target hydraulic retention time and target minimum chemical dosage corresponding to the target plan for sewage treatment.
[0057] For easy understanding, the following introduces the sewage treatment system to which the above sewage treatment method is applied. Figure 2 The structural diagram of a sewage treatment system provided for the embodiments of the present application is as Figure 2As shown in the figure, the sewage treatment system includes: a dosing pump 1, a first TP sensor, a second TP sensor, a coagulation tank 2, a flotation tank 3, a reservoir 4, a micro-nano flotation device 5, and a control device 6; the dosing pump 1 is connected to the water inlet of the coagulation tank 2, the water outlet of the coagulation tank 2 is connected to the water inlet of the flotation tank 3, the water outlet of the flotation tank 3 is connected to the reservoir 4, the micro-nano flotation device 5 is respectively connected to the flotation tank 3 and the reservoir 4, the first TP sensor is arranged on the water inlet pipeline of the coagulation tank 2, the second TP sensor is arranged on the water outlet pipeline of the reservoir 4, the control device 6 is respectively connected to the dosing pump 1, the first TP sensor, the second TP sensor, and the micro-nano flotation device 5, and the first TP sensor is used to obtain the total phosphorus concentration of the influent in real time.
[0058] In the embodiment of the present application, the dosing pump 1 is connected to the water inlet of the coagulation tank 2 and is responsible for adding a coagulant or a flocculant to the sewage. The first TP sensor is installed on the water inlet pipeline of the coagulation tank 2 and is used to monitor the total phosphorus concentration of the influent in real time. The second TP sensor is installed on the water outlet pipeline of the reservoir 4 and is used to monitor the total phosphorus concentration of the treated effluent in real time to ensure that the TP of the effluent meets the standard. The coagulation tank 2 realizes the full mixing of the sewage and the reagent through mechanical stirring, completes the growth process of the coagulant flocs, and prepares for the subsequent flotation separation. The flotation tank 3 uses micro-nano bubbles to adhere to the flocs to form a "bubble-floc" complex and quickly float up to achieve efficient separation of mud and water. The reservoir 4 stores the treated clear water and at the same time provides raw water for the micro-nano flotation device 5. The micro-nano flotation device 5 generates ultra-fine bubbles, significantly improves the pollutant capture efficiency, is connected to the flotation tank 3 and the reservoir 4, and assists in completing the mud-water separation process. The control device 6 is used to execute the steps of the above sewage treatment method based on the neural network model. Further, a first flowmeter can be set on the water inlet pipeline of the coagulation tank 2, and the first flowmeter is used to obtain the influent flow rate in real time; a second flowmeter is set on the pipeline connecting the reservoir 4 and the micro-nano flotation device 5, and the second flowmeter is used to obtain the return flow rate in real time. An appropriate return flow rate can maintain the hydraulic balance in the flotation tank 3, prevent the water flow from being too fast or too slow from having an adverse impact on the flotation effect, and the return flow can also help to stabilize the operation of the system and avoid having too much impact on the flotation effect due to fluctuations in the influent water quality or flow rate. A human-computer interaction device connected to the control device 6 can also be set, and the human-computer interaction device supports parameter setting, trend analysis, and alarm management, reducing the complexity of operation and maintenance.
[0059] In step S10, the total phosphorus concentration of the influent fed back by the first TP sensor arranged on the water inlet pipeline of the coagulation tank is obtained in real time; the limit value of the total phosphorus concentration of the effluent can be less than or equal to 0.05 mg / L, and it can be adjusted according to the actual situation specifically.
[0060] In step S11, the hydraulic retention time includes the hydraulic retention time of the reservoir and the hydraulic retention time of the flotation tank. The hydraulic retention time of the reservoir = the volume of the reservoir / the sewage flow rate, and the hydraulic retention time of the flotation tank = the volume of the flotation tank / the sewage flow rate. The dissolved air volume is equal to 10% to 50% of the influent flow rate. After obtaining the current influent flow rate and based on the dissolved air volume being 10% to 50% of the influent flow rate, multiple dissolved air volumes are generated, and each combination of the dissolved air volume and the hydraulic retention time constitutes a treatment plan.
[0061] In step S12, the influent total phosphorus concentration, the effluent total phosphorus concentration limit value, the dissolved air volume, and the hydraulic retention time in each treatment plan are input into a preset neural network model. Under the condition of meeting the effluent total phosphorus concentration limit value, multiple chemical dosages will be output. To reduce the chemical cost, the lowest chemical dosage corresponding to each treatment plan is determined.
[0062] In step S12, the sewage treatment cost can include the electricity cost and the chemical cost. The electricity cost is related to the dissolved air volume, and the chemical cost is related to the chemical dosage. Therefore, the electricity cost is calculated based on each treatment plan, the chemical cost is calculated based on the lowest chemical dosage corresponding to each treatment plan, the sewage treatment cost of each treatment plan is calculated according to the electricity cost and the chemical cost, and the sewage treatment is carried out by applying the target dissolved air volume, the target hydraulic retention time, and the target lowest chemical dosage corresponding to the lowest sewage treatment cost.
[0063] The embodiment of the present application provides a sewage treatment method based on a neural network model. By real-time monitoring of water quality parameters such as the influent total phosphorus concentration, the latest information of the sewage can be obtained in a timely manner, which means that the input data of the preset neural network model always reflects the current actual working conditions, rather than making predictions based on outdated or fixed data, thereby ensuring the timeliness and accuracy of the chemical dosage prediction. Moreover, by using the preset neural network model to predict the chemical dosage, the lag of adding chemicals after traditional offline detection of the effluent total phosphorus concentration is eliminated, and real-time regulation can be achieved. By generating different combinations of the dissolved air volume and the hydraulic retention time, several treatment plans are obtained. Each treatment plan corresponds to a different lowest chemical dosage. The cost is evaluated and compared under multiple possible operating conditions. On the premise of ensuring that the sewage treatment effect meets the effluent total phosphorus concentration limit value, the treatment plan corresponding to the lowest sewage treatment cost is used as the target plan. This decision-making method based on cost optimization can select the most economical operating plan among many feasible plans, thereby effectively reducing the sewage treatment cost on the premise of ensuring that the effluent total phosphorus concentration meets the requirements.
[0064] Based on the above embodiments, before the embodiments of the present application input water quality parameters and various treatment schemes into the trained preset neural network model to obtain the minimum chemical dosage corresponding to each treatment scheme, it further includes: obtaining historical data; wherein, the historical data includes historical effluent total phosphorus concentration, and the corresponding historical influent total phosphorus concentration, historical gas dissolution amount, historical hydraulic retention time, and historical chemical dosage; wherein, the historical effluent total phosphorus concentration is less than or equal to the effluent total phosphorus concentration limit value; calculating the total phosphorus concentration removal rate according to the historical influent total phosphorus concentration and the historical effluent total phosphorus concentration; constructing a five-dimensional input vector including the total phosphorus concentration removal rate, historical influent total phosphorus concentration, historical gas dissolution amount, historical hydraulic retention time, and historical chemical dosage; inputting the five-dimensional input vector into the neural network architecture for training to obtain the preset neural network model.
[0065] The embodiments of the present application mainly introduce using some historical data with the effluent total phosphorus concentration meeting the requirements for model training to obtain the preset neural network model. The historical data includes the historical effluent total phosphorus concentration, and the corresponding historical influent total phosphorus concentration, historical gas dissolution amount, historical hydraulic retention time, and historical chemical dosage. These data record the operation conditions and effects of the sewage treatment system under different working conditions in the past. The key point is that the historical effluent total phosphorus concentration must be less than or equal to the effluent total phosphorus concentration limit value to ensure the effectiveness and reliability of the training data. The total phosphorus concentration removal rate = (historical influent total phosphorus concentration - historical effluent total phosphorus concentration) / historical influent total phosphorus concentration. Construct a five-dimensional input vector including the total phosphorus concentration removal rate, historical influent total phosphorus concentration, historical gas dissolution amount, historical hydraulic retention time, and historical chemical dosage. Before inputting the five-dimensional input vector into the neural network, it is usually necessary to perform normalization processing on the input vector. The purpose of normalization is to enable data with different dimensions and orders of magnitude to be compared and learned on a unified scale, improving the training efficiency and prediction accuracy of the neural network. The total phosphorus concentration removal rate directly reflects the removal efficiency of the air flotation process for total phosphorus and is the core index for evaluating the sewage treatment effect. Using it as an input feature enables the neural network to directly learn the correlation between "treatment efficiency" and "chemical dosage". The influent total phosphorus concentrations of different sewage treatment plants vary significantly. Simply relying on the influent total phosphorus concentration will cause the model to overfit high-concentration samples. The total phosphorus concentration removal rate is normalized to unify the performance characterization of different concentration intervals.
[0066] In the embodiments of the present application, the five-dimensional input vector covers multiple key parameters such as the total phosphorus concentration removal rate, influent total phosphorus concentration, gas dissolution amount, hydraulic retention time, and chemical dosage. These parameters are interrelated and jointly affect the sewage treatment effect. By comprehensively considering these parameters, the neural network model captures the complex correlation between water quality parameters and chemical dosage through a non-linear mapping relationship, thereby improving the accuracy and reliability of prediction, adapting to the dynamic fluctuations of water quality, and eliminating the lag of traditional off-line detection.
[0067] Based on the above embodiments, before calculating the total phosphorus concentration removal rate according to the historical influent total phosphorus concentration and the historical effluent total phosphorus concentration in the embodiments of the present application, it further includes: separating historical data to obtain feature data and target variables; wherein, the feature data includes the historical influent total phosphorus concentration, the historical effluent total phosphorus concentration, the historical gas dissolution amount, and the historical hydraulic retention time, and the target variable is the historical chemical dosage; performing standardization processing on each piece of feature data so that the mean of each piece of feature data is 0 and the standard deviation is 1. The embodiments of the present application use StandardScaler (StandardScaler is a tool provided in the machine learning library) to perform standardization processing on the feature data, which helps to improve the training efficiency and prediction accuracy of the model.
[0068] Based on the above embodiments, before inputting the five-dimensional input vector into the neural network architecture for training in the embodiments of the present application, it further includes: creating a two-layer fully connected network, using the ReLU activation function and a linear node for the output layer, and integrating L2 regularization (also known as ridge regression, a regularization method widely used in machine learning and statistics) and Dropout technology to construct the neural network architecture; wherein, the loss function of the neural network architecture uses the Huber loss.
[0069] The neural network architecture of this application: A two-layer fully connected network (64-32 nodes) is adopted, with the ReLU activation function and a linear node in the output layer. The L2 regularization (λ = 0.01) and Dropout (p = 0.2) techniques are integrated to suppress overfitting, and the Huber loss (δ = 1.0) is used as the loss function. In the embodiments of this application, the two-layer fully connected network (64-32 nodes) consists of two fully connected layers. The first layer has 64 nodes and the second layer has 32 nodes. This structure is complex enough to learn and model the complex non-linear relationship between the input features and the output. The input layer receives the input vector (including the total phosphorus concentration of influent water, the total phosphorus concentration of effluent water, the gas dissolution amount, and the hydraulic retention time). After being processed by the two fully connected layers, the output layer predicts the minimum chemical dosage. The ReLU (Rectified Linear Unit) activation function is used in the hidden layer, which can introduce non-linearity and enable the network to learn complex patterns. The linear activation function is used in the output layer to directly output the predicted minimum chemical dosage. The linear activation function can ensure that the output has no limit and can adapt to all possible numerical ranges. L2 regularization restricts the excessive growth of the weights by adding the L2 norm term of the weights to the loss function, thereby reducing the complexity of the model and preventing overfitting. The parameter λ = 0.01 represents the strength of regularization, which balances the relationship between the model fitting the data and preventing overfitting. The Dropout technique (p = 0.2) is a technique that randomly discards the outputs of some neurons during the training process to prevent the network from over-relying on certain specific neurons. Here, p = 0.2 means that 20% of the neurons will be randomly discarded in each iteration during the training process, which increases the robustness of the model and improves its generalization ability. The Huber loss (a loss function commonly used in machine learning and statistics) combines the advantages of the mean square error (MSE) and the mean absolute error (MAE). It uses the square loss for small residuals and the absolute value loss for large residuals, which makes the model more robust when dealing with outliers. The parameter δ = 1.0 defines the threshold of the residuals. The part exceeding this threshold uses the absolute value loss, and the part less than or equal to this threshold uses the square loss.
[0070] The non-linear neural network modeling replaces the linear model. A two-layer fully connected neural network is adopted. Through the non-linear mapping ability of the ReLU activation function, it can automatically learn the non-linear relationship between the chemical dosage and the total phosphorus concentration removal rate under different influent total phosphorus concentration and effluent total phosphorus concentration conditions, breaking through the linear limitation. Compared with the traditional Proportional -Integral – Derivative (PID) control or linear feedforward model that can only handle fixed working conditions, the neural network can autonomously learn the dynamic relationship between the chemical dosage and the total phosphorus concentration removal efficiency under different gas dissolution amounts and hydraulic retention time conditions, and adapt to the continuous change of water quality parameters.
[0071] Based on the above embodiments, after the five-dimensional input vector is input into the neural network architecture for training in the embodiments of the present application to obtain a preset neural network model, the following steps are further included: adding hard coding corresponding to the dosing amount limit in the preset neural network model; correspondingly, after the water quality parameters and each treatment plan are input into the trained preset neural network model to obtain the minimum dosing amount corresponding to each treatment plan, the following steps are further included: if the minimum dosing amount does not meet the dosing amount limit; re-inputting the input vector corresponding to the minimum dosing amount (inlet total phosphorus concentration, outlet total phosphorus concentration limit, dissolved air volume, and hydraulic retention time) into the preset neural network model for learning until the minimum dosing amount meets the dosing amount limit.
[0072] The embodiments of the present application are to ensure that the predicted dosing amount complies with the limiting conditions in actual operation. Through this mechanism, the system can continuously learn and adjust to ensure that the predicted dosing amount is both accurate and practical. This iterative optimization method can effectively balance the accuracy of the model and the feasibility of actual application, ensuring that the system can operate stably under various working conditions. This mechanism ensures that during actual operation, the dosing amount is always within a reasonable range, preventing the dosing amount from being too large or too small due to model prediction errors or sudden changes in working conditions.
[0073] Based on the above embodiments, the embodiments of the present application calculate the sewage treatment cost of each treatment plan based on each treatment plan and the minimum dosing amount corresponding to each treatment plan, including: determining the dissolved air volume corresponding to each treatment plan; determining the power corresponding to the dissolved air volume according to the power model including the relationship between the dissolved air volume and power; calculating the electricity cost corresponding to each treatment plan according to the power, treatment time, unit price of electricity, and the total amount of sewage treated corresponding to the treatment time; calculating the chemical agent cost according to the minimum dosing amount corresponding to each treatment plan; calculating the sewage treatment cost corresponding to each treatment plan according to the electricity cost and the chemical agent cost.
[0074] In the embodiments of the present application, each treatment plan has a specific dissolved air volume, and the size of the dissolved air volume directly affects the efficiency of the air flotation process and the required power consumption. The power model of the relationship between the dissolved air volume and power is obtained by fitting experimental data. Usually, the method of quadratic polynomial regression can be used to establish the power model. Substituting the dissolved air volume in the treatment plan into the power model, the corresponding power can be calculated. Electricity cost = power × treatment time × unit price of electricity / total amount of sewage treated. This formula calculates the electricity cost required to treat a unit volume of sewage under specific power and treatment time. Chemical agent cost = dosing amount × unit price of chemical agent. Adding the electricity cost and the chemical agent cost gives the total sewage treatment cost. By comparing the sewage treatment costs of different treatment plans, the treatment plan with the lowest sewage treatment cost is selected as the final sewage treatment plan, so as to minimize the sewage treatment cost on the premise of ensuring the effluent quality.
[0075] Of course, a cost model can also be constructed. The cost model calculates the chemical cost + electricity cost corresponding to different treatment schemes and outputs the target gas dissolution volume, target hydraulic retention time, and target minimum chemical dosage under the condition of the minimum sewage treatment cost.
[0076] To demonstrate the advantages of the sewage treatment method of this application, the following examples are given.
[0077] Advanced phosphorus removal from the tail water of a 50,000-ton / day sewage treatment plant.
[0078] Equipment configuration: Install an electromagnetic flowmeter and an on-line TP analyzer at the inlet end of the flotation tank. The dosing pump adopts frequency conversion control, and the PLC controller is equipped with the algorithm of the sewage treatment method of this application.
[0079] Model training: Collect historical data (3 months, sampling interval 5 minutes) to train the neural network. The mean square error (MSE) of the test set is 0.002, and the prediction deviation rate < 5%.
[0080] Operation effect: After the system is put into operation, the effluent TP concentration is stable at 0.03 - 0.05 mg / L, and the sewage treatment cost per ton of water is 0.3719 yuan / ton of water. Compared with the operation cost of the traditional advanced phosphorus removal method by flotation, which is about 0.5 yuan - 1.8 yuan, the operation cost is reduced by 25.62% - 78.89% year-on-year.
[0081] In the above embodiments, the sewage treatment method based on the neural network model is described in detail. This application also provides embodiments corresponding to the sewage treatment device based on the neural network model. It should be noted that this application describes the embodiments of the device part from two perspectives, one is from the perspective of functional modules, and the other is from the perspective of hardware.
[0082] Figure 3 The structural diagram of a sewage treatment device based on the neural network model provided by the embodiments of this application is as Figure 3 shown. The sewage treatment device based on the neural network model includes:
[0083] The first acquisition module 10 is used to acquire the water quality parameters of the current sewage in real time. The water quality parameters at least include the influent total phosphorus concentration and the effluent total phosphorus concentration limit.
[0084] The generation module 11 is used to generate different combinations of gas dissolution volume and hydraulic retention time to obtain several treatment schemes.
[0085] The prediction module 12 is used to input the water quality parameters and each treatment scheme into the trained preset neural network model to obtain the minimum chemical dosage corresponding to each treatment scheme.
[0086] The first calculation module 13 is configured to calculate the sewage treatment cost of each treatment plan based on each treatment plan and the corresponding minimum chemical dosage, and use the treatment plan corresponding to the lowest sewage treatment cost as the target plan, so as to perform sewage treatment by applying the target dissolved gas volume, the target hydraulic retention time, and the target minimum chemical dosage corresponding to the target plan.
[0087] Based on the above embodiments, in a feasible embodiment, it further includes:
[0088] The second acquisition module is configured to acquire historical data; wherein, the historical data includes the historical total phosphorus concentration of the effluent, and the corresponding historical total phosphorus concentration of the influent, historical dissolved gas volume, historical hydraulic retention time, and historical chemical dosage; wherein, the historical total phosphorus concentration of the effluent is less than or equal to the effluent total phosphorus concentration limit;
[0089] The second calculation module is configured to calculate the total phosphorus concentration removal rate according to the historical total phosphorus concentration of the influent and the historical total phosphorus concentration of the effluent;
[0090] The construction module is configured to construct a five-dimensional input vector including the total phosphorus concentration removal rate, historical total phosphorus concentration of the influent, historical dissolved gas volume, historical hydraulic retention time, and historical chemical dosage;
[0091] The training module is configured to input the five-dimensional input vector into the neural network architecture for training to obtain a preset neural network model.
[0092] Based on the above embodiments, in a feasible embodiment, it further includes:
[0093] The separation module is configured to separate the historical data into feature data and target variables; wherein, the feature data includes the historical total phosphorus concentration of the influent, historical total phosphorus concentration of the effluent, historical dissolved gas volume, and historical hydraulic retention time, and the target variable is the historical chemical dosage;
[0094] The processing module is configured to perform standardization processing on each feature data so that the mean of each feature data is 0 and the standard deviation is 1.
[0095] Based on the above embodiments, in a feasible embodiment, it further includes:
[0096] The creation module is configured to create a two-layer fully connected network, use the ReLU as the activation function and the output layer as linear nodes, and integrate the L2 regularization and Dropout techniques to construct a neural network architecture; wherein, the loss function of the neural network architecture adopts the Huber loss.
[0097] Based on the above embodiments, in a feasible embodiment, it further includes:
[0098] The addition module is configured to add hard coding corresponding to the chemical dosage limit to the preset neural network model;
[0099] Correspondingly, it further includes:
[0100] A comparison module, configured to determine if the minimum chemical dosage does not meet the chemical dosage limit;
[0101] A learning module, configured to re-enter the input vector corresponding to the minimum chemical dosage into a preset neural network model for learning until the minimum chemical dosage meets the chemical dosage limit.
[0102] Based on the above embodiments, the first calculation module includes:
[0103] A first determination unit, configured to determine the dissolved gas volume corresponding to each treatment solution;
[0104] A second determination unit, configured to determine the power corresponding to the dissolved gas volume according to a power model including the relationship between the dissolved gas volume and power;
[0105] A first calculation unit, configured to calculate the electricity cost corresponding to each treatment solution according to the power, treatment time, unit price of electricity used, and the total amount of sewage treated corresponding to the treatment time;
[0106] A second calculation unit, configured to calculate the chemical cost according to the minimum chemical dosage corresponding to each treatment solution;
[0107] A third calculation unit, configured to calculate the sewage treatment cost corresponding to each treatment solution according to the electricity cost and the chemical cost.
[0108] Since the embodiments of the device part correspond to the embodiments of the method part, for the embodiments of the device part, please refer to the description of the embodiments of the method part, which will not be elaborated here.
[0109] Figure 4 The following is a structural diagram of another sewage treatment device based on a neural network model provided by the embodiments of the present application. As Figure 4 shown, the sewage treatment device based on the neural network model includes: a memory 20, configured to store a computer program;
[0110] A processor 21, configured to implement the steps of the sewage treatment method based on the neural network model as described in the above embodiments when executing the computer program.
[0111] The sewage treatment device based on the neural network model provided by this embodiment may include, but is not limited to, smart phones, tablet computers, laptop computers, desktop computers, etc.
[0112] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the Central Processing Unit (CPU); the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may be integrated with a Graphics Processing Unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 21 may further include an Artificial Intelligence (AI) processor, and the AI processor is used to process computational operations related to machine learning.
[0113] The memory 20 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 20 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201. After the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the sewage treatment method based on the neural network model disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may further include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, water quality parameters, etc.
[0114] In some embodiments, the sewage treatment device based on the neural network model may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
[0115] Those skilled in the art can understand that Figure 4 the structure shown in
[0116] The sewage treatment device based on a neural network model provided by an embodiment of the present application includes a memory and a processor. When the processor executes the program stored in the memory, the following method can be implemented: obtaining in real time the water quality parameters of the current sewage, where the water quality parameters at least include the influent total phosphorus concentration and the effluent total phosphorus concentration limit value; generating different combinations of the gas dissolution amount and the hydraulic retention time to obtain several treatment plans; inputting the water quality parameters and each treatment plan into a trained preset neural network model to obtain the minimum chemical dosage corresponding to each treatment plan; calculating the sewage treatment cost of each treatment plan based on each treatment plan and the minimum chemical dosage corresponding to each treatment plan, and taking the treatment plan corresponding to the minimum sewage treatment cost as the target plan, so as to apply the target gas dissolution amount, the target hydraulic retention time, and the target minimum chemical dosage corresponding to the target plan for sewage treatment.
[0117] Finally, the present application also provides an embodiment corresponding to a computer-readable storage medium. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps recorded in the sewage treatment method based on a neural network model in the above method embodiment are implemented.
[0118] It can be understood that if the method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and executes all or part of the steps of the methods described in various embodiments of the present application. The aforementioned storage media include: USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs, etc., which can store program codes.
[0119] The above has introduced in detail a sewage treatment method, system, device, and medium based on a neural network model provided by the present application. The various embodiments in the specification are described in a progressive manner, and the key points of each embodiment are the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method part. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
[0120] It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the said element.
Claims
1. A sewage treatment method based on a neural network model, characterized in that, including: Obtaining in real time the water quality parameters of the current sewage, where the water quality parameters at least include the influent total phosphorus concentration and the effluent total phosphorus concentration limit; Generating different combinations of the gas dissolution amount and the hydraulic retention time to obtain a number of treatment plans; Inputting the water quality parameters and each of the treatment plans into a trained preset neural network model to obtain the minimum chemical dosage corresponding to each treatment plan; Calculating the sewage treatment cost of each treatment plan based on each treatment plan and the minimum chemical dosage corresponding to each treatment plan, and taking the treatment plan corresponding to the lowest sewage treatment cost as the target plan, so as to apply the target gas dissolution amount, the target hydraulic retention time and the target minimum chemical dosage corresponding to the target plan for sewage treatment.
2. The sewage treatment method based on the neural network model according to claim 1, characterized in that Before inputting the water quality parameters and each of the treatment plans into a trained preset neural network model to obtain the minimum chemical dosage corresponding to each treatment plan, it further includes: Obtaining historical data; where the historical data includes the historical effluent total phosphorus concentration, and the historical influent total phosphorus concentration, historical gas dissolution amount, historical hydraulic retention time and historical chemical dosage corresponding to the historical effluent total phosphorus concentration; where the historical effluent total phosphorus concentration is less than or equal to the effluent total phosphorus concentration limit; Calculating the total phosphorus concentration removal rate according to the historical influent total phosphorus concentration and the historical effluent total phosphorus concentration; Constructing a five-dimensional input vector including the total phosphorus concentration removal rate, the historical influent total phosphorus concentration, the historical gas dissolution amount, the historical hydraulic retention time and the historical chemical dosage; Inputting the five-dimensional input vector into a neural network architecture for training to obtain the preset neural network model.
3. The sewage treatment method based on a neural network model according to claim 2, characterized in that, Before calculating the total phosphorus concentration removal rate according to the historical influent total phosphorus concentration and the historical effluent total phosphorus concentration, it further includes: Separating the historical data to obtain feature data and a target variable; where the feature data includes the historical influent total phosphorus concentration, the historical effluent total phosphorus concentration, the historical gas dissolution amount and the historical hydraulic retention time, and the target variable is the historical chemical dosage; Performing standardization processing on each piece of the feature data so that the mean of each piece of the feature data is 0 and the standard deviation is 1.
4. The sewage treatment method based on a neural network model according to claim 2, characterized in that, Before inputting the five-dimensional input vector into a neural network architecture for training, it further includes: Creating a two-layer fully connected network, using the ReLU as the activation function and a linear node as the output layer, and integrating the L2 regularization and Dropout techniques to construct the neural network architecture; where the loss function of the neural network architecture uses the Huber loss.
5. The sewage treatment method based on a neural network model according to claim 2, characterized in that After inputting the five-dimensional input vector into a neural network architecture for training to obtain the preset neural network model, it further includes: Adding a hard code corresponding to the chemical dosage limit in the preset neural network model; Correspondingly, after inputting the water quality parameters and each of the treatment plans into a trained preset neural network model to obtain the minimum chemical dosage corresponding to each treatment plan, it further includes: If the minimum chemical dosage does not meet the chemical dosage limit; Re-inputting the input vector corresponding to the minimum chemical dosage into the preset neural network model for learning until the minimum chemical dosage meets the chemical dosage limit.
6. The sewage treatment method based on a neural network model according to claim 1, characterized in that Calculating the sewage treatment cost of each treatment solution based on each treatment solution and the minimum chemical dosage corresponding to each treatment solution, including: Determining the gas dissolution amount corresponding to each treatment solution; Determining the power corresponding to the gas dissolution amount according to the power model including the relationship between the gas dissolution amount and power; Calculating the electricity cost corresponding to each treatment solution according to the power, treatment time, electricity unit price, and the total amount of sewage treated corresponding to the treatment time; Calculating the chemical cost according to the minimum chemical dosage corresponding to each treatment solution; Calculating the sewage treatment cost corresponding to each treatment solution according to the electricity cost and the chemical cost.
7. A sewage treatment system, characterized in that, Applied to the sewage treatment method based on the neural network model according to any one of claims 1 to 6, including: a chemical dosing pump, a first TP sensor, a second TP sensor, a coagulation tank, a flotation tank, a reservoir, a micro-nano flotation device, and a control device; The chemical dosing pump is connected to the water inlet of the coagulation tank, the water outlet of the coagulation tank is connected to the water inlet of the flotation tank, the water outlet of the flotation tank is connected to the reservoir, the micro-nano flotation device is respectively connected to the flotation tank and the reservoir, the first TP sensor is arranged on the water inlet pipeline of the coagulation tank, the second TP sensor is arranged on the water outlet pipeline of the reservoir, the control device is respectively connected to the chemical dosing pump, the first TP sensor, the second TP sensor, and the micro-nano flotation device, and the first TP sensor is used to obtain the total phosphorus concentration of the influent in real time.
8. A sewage treatment device based on a neural network model, characterized in that, Including: A first acquisition module for acquiring the water quality parameters of the current sewage in real time, where the water quality parameters at least include the influent total phosphorus concentration and the effluent total phosphorus concentration limit; A generation module for generating different combinations of gas dissolution amount and hydraulic retention time to obtain several treatment solutions; A prediction module for inputting the water quality parameters and each treatment solution into a trained preset neural network model to obtain the minimum chemical dosage corresponding to each treatment solution; A first calculation module for calculating the sewage treatment cost of each treatment solution based on each treatment solution and the minimum chemical dosage corresponding to each treatment solution, and taking the treatment solution corresponding to the minimum sewage treatment cost as the target solution, so as to apply the target gas dissolution amount, target hydraulic retention time, and target minimum chemical dosage corresponding to the target solution for sewage treatment.
9. A sewage treatment device based on a neural network model, characterized in that, Including a memory for storing computer programs; A processor for implementing the steps of the sewage treatment method based on the neural network model according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by the processor, the steps of the sewage treatment method based on the neural network model according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Chemical feed control device, water treatment system, chemical feed control method, and program
CN110709354A
Energy-saving control method for industrial park sewage treatment equipment
CN118666330A
Sewage treatment method and device, electronic equipment and program product
CN119294573A
Intelligent dosing setting method for wastewater treatment system
WO2024198228A1
Cited By
Self-adaptive pipe network dynamic hydraulic balance online optimization method
CN120524873A
An Adaptive Online Optimization Method for Dynamic Hydraulic Balance of Pipeline Networks
CN120524873B
Leachate treatment method based on microalgae coupling nitrification process
CN120647032A
Micro-nano air flotation phosphorus removal real-time control method, device and equipment based on neural network model and medium
CN121704203A