Water quality evaluation method and system for discharged water of sewage treatment plant
Through deep learning anomaly detection, particle swarm optimization filtering, integrated learning prediction and multi-objective optimization strategy generation methods, the immediacy, responsiveness, cost and interpretation difficulty of water quality monitoring and improvement in sewage treatment plants is solved, and efficient and accurate water quality management is achieved.
Patent Information
- Application Number
- CN202510157129.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-03-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology cannot achieve immediate feedback, and it has poor response capabilities to sudden water quality changes, is expensive, and is difficult to interpret data.
Data processing is performed using deep learning anomaly detection model and particle swarm optimization adaptive filtering algorithm, an integrated learning water quality prediction model is built, and water quality improvement strategies are generated using multi-objective optimization algorithms, and these strategies are optimized through reinforcement learning algorithms.
Real-time monitoring and management of drainage water quality in sewage treatment plants has been achieved, the accuracy of prediction of water quality changes has been improved and the comprehensive effect of water quality improvement has been improved, cost has been reduced and data interpretation has been simplified.
Smart Images

Figure CN119624190A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of water treatment technology, and in particular to a method and system for evaluating the water quality of wastewater discharged from a sewage treatment plant. Background Art
[0002] With the acceleration of industrialization and urbanization, water pollution is becoming increasingly serious, and sewage treatment has become an important part of environmental protection. As a key facility for controlling water pollution, the quality of sewage treatment plants' drainage is directly related to the ecological safety of water bodies and human health.
[0003] At present, the water quality evaluation method based on laboratory chemical analysis is widely used at home and abroad, such as the determination of chemical oxygen demand (COD), biochemical oxygen demand (BOD), ammonia nitrogen and other indicators. In addition, some sewage treatment plants have begun to try to use online monitoring instruments to achieve real-time water quality monitoring. These instruments can continuously measure parameters such as pH, dissolved oxygen, and conductivity, and send the results to the central control system or cloud platform through the data transmission system. The laboratory analysis method requires the collection of samples and then taking them back to the laboratory for processing. The whole process takes a long time and cannot achieve instant feedback. The response ability to sudden changes in water quality is poor; frequent laboratory testing and maintenance of online monitoring equipment will incur high costs, especially for small sewage treatment plants. This is an expensive expense; for non-professionals, how to extract useful information from the massive data of online monitoring equipment and make accurate judgments is a major challenge. Summary of the invention
[0004] The embodiment of the present invention provides a water quality evaluation method and system for wastewater treatment plant drainage, which is used to solve the problems in the prior art of being unable to achieve instant feedback, having poor responsiveness to sudden changes in water quality, high cost, and high difficulty in data interpretation.
[0005] In a first aspect, an embodiment of the present invention provides a method for evaluating water quality of wastewater discharged from a sewage treatment plant, comprising: Collecting water quality parameters at multiple points in a sewage treatment plant, performing data processing on the water quality parameters, and obtaining a comprehensive water quality data set; Using a deep learning anomaly detection model to perform anomaly detection on the comprehensive water quality data set, identifying abnormal data points, and using an adaptive filtering algorithm based on particle swarm optimization to dynamically correct or eliminate the abnormal data points to obtain normal water quality data; Based on the normal water quality data, a water quality prediction model is constructed using an integrated learning method, and the water quality prediction model is used to predict the water quality change trend to obtain a water quality change trend prediction result; Using a first water quality improvement strategy recommendation mechanism based on a multi-objective optimization algorithm, a target water quality improvement measure combination is generated according to the water quality change trend prediction result and the normal water quality data; A closed-loop feedback mechanism is established, and a reinforcement learning algorithm is used to evaluate the application effect of the target water quality improvement measure combination to obtain an application effect evaluation result. The key parameters of the water quality prediction model and the multi-objective optimization algorithm are adjusted according to the application effect evaluation result to optimize the first water quality improvement strategy recommendation mechanism to obtain a second water quality improvement strategy recommendation mechanism. Based on the second water quality improvement strategy recommendation mechanism, an optimal target water quality improvement measure combination is generated.
[0006] Optionally, the first water quality improvement strategy recommendation mechanism based on a multi-objective optimization algorithm is used to generate a target water quality improvement measure combination according to the water quality change trend prediction result and the normal water quality data, including: Based on the water quality change trend prediction result and the normal water quality data, determining an optimization target, wherein the optimization target includes reducing chemical oxygen demand, increasing dissolved oxygen level, and reducing heavy metal content; Based on the optimization target, construct a multi-objective optimization model, wherein the multi-objective optimization model is used to implement the first water quality improvement strategy recommendation mechanism based on the multi-objective optimization algorithm; The water quality change trend prediction result and the normal water quality data are input into the multi-objective optimization model, and the multi-objective optimization model calculates the optimal solution set that meets the optimization objectives. Based on the optimal solution set, a target water quality improvement measure combination is generated, and the target water quality improvement measure combination includes increasing the aeration volume, adjusting the pH value, and adding chemical agents.
[0007] Optionally, the water quality change trend prediction result and the normal water quality data are input into the multi-objective optimization model, and the multi-objective optimization model calculates an optimal solution set that meets the optimization objectives, and based on the optimal solution set, generates a target water quality improvement measure combination, wherein the target water quality improvement measure combination includes increasing aeration volume, adjusting pH value, and adding chemical agents, including: Converting the water quality change trend prediction result and the normal water quality data into input data, and inputting the input data into the multi-objective optimization model, wherein the input data includes historical water quality data, water quality change trend and standard range of water quality parameters; Based on the multi-objective optimization model, using a non-dominated sorting genetic algorithm, different combinations of water quality improvement measures are calculated, and the impact of each combination of water quality improvement measures on the normal water quality data is evaluated to obtain an impact assessment result, and based on the impact assessment result, an optimal solution set that meets the optimization goal is generated; Based on the optimal solution set, a combination of water quality improvement measures to be verified is selected, and the effect of the combination of water quality improvement measures to be verified in solving the optimization target is analyzed to obtain a solution effect analysis result; based on the solution effect analysis result, feasibility factors are compared to verify the combination of water quality improvement measures to be verified, and a target water quality improvement measure combination is obtained, wherein the feasibility factors include implementation cost and operational feasibility.
[0008] Optionally, based on the multi-objective optimization model, a non-dominated sorting genetic algorithm is used to calculate different combinations of water quality improvement measures, and the impact of each combination of water quality improvement measures on the normal water quality data is evaluated to obtain an impact assessment result, and based on the impact assessment result, an optimal solution set that meets the optimization goal is generated, including: Initializing parameters of a non-dominated sorting genetic algorithm, generating an initial population based on the parameters, wherein each individual in the initial population represents a set of water quality improvement measures, and the parameters include an initial population size, a crossover probability, and a mutation probability; Based on the water quality change trend prediction result and the normal water quality data, the initial population is evaluated to obtain an initial population performance evaluation result, and based on the initial population performance evaluation result, individuals in the initial population are non-dominatedly sorted to obtain a non-dominated sorting result; Based on the non-dominated sorting result, the crowding distance of each individual in the initial population is calculated to obtain the crowding distance of each individual; Based on the non-dominated sorting result and the crowding distance, a target individual is selected as a next-generation population, a crossover operation is performed on the next-generation population to obtain a crossover population, and a mutation operation is performed on the crossover population to obtain a mutated population; Based on the water quality change trend prediction result and the normal water quality data, the mutated population is evaluated to obtain a performance evaluation result of the mutated population; based on the performance evaluation result of the mutated population, the mutated population is updated to obtain an updated population; the updated population is verified; if the verification passes, a target population is obtained; if the verification fails, the target individual selection, crossover operation, mutation operation and evaluation operation are repeatedly performed until a termination condition is met; the target population represents an optimal solution set; and the termination condition is that a diversity index of the population is lower than a preset threshold, and the diversity index includes a standard deviation.
[0009] Optionally, the deep learning anomaly detection model is used to perform anomaly detection on the comprehensive water quality data set, abnormal data points are identified, and an adaptive filtering algorithm based on particle swarm optimization is used to dynamically correct or eliminate the abnormal data points to obtain normal water quality data, including: Based on the comprehensive water quality data set, an initial deep learning model is selected, and a deep learning anomaly detection model is constructed based on the initial deep learning model; Based on the deep learning anomaly detection model, anomaly detection is performed on the comprehensive water quality data set, a difference value is obtained by calculating the difference between the data in the comprehensive water quality data set and the data in the deep learning anomaly detection model, and a data point with a difference value higher than a preset threshold is selected as an abnormal data point; An adaptive filtering algorithm based on particle swarm optimization is used to dynamically correct or eliminate the abnormal data points to obtain normal water quality data.
[0010] Optionally, the adaptive filtering algorithm based on particle swarm optimization is used to dynamically correct or eliminate the abnormal data points to obtain normal water quality data, including: Initializing a particle swarm of a particle swarm optimization algorithm, wherein the initialization content includes initial parameters of the particle swarm and the position and velocity of each particle, wherein the initial parameters include the particle population size and the maximum number of iterations; Based on the difference value, defining a fitness function of a particle swarm optimization algorithm; Based on the particle swarm and the fitness function, the adaptive filtering algorithm is used to dynamically adjust the filtering parameters of the particle swarm to minimize the difference value and obtain the optimized filtering parameters. Based on the optimized filtering parameters, the abnormal data points are corrected. If the abnormal data points cannot meet the preset effects after correction, the abnormal data points are removed to obtain normal water quality data. The preset effects include the difference value being within a preset range.
[0011] Optionally, the closed-loop feedback mechanism is established, and a reinforcement learning algorithm is used to evaluate the application effect of the target water quality improvement measure combination to obtain an application effect evaluation result, and the key parameters of the water quality prediction model and the multi-objective optimization algorithm are adjusted according to the application effect evaluation result to optimize the first water quality improvement strategy recommendation mechanism to obtain a second water quality improvement strategy recommendation mechanism, and based on the second water quality improvement strategy recommendation mechanism, an optimal target water quality improvement measure combination is generated, including: Defining an environment for a reinforcement learning algorithm, the definition including a state space of the water quality parameter, an action space of the target water quality improvement measure combination, and a reward function; Using the reinforcement learning algorithm to evaluate the target water quality improvement measure combination, obtain an application evaluation effect, calculate a reward value for each target water quality improvement measure combination based on the application evaluation effect and the evaluation index, and obtain an application effect evaluation result based on the reward value, wherein the evaluation index includes a change in the water quality parameter and a treatment cost; Based on the application effect evaluation result, adjusting the water quality prediction model to obtain an adjusted water quality prediction model; based on the application effect evaluation result, adjusting the key parameters of the multi-objective optimization algorithm to obtain an adjusted multi-objective optimization algorithm; Based on the adjusted water quality prediction model and the adjusted multi-objective optimization algorithm, the first water quality improvement strategy recommendation mechanism is optimized to obtain a second water quality improvement strategy recommendation mechanism; based on the second water quality improvement strategy recommendation mechanism, the normal water quality data is evaluated to obtain a water quality evaluation result; based on the water quality evaluation result and the second water quality improvement strategy recommendation mechanism, an optimal target water quality improvement measure combination is generated.
[0012] In a second aspect, an embodiment of the present invention provides a water quality evaluation system for wastewater treatment plant drainage, comprising: A collection module is used to collect water quality parameters at multiple points in the sewage treatment plant, perform data processing on the water quality parameters, and obtain a comprehensive water quality data set; An identification module is used to perform anomaly detection on the comprehensive water quality data set using a deep learning anomaly detection model, identify abnormal data points, and dynamically correct or eliminate the abnormal data points using an adaptive filtering algorithm based on particle swarm optimization to obtain normal water quality data; A prediction module, for constructing a water quality prediction model based on the normal water quality data using an integrated learning method, and using the water quality prediction model to predict the water quality change trend to obtain a water quality change trend prediction result; A generation module, for generating a target water quality improvement measure combination according to the water quality change trend prediction result and the normal water quality data by using a first water quality improvement strategy recommendation mechanism based on a multi-objective optimization algorithm; A construction module is used to establish a closed-loop feedback mechanism, use a reinforcement learning algorithm to evaluate the application effect of the target water quality improvement measure combination, obtain an application effect evaluation result, adjust the key parameters of the water quality prediction model and the multi-objective optimization algorithm according to the application effect evaluation result, so as to optimize the first water quality improvement strategy recommendation mechanism, obtain a second water quality improvement strategy recommendation mechanism, and generate an optimal target water quality improvement measure combination based on the second water quality improvement strategy recommendation mechanism.
[0013] In a third aspect, an embodiment of the present invention provides a computing device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute a method for evaluating the water quality of wastewater discharged from a sewage treatment plant as described in any one of the first aspects.
[0014] In a fourth aspect, an embodiment of the present invention provides a computer storage medium having computer program instructions stored thereon, wherein the computer program instructions, when executed by a processor, implement a method for evaluating the water quality of wastewater discharged from a sewage treatment plant as described in any one of the first aspects.
[0015] In an embodiment of the present invention, water quality parameters of multiple points in a sewage treatment plant are collected, and data processing is performed on the water quality parameters to obtain a comprehensive water quality data set; a deep learning anomaly detection model is used to perform anomaly detection on the comprehensive water quality data set to identify abnormal data points, and an adaptive filtering algorithm based on particle swarm optimization is used to dynamically correct or eliminate the abnormal data points to obtain normal water quality data; based on the normal water quality data, a water quality prediction model is constructed using an integrated learning method, and the water quality prediction model is used to predict the water quality change trend to obtain a water quality change trend prediction result; a first water quality improvement strategy recommendation mechanism based on a multi-objective optimization algorithm is used to generate a target water quality improvement measure combination according to the water quality change trend prediction result and the normal water quality data; a closed-loop feedback mechanism is established, and a reinforcement learning algorithm is used to evaluate the application effect of the target water quality improvement measure combination to obtain an application effect evaluation result, and the key parameters of the water quality prediction model and the multi-objective optimization algorithm are adjusted according to the application effect evaluation result to optimize the first water quality improvement strategy recommendation mechanism to obtain a second water quality improvement strategy recommendation mechanism, and based on the second water quality improvement strategy recommendation mechanism, an optimal target water quality improvement measure combination is generated. The technical solution provided by the present invention realizes comprehensive, accurate and real-time monitoring and management of the water quality of sewage treatment plants, significantly improving the effect of water quality management and improvement. Among them, based on the prediction results of water quality change trends and normal water quality data, the scientificity and effectiveness of the optimization measures are ensured; using a multi-objective optimization model and a non-dominated sorting genetic algorithm, multiple objectives can be optimized at the same time, and the best solution set that meets all objectives can be found, thereby improving the comprehensive effect of water quality improvement; the generated target water quality improvement measure combination includes increasing aeration volume, adjusting pH value, adding chemical agents, etc., which is practical and feasible; in the evaluation and optimization process, environmental impact parameters are taken into account to ensure that the water quality improvement measures are not only effective, but also environmentally friendly and meet the requirements of sustainable development; by comparing the implementation cost and operational feasibility, it is ensured that the selected water quality improvement measure combination is economically reasonable and operationally feasible, thereby improving the success rate and effect of implementation.
[0016] These and other aspects of the present invention will become more apparent from the following description of the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. 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 paying creative work.
[0018] Figure 1 A flow chart of a method for evaluating water quality of wastewater discharged from a sewage treatment plant provided by an embodiment of the present invention; Figure 2 A schematic diagram of the structure of a water quality evaluation system for wastewater from a sewage treatment plant provided by an embodiment of the present invention; Figure 3 A schematic diagram of the structure of a computing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0020] In some of the processes described in the specification and claims of the present invention and the above-mentioned figures, multiple operations that appear in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this article or executed in parallel. The serial numbers of the operations, such as 101, 102, etc., are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel. It should be noted that the descriptions of "first", "second", etc. in this article are used to distinguish different messages, devices, modules, etc., do not represent the order of precedence, and do not limit the "first" and "second" to be different types.
[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in 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. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0022] Figure 1 A flow chart of a method for evaluating water quality of wastewater discharged from a sewage treatment plant is provided in accordance with an embodiment of the present invention. Figure 1 As shown, the method includes: In order to achieve comprehensive, accurate and real-time monitoring and management of the water quality of sewage treatment plant discharge, improve the efficiency and reliability of water quality evaluation, and provide strong technical support for environmental protection and water resources management. Based on this, the present invention provides a water quality evaluation method for sewage treatment plant discharge, such as Figure 1 ,include: Step 101: collecting water quality parameters at multiple points in a sewage treatment plant, performing data processing on the water quality parameters, and obtaining a comprehensive water quality data set; In this step, water quality parameters refer to various physical, chemical and biological indicators used to describe water quality characteristics, such as pH, dissolved oxygen, chemical oxygen demand (COD), biochemical oxygen demand (BOD), ammonia nitrogen, etc.
[0023] This step collects water quality parameters at different locations of the sewage treatment plant, such as the water inlet, each treatment unit, and the water outlet. These parameters include pH value, dissolved oxygen, chemical oxygen demand (COD), biochemical oxygen demand (BOD), ammonia nitrogen, etc. Data processing is performed on these parameters, including data cleaning, data standardization, and data integration. Data cleaning includes removing invalid or missing values, data standardization includes scaling the data to the same scale, and data integration includes merging data from different points into a comprehensive data set to obtain a comprehensive water quality data set to ensure data consistency and integrity.
[0024] Step 102: using a deep learning anomaly detection model to perform anomaly detection on the comprehensive water quality data set, identifying abnormal data points, and using an adaptive filtering algorithm based on particle swarm optimization to dynamically correct or eliminate the abnormal data points to obtain normal water quality data; In this step, particle swarm optimization (PSO) refers to an optimization algorithm based on swarm intelligence, which simulates the group behavior of bird flocks or fish schools to find the optimal solution. Adaptive filtering algorithm refers to an algorithm that can dynamically adjust the filtering parameters according to the input data, which is used to remove or correct abnormal data points.
[0025] In this step, a suitable deep learning model, such as an autoencoder or LSTM, is selected to build a deep learning anomaly detection model. The purpose of building this model is to learn the characteristic distribution of normal water quality data in order to identify abnormal data points; use the trained deep learning anomaly detection model to perform anomaly detection on the comprehensive water quality data set, calculate the difference between each data point and the model reconstruction data, such as the reconstruction error; select data points with a difference value higher than the preset threshold as abnormal data points; use an adaptive filtering algorithm based on particle swarm optimization to dynamically adjust the filtering parameters to minimize the difference value and obtain the optimized filtering parameters; based on the optimized filtering parameters, correct the abnormal data points. If the corrected data point still cannot meet the preset effect, the data point is removed to obtain normal water quality data. The normal water quality data includes the original normal water quality data in the comprehensive water quality data set and the new normal water quality data obtained after correcting the abnormal data point.
[0026] Step 103: Based on the normal water quality data, a water quality prediction model is constructed using an integrated learning method, and the water quality prediction model is used to predict the water quality change trend to obtain a water quality change trend prediction result; In this step, the ensemble learning method refers to building a strong learner by combining multiple weak learners to improve the prediction and generalization capabilities of the model. The water quality prediction model refers to a model trained using historical water quality data that can predict future water quality trends.
[0027] This step uses the normal water quality data obtained in step 102 to prepare training sets and validation sets; selects appropriate ensemble learning methods (such as random forests, gradient boosting trees, etc.), builds a water quality prediction model, uses independent validation set data to verify the water quality prediction model, and evaluates the prediction performance of the model. Common evaluation indicators include mean square error (MSE), mean absolute error (MAE) and R² score. The purpose of this model is to predict the trend of water quality changes in the future to obtain the prediction results of water quality change trends.
[0028] Step 104: using a first water quality improvement strategy recommendation mechanism based on a multi-objective optimization algorithm, generating a target water quality improvement measure combination according to the water quality change trend prediction result and the normal water quality data; In this step, multi-objective optimization algorithm refers to an optimization method that can find the optimal solution or Pareto front among multiple objectives.
[0029] This step determines the optimization goals based on the water quality trend prediction results and normal water quality data, such as reducing chemical oxygen demand, increasing dissolved oxygen levels, reducing heavy metal content, etc. Based on the determined optimization goals, a multi-objective optimization model is constructed. The purpose of the model is to find the best solution set that meets all optimization goals, and based on the best solution set, generate a combination of target water quality improvement measures.
[0030] Step 105: Establish a closed-loop feedback mechanism, use a reinforcement learning algorithm to evaluate the application effect of the target water quality improvement measure combination, obtain an application effect evaluation result, adjust the key parameters of the water quality prediction model and the multi-objective optimization algorithm according to the application effect evaluation result, so as to optimize the first water quality improvement strategy recommendation mechanism, obtain a second water quality improvement strategy recommendation mechanism, and generate an optimal target water quality improvement measure combination based on the second water quality improvement strategy recommendation mechanism; In this step, the closed-loop feedback mechanism refers to the continuous collection of data on actual application effects and the feedback to the model for adjustment to optimize model performance. Reinforcement learning algorithm refers to a machine learning method that learns the optimal strategy through interaction with the environment to maximize the cumulative reward.
[0031] This step establishes a closed-loop feedback mechanism, uses a reinforcement learning algorithm to evaluate the application effect of the target water quality improvement measure combination, obtains the application effect evaluation results, and adjusts the key parameters of the water quality prediction model based on the application effect evaluation results to improve the prediction accuracy of the model; adjusts the key parameters of the multi-objective optimization algorithm to optimize the generation of water quality improvement measures. Based on the adjusted water quality prediction model and multi-objective optimization algorithm, optimize the first water quality improvement strategy recommendation mechanism to obtain the second water quality improvement strategy recommendation mechanism. Based on the second water quality improvement strategy recommendation mechanism, generate the optimal target water quality improvement measure combination.
[0032] The embodiments of the present invention can achieve the following beneficial effects through the above steps: Through the deep learning anomaly detection model and particle swarm optimization adaptive filtering algorithm, abnormal data points can be effectively identified and corrected, improving the accuracy and reliability of water quality data; The water quality prediction model constructed using the ensemble learning method can accurately predict the future trend of water quality changes and provide a scientific basis for water quality management; The target water quality improvement measure combination generated by the multi-objective optimization algorithm can meet multiple optimization goals at the same time, thus improving the comprehensive effect of water quality improvement; The established closed-loop feedback mechanism evaluates and optimizes the application effects of water quality improvement measures through reinforcement learning algorithms, achieving continuous improvement of models and algorithms and ensuring the long-term stable operation of the system; During the evaluation and optimization process, environmental impact parameters were taken into account to ensure that water quality improvement measures were not only effective but also environmentally friendly and in line with the requirements of sustainable development.
[0033] To provide a scientific and effective water quality management solution for a sewage treatment plant, the present invention provides a specific embodiment. In step 104, a first water quality improvement strategy recommendation mechanism based on a multi-objective optimization algorithm is used to generate a target water quality improvement measure combination according to the water quality change trend prediction result and the normal water quality data. The specific steps include: Step 401: Based on the water quality change trend prediction result and the normal water quality data, determining an optimization target, wherein the optimization target includes reducing chemical oxygen demand, increasing dissolved oxygen level, and reducing heavy metal content; This step is based on the water quality trend prediction results and normal water quality data, and sets specific optimization goals according to the needs of water quality management and environmental protection. Common optimization goals include reducing chemical oxygen demand (COD), increasing dissolved oxygen levels (DO), and reducing heavy metal content. Chemical oxygen demand is an important indicator for measuring the degree of organic pollution in water. Reducing COD can reduce organic pollution; dissolved oxygen is the oxygen content in water. Increasing dissolved oxygen levels helps maintain the health of aquatic ecosystems; heavy metals such as lead, mercury, and cadmium are harmful to the environment and human health. Reducing heavy metal content is an important water quality management goal.
[0034] Step 402: constructing a multi-objective optimization model based on the optimization target, wherein the multi-objective optimization model is used to implement the first water quality improvement strategy recommendation mechanism based on the multi-objective optimization algorithm; This step builds a multi-objective optimization model to optimize multiple objectives simultaneously. The input of the model includes the water quality trend prediction results and normal water quality data, and the output is a solution set that meets all optimization objectives; select a suitable multi-objective optimization algorithm to apply to the model, such as the non-dominated sorting genetic algorithm NSGA-II, to solve the model; the non-dominated sorting genetic algorithm is a commonly used multi-objective optimization algorithm that can find multiple non-dominated solutions to form a Pareto frontier.
[0035] Step 403: input the water quality change trend prediction result and the normal water quality data into the multi-objective optimization model, calculate the optimal solution set that meets the optimization target through the multi-objective optimization model, and generate a target water quality improvement measure combination based on the optimal solution set, wherein the target water quality improvement measure combination includes increasing aeration volume, adjusting pH value, and adding chemical agents; In this step, the best solution set refers to the set of optimal solutions that meet all optimization objectives calculated by the multi-objective optimization model.
[0036] This step converts the water quality trend prediction results and normal water quality data into the input format required by the model. The input data includes historical water quality data, water quality trend, and standard range of water quality parameters. The multi-objective optimization model is used to calculate different combinations of water quality improvement measures, and the impact of each combination on normal water quality data is evaluated to obtain the impact assessment results. Based on the impact assessment results, the optimal solution set that meets the optimization objectives is generated. The optimal solution set is a set of non-dominated solutions, each of which represents a possible combination of water quality improvement measures. The most suitable solution is selected from the optimal solution set as the target water quality improvement measure combination.
[0037] The embodiments of the present invention can achieve the following beneficial effects through the above steps: Ensure that water quality management has clear direction and goals by determining specific optimization targets (such as reducing COD, increasing DO, and reducing heavy metal content); By using multi-objective optimization models and algorithms, multiple objectives can be optimized simultaneously, and the best solution set that meets all objectives can be found, thus improving the comprehensive effect of water quality improvement; Ensure the scientificity and effectiveness of optimization measures based on water quality trend prediction results and normal water quality data; The generated target water quality improvement measures include increasing aeration volume, adjusting pH value, adding chemical agents, etc., which are practical and feasible.
[0038] The present invention provides a specific embodiment, in step 403, the water quality change trend prediction result and the normal water quality data are input into the multi-objective optimization model, and the multi-objective optimization model calculates the best solution set that meets the optimization target, and based on the best solution set, generates a target water quality improvement measure combination, and the target water quality improvement measure combination includes increasing aeration volume, adjusting pH value and adding chemical agents, and specifically includes the following steps: Step 301: converting the water quality change trend prediction result and the normal water quality data into input data, and inputting the input data into the multi-objective optimization model, wherein the input data includes historical water quality data, water quality change trend and standard range of water quality parameters; This step converts the water quality trend prediction results and normal water quality data into the input format required by the multi-objective optimization model. The input data includes historical water quality data, water quality change trends and standard ranges of water quality parameters. Historical water quality data refers to the records of water quality parameters in the past period of time; water quality change trends refer to the predictions of water quality parameter changes in the future period of time; the standard range of water quality parameters refers to the normal range of each water quality parameter, which is used to evaluate the effectiveness of water quality improvement measures.
[0039] Step 302: Based on the multi-objective optimization model, using a non-dominated sorting genetic algorithm, different combinations of water quality improvement measures are calculated, and the impact of each combination of water quality improvement measures on the normal water quality data is evaluated to obtain an impact assessment result, and based on the impact assessment result, an optimal solution set that meets the optimization goal is generated; In this step, the non-dominated sorting genetic algorithm is selected to solve the multi-objective optimization model. The non-dominated sorting genetic algorithm generates a new solution set through genetic operations, including selection, crossover, and mutation, and generates a new population through non-dominated sorting and crowding distance calculation. Each individual in the new population represents a combination of water quality improvement measures; the impact of each combination of water quality improvement measures on normal water quality data is evaluated to obtain the impact assessment results. Based on the impact assessment results, the optimal solution set that meets the optimization objectives is generated. Each solution in the optimal solution set represents a combination of water quality improvement measures.
[0040] More specifically, the present invention provides a comprehensive evaluation function for evaluating the impact of each combination of water quality improvement measures on the normal water quality data. The specific formula is as follows: ; in, is the comprehensive evaluation function; represents a combination of water quality improvement measures; is a weight function, which indicates the relative importance of changes in water quality parameters; Indicates changes in water quality parameters; is a weight function, which indicates the relative importance of processing cost; represents the processing cost; is a weight function, which indicates the relative importance of the feasibility of the operation; Indicates operational feasibility; is the relative importance of environmental impacts; Indicates environmental impact; This comprehensive assessment function considers multiple factors, including changes in water quality parameters, treatment costs, operational feasibility, and environmental impacts, to more comprehensively evaluate the effectiveness and costs of a combination of water quality improvement measures.
[0041] Among them, the calculation formula for the change of water quality parameters is: ; in, Indicates changes in water quality parameters; is the number of water quality parameters, It is The weight of each water quality parameter, is the predicted water quality parameter value, is the actual water quality parameter value, is the standard range of water quality parameters; It is Standard deviation of each water quality parameter; The water quality parameter change calculation formula uses a Gaussian function to smooth the changes in water quality parameters, making the assessment more continuous and stable.
[0042] The calculation formula for processing cost is: ; in, represents the processing cost; is the number of cost items, It is The coefficient of the cost item, It is The value of the cost item; The processing cost calculation formula introduces nonlinear , which reflects the nonlinear growth of cost with the intensity of measures and is more in line with the actual situation.
[0043] The calculation formula for operational feasibility is: ; in, Indicates operational feasibility represents the number of operational feasibility items, It is The coefficient of the operational feasibility term, It is The value of the operation feasibility item; It is The maximum value of the feasibility items of the operations; The operational feasibility calculation formula takes into account the upper limit of operational feasibility and avoids excessive operations.
[0044] The calculation formula for environmental impact is: ; in, Indicates environmental impact; is the number of environmental impact parameters; It is The weight of each environmental impact parameter; is the predicted environmental impact parameter value; is the standard value of the environmental impact parameter; It is Standard deviation of environmental impact parameters; The environmental impact calculation formula introduces environmental impact parameters to ensure that the combination of water quality improvement measures is not only effective but also environmentally friendly.
[0045] Step 303: Based on the optimal solution set, a combination of water quality improvement measures to be verified is selected, and the effect of the combination of water quality improvement measures to be verified in solving the optimization target is analyzed to obtain a solution effect analysis result; based on the solution effect analysis result, feasibility factors are compared to verify the combination of water quality improvement measures to be verified, and a target water quality improvement measure combination is obtained, wherein the feasibility factors include implementation cost and operational feasibility; In this step, feasibility factors refer to assessing the practical feasibility of the combination of water quality improvement measures, including implementation costs and operational feasibility.
[0046] This step selects several most promising combinations of water quality improvement measures from the optimal solution set as the combinations to be verified; analyzes the effect of the combinations of water quality improvement measures to be verified in solving the optimization goals, and analyzes their contribution to the goals of reducing chemical oxygen demand, increasing dissolved oxygen levels, and reducing heavy metal content to obtain the results of the solution effect analysis; evaluates the actual feasibility of the combination of water quality improvement measures, including implementation costs and operational feasibility, specifically evaluating the cost of implementing water quality improvement measures, including equipment purchase, operation and maintenance costs; evaluates the operational difficulty and technical requirements of water quality improvement measures to ensure that the measures are feasible in actual operation. Combined with the results of the solution effect analysis and feasibility factors, comprehensively evaluate the advantages and disadvantages of each combination of water quality improvement measures; and finally selects the optimal combination of water quality improvement measures as the target combination of water quality improvement measures.
[0047] The embodiments of the present invention can achieve the following beneficial effects through the above steps: Ensure the scientificity and effectiveness of optimization measures based on water quality trend prediction results and normal water quality data; The use of multi-objective optimization model and non-dominated sorting genetic algorithm can optimize multiple objectives at the same time, find the best solution set that meets all objectives, and improve the comprehensive effect of water quality improvement; The generated target water quality improvement measures include increasing aeration volume, adjusting pH value, adding chemical agents, etc., which are practical and feasible; During the evaluation and optimization process, environmental impact parameters were taken into account to ensure that water quality improvement measures were not only effective but also environmentally friendly and in line with the requirements of sustainable development; By comparing implementation costs and operational feasibility, we ensure that the selected combination of water quality improvement measures is economically reasonable and operationally feasible, thereby improving the success rate and effectiveness of implementation.
[0048] In order to gain a deeper understanding of the process of generating an optimal solution set by a non-dominated sorting genetic algorithm, the present invention provides a specific embodiment based on this. The step 302, based on the multi-objective optimization model, uses a non-dominated sorting genetic algorithm to calculate different combinations of water quality improvement measures, and evaluates the impact of each combination of water quality improvement measures on the normal water quality data to obtain an impact assessment result. Based on the impact assessment result, an optimal solution set that meets the optimization goal is generated, which specifically includes the following steps: Step 311: Initializing the parameters of the non-dominated sorting genetic algorithm, and generating an initial population based on the parameters, wherein each individual in the initial population represents a combination of water quality improvement measures, and the parameters include the initial population size, crossover probability, and mutation probability; This step sets the size of the initial population, for example, 100 individuals; sets the probability of the crossover operation, for example, 0.9; sets the probability of the mutation operation, for example, 0.1; randomly generates the initial population, and each individual represents a combination of water quality improvement measures, for example, individual 1, increases the aeration volume by 20%, adjusts the pH value to 7.5, and adds 10 mg / L of flocculant; individual 2, increases the aeration volume by 15%, adjusts the pH value to 7.0, and adds 5 mg / L of disinfectant; individual 3, increases the aeration volume by 25%, adjusts the pH value to 8.0, and adds 50 mg / L of activated carbon.
[0049] Step 312: Based on the water quality change trend prediction result and the normal water quality data, the initial population is evaluated to obtain an initial population performance evaluation result, and based on the initial population performance evaluation result, individuals in the initial population are non-dominatedly sorted to obtain a non-dominated sorting result; This step evaluates the contribution of each individual to the water quality improvement target based on the water quality trend prediction results and normal water quality data, and obtains the initial population performance evaluation results, such as reducing chemical oxygen demand, increasing dissolved oxygen levels, and reducing heavy metal content. The individuals in the population are sorted according to the non-dominance relationship to form multiple levels. Individuals in the same level do not dominate each other on all targets, and the non-dominance level of each individual is obtained. For example, individual 1 is level 1; individual 2 is level 2; individual 3 is level 1.
[0050] Step 313: Based on the non-dominated sorting result, the crowding distance of each individual in the initial population is calculated to obtain the crowding distance of each individual; In this step, the crowding distance of each individual is calculated in the same level to maintain the diversity of the population. The larger the distance, the more unique the individual is; in the same level, the individuals are sorted by the value of each target, the distances between adjacent individuals are calculated, and the sum of these distances is taken as the crowding distance.
[0051] Step 314: based on the non-dominated sorting result and the crowding distance, select a target individual as the next generation population, perform a crossover operation on the next generation population to obtain a crossover population, and perform a mutation operation on the crossover population to obtain a mutated population; In this step, individuals with higher non-dominated ranks are selected first. If the ranks are the same, individuals with larger crowding distance are selected. The selected target individuals form the next generation population; two individuals are selected for crossover operation to generate new individuals. The crossover operation can generate new combinations by exchanging some genes, i.e. water quality improvement measures; mutation operation is performed on the newly generated individuals to randomly change some genes to increase the diversity of the population.
[0052] Step 315: Based on the water quality change trend prediction result and the normal water quality data, the mutated population is evaluated to obtain a performance evaluation result of the mutated population; based on the performance evaluation result of the mutated population, the mutated population is updated to obtain an updated population; the updated population is verified; if the verification passes, a target population is obtained; if the verification fails, target individuals are selected, crossover operations, mutation operations, and evaluation operations are repeatedly performed until a termination condition is met, the target population represents an optimal solution set, and the termination condition is that a diversity index of the population is lower than a preset threshold, and the diversity index includes a standard deviation; This step evaluates the contribution of each individual in the mutated population to the water quality improvement goal, and obtains the performance evaluation results of the mutated population, such as reducing chemical oxygen demand, increasing dissolved oxygen levels, and reducing heavy metal content. Based on the performance evaluation results of the mutated population, the individuals in the mutated population are compared with those in the current population, and better individuals are selected to form a new population. The updated population is verified. If the verification passes, that is, the optimization goal is met, the target population is obtained; if the verification fails, the target individual selection, crossover operation, mutation operation, and evaluation operation are repeated until the termination condition is met. The termination condition is that the diversity index of the population is lower than the preset threshold. The diversity index refers to the indicator used to evaluate the diversity of the population, such as the standard deviation. When the standard deviation is lower than the preset threshold, it indicates that the individuals in the population have converged and the optimization process can be stopped.
[0053] The embodiments of the present invention can achieve the following beneficial effects through the above steps: Ensure the scientificity and effectiveness of optimization measures based on water quality trend prediction results and normal water quality data; The use of multi-objective optimization model and non-dominated sorting genetic algorithm can optimize multiple objectives at the same time, find the best solution set that meets all objectives, and improve the comprehensive effect of water quality improvement; The generated target water quality improvement measures include increasing aeration volume, adjusting pH value, adding chemical agents, etc., which are practical and feasible.
[0054] In order to ensure the accuracy and reliability of water quality data and obtain high-quality normal water quality data, the present invention provides a specific embodiment based on this. The step 102 uses a deep learning anomaly detection model to perform anomaly detection on the comprehensive water quality data set, identifies abnormal data points, and uses an adaptive filtering algorithm based on particle swarm optimization to dynamically correct or eliminate the abnormal data points to obtain normal water quality data. The specific steps include: Step 211: Based on the comprehensive water quality data set, select an initial deep learning model, and build a deep learning anomaly detection model based on the initial deep learning model; In this step, the initial deep learning model refers to the base model selected for building the deep learning anomaly detection model. The deep learning anomaly detection model refers to the model built based on the initial deep learning model and is used to detect abnormal data points in the comprehensive water quality dataset.
[0055] In this step, a suitable deep learning model, such as an autoencoder or a long short-term memory network (LSTM), is selected as the basic model; the initial deep learning model is used to train the comprehensive water quality data set to build a deep learning anomaly detection model, the purpose of which is to learn the characteristic distribution of normal water quality data in order to identify abnormal data points. The training process includes data preparation, model training, and model verification. Specifically, the comprehensive water quality data set is divided into a training set and a verification set; the training set data is used to train the initial deep learning model and optimize the model parameters; the verification set data is used to verify the trained model and evaluate the performance of the model.
[0056] Step 212: Based on the deep learning anomaly detection model, anomaly detection is performed on the comprehensive water quality data set, a difference value is obtained by calculating the difference between the data in the comprehensive water quality data set and the data in the deep learning anomaly detection model, and a data point whose difference value is higher than a preset threshold is selected as an abnormal data point; In this step, the difference value refers to the difference between the data in the comprehensive water quality dataset and the data in the deep learning anomaly detection model, which is used to determine whether a data point is an anomaly.
[0057] In this step, the deep learning anomaly detection model detects abnormal data points in the comprehensive water quality data set. The difference between each data point in the comprehensive water quality data set and the corresponding data point in the deep learning anomaly detection model is calculated. Common methods include reconstruction error or prediction error. According to the performance of the model and actual needs, a threshold is set, and data points with a difference value higher than this threshold are regarded as abnormal data points. The specific anomaly detection process is as follows: the comprehensive water quality data set is input into the deep learning anomaly detection model; the difference value of each data point is calculated; and the data points with a difference value higher than the preset threshold are selected as abnormal data points.
[0058] Step 213: Adopting an adaptive filtering algorithm based on particle swarm optimization to dynamically correct or eliminate the abnormal data points to obtain normal water quality data; In this step, the abnormal data points are corrected by adjusting the filtering parameters to make them closer to the normal data points; if the corrected data points still cannot meet the preset effect, such as the difference value is within the preset range, the data points are eliminated, and normal water quality data is obtained after correction and elimination. The normal water quality data includes the original normal water quality data in the comprehensive water quality data set and the new normal water quality data obtained after the abnormal data points are corrected.
[0059] The embodiments of the present invention can achieve the following beneficial effects through the above steps: Through the deep learning anomaly detection model and the adaptive filtering algorithm based on particle swarm optimization, abnormal data points can be effectively identified and corrected, improving the accuracy and reliability of water quality data; The deep learning anomaly detection model can automatically learn the characteristic distribution of normal water quality data and accurately identify abnormal data points, reducing the need for manual intervention; The adaptive filtering algorithm based on particle swarm optimization can dynamically adjust the filtering parameters and correct abnormal data points, thus improving the integrity and consistency of the data. By correcting or eliminating abnormal data points, the integrity and reliability of the comprehensive water quality data set are ensured, providing high-quality data support for subsequent water quality analysis and prediction; The entire process is highly automated, reducing human errors and improving work efficiency.
[0060] In order to further improve the accuracy and reliability of water quality data, the present invention provides a specific embodiment, wherein step 213 uses an adaptive filtering algorithm based on particle swarm optimization to dynamically correct or remove the abnormal data points to obtain normal water quality data, specifically comprising the following steps: Step 221: Initializing a particle swarm of a particle swarm optimization algorithm, wherein the initialization content includes initial parameters of the particle swarm and the position and velocity of each particle, wherein the initial parameters include the particle population size and the maximum number of iterations; In this step, particle swarm refers to a set of solutions in the particle swarm optimization algorithm, each of which is called a particle. Particle position refers to the position of each particle in the search space, representing a potential solution. Particle velocity refers to the speed at which each particle moves in the search space, which is used to update the position of the particle.
[0061] The initialization process of this step includes setting the size of the particle swarm, such as 100 particles; setting the maximum number of iterations of the algorithm, such as 100 times; randomly initializing the position of each particle in the search space, representing a potential combination of filtering parameters; and randomly initializing the speed of each particle to update the position of the particle.
[0062] Step 222: Based on the difference value, define a fitness function of a particle swarm optimization algorithm; In this step, the fitness function refers to the function used to evaluate the performance of each particle, which is usually defined based on the optimization objective.
[0063] This step defines the fitness function, which is used to evaluate the performance of each particle. The fitness function is usually defined based on the difference value, and the goal is to minimize the difference value.
[0064] Step 223: Based on the particle swarm and the fitness function, the adaptive filtering algorithm is used to dynamically adjust the filtering parameters of the particle swarm to minimize the difference value and obtain the optimized filtering parameters. This step is based on the particle swarm and fitness function. The particle swarm optimization algorithm is used to dynamically adjust the filter parameters to minimize the difference value and obtain the optimized filter parameters. During the adjustment process, the performance of each particle is evaluated according to the fitness function, and the speed and position of the particle are updated.
[0065] Step 224: based on the optimized filtering parameters, the abnormal data points are corrected. If the abnormal data points cannot meet the preset effect after correction, the abnormal data points are removed to obtain normal water quality data. The preset effect includes that the difference value is within a preset range. This step uses the optimized filtering parameters to correct the abnormal data points; calculate the difference value of the corrected data points to determine whether the preset effect is met; the difference value is within the preset range, for example, the difference value is less than a certain threshold; if the corrected data point still cannot meet the preset effect, the data point is eliminated to obtain normal water quality data after correction or elimination.
[0066] The embodiments of the present invention can achieve the following beneficial effects through the above steps: Through particle swarm optimization algorithm and adaptive filtering algorithm, abnormal data points can be effectively identified and corrected, improving the accuracy and reliability of water quality data; The adaptive filtering algorithm can dynamically adjust the filtering parameters to minimize the difference value and ensure the integrity of the data; The entire process is highly automated, reducing the need for human intervention and improving work efficiency; By correcting or eliminating abnormal data points, the integrity and reliability of the comprehensive water quality data set are ensured, providing high-quality data support for subsequent water quality analysis and prediction; The particle swarm optimization algorithm can find the optimal filtering parameters, improve the effect of abnormal data point correction, and ensure data quality.
[0067] In order to ensure the continuous optimization and effectiveness of water quality improvement measures, based on this, the present invention provides a specific embodiment, in which the step 105 establishes a closed-loop feedback mechanism, uses a reinforcement learning algorithm to evaluate the application effect of the target water quality improvement measure combination, obtains an application effect evaluation result, and adjusts the key parameters of the water quality prediction model and the multi-objective optimization algorithm according to the application effect evaluation result to optimize the first water quality improvement strategy recommendation mechanism, obtains a second water quality improvement strategy recommendation mechanism, and generates an optimal target water quality improvement measure combination based on the second water quality improvement strategy recommendation mechanism, which specifically includes the following steps: Step 501: defining an environment of a reinforcement learning algorithm, wherein the definition includes the state space of the water quality parameters, the action space of the target water quality improvement measure combination, and a reward function; In this step, the environment refers to the virtual environment in the reinforcement learning algorithm, which is used to simulate the real world. The state space refers to the set of all possible states in the environment, such as different combinations of water quality parameters. The action space refers to the set of all possible actions in the environment, such as different combinations of water quality improvement measures. The reward function refers to the function used to evaluate the effect of each action, which is usually defined based on the evaluation metric.
[0068] This step defines all possible states of water quality parameters, such as the range of values of pH, dissolved oxygen, chemical oxygen demand, etc.; defines all possible actions for the target water quality improvement measure combination, such as increasing aeration volume, adjusting pH value, adding chemicals, etc.; defines a reward function to evaluate the effect of each combination of water quality improvement measures. The reward function is usually defined based on the evaluation indicator.
[0069] Step 502: using the reinforcement learning algorithm to evaluate the target water quality improvement measure combination, obtaining an application evaluation effect, calculating a reward value for each target water quality improvement measure combination based on the application evaluation effect and the evaluation index, and obtaining an application effect evaluation result based on the reward value, wherein the evaluation index includes a change in the water quality parameter and a treatment cost; In this step, the reinforcement learning algorithm interacts with the environment, selects different combinations of water quality improvement measures, and observes their effects, including changes in water quality parameters and treatment costs, to obtain application evaluation effects. The reward value of each combination of water quality improvement measures is calculated based on the application evaluation effects and evaluation indicators. Based on the reward value, the application effect evaluation results of each combination of water quality improvement measures are obtained.
[0070] Step 503: Based on the application effect evaluation result, the water quality prediction model is adjusted to obtain an adjusted water quality prediction model; based on the application effect evaluation result, the key parameters of the multi-objective optimization algorithm are adjusted to obtain an adjusted multi-objective optimization algorithm; In this step, the key parameters of the water quality prediction model are adjusted according to the application effect evaluation results to improve the prediction accuracy of the model. For example, the hyperparameters of the water quality prediction model, such as the learning rate and the number of hidden layer nodes, are adjusted to improve the prediction accuracy of the model. According to the application effect evaluation results, the key parameters of the multi-objective optimization algorithm, such as population size, crossover probability, mutation probability, etc., are adjusted to optimize the generation of combinations of water quality improvement measures.
[0071] Step 504: Based on the adjusted water quality prediction model and the adjusted multi-objective optimization algorithm, the first water quality improvement strategy recommendation mechanism is optimized to obtain a second water quality improvement strategy recommendation mechanism; based on the second water quality improvement strategy recommendation mechanism, the normal water quality data is evaluated to obtain a water quality evaluation result; based on the water quality evaluation result and the second water quality improvement strategy recommendation mechanism, an optimal target water quality improvement measure combination is generated; This step optimizes the first water quality improvement strategy recommendation mechanism based on the adjusted water quality prediction model and multi-objective optimization algorithm to obtain the second water quality improvement strategy recommendation mechanism; evaluates normal water quality data to obtain water quality assessment results; and generates the optimal target water quality improvement measure combination based on the water quality assessment results and the second water quality improvement strategy recommendation mechanism.
[0072] The embodiments of the present invention can achieve the following beneficial effects through the above steps: By establishing a closed-loop feedback mechanism, key parameters of the water quality prediction model and multi-objective optimization algorithm are continuously evaluated and adjusted to ensure the continuous optimization and effectiveness of water quality improvement measures.
[0073] Figure 2 The present invention provides a schematic diagram of a water quality evaluation system for wastewater treatment plant drainage. Figure 2 As shown, the system includes: The acquisition module 21 is used to collect water quality parameters at multiple points in the sewage treatment plant, perform data processing on the water quality parameters, and obtain a comprehensive water quality data set; The identification module 22 is used to perform anomaly detection on the comprehensive water quality data set using a deep learning anomaly detection model, identify abnormal data points, and dynamically correct or eliminate the abnormal data points using an adaptive filtering algorithm based on particle swarm optimization to obtain normal water quality data; A prediction module 23 is used to construct a water quality prediction model based on the normal water quality data using an integrated learning method, and use the water quality prediction model to predict the water quality change trend to obtain a water quality change trend prediction result; A generating module 24 for generating a target water quality improvement measure combination according to the water quality change trend prediction result and the normal water quality data by using a first water quality improvement strategy recommendation mechanism based on a multi-objective optimization algorithm; Construction module 25 is used to establish a closed-loop feedback mechanism, use a reinforcement learning algorithm to evaluate the application effect of the target water quality improvement measure combination, obtain an application effect evaluation result, adjust the key parameters of the water quality prediction model and the multi-objective optimization algorithm according to the application effect evaluation result, so as to optimize the first water quality improvement strategy recommendation mechanism, obtain a second water quality improvement strategy recommendation mechanism, and generate an optimal target water quality improvement measure combination based on the second water quality improvement strategy recommendation mechanism.
[0074] Figure 2 The water quality evaluation system of the sewage treatment plant drainage can be performed Figure 1 The implementation principle and technical effect of the water quality evaluation method for sewage treatment plant drainage described in the embodiment are not described in detail. The specific way in which each module and unit performs operations in the water quality evaluation system for sewage treatment plant drainage in the above embodiment has been described in detail in the embodiment of the method, and will not be described in detail here.
[0075] In one possible design, Figure 2 The water quality evaluation system of a sewage treatment plant drainage in the embodiment shown can be implemented as a computing device, such as Figure 3 As shown, the computing device may include a storage component 31 and a processing component 32; The storage component 31 stores one or more computer instructions, wherein the one or more computer instructions are called and executed by the processing component 32 .
[0076] The processing component 32 is used to: collect water quality parameters from multiple points in the sewage treatment plant, perform data processing on the water quality parameters, and obtain a comprehensive water quality data set; use a deep learning anomaly detection model to perform anomaly detection on the comprehensive water quality data set, identify abnormal data points, and use an adaptive filtering algorithm based on particle swarm optimization to dynamically correct or eliminate the abnormal data points to obtain normal water quality data; based on the normal water quality data, use an integrated learning method to build a water quality prediction model, and use the water quality prediction model to predict the water quality change trend to obtain a water quality change trend prediction result; use a first water quality improvement strategy recommendation mechanism based on a multi-objective optimization algorithm to generate a target water quality improvement measure combination according to the water quality change trend prediction result and the normal water quality data; establish a closed-loop feedback mechanism, use a reinforcement learning algorithm to evaluate the application effect of the target water quality improvement measure combination, obtain an application effect evaluation result, adjust the key parameters of the water quality prediction model and the multi-objective optimization algorithm according to the application effect evaluation result, so as to optimize the first water quality improvement strategy recommendation mechanism to obtain a second water quality improvement strategy recommendation mechanism, and generate an optimal target water quality improvement measure combination based on the second water quality improvement strategy recommendation mechanism.
[0077] The processing component 32 may include one or more processors to execute computer instructions to complete all or part of the steps in the above method. Of course, the processing component may also be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.
[0078] The storage component 31 is configured to store various types of data to support operations at the terminal. The storage component can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0079] Of course, the computing device may also include other components, such as input / output interfaces, display components, communication components, etc.
[0080] The input / output interface provides an interface between the processing component and the peripheral interface module, which may be an output device, an input device, etc.
[0081] The communication component is configured to facilitate, among other things, wired or wireless communications between the computing device and other devices.
[0082] Among them, the computing device can be a physical device or an elastic computing host provided by a cloud computing platform, etc. In this case, the computing device can refer to a cloud server, and the above-mentioned processing components, storage components, etc. can be basic server resources rented or purchased from the cloud computing platform.
[0083] The embodiment of the present invention further provides a computer storage medium storing a computer program, which can achieve the above-mentioned Figure 1 The illustrated embodiment is a method for evaluating the water quality of wastewater discharged from a sewage treatment plant.
[0084] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0085] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0086] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0087] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for evaluating the water quality of wastewater treatment plant drainage, characterized in that: include: Collecting water quality parameters at multiple points in a sewage treatment plant, performing data processing on the water quality parameters, and obtaining a comprehensive water quality data set; Using a deep learning anomaly detection model to perform anomaly detection on the comprehensive water quality data set, identifying abnormal data points, and using an adaptive filtering algorithm based on particle swarm optimization to dynamically correct or eliminate the abnormal data points to obtain normal water quality data; Based on the normal water quality data, a water quality prediction model is constructed using an integrated learning method, and the water quality prediction model is used to predict the water quality change trend to obtain a water quality change trend prediction result; Using a first water quality improvement strategy recommendation mechanism based on a multi-objective optimization algorithm, a target water quality improvement measure combination is generated according to the water quality change trend prediction result and the normal water quality data; A closed-loop feedback mechanism is established, and a reinforcement learning algorithm is used to evaluate the application effect of the target water quality improvement measure combination to obtain an application effect evaluation result. The key parameters of the water quality prediction model and the multi-objective optimization algorithm are adjusted according to the application effect evaluation result to optimize the first water quality improvement strategy recommendation mechanism to obtain a second water quality improvement strategy recommendation mechanism. Based on the second water quality improvement strategy recommendation mechanism, an optimal target water quality improvement measure combination is generated.
2. The method according to claim 1, characterized in that The first water quality improvement strategy recommendation mechanism based on the multi-objective optimization algorithm generates a target water quality improvement measure combination according to the water quality change trend prediction result and the normal water quality data, including: Based on the water quality change trend prediction result and the normal water quality data, determining an optimization target, wherein the optimization target includes reducing chemical oxygen demand, increasing dissolved oxygen level, and reducing heavy metal content; Based on the optimization target, construct a multi-objective optimization model, wherein the multi-objective optimization model is used to implement the first water quality improvement strategy recommendation mechanism based on the multi-objective optimization algorithm; The water quality change trend prediction result and the normal water quality data are input into the multi-objective optimization model, and the multi-objective optimization model calculates the optimal solution set that meets the optimization objectives. Based on the optimal solution set, a target water quality improvement measure combination is generated, and the target water quality improvement measure combination includes increasing the aeration volume, adjusting the pH value, and adding chemical agents.
3. The method according to claim 2, characterized in that The water quality change trend prediction result and the normal water quality data are input into the multi-objective optimization model, and the multi-objective optimization model is used to calculate the best solution set that meets the optimization goal. Based on the best solution set, a target water quality improvement measure combination is generated, and the target water quality improvement measure combination includes increasing aeration volume, adjusting pH value, and adding chemical agents, including: Converting the water quality change trend prediction result and the normal water quality data into input data, and inputting the input data into the multi-objective optimization model, wherein the input data includes historical water quality data, water quality change trend and standard range of water quality parameters; Based on the multi-objective optimization model, using a non-dominated sorting genetic algorithm, different combinations of water quality improvement measures are calculated, and the impact of each combination of water quality improvement measures on the normal water quality data is evaluated to obtain an impact assessment result, and based on the impact assessment result, an optimal solution set that meets the optimization goal is generated; Based on the optimal solution set, a combination of water quality improvement measures to be verified is selected, and the effect of the combination of water quality improvement measures to be verified in solving the optimization target is analyzed to obtain a solution effect analysis result; based on the solution effect analysis result, feasibility factors are compared to verify the combination of water quality improvement measures to be verified, and a target water quality improvement measure combination is obtained, wherein the feasibility factors include implementation cost and operational feasibility.
4. The method according to claim 3, characterized in that Based on the multi-objective optimization model, a non-dominated sorting genetic algorithm is used to calculate different combinations of water quality improvement measures, and the impact of each combination of water quality improvement measures on the normal water quality data is evaluated to obtain an impact assessment result. Based on the impact assessment result, an optimal solution set that meets the optimization goal is generated, including: Initializing parameters of a non-dominated sorting genetic algorithm, generating an initial population based on the parameters, wherein each individual in the initial population represents a set of water quality improvement measures, and the parameters include an initial population size, a crossover probability, and a mutation probability; Based on the water quality change trend prediction result and the normal water quality data, the initial population is evaluated to obtain an initial population performance evaluation result, and based on the initial population performance evaluation result, individuals in the initial population are non-dominatedly sorted to obtain a non-dominated sorting result; Based on the non-dominated sorting result, the crowding distance of each individual in the initial population is calculated to obtain the crowding distance of each individual; Based on the non-dominated sorting result and the crowding distance, a target individual is selected as a next-generation population, a crossover operation is performed on the next-generation population to obtain a crossover population, and a mutation operation is performed on the crossover population to obtain a mutated population; Based on the water quality change trend prediction result and the normal water quality data, the mutated population is evaluated to obtain a performance evaluation result of the mutated population; based on the performance evaluation result of the mutated population, the mutated population is updated to obtain an updated population; the updated population is verified; if the verification passes, a target population is obtained; if the verification fails, the target individual selection, crossover operation, mutation operation and evaluation operation are repeatedly performed until a termination condition is met; the target population represents an optimal solution set; and the termination condition is that a diversity index of the population is lower than a preset threshold, and the diversity index includes a standard deviation.
5. The method according to claim 1, characterized in that The deep learning anomaly detection model is used to perform anomaly detection on the comprehensive water quality data set, identify abnormal data points, and use an adaptive filtering algorithm based on particle swarm optimization to dynamically correct or eliminate the abnormal data points to obtain normal water quality data, including: Based on the comprehensive water quality data set, an initial deep learning model is selected, and a deep learning anomaly detection model is constructed based on the initial deep learning model; Based on the deep learning anomaly detection model, anomaly detection is performed on the comprehensive water quality data set, a difference value is obtained by calculating the difference between the data in the comprehensive water quality data set and the data in the deep learning anomaly detection model, and a data point with a difference value higher than a preset threshold is selected as an abnormal data point; An adaptive filtering algorithm based on particle swarm optimization is used to dynamically correct or eliminate the abnormal data points to obtain normal water quality data.
6. The method according to claim 5, characterized in that The adaptive filtering algorithm based on particle swarm optimization is used to dynamically correct or eliminate the abnormal data points to obtain normal water quality data, including: Initializing a particle swarm of a particle swarm optimization algorithm, wherein the initialization content includes initial parameters of the particle swarm and the position and velocity of each particle, wherein the initial parameters include the particle population size and the maximum number of iterations; Based on the difference value, defining a fitness function of a particle swarm optimization algorithm; Based on the particle swarm and the fitness function, the adaptive filtering algorithm is used to dynamically adjust the filtering parameters of the particle swarm to minimize the difference value and obtain the optimized filtering parameters. Based on the optimized filtering parameters, the abnormal data points are corrected. If the abnormal data points cannot meet the preset effects after correction, the abnormal data points are removed to obtain normal water quality data. The preset effects include the difference value being within a preset range.
7. The method according to claim 1, characterized in that The closed-loop feedback mechanism is established, and the application effect of the target water quality improvement measure combination is evaluated by using a reinforcement learning algorithm to obtain an application effect evaluation result. The key parameters of the water quality prediction model and the multi-objective optimization algorithm are adjusted according to the application effect evaluation result to optimize the first water quality improvement strategy recommendation mechanism to obtain a second water quality improvement strategy recommendation mechanism. Based on the second water quality improvement strategy recommendation mechanism, an optimal target water quality improvement measure combination is generated, including: Defining an environment for a reinforcement learning algorithm, the definition including a state space of the water quality parameter, an action space of the target water quality improvement measure combination, and a reward function; Using the reinforcement learning algorithm to evaluate the target water quality improvement measure combination, obtain an application evaluation effect, calculate a reward value for each target water quality improvement measure combination based on the application evaluation effect and the evaluation index, and obtain an application effect evaluation result based on the reward value, wherein the evaluation index includes a change in the water quality parameter and a treatment cost; Based on the application effect evaluation result, adjusting the water quality prediction model to obtain an adjusted water quality prediction model; based on the application effect evaluation result, adjusting the key parameters of the multi-objective optimization algorithm to obtain an adjusted multi-objective optimization algorithm; Based on the adjusted water quality prediction model and the adjusted multi-objective optimization algorithm, the first water quality improvement strategy recommendation mechanism is optimized to obtain a second water quality improvement strategy recommendation mechanism; based on the second water quality improvement strategy recommendation mechanism, the normal water quality data is evaluated to obtain a water quality evaluation result; based on the water quality evaluation result and the second water quality improvement strategy recommendation mechanism, an optimal target water quality improvement measure combination is generated.
8. A water quality evaluation system for wastewater treatment plant drainage, characterized in that: include: A collection module is used to collect water quality parameters at multiple points in the sewage treatment plant, perform data processing on the water quality parameters, and obtain a comprehensive water quality data set; An identification module is used to perform anomaly detection on the comprehensive water quality data set using a deep learning anomaly detection model, identify abnormal data points, and dynamically correct or eliminate the abnormal data points using an adaptive filtering algorithm based on particle swarm optimization to obtain normal water quality data; A prediction module, for constructing a water quality prediction model based on the normal water quality data using an integrated learning method, and using the water quality prediction model to predict the water quality change trend to obtain a water quality change trend prediction result; A generation module, for generating a target water quality improvement measure combination according to the water quality change trend prediction result and the normal water quality data by using a first water quality improvement strategy recommendation mechanism based on a multi-objective optimization algorithm; A construction module is used to establish a closed-loop feedback mechanism, use a reinforcement learning algorithm to evaluate the application effect of the target water quality improvement measure combination, obtain an application effect evaluation result, adjust the key parameters of the water quality prediction model and the multi-objective optimization algorithm according to the application effect evaluation result, so as to optimize the first water quality improvement strategy recommendation mechanism, obtain a second water quality improvement strategy recommendation mechanism, and generate an optimal target water quality improvement measure combination based on the second water quality improvement strategy recommendation mechanism.
9. A computing device, characterized in that It comprises a processing component and a storage component; the storage component stores one or more computer instructions; the one or more computer instructions are used to be called and executed by the processing component to implement a water quality evaluation method for wastewater treatment plant drainage as described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that: A computer program is stored, and when the computer program is executed by a computer, a water quality evaluation method for wastewater treatment plant drainage as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Sewage treatment dissolved oxygen concentration prediction method based on hybrid optimization algorithm
CN116542382A
Chemical plant sewage treatment monitoring method and system
CN117171661A
Water quality monitoring control method and system
CN118861642A
Sewage treatment data optimization method and system based on cloud computing
CN119294614A
Dynamic multi-objective particle swarm optimization-based optimal control method for wastewater treatment process
US20200385286A1
Cited By
Optimization treatment method and equipment for urban water control system and medium
CN119886772A
Optimization Processing Method, Equipment and Medium of Urban Water Treatment System
CN119886772B
Supervision system and method for sewage treatment process
CN120406247A
Pollutant prediction method and device based on evolutionary learning strategy, equipment and storage medium
CN120654199A
Multi-parameter intelligent cooperative control method for sewage treatment equipment
CN120949729A