An industrial sewage treatment management system based on artificial intelligence
By using an AI-based industrial wastewater treatment management system, water quality monitoring and prediction are performed using IoT sensors and self-organizing mapping networks. Random scenarios are generated to assess the risk of water quality exceeding standards. This solves the problems of insufficient timeliness and predictive ability of traditional wastewater treatment systems, and achieves real-time and accurate water quality monitoring and flexible wastewater treatment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU ANLU NEW ENERGY TECH CO LTD
- Filing Date
- 2025-07-08
- Publication Date
- 2026-06-16
AI Technical Summary
Traditional wastewater treatment systems rely on manual sampling and analysis, resulting in poor timeliness and accuracy of water quality monitoring, lack of predictive capabilities, slow response speed, inability to respond to water quality fluctuations in a timely manner, and lack of effective early warning mechanisms, which increases the risk of environmental pollution and treatment costs.
An AI-based industrial wastewater treatment and management system is adopted. Water quality is monitored through industrial IoT sensors, water quality parameters are clustered and analyzed using self-organizing mapping networks, and water quality is predicted by combining long short-term memory networks. Random scenarios are generated and the risk of water quality exceeding standards is assessed to determine the boundary set of early warning thresholds.
It enables real-time and accurate water quality monitoring and forecasting, provides predictive information, can respond promptly to changes in wastewater, flexibly address fluctuations, reduce environmental pollution risks, and ensure timely adjustments to wastewater treatment.
Smart Images

Figure CN120995255B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wastewater management technology, and more specifically to an industrial wastewater treatment and management system based on artificial intelligence. Background Technology
[0002] Traditional systems often rely on manual sampling and analysis of water quality data. This approach is not only time-consuming and labor-intensive, but also fails to reflect real-time changes in water quality. Water quality monitoring suffers from poor timeliness and low accuracy, potentially failing to capture minute changes in wastewater, leading to untimely or inaccurate treatment. Furthermore, traditional systems generally process only existing data, lacking the ability to predict water quality changes. This makes wastewater treatment unpredictable and unable to address potential future water quality problems. Moreover, traditional systems rely heavily on experience and fixed processes; fluctuations or anomalies in water quality often require manual intervention, resulting in slow response times and poor flexibility. Additionally, the early warning mechanisms for exceeding water quality standards in traditional systems are often delayed, failing to promptly assess potential risks and leading to emergency treatment only after standards are exceeded, increasing the risk of environmental pollution and treatment costs. Summary of the Invention
[0003] The technical problem to be solved by the present invention is to overcome the shortcomings of the prior art and provide an industrial wastewater treatment management system based on artificial intelligence.
[0004] The technical solution adopted to solve the above technical problems is: an industrial wastewater treatment and management system based on artificial intelligence, including a wastewater classification unit, a scene generation unit, and a wastewater early warning unit;
[0005] The wastewater classification unit is used to monitor water quality in the wastewater treatment process based on industrial IoT sensors to obtain a dynamic monitoring dataset; and to perform water quality parameter clustering analysis through a self-organizing mapping network based on the dynamic monitoring dataset to obtain a water quality status zoning map.
[0006] The scene generation unit is used to perform data augmentation on the water quality status zoning map to obtain an augmented dataset, perform water quality prediction on the augmented dataset according to the long short-term memory network prediction model to obtain a water quality evolution trend prediction sequence, and generate scenes according to the water quality evolution trend prediction sequence to obtain a preset number of random scenes.
[0007] The wastewater early warning unit is used to assess the risk cost of water quality exceeding standards under the random scenario, and to determine the early warning threshold boundary set based on the risk cost of water quality exceeding standards and the constraints of wastewater treatment process.
[0008] Preferably, the dynamic monitoring dataset includes parameters such as pH value, chemical oxygen demand, dissolved oxygen, suspended solids, and temperature; the operating condition data includes parameters such as aerator speed, reagent dosing flow rate, and sludge return ratio.
[0009] Preferably, water quality parameters are clustered using a self-organizing map network based on the dynamic monitoring dataset to obtain a water quality status zoning map, including:
[0010] The dynamic monitoring dataset is reconstructed into a two-dimensional sample matrix, where each row of the two-dimensional sample matrix represents a spatiotemporal sampling point and each column corresponds to a water quality parameter. The input vector of the self-organizing mapping network is determined based on the two-dimensional sample matrix.
[0011] The output layer of the self-organizing map network is defined as a hexagonal mesh, wherein the mesh size of the hexagonal mesh is determined by heuristic rules;
[0012] A Gaussian kernel function is configured as the neighborhood interaction function of the self-organizing map network; the initial neighborhood radius of the self-organizing map network is set to half the grid side length.
[0013] Preferably, the method further includes performing water quality parameter clustering analysis using a self-organizing map network based on the dynamic monitoring dataset to obtain a water quality status zoning map, and also includes:
[0014] For each input vector, calculate its Euclidean distance to the weight vectors of all neurons in the self-organizing map network, and select the neuron with the smallest Euclidean distance as the best matching unit.
[0015] The weights of the best matching unit and its neighboring neurons are updated; when the rate of change of the distribution of the best matching unit is less than a preset threshold in a series of preset iterations, the training is terminated and the current weight matrix is retained as the clustering result.
[0016] Similar neurons are merged from the clustering results to obtain superclusters; the superclusters are functionally labeled according to expert knowledge to obtain a water quality status zoning map.
[0017] Preferably, the data is augmented based on the water quality status zoning map to obtain an augmented dataset, and water quality is predicted based on the augmented dataset using a long short-term memory network prediction model to obtain a water quality evolution trend prediction sequence, including:
[0018] Based on the water quality status zoning map, self-organizing map network clustering labels are added to each spatiotemporal sampling point in the dynamic monitoring dataset to obtain an enhanced dataset;
[0019] The enhanced dataset is processed using the sliding window technique to obtain time series samples. The mapping relationship between the input sequence and the prediction target is determined based on the time series samples. The input sequence includes time series data of a first preset proportion before the time series samples, and the prediction target includes time series data of a second preset proportion after the time series samples.
[0020] The input sequence and the prediction target are normalized to linearly map the parameter values to the [0,1] interval;
[0021] Feature extraction is performed on the input sequence and the predicted target using a two-layer stacked LSTM structure to obtain a hidden state vector, wherein each layer of the LSTM structure includes 128 neurons.
[0022] Preferably, the data augmentation is performed based on the water quality status zoning map to obtain an augmented dataset, and water quality prediction is performed based on the augmented dataset using a long short-term memory network prediction model to obtain a water quality evolution trend prediction sequence, further comprising:
[0023] The input sequence and the self-organizing map network clustering labels in the prediction target are converted into dense vectors according to the embedding layer. The hidden state vector and the dense vector are concatenated to obtain the concatenated vector.
[0024] A fully connected layer is added after the two-layer stacked LSTM structure. The splicing vector is mapped to the dimension of the prediction target according to the fully connected layer to obtain the water quality evolution trend prediction sequence.
[0025] A composite loss function is defined, and the long short-term memory network prediction model is trained based on the composite loss function. The composite loss function includes a main loss term and an auxiliary loss term. The main loss term is used to calculate the mean square error between the predicted value and the true value, and the auxiliary loss term is used to quantify the matching degree between the water quality evolution trend prediction sequence and the water quality status zoning map.
[0026] Preferably, scene generation is performed based on the water quality evolution trend prediction sequence to obtain a preset number of random scenes, including:
[0027] The statistics of each parameter in the water quality evolution trend prediction sequence are determined to obtain the statistical feature vector of each parameter in the water quality evolution trend prediction sequence. The correlation between each parameter in the water quality evolution trend prediction sequence is determined according to the Pearson correlation coefficient to obtain the correlation matrix between each parameter in the water quality evolution trend prediction sequence.
[0028] The probability model is determined based on the distribution pattern of the historical monitoring dataset. The joint distribution function of the probability model is used to describe the water quality evolution trend prediction sequence through the statistical feature vector and the correlation matrix to obtain the joint probability distribution model.
[0029] Based on the joint probability distribution model, the parameters in the water quality evolution trend prediction sequence are randomly sampled using the Monte Carlo simulation method, wherein the number of samplings is equal to the preset number of random scenarios.
[0030] For each sampling time, random values are extracted from the joint probability distribution model of each parameter in the water quality evolution trend prediction sequence, and the random values are combined to obtain the parameter combination at the sampling time, wherein the parameter combination represents a random water quality state.
[0031] The parameter combinations at each sampling time are arranged in chronological order to obtain a random scenario, which includes the random change path of each parameter within a preset future time period.
[0032] Preferably, the risk cost of water quality exceeding standards under the random scenario is evaluated, and the warning threshold boundary set is determined based on the risk cost of water quality exceeding standards and the constraints of the wastewater treatment process, including:
[0033] For each random scenario, check whether each parameter exceeds the preset threshold in chronological order, record the duration, frequency, and peak exceedance of the parameter in each random scenario, and convert the duration, frequency, and peak exceedance of the parameter in each random scenario into economic loss indicators.
[0034] The random scenario is risk-classified based on the duration, frequency, and peak exceedance of the parameters to obtain the risk level of the random scenario;
[0035] All random scenarios are assigned probability weights according to their risk levels. The economic loss indicators of all random scenarios are weighted and averaged according to the probability weights to obtain the cost of water quality exceeding the standard under the random scenario.
[0036] Based on the maximum treatment capacity of the wastewater treatment equipment, process parameter boundaries are set, and economic constraints are established through reagent costs and energy consumption. Under the economic constraints, the threshold combination that minimizes the cost of exceeding water quality standards is found. A third preset safety margin is added to the lowest threshold combination to obtain the early warning threshold boundary set.
[0037] The beneficial effects of the present invention are as follows: (1) The present invention can monitor water quality data in real time based on industrial Internet of Things sensors, and combine self-organizing mapping network to perform cluster analysis of water quality parameters and construct water quality status partition map. This process can accurately classify different water quality states of sewage, providing a reliable basis for subsequent treatment and decision-making. This not only improves the accuracy of water quality monitoring, but also responds to changes in sewage in a timely manner. Moreover, by using the long short-term memory network prediction model to predict water quality of the enhanced dataset, the evolution trend prediction sequence of sewage can be obtained, providing predictive information for future water quality changes. Based on these prediction results, multiple random scenarios can be generated to simulate different treatment situations, helping decision-makers to identify potential water quality problems in advance. This predictability helps the sewage treatment process to cope with possible fluctuations more flexibly and effectively. (2) The present invention can assess the potential water quality exceedance risk cost based on the predicted water quality trend, and determine the appropriate early warning threshold boundary set based on the water quality exceedance risk and process constraints. This enables the system to provide early warning when the water quality exceedance risk is high, ensuring timely adjustment of sewage treatment process and reducing the risk of environmental pollution. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the overall system architecture in one embodiment of the present invention.
[0039] Attached labels: 1. Wastewater classification unit; 2. Scene generation unit; 3. Wastewater early warning unit. Detailed Implementation
[0040] Example 1, as Figure 1 As shown, the present invention proposes an artificial intelligence-based industrial wastewater treatment and management system, which includes a wastewater classification unit 1, a scene generation unit 2, and a wastewater early warning unit 3.
[0041] The wastewater classification unit 1 is used to monitor the water quality of the wastewater treatment process based on industrial Internet of Things sensors to obtain a dynamic monitoring dataset; and to perform water quality parameter clustering analysis through a self-organizing mapping network based on the dynamic monitoring dataset to obtain a water quality status zoning map.
[0042] The scene generation unit 2 is used to perform data augmentation on the water quality status zoning map to obtain an augmented dataset, perform water quality prediction on the augmented dataset according to the long short-term memory network prediction model to obtain a water quality evolution trend prediction sequence, and generate scenes according to the water quality evolution trend prediction sequence to obtain a preset number of random scenes.
[0043] The wastewater early warning unit 3 is used to assess the risk cost of water quality exceeding standards under the random scenario, and to determine the early warning threshold boundary set based on the risk cost of water quality exceeding standards and the constraints of wastewater treatment process.
[0044] In this invention, after obtaining the warning threshold boundary set, the operating condition data of the wastewater treatment equipment is then acquired; the efficiency degradation surface of the wastewater treatment equipment is determined based on the operating condition data; the operating condition is optimized using a particle swarm optimization algorithm based on the efficiency degradation surface to obtain the optimal operating point; a performance degradation factor is determined based on the historical efficiency data corresponding to the optimal operating point; a wastewater decision model is determined based on the warning threshold boundary set and the performance degradation factor; the wastewater decision model is then solved using a deep deterministic strategy gradient algorithm to obtain an optimized control instruction set, wherein the optimized control instruction set includes reagent dosage, aeration duration, and sludge discharge cycle; the operating condition is optimized using a particle swarm optimization algorithm based on the efficiency degradation surface to obtain the optimal operating point, including the following operations:
[0045] A mapping table is determined based on the operating condition data and the performance index of the wastewater treatment equipment. The mapping table is filled using cubic spline interpolation to obtain a performance decay surface. The X-axis of the performance decay surface represents the equipment load corresponding to the operating condition data, the Y-axis represents the operating time, and the Z-axis represents the performance index value.
[0046] Based on the maximum load constraint of the operating condition data of the wastewater treatment equipment, the dimension of the operating condition data is divided into a preset number of discrete intervals to construct a three-dimensional parameter grid to obtain the initial parameter space, wherein each three-dimensional parameter grid represents a set of operating condition combinations.
[0047] The particle swarm of the particle swarm optimization algorithm is initialized, wherein the initialization includes setting a preset number of particles and velocity initialization, wherein each particle corresponds to a point in the initial parameter space, and the velocity of the particle is set to a fourth preset ratio of the initial parameter space;
[0048] The fitness function of the particle swarm optimization algorithm is set, and the optimal working point is found based on the initialized particle swarm and fitness function. The fitness function is as follows: ;in, Indicates the fitness value. This represents the Z-axis value of the performance decay surface.
[0049] It should be noted that operating condition data refers to the operational data of wastewater treatment equipment under different working conditions; these data can be considered factors affecting equipment efficiency; efficiency indicators are key parameters for evaluating equipment efficiency, such as treatment efficiency, energy consumption, and treated water quality standards; different operating conditions may lead to different efficiency indicators; the mapping relationship table is a table or data model established based on the relationship between operating condition data and efficiency indicators, recording efficiency values under different operating conditions; cubic spline interpolation is used to fill the blanks in this mapping relationship table; this method estimates unknown data points by constructing smooth curves to connect known data points; this method can handle high-dimensional data well and form a smooth transition between data points; the efficiency decay surface is a three-dimensional "efficiency decay surface" obtained through interpolation; in this surface: the X-axis represents the load of the equipment; the Y-axis... The Z-axis represents the equipment's runtime; the Z-axis represents performance indicators (such as processing capacity), i.e., how the equipment's performance changes under different loads and runtimes; based on the maximum load constraint of the wastewater treatment equipment, the equipment's operating condition data is dimensionally divided; this constraint typically refers to the maximum workload the equipment can withstand under extreme loads; based on this load constraint, the operating condition data is divided into multiple discrete intervals, for example, the load may be divided into several intervals, and the runtime may also be divided into several intervals; based on the divided operating condition data, a three-dimensional parameter grid is constructed; each grid represents an operating condition combination, which may include a certain combination of parameters such as load, runtime, and performance; this grid forms the initial parameter space, i.e., the set of all possible operating condition combinations; Particle Swarm Optimization (PSO) is an optimization algorithm based on swarm intelligence; it optimizes the solution to the problem by simulating the process of a swarm of particles finding the optimal solution in the search space.
[0050] The wastewater decision-making model is determined based on the warning threshold boundary set and the performance degradation factor, including the following operations:
[0051] The baseline values of the decision variables are adjusted according to the performance degradation factor, wherein the decision variables include the dosage of the reagent, the aeration time and the sludge discharge cycle;
[0052] The risk objective function is determined based on the duration, frequency, and peak exceedance of each parameter in the water quality evolution trend prediction sequence; the cost objective function is determined based on the unit cost of the decision variables.
[0053] The wastewater decision-making model is determined based on the warning threshold boundary set, the risk objective function, and the cost objective function.
[0054] It should be noted that the risk objective function is as follows:
[0055] ;
[0056] in, Represents the risk objective function, , and This indicates the preset penalty weight. Indicates duration, and This represents the predicted water quality value and the upper limit of the water quality warning threshold at time k. The penalty term represents the frequency of exceeding the standard at time k, measuring the number of times the water quality exceeds the standard within a certain period. The penalty term represents the peak value exceeding the standard at time k, and the penalty term represents the maximum exceedance value of the water quality standard.
[0057] The cost objective function is as follows:
[0058] ;
[0059] in, Represents the cost objective function, Indicates the first The cost per unit price is one of the decision variables. Indicates the first One decision variable, , , and This indicates the dosage of the reagent, the aeration duration, and the sludge discharge cycle;
[0060] The constraints are as follows:
[0061] ;
[0062] ;
[0063] in, This indicates the lower limit of the water quality warning threshold; Represents the boundary set of early warning thresholds;
[0064] The wastewater decision-making model is as follows:
[0065] .
[0066] It should be noted that in wastewater treatment systems, equipment and operations will experience performance degradation over time. For example, aeration equipment may become less efficient due to prolonged use, and the accuracy of chemical dosing systems may be affected by equipment aging. Performance degradation factors reflect the degree of this degradation. Adjusting the baseline values of decision variables: To maintain the efficient operation of the wastewater treatment system, the baseline values of decision variables (such as chemical dosage, aeration duration, and sludge discharge cycle) need to be adjusted based on performance degradation factors. The adjusted baseline values can more accurately reflect the actual capacity of the current system. Chemical dosage refers to the amount of chemical reagents added during the treatment process, typically used to remove pollutants from the water. Depending on the degree of equipment degradation, [the following adjustments can be made]. The dosage of chemicals may need to be adjusted; aeration time refers to the time for oxygen to be provided through aeration in wastewater treatment, which usually affects the biodegradation process in wastewater; equipment performance degradation may lead to the need to extend the aeration time; sludge discharge cycle refers to the periodic discharge of sludge generated in wastewater treatment; degraded equipment may lead to untimely sludge discharge, affecting the treatment effect; water quality evolution trend prediction sequence predicts the trend of various water quality parameters (such as COD, ammonia nitrogen, total phosphorus, etc.) in wastewater over time using historical data, models, and algorithms; these trends are usually based on the water quality change patterns and the operating status of the treatment facilities; prediction of the duration, frequency, and peak exceedance of exceedances: based on the water quality evolution trend, predict whether each water quality parameter will exceed the standard within a certain period of time. The forecasts include the duration of exceedances (how long the exceedance lasts), frequency of occurrence (the number of times the exceedance occurs), and peak exceedance (the maximum extent of exceedance). These predictions help understand the severity of potential risks. The risk objective function is based on water quality exceedance prediction data and typically aims to minimize the duration, frequency, and peak exceedance of water quality exceedances, thereby reducing the risks associated with them. The risk objective function considers the probability of exceedance events and their potential environmental and social impacts. For example, the probability and impact weights of exceedances can be incorporated into the objective function to optimize water quality control. In wastewater treatment, optimization involves more than just risk reduction; it also considers cost. Cost considerations; the cost objective function typically includes: reagent cost: calculated based on the dosage and unit price of the reagent; energy cost: such as aeration time directly affecting energy consumption, and thus electricity cost; sludge treatment cost: the sludge discharge cycle may also affect the treatment and discharge costs of sludge; the objective is to minimize the total cost generated during the treatment process; warning threshold boundary set: through the risk analysis and safety margin setting mentioned above, a warning threshold boundary set is obtained, which is a safety range used to monitor whether water quality exceeds the standard; if the water quality parameters are close to or exceed the warning threshold, measures need to be taken in advance; construction of the decision model: by combining the risk objective function of water quality exceeding the standard, the cost objective function, and the warning threshold boundary set, a wastewater decision model is constructed;The purpose of this model is to minimize treatment costs while ensuring water quality does not exceed standards; to optimize the wastewater treatment process by adjusting decision variables such as reagent dosage, aeration duration, and sludge discharge cycle; and to find the optimal balance between risk and cost to achieve the best wastewater treatment effect and the lowest economic loss.
[0067] In this invention, the Deep Deterministic Policy Gradient (DDPG) algorithm is a reinforcement learning algorithm based on the policy gradient method, particularly suitable for environments with continuous action spaces. Traditional reinforcement learning typically trains an agent to learn how to choose the optimal action to maximize long-term rewards. DDPG, by combining deep learning and the deterministic policy gradient algorithm, can efficiently handle these complex decision-making problems. Policy gradient directly learns how to choose an action from the current state by optimizing the policy function. DDPG gradually finds the optimal decision by optimizing the action probability distribution in each state. In wastewater treatment optimization, decision variables such as reagent dosage, aeration duration, and sludge discharge cycle are all continuous variables; this means the optimization problem... Wastewater treatment is a continuous action space problem, and DDPG is specifically designed to solve such problems. By using the DDPG algorithm, the decision-making process for wastewater treatment can be optimized through the following steps: Objective: To maximize the efficiency of the treatment system and minimize costs while ensuring water quality compliance; Decision variables: These include reagent dosage, aeration duration, and sludge discharge cycle. These are continuous decision variables, making DDPG a suitable application; Reward function: The goal of DDPG is to learn the optimal control strategy through continuous trial and error, achieving a balance between optimal water quality control and minimum cost within a certain timeframe; Environmental model: This is a mathematical or simulation model of the wastewater treatment system, reflecting the impact of control decisions (such as reagent dosage and aeration duration) on the system. The impact of water quality and cost; In DDPG, the environmental model outputs information such as current water quality, exceedance status, and cost based on the input of current decision variables, serving as feedback for the agent; State: including water quality evolution trends, current wastewater treatment effects, equipment performance, and costs; Action: control variables, including reagent dosage, aeration duration, and sludge discharge cycle; Reward: the reward value calculated based on water quality exceedance status, risk objective function, and cost objective function; this reward value is adjusted according to the effectiveness of the decision (e.g., whether water quality meets standards, whether costs are minimized); Initializing the agent: The DDPG algorithm approximates the policy and value function through a neural network; the agent learns how to... Based on the state (i.e., current water quality, equipment status, etc.), the agent takes appropriate actions (i.e., adjusts decision variables); interacts with the environment: at each time step, the agent selects an action based on the current state (e.g., adjusts the dosage of chemicals); after executing this action, the environment returns a new state (e.g., updated water quality) and a corresponding reward (e.g., reduced risk or reduced cost); strategy optimization: by replaying and optimizing past experiences (states, actions, rewards, next state), the agent adjusts its strategy and gradually learns how to make better decisions; balance between exploration and exploitation: during the learning process, the agent explores new decisions (exploration) and utilizes the learned knowledge (exploitation) to maximize rewards; in this way, the agent can continuously improve its control strategy;After training, the DDPG algorithm will obtain an optimized policy function. This policy function determines the optimal control variables (chemical dosage, aeration duration, and sludge discharge cycle) for any given state. Based on these optimal control variables, an optimized control instruction set—a series of decision instructions—can be derived to guide operations in actual wastewater treatment processes.
[0068] Example 2: The present invention proposes an industrial wastewater treatment management system based on artificial intelligence. Compared with Example 1, this example further includes: the dynamic monitoring dataset includes pH value, chemical oxygen demand, dissolved oxygen, suspended solids and temperature parameters; the operating condition data includes aerator speed, reagent dosing flow rate and sludge return ratio parameters.
[0069] In this embodiment, the aerator speed refers to the speed at which the aerator increases the dissolved oxygen content in the water by introducing air or oxygen, supporting the aerobic biodegradation process. The aerator speed directly affects the dissolved oxygen supply; too high a speed may lead to energy waste, while too low a speed may result in insufficient oxygen supply, affecting the wastewater treatment effect. The chemical dosing flow rate is used by chemicals to help with sedimentation, flocculation, degradation of organic matter, or pH adjustment. The chemical dosing flow rate directly affects the reaction effect of the chemicals. For example, flocculants can help remove suspended solids, and pH adjusters can adjust pH. Too much or too little chemicals may affect the effect and cost. The sludge return ratio is a key parameter in sludge treatment, referring to the ratio of returned sludge to fresh wastewater. A higher return ratio helps increase the number of microorganisms and improve the degradation effect of organic matter, but an excessively high return ratio may lead to excessively high sludge concentration, which will affect the treatment effect. An appropriate return ratio helps maintain the efficiency of biodegradation and reduce energy consumption and chemical consumption.
[0070] In an optional embodiment, water quality parameter clustering analysis is performed using a self-organizing map network based on the dynamic monitoring dataset to obtain a water quality status zoning map, including:
[0071] The dynamic monitoring dataset is reconstructed into a two-dimensional sample matrix, where each row of the two-dimensional sample matrix represents a spatiotemporal sampling point and each column corresponds to a water quality parameter. The input vector of the self-organizing mapping network is determined based on the two-dimensional sample matrix.
[0072] The output layer of the self-organizing map network is defined as a hexagonal mesh, wherein the mesh size of the hexagonal mesh is determined by heuristic rules;
[0073] A Gaussian kernel function is configured as the neighborhood interaction function of the self-organizing map network; the initial neighborhood radius of the self-organizing map network is set to half the grid side length.
[0074] It should be noted that dynamic monitoring datasets (such as pH, chemical oxygen demand, dissolved oxygen, suspended solids, and temperature) need to be reconstructed into a two-dimensional sample matrix. Each row represents a spatiotemporal sampling point, i.e., a combination of sampling time and spatial location, reflecting water quality data monitored at different times and locations. Each column represents a water quality parameter, such as pH, COD, and DO, indicating a specific water quality indicator measured at that time and spatial point. For example, assuming you have 5 water quality parameters (pH, COD, DO, suspended solids, and temperature), and the sampling data comes from 10 spatiotemporal points, then the size of this two-dimensional sample matrix is 10×5, with each row corresponding to the five water quality parameters of one spatiotemporal sampling point. Based on the constructed two-dimensional sample matrix, the water quality parameters of each spatiotemporal sampling point will be used as input vectors into a self-organizing map (SOM) network. The SOM network uses unsupervised learning to process the input data... Clustering is performed to map similar input samples to neighboring neurons in the network; each neuron represents a specific water quality state; the output layer of the SOM is set as a hexagonal grid, a commonly used grid layout with the following characteristics: the advantage of a hexagonal grid is that the distance between adjacent neurons is uniform, which helps to preserve the topological structure between data, allowing similar input vectors to be mapped to adjacent neurons; the grid size is determined heuristically, usually based on the size and complexity of the data and the required clustering accuracy; the heuristic may be based on factors such as the network's input dimension, the amount of training data, and the target number of clusters; in the SOM, the neighborhood interaction function controls the degree of mutual influence between neurons; the Gaussian kernel function is a commonly used neighborhood function, which determines the interaction between neighboring neurons and the best-matching unit during training. The weight update relationship between Matching Units (BMUs) is shown; using a Gaussian kernel function can ensure that the weights of neighboring neurons are more similar during updates, thus preserving the local structure of the data; the initial neighborhood radius is set to half the grid side length, which means that in the initial stage, the neighborhood range between neurons is large, which helps to cluster the data extensively; as training progresses, the neighborhood radius gradually decreases, emphasizing local details;
[0075] In an optional embodiment, water quality parameter clustering analysis is performed using a self-organizing map network based on the dynamic monitoring dataset to obtain a water quality status zoning map, further comprising:
[0076] For each input vector, calculate its Euclidean distance to the weight vectors of all neurons in the self-organizing map network, and select the neuron with the smallest Euclidean distance as the best matching unit.
[0077] The weights of the best matching unit and its neighboring neurons are updated; when the rate of change of the distribution of the best matching unit is less than a preset threshold in a series of preset iterations, the training is terminated and the current weight matrix is retained as the clustering result.
[0078] Similar neurons are merged from the clustering results to obtain superclusters; the superclusters are functionally labeled according to expert knowledge to obtain a water quality status zoning map.
[0079] It's important to note that the training process is the core of the SOM model, typically involving the following steps: For each input vector, calculate its Euclidean distance to the weight vectors of all neurons in the network; select the neuron with the smallest distance as the best-matching unit (BMU); update the weights of the BMU and its neighboring neurons; the magnitude of the update is usually related to the size of the Euclidean distance and the neighborhood range—the closer the neighborhood, the more significant the update; through multiple iterations of training, adjust the network weights so that the network gradually maps the input data onto the topology and forms a reasonable clustering structure in the output layer; the training process continues until certain stopping conditions are met (e.g., the rate of change of the BMU distribution is less than a preset threshold in a preset number of consecutive iterations); this means that when the network's clustering results... When the system reaches a stable state, the training process terminates, retaining the current weight matrix as the clustering result. After training, similar neurons are merged to form superclusters. A supercluster can be viewed as a combination of multiple neurons, representing a group of samples with similar water quality characteristics. Expert knowledge annotation: Based on the knowledge of domain experts, each supercluster is functionally labeled, that is, each supercluster is assigned an appropriate water quality state label according to the characteristics of the water quality parameters. For example, one supercluster may represent a good water quality state, while another supercluster may represent a severely polluted water quality state. Through the above steps, a water quality state partition map is finally obtained, where each supercluster corresponds to a water quality state. This map helps to quickly understand the quality of water bodies and provides a basis for water quality monitoring, management, and decision-making.
[0080] In an optional embodiment, the data is augmented based on the water quality status zoning map to obtain an augmented dataset. Water quality prediction is then performed using the augmented dataset based on a Long Short-Term Memory (LSTM) network prediction model to obtain a water quality evolution trend prediction sequence, including:
[0081] Based on the water quality status zoning map, self-organizing map network clustering labels are added to each spatiotemporal sampling point in the dynamic monitoring dataset to obtain an enhanced dataset;
[0082] The enhanced dataset is processed using the sliding window technique to obtain time series samples. The mapping relationship between the input sequence and the prediction target is determined based on the time series samples. The input sequence includes time series data of a first preset proportion before the time series samples, and the prediction target includes time series data of a second preset proportion after the time series samples.
[0083] The input sequence and the prediction target are normalized to linearly map the parameter values to the [0,1] interval;
[0084] Feature extraction is performed on the input sequence and the predicted target using a two-layer stacked LSTM structure to obtain a hidden state vector, wherein each layer of the LSTM structure includes 128 neurons.
[0085] It should be noted that the generation of the enhanced dataset begins with the following steps: First, based on the water quality monitoring dataset, a Self-Organizing Map (SOM) network is used for clustering to divide the data points into different water quality states (e.g., good water quality, severe pollution, etc.). Each spatiotemporal sampling point is assigned a cluster label indicating which water quality category it belongs to. The enhanced dataset is then appended to the original dataset, generating an enhanced dataset. In this way, the dataset includes not only water quality data but also water quality state information, enhancing the data's expressive power and facilitating subsequent model training. A sliding window technique is used to process the enhanced dataset, extracting time-series samples. Each time-series sample consists of continuous water quality monitoring data, capturing the temporal characteristics of water quality changes. The input sequence includes a first preset proportion of time-series data preceding the samples; this data serves as the model input, providing... Historical information; Prediction target: including the second preset proportion of time-series data after the sample, this part of the data is the prediction target of the model, representing the water quality changes in the future period; Normalization processing: in order to avoid the different scales of the input data affecting the training effect of the model, the input sequence and prediction target are normalized; through linear mapping, the value range of the data is adjusted to the [0,1] interval, so that the data is of uniform scale, which helps LSTM to learn more efficiently; LSTM is a deep learning model suitable for processing time series data, with memory ability, and can capture long-term dependencies; here, a two-layer stacked LSTM structure is used, each layer containing 128 neurons, and more temporal features are extracted by stacking multiple LSTM layers; Hidden state vector: LSTM calculates the hidden state vector, which contains all the important temporal information in the input sequence, and is used to capture the temporal changes of water quality data.
[0086] In an optional embodiment, the data is augmented based on the water quality status zoning map to obtain an augmented dataset, and water quality is predicted based on the augmented dataset using a long short-term memory network prediction model to obtain a water quality evolution trend prediction sequence, further comprising:
[0087] The input sequence and the self-organizing map network clustering labels in the prediction target are converted into dense vectors according to the embedding layer. The hidden state vector and the dense vector are concatenated to obtain the concatenated vector.
[0088] A fully connected layer is added after the two-layer stacked LSTM structure. The splicing vector is mapped to the dimension of the prediction target according to the fully connected layer to obtain the water quality evolution trend prediction sequence.
[0089] A composite loss function is defined, and the long short-term memory network prediction model is trained based on the composite loss function. The composite loss function includes a main loss term and an auxiliary loss term. The main loss term is used to calculate the mean square error between the predicted value and the true value, and the auxiliary loss term is used to quantify the matching degree between the water quality evolution trend prediction sequence and the water quality status zoning map.
[0090] It should be noted that in some deep learning tasks, categorical data (such as SOM cluster labels) needs to be transformed into dense vectors through an embedding layer. This transformation maps discrete cluster labels to a continuous vector space, facilitating subsequent computation and model training. The hidden state vector output by the LSTM is concatenated with the dense vector of cluster labels transformed by the embedding layer. The concatenated vector integrates the temporal and categorical information of water quality, providing a more comprehensive representation of the water quality data. A fully connected layer... Following the LSTM layer, a fully connected layer is added. This layer maps the concatenated vector to the dimension of the prediction target, i.e., to the shape of the water quality evolution trend prediction sequence. The fully connected layer is used to connect the features extracted by LSTM with the actual prediction task, ultimately outputting the water quality evolution trend prediction result. Composite loss function: To train the Long Short-Term Memory (LSTM) network, a loss function needs to be defined to measure the difference between the model's prediction results and the real data. Here, a composite loss function is used, which consists of two parts: Main loss term: mainly used to calculate the error between the model's predicted value and the real value. A common error metric is mean squared error (MSE), used to evaluate the model's prediction accuracy. Auxiliary loss term: this term is used to quantify the matching degree between the water quality evolution trend prediction sequence and the water quality state zoning map. By comparing the similarity between the predicted water quality trend and the actual water quality state zoning map, the auxiliary loss term helps the model better learn the potential patterns in the data. Through these two loss terms, the model not only focuses on the accuracy of the prediction, but also on whether the evolution of water quality state conforms to the actual water quality zoning trend through the auxiliary loss term, improving the overall performance of the model.
[0091] In an optional embodiment, scene generation is performed based on the water quality evolution trend prediction sequence to obtain a preset number of random scenes, including:
[0092] The statistics of each parameter in the water quality evolution trend prediction sequence are determined to obtain the statistical feature vector of each parameter in the water quality evolution trend prediction sequence. The correlation between each parameter in the water quality evolution trend prediction sequence is determined according to the Pearson correlation coefficient to obtain the correlation matrix between each parameter in the water quality evolution trend prediction sequence.
[0093] The probability model is determined based on the distribution pattern of the historical monitoring dataset. The joint distribution function of the probability model is used to describe the water quality evolution trend prediction sequence through the statistical feature vector and the correlation matrix to obtain the joint probability distribution model.
[0094] Based on the joint probability distribution model, the parameters in the water quality evolution trend prediction sequence are randomly sampled using the Monte Carlo simulation method, wherein the number of samplings is equal to the preset number of random scenarios.
[0095] For each sampling time, random values are extracted from the joint probability distribution model of each parameter in the water quality evolution trend prediction sequence, and the random values are combined to obtain the parameter combination at the sampling time, wherein the parameter combination represents a random water quality state.
[0096] The parameter combinations at each sampling time are arranged in chronological order to obtain a random scenario, which includes the random change path of each parameter within a preset future time period.
[0097] It's important to note that, firstly, it's necessary to calculate the statistics (such as mean, variance, and standard deviation) for each parameter in the water quality evolution trend prediction sequence. These statistics will help us understand the basic characteristics of each parameter. Secondly, a statistical feature vector is generated by organizing these statistics into a vector, which represents the overall characteristics of each parameter in the water quality evolution trend prediction sequence. Thirdly, the Pearson correlation coefficient is used to understand the relationships between different water quality parameters. A commonly used method is to calculate the Pearson correlation coefficient, which measures the degree of linearity between two variables. The Pearson correlation coefficient ranges from -1 (perfectly negative correlation) to 1 (perfectly positive correlation). 0 indicates no linear relationship; the correlation matrix is constructed based on the Pearson correlation coefficient, showing the correlation between parameters in the water quality evolution trend prediction sequence; each element of the matrix represents the correlation value between two parameters; historical data distribution: by analyzing the distribution pattern of historical monitoring datasets, the probability distribution type of these data is inferred; possible probability models include normal distribution, log-normal distribution, etc., depending on the actual situation of the data; joint distribution function: once the probability model and its distribution characteristics are determined, the joint distribution function can be constructed; the joint distribution function represents the probability of multiple parameters (e.g., multiple water quality indicators) changing together. This function combines statistical eigenvectors and correlation matrices to describe the joint distribution. Monte Carlo simulation is a computational method that solves probability problems through random sampling. Here, Monte Carlo simulation is used to randomly sample various parameters in the water quality evolution trend prediction sequence. The number of samples equals the preset number of random scenarios, meaning we simulate multiple water quality change scenarios through random sampling. During the simulation, a random value is drawn from the joint probability distribution model for each time step. This value is sampled based on the joint distribution of the parameters, thus reflecting the randomness of water quality evolution. Each sample... Random values at different times are combined to obtain a "parameter combination"; each parameter combination represents a possible water quality state; the random scenarios are arranged by sampling at each time point and arranging all sampled parameter combinations in chronological order; in this way, we can obtain multiple different random scenarios, which contain the possible change paths of each parameter within a preset future time period; the change path of water quality state refers to the possible water quality evolution trend represented by each random scenario, which shows how water quality parameters will change randomly in the future; these change paths help predict and simulate water quality changes under different conditions, providing decision-makers with different possible outcomes and risk assessments.
[0098] In an optional embodiment, the risk cost of water quality exceeding standards under the random scenario is evaluated, and a warning threshold boundary set is determined based on the risk cost of water quality exceeding standards and the constraints of the wastewater treatment process, including:
[0099] For each random scenario, check whether each parameter exceeds the preset threshold in chronological order, record the duration, frequency, and peak exceedance of the parameter in each random scenario, and convert the duration, frequency, and peak exceedance of the parameter in each random scenario into economic loss indicators.
[0100] The random scenario is risk-classified based on the duration, frequency, and peak exceedance of the parameters to obtain the risk level of the random scenario;
[0101] All random scenarios are assigned probability weights according to their risk levels. The economic loss indicators of all random scenarios are weighted and averaged according to the probability weights to obtain the cost of water quality exceeding the standard under the random scenario.
[0102] Based on the maximum treatment capacity of the wastewater treatment equipment, process parameter boundaries are set, and economic constraints are established through reagent costs and energy consumption. Under the economic constraints, the threshold combination that minimizes the cost of exceeding water quality standards is found. A third preset safety margin is added to the lowest threshold combination to obtain the early warning threshold boundary set.
[0103] It should be noted that the exceedance inspection, for each random scenario, checks whether water quality parameters exceed preset thresholds in chronological order. For example, some water quality parameters (such as chemical oxygen demand (COD), ammonia nitrogen concentration, etc.) have a safety threshold; when these parameters exceed this value, it is considered an exceedance. For each exceedance, its duration, frequency of occurrence, and peak exceedance amount are recorded. These data reflect the severity, frequency, and maximum exceedance level of the water quality exceedance: duration indicates the length of time a parameter remains in an exceedance state; frequency of occurrence indicates the number of times the exceedance event occurs; peak exceedance amount indicates the maximum deviation of the parameter value from the threshold when exceeding the limit. The duration, frequency of occurrence, and peak exceedance amount of the exceedance have significant impacts on the environment, production, and... The data on water quality exceeding standards leads to economic losses. Through certain conversion methods (based on historical data or expert estimates), these exceedance data are transformed into specific economic loss indicators. For example, exceeding water quality standards may require more treatment, leading to increased treatment costs and potentially causing long-term damage to the aquatic ecosystem. Risk grading classifies the risk of water quality exceedance events based on the exceedance data (duration, frequency, and peak exceedance amount) for each random scenario. Typically, risk grading divides scenarios into different levels, such as low risk, medium risk, and high risk. This grading helps identify which scenarios have the most severe water quality exceedances and require priority treatment. Different probability weights are assigned to all random scenarios according to their risk level; scenarios with higher risk are assigned higher weights. The larger the value, the greater the probability or impact of these scenarios. Based on the probability weight of each scenario, a weighted average of the economic loss indicators for all scenarios is calculated. The result of this process is an overall cost for exceeding water quality standards, i.e., the overall economic loss value considering the probability of different scenarios and their related losses. This value helps decision-makers understand the overall economic impact that exceeding water quality standards may bring under different circumstances. The boundaries of process parameters are set based on the maximum treatment capacity of the wastewater treatment equipment. This maximum treatment capacity may include the maximum volume of water the equipment can treat or the volume of wastewater with a specific concentration. Chemical costs and energy consumption: When setting water treatment parameters, the costs of the chemicals used and energy consumption need to be considered. These costs will affect the overall economic benefits, therefore... As an economic constraint, the threshold combination is set to minimize the cost of exceeding water quality standards. This threshold combination refers to the safety thresholds set for different water quality parameters, ensuring that water quality meets standards while minimizing economic losses from exceeding standards. After finding the threshold combination that minimizes the cost of exceeding water quality standards, a safety margin is added to prevent potential emergencies and ensure a safe level is maintained even under water quality fluctuations or uncertainties. Typically, the safety margin is set according to a certain proportion; here, we are referring to adding a "third preset proportion" safety margin. The warning threshold boundary set refers to the new warning threshold boundary set obtained by adding the safety margin.These thresholds not only take into account the water quality requirements in daily operations, but also include a margin to deal with abnormal situations, so as to detect water quality problems in a timely manner and make early warnings and interventions.
[0104] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited thereto. Various changes can be made within the scope of knowledge possessed by those skilled in the art without departing from the spirit of the present invention.
Claims
1. An artificial intelligence-based industrial wastewater treatment and management system, comprising a wastewater classification unit, a scene generation unit, and a wastewater early warning unit, characterized in that: The wastewater classification unit is used to monitor water quality in the wastewater treatment process based on industrial IoT sensors to obtain a dynamic monitoring dataset; and to perform water quality parameter clustering analysis through a self-organizing mapping network based on the dynamic monitoring dataset to obtain a water quality status zoning map. The scene generation unit is used to augment the dynamic monitoring dataset according to the water quality status zoning map to obtain an augmented dataset, and to perform water quality prediction based on the augmented dataset using the long short-term memory network prediction model to obtain a water quality evolution trend prediction sequence. Scenes are generated based on the water quality evolution trend prediction sequence to obtain a preset number of random scenes; The wastewater early warning unit is used to assess the risk cost of water quality exceeding standards under the random scenario, and to determine the early warning threshold boundary set based on the risk cost of water quality exceeding standards and the constraints of wastewater treatment process. Based on the dynamic monitoring dataset, water quality parameters are clustered using a self-organizing map network to obtain a water quality status zoning map, including: The dynamic monitoring dataset is reconstructed into a two-dimensional sample matrix, where each row of the two-dimensional sample matrix represents a spatiotemporal sampling point and each column corresponds to a water quality parameter. The input vector of the self-organizing mapping network is determined based on the two-dimensional sample matrix. Based on the dynamic monitoring dataset, water quality parameters are clustered using a self-organizing map network to obtain a water quality status zoning map, which also includes: For each input vector, calculate its Euclidean distance to the weight vectors of all neurons in the self-organizing map network, and select the neuron with the smallest Euclidean distance as the best matching unit. The weights of the best matching unit and its neighboring neurons are updated; when the rate of change of the distribution of the best matching unit is less than a preset threshold in a series of preset iterations, the training is terminated and the current weight matrix is retained as the clustering result. Similar neurons in the clustering results are merged to obtain superclusters; the superclusters are functionally labeled according to expert knowledge to obtain a water quality status zoning map; Data augmentation is performed on the dynamic monitoring dataset based on the water quality status zoning map to obtain an augmented dataset. Water quality prediction is then performed on the augmented dataset using a long short-term memory network prediction model to obtain a water quality evolution trend prediction sequence, including: Based on the water quality status zoning map, self-organizing map network clustering labels are added to each spatiotemporal sampling point in the dynamic monitoring dataset to obtain an enhanced dataset; The enhanced dataset is processed using the sliding window technique to obtain time series samples. The mapping relationship between the input sequence and the prediction target is determined based on the time series samples. The input sequence includes time series data of a first preset proportion before the time series samples, and the prediction target includes time series data of a second preset proportion after the time series samples. The input sequence and the prediction target are normalized to linearly map the parameter values to the [0,1] interval; Feature extraction is performed on the input sequence and the predicted target using a two-layer stacked LSTM structure to obtain a hidden state vector, wherein each layer of the LSTM structure includes 128 neurons.
2. The industrial wastewater treatment management system based on artificial intelligence according to claim 1, characterized in that, The dynamic monitoring dataset includes parameters such as pH value, chemical oxygen demand, dissolved oxygen, suspended solids, and temperature; the operating condition data of the wastewater treatment equipment includes parameters such as aerator speed, reagent dosing flow rate, and sludge return ratio.
3. The industrial wastewater treatment management system based on artificial intelligence according to claim 2, characterized in that, The output layer of the self-organizing map network is defined as a hexagonal mesh, wherein the mesh size of the hexagonal mesh is determined by heuristic rules; A Gaussian kernel function is configured as the neighborhood interaction function of the self-organizing map network; the initial neighborhood radius of the self-organizing map network is set to half the grid side length.
4. The industrial wastewater treatment management system based on artificial intelligence according to claim 3, characterized in that, The dynamic monitoring dataset is augmented based on the water quality status zoning map to obtain an enhanced dataset. Water quality is then predicted using the enhanced dataset based on a long short-term memory network prediction model to obtain a predicted sequence of water quality evolution trends. The method also includes: The input sequence and the self-organizing map network clustering labels in the prediction target are converted into dense vectors according to the embedding layer. The hidden state vector and the dense vector are concatenated to obtain the concatenated vector. A fully connected layer is added after the two-layer stacked LSTM structure. The splicing vector is mapped to the dimension of the prediction target according to the fully connected layer to obtain the water quality evolution trend prediction sequence. A composite loss function is defined, and the long short-term memory network prediction model is trained based on the composite loss function. The composite loss function includes a main loss term and an auxiliary loss term. The main loss term is used to calculate the mean square error between the predicted value and the true value, and the auxiliary loss term is used to quantify the matching degree between the water quality evolution trend prediction sequence and the water quality status zoning map.
5. The industrial wastewater treatment management system based on artificial intelligence according to claim 4, characterized in that, Scenes are generated based on the water quality evolution trend prediction sequence to obtain a preset number of random scenes, including: The statistics of each parameter in the water quality evolution trend prediction sequence are determined to obtain the statistical feature vector of each parameter in the water quality evolution trend prediction sequence. The correlation between each parameter in the water quality evolution trend prediction sequence is determined according to the Pearson correlation coefficient to obtain the correlation matrix between each parameter in the water quality evolution trend prediction sequence. The probability model is determined based on the distribution pattern of the historical monitoring dataset. The joint distribution function of the probability model is used to describe the water quality evolution trend prediction sequence through the statistical feature vector and the correlation matrix to obtain the joint probability distribution model. Based on the joint probability distribution model, the parameters in the water quality evolution trend prediction sequence are randomly sampled using the Monte Carlo simulation method, wherein the number of samplings is equal to the preset number of random scenarios. For each sampling time, random values are extracted from the joint probability distribution model of each parameter in the water quality evolution trend prediction sequence, and the random values are combined to obtain the parameter combination at the sampling time, wherein the parameter combination represents a random water quality state. The parameter combinations at each sampling time are arranged in chronological order to obtain a random scenario, which includes the random change path of each parameter within a preset future time period.
6. The industrial wastewater treatment management system based on artificial intelligence according to claim 5, characterized in that, Assess the risk cost of water quality exceeding standards under the aforementioned random scenario, and determine the early warning threshold boundary set based on the risk cost of water quality exceeding standards and the constraints of the wastewater treatment process, including: For each random scenario, check whether each parameter exceeds the preset threshold in chronological order, record the duration, frequency, and peak exceedance of the parameter in each random scenario, and convert the duration, frequency, and peak exceedance of the parameter in each random scenario into economic loss indicators. The random scenario is risk-classified based on the duration, frequency, and peak exceedance of the parameters to obtain the risk level of the random scenario; All random scenarios are assigned probability weights according to their risk levels. The economic loss indicators of all random scenarios are weighted and averaged according to the probability weights to obtain the cost of water quality exceeding the standard under the random scenario. Based on the maximum treatment capacity of the wastewater treatment equipment, process parameter boundaries are set, and economic constraints are established through reagent costs and energy consumption. Under the economic constraints, the threshold combination that minimizes the cost of exceeding water quality standards is found. A third preset safety margin is added to the lowest threshold combination to obtain the early warning threshold boundary set.