Method and system for dynamically adding complex microbial inoculants in combination with water quality monitoring
By setting up water quality monitoring points in the sewage treatment system and using hybrid models and machine learning algorithms, the dosage of compound bacterial agents is dynamically adjusted, which solves the problem of dosage mismatch in traditional dosing methods, achieves precise dosing, improves water quality compliance rate and reduces costs.
Patent Information
- Application Number
- CN202510896285.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-30
- Publication Date
- 2025-10-17
AI Technical Summary
The traditional method of adding composite bacterial agents fails to make dynamic adjustments according to real-time changes in water quality, resulting in mismatched dosage, affecting treatment effects and increasing costs.
Multiple water quality monitoring points are set up in the sewage treatment system, and real-time data is collected using sensors. The dosage of the composite bacterial agent is dynamically adjusted through a hybrid model and machine learning algorithm, and precise dosage is carried out in combination with water quality prediction and dynamic optimization algorithm.
It achieves precise dosing according to changes in water quality, improves water quality compliance rate, reduces bacterial agent consumption and treatment costs, and enhances the stability and adaptability of the sewage treatment system.
Smart Images

Figure HDA0005476046630000011 
Figure HDA0005476046630000012 
Figure HDA0005476046630000021
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of water pollution treatment, and particularly relates to a dynamic composite bacterial agent dosing method and system combined with water quality monitoring. BACKGROUND
[0002] In the sewage treatment process, the dosing of the composite bacterial agent plays a key role in improving water quality. The traditional composite bacterial agent dosing method usually adopts a fixed dosing amount or an experience-based dosing method with fixed time and quantity. This method does not fully consider the real-time changes of water quality, resulting in that the dosing amount of the bacterial agent may not match the actual demand. When the water quality is good, excessive dosing will cause waste of the bacterial agent and increase the treatment cost. When the water quality deteriorates, insufficient dosing cannot achieve the ideal treatment effect, affecting the discharge of water quality up to the standard. SUMMARY
[0003] The present application aims to solve the above problems, and provides a dynamic composite bacterial agent dosing method and system combined with water quality monitoring.
[0004] The first aspect of the present application provides a dynamic composite bacterial agent dosing method combined with water quality monitoring, which comprises the following steps:
[0005] A plurality of water quality monitoring points are arranged in the sewage treatment system, real-time water quality parameters are collected by using sensors, and the collected real-time water quality data is preprocessed to obtain preprocessed water quality data;
[0006] The historical water quality data and the corresponding composite bacterial agent dosing amount and treatment effect data are used to establish a hybrid model including a water quality prediction branch and a bacterial agent dosing branch;
[0007] The preprocessed water quality data is input into the hybrid model, the required composite bacterial agent dosing amount at the current time is determined through the bacterial agent dosing branch, and a preliminary dosing amount is obtained;
[0008] The water quality parameter prediction value within 1-2 hours in the future is obtained through the water quality prediction branch, and the MO-IPSO algorithm is used to dynamically adjust the preliminary dosing amount based on the water quality parameter prediction value, so as to obtain an optimized dosing amount;
[0009] The optimized dosing amount is sent to a dosing device, so that the dosing device can dose the composite bacterial agent according to the set dosing amount and dosing time.
[0010] Optionally, in the first implementation manner of the first aspect of the present application, the preprocessed water quality data is obtained by preprocessing the collected real-time water quality data, and the preprocessing comprises:
[0011] The GAN network is used for judging abnormal data of real-time water quality data, and when abnormal data occurs, generated data of the GAN network is used to replace the abnormal data.
[0012] The real-time water quality data after the abnormal data is removed is decomposed into multi-scale components by using empirical mode decomposition, the complexity of each component is calculated by using sample entropy, and a dynamic threshold is selected to filter high-frequency noise.
[0013] The real-time water quality data after the noise is removed is standardized to obtain preprocessed water quality data.
[0014] Optionally, in the second implementation manner of the first aspect of the present application, the hidden layer of the water quality prediction branch includes two Bi-LSTM layers, the number of neurons of each layer is 64, two fully connected layers are connected after the Bi-LSTM layer, the number of neurons of the first layer is 32, the activation function is ReLU, the number of neurons of the second layer is 4, and the activation function is a linear function.
[0015] Optionally, in the third implementation manner of the first aspect of the present application, the compound microbial agent addition in the microbial agent addition branch is defined as an agent, the environmental state is composed of water quality data at the current time, the compound microbial agent addition amount at the previous time and treatment effect data, the action is the addition amount of the compound microbial agent, and the reward function is the compliance of effluent water quality, the use efficiency of the microbial agent and the treatment cost.
[0016] Optionally, in the fourth implementation manner of the first aspect of the present application, the preprocessed water quality data is input into the mixed model, the required compound microbial agent addition amount at the current time is determined through the microbial agent addition branch to obtain a preliminary addition amount, which includes:
[0017] The preprocessed water quality data at the current time is fused with the actual amount of microbial agent added at the previous time and the treatment effect data of effluent water at the previous time to form a state vector;
[0018] The state vector is input into the microbial agent addition branch of the mixed model, the Actor network adds the compound microbial agent after discrete processing of the action space according to the current state vector, outputs a continuous addition amount action, and obtains the preliminary addition amount of the compound microbial agent required at the current time;
[0019] The Critic network evaluates the value of the action according to the state vector and the action, outputs a Q value, and constantly updates the parameters of the Actor network and the Critic network through interaction with the environment to obtain an optimal addition strategy.
[0020] Optionally, in the fifth implementation manner of the first aspect of the present application, the water quality parameter prediction value in the future 1-2 hours is obtained through the water quality prediction branch, which includes:
[0021] The pretreated current time water quality data is integrated with the historical water quality data of 12 continuous time points to form an input data group containing 13 time points, and a water quality parameter sequence is obtained;
[0022] The long-term dependence relationship of the water quality parameters in the time dimension is extracted from the water quality parameter sequence through the Bi-LSTM layer;
[0023] The full connection layer fuses the features extracted through the Bi-LSTM layer in two directions, and generates the water quality parameter prediction value in the future 1-2 hours in combination with the running state of the current sewage treatment system.
[0024] Optionally, in the sixth implementation manner of the first aspect of the present application, the MO-IPSO algorithm is used to dynamically adjust the preliminary dosage based on the water quality parameter prediction value, and an optimized dosage is obtained, comprising:
[0025] The particle swarm is initialized, and each particle of the particle swarm represents a composite bacterial agent dosage adjustment scheme, and the position vector of the particle is the adjustment value of the dosage;
[0026] For each particle, the fitness value is calculated according to the water quality parameter prediction value in the future 1-2 hours obtained by the water quality prediction branch;
[0027] The speed and position of the particle are updated according to the individual optimal position and the global optimal position, all particles in the particle swarm are non-dominantly sorted, the particles are divided into different Pareto front surfaces, and the crowding degree of each particle in the front surface is calculated;
[0028] When the maximum iteration number is reached, the particles located in the optimal Pareto front surface are selected from the last generation of particle swarm to determine the composite bacterial agent dosage adjustment scheme, and an optimized dosage is obtained.
[0029] The second aspect of the present application provides a composite bacterial agent dynamic dosage system combined with water quality monitoring, which comprises:
[0030] The data acquisition module is used for setting multiple water quality monitoring points in the sewage treatment system, collecting real-time water quality parameters by using sensors, and preprocessing the collected real-time water quality data to obtain pretreated water quality data;
[0031] The model establishment module is used for establishing a mixed model comprising a water quality prediction branch and a bacterial agent dosage branch by using historical water quality data and corresponding composite bacterial agent dosage and treatment effect data;
[0032] The input module is used for inputting the pretreated water quality data into the mixed model, determining the required composite bacterial agent dosage at the current time through the bacterial agent dosage branch, and obtaining a preliminary dosage;
[0033] The dynamic adjustment module is configured to obtain water quality parameter prediction values in the next 1-2 hours through the water quality prediction branch, and dynamically adjust the preliminary dosage by using the MO-IPSO algorithm based on the water quality parameter prediction values, so as to obtain the optimized dosage.
[0034] The sending module is configured to send the optimized dosage to the dosing device, so that the dosing device adds the compound microbial agent according to the set dosage and dosing time.
[0035] The third aspect of the present application provides a compound microbial agent dynamic dosing device combined with water quality monitoring, which comprises a memory and at least one processor, and the memory stores instructions; the at least one processor invokes the instructions in the memory to enable the compound microbial agent dynamic dosing device combined with water quality monitoring to perform each step of the compound microbial agent dynamic dosing method combined with water quality monitoring.
[0036] The fourth aspect of the present application provides a computer readable storage medium, which stores instructions, and the instructions are executed by a processor to implement each step of the compound microbial agent dynamic dosing method combined with water quality monitoring.
[0037] In the technical solution provided by the present application, a plurality of water quality monitoring points are arranged in the sewage treatment system, real-time water quality parameters are collected by using sensors, and the collected real-time water quality data are preprocessed to obtain preprocessed water quality data; a mixed model including a water quality prediction branch and a microbial agent dosing branch is established by using historical water quality data and corresponding compound microbial agent dosing amount and treatment effect data; the preprocessed water quality data are input into the mixed model, the required compound microbial agent dosing amount at the current time is determined through the microbial agent dosing branch, and a preliminary dosing amount is obtained; water quality parameter prediction values in the next 1-2 hours are obtained through the water quality prediction branch, and the preliminary dosing amount is dynamically adjusted by using the MO-IPSO algorithm based on the water quality parameter prediction values, so as to obtain an optimized dosing amount; the optimized dosing amount is sent to a dosing device, so that the dosing device adds the compound microbial agent according to the set dosage and dosing time; the present application dynamically calculates and adjusts the dosing amount of the compound microbial agent, realizes accurate dosing of the microbial agent, can timely adjust the dosing amount according to real-time changes and future prediction of the water quality, ensures that the sewage treatment system can achieve good treatment effect under various water quality conditions, improves the water quality compliance rate, avoids waste of the microbial agent, reduces microbial agent consumption by 20%-35%, reduces unnecessary dosing amount, reduces sewage treatment cost, can adapt to complex changes and fluctuations of the water quality, improves the stability and adaptability of the sewage treatment system, reduces manual intervention, improves management efficiency, improves the water quality compliance rate by 15%-25%, reduces the response time by more than 50%, and reduces the comprehensive cost by 10%-20%. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Various other advantages and benefits will become apparent to those skilled in the art by reading the following detailed description of the preferred embodiment.The accompanying drawings are only for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present invention.
[0039] Figure 1 A flow chart of a method for dynamically adding a composite bacterial agent combined with water quality monitoring provided in an embodiment of the present invention;
[0040] Figure 2 A schematic diagram of the structure of a dynamic dosing system for a composite bacterial agent combined with water quality monitoring provided by an embodiment of the present invention;
[0041] Figure 3 This is a schematic structural diagram of a dynamic dosing device for a composite bacterial agent combined with water quality monitoring provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The terms "first," "second," "third," "fourth," and the like (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, apparatus, product, or apparatus that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to these processes, methods, products, or apparatus.
[0043] For ease of understanding, the specific process of the embodiment of the present invention is described below. Figure 1 The flow chart of the method for dynamic addition of a composite bacterial agent combined with water quality monitoring provided in an embodiment of the present invention specifically includes the following steps:
[0044] Step 101: Set up multiple water quality monitoring points in the sewage treatment system, use sensors to collect real-time water quality parameters, and pre-process the collected real-time water quality data to obtain pre-processed water quality data;
[0045] In this embodiment, sensors with high precision, high stability and fast response characteristics are selected in the sewage treatment system, including pH sensor, dissolved oxygen (DO) sensor, chemical oxygen demand (COD) sensor, ammonia nitrogen (NH3-N) sensor, etc., to realize real-time and accurate collection of key water quality parameters such as pH value, dissolved oxygen concentration, chemical oxygen demand and ammonia nitrogen concentration; the monitoring point arrangement follows the principles of comprehensiveness and representativeness, and is set at the water inlet for obtaining initial data of raw water quality; in the aerobic zone of the biological reaction tank, 1-2 m away from the aeration device, 1 is set every 100 m 3 The reaction volume is set to 1 in the anoxic zone, the slow water flow area, and 1 is set every 20-30 m in the anaerobic zone, 0.5-1 m above the bottom of the tank, and 1 is set every 50 m 3 The reaction volume is set to 1 to capture the water quality changes at different reaction stages; the secondary sedimentation tank outlet is set to monitor the water quality of the treated effluent.
[0046] In this embodiment, the GAN network is used to judge the real-time water quality data for abnormal data, and the generated data of the GAN network is used to replace the abnormal data when abnormal data occurs; the real-time water quality data after removing the abnormal data is decomposed into multiple scale components by empirical mode decomposition, the complexity of each component is calculated by sample entropy, and a dynamic threshold is selected to filter out high-frequency noise; the real-time water quality data after denoising is standardized to obtain the pretreated water quality data.
[0047] In this embodiment, the generator of the generative adversarial network adopts a multi-layer perceptron, the input layer is a vector containing the time stamp and each water quality parameter, the hidden layer is set to 3 layers, the number of neurons in each layer is 128, 256 and 128 respectively, the activation function is ReLU, the number of neurons in the output layer is consistent with the number of input water quality parameters, and the activation function is a linear function; the discriminator also adopts a multi-layer perceptron, the input layer is the original normal data or generated data, the hidden layer is set to 3 layers, the number of neurons is 256, 128 and 64 respectively, the activation function is LeakyReLU, the output layer is one neuron, and the activation function is Sigmoid, which is used to judge whether the data is normal data; the normal water quality data in the same time period in history is selected as the training set, and the data amount is not less than 100,000; the generator tries to generate abnormal repair data close to normal data, and the discriminator tries to distinguish between generated data and real normal data, by alternately training the generator and the discriminator, until the generator can generate high-quality repair data, and the discriminator cannot accurately distinguish between generated data and real data.
[0048] In this embodiment, there may still be high-frequency noise in the real-time water quality data after removing abnormal data due to environmental interference and other factors. Empirical mode decomposition can decompose complex water quality data signals into multiple intrinsic mode function components of different frequencies, each component representing the change characteristics of the data at different scales. Then, the complexity of each component is calculated by sample entropy. The higher the sample entropy value, the more complex the fluctuations of the component, and the greater the possibility of noise. According to the calculation result of sample entropy, a suitable threshold is dynamically set for each component. High-frequency components higher than the threshold are considered as noise and filtered out, and low-frequency and medium-frequency components reflecting the real trend of water quality change are retained, thereby realizing effective noise reduction of water quality data. After abnormal data repair and noise reduction processing, the numerical ranges and dimensional differences of different parameters of the water quality data are large, such as pH value, chemical oxygen demand, ammonia nitrogen concentration, etc. This will affect the training and calculation efficiency of the subsequent model. Therefore, it is necessary to standardize these data. The purpose of standardization is to unify all data to a specific numerical interval, usually between 0 and 1 or -1 and 1, so that the data of different parameters are comparable. The specific operation is to adjust each data point according to its mean and standard deviation of the parameter it belongs to, eliminate the influence of dimension and numerical size, and finally obtain the preprocessed water quality data.
[0049] Step 102, using historical water quality data and corresponding composite bacterial agent dosage and treatment effect data, a mixed model including water quality prediction branch and bacterial agent dosage branch is established;
[0050] In this embodiment, historical water quality data (including pH value, dissolved oxygen concentration, chemical oxygen demand, ammonia nitrogen concentration, etc.), corresponding composite bacterial agent dosage (including dosage time, dosage concentration, etc.) and treatment effect data (such as effluent chemical oxygen demand, ammonia nitrogen concentration removal rate, etc.) are collected. The historical water quality data includes pH value, dissolved oxygen concentration, chemical oxygen demand, ammonia nitrogen concentration, etc. The corresponding composite bacterial agent dosage includes dosage time, dosage concentration, etc. The treatment effect data such as effluent chemical oxygen demand, ammonia nitrogen concentration removal rate, etc. The data time span is not less than 1 year, forming a training data set and a test data set, wherein the training data set accounts for 80%, and the test data set accounts for 20%.
[0051] The input layer of the water quality prediction branch is a water quality parameter vector at the current time and the previous 12 times, each time including 4 water quality parameters, a total of 13x4=52 input neurons, the hidden layer includes 2 Bi-LSTM layers, each with 64 neurons, to capture long-term dependencies in time series; then connect 2 fully connected layers, the first layer has 32 neurons, the activation function is ReLU, the second layer has 4 neurons, corresponding to the predicted values of the 4 water quality parameters in the next 1-2 hours, and the activation function is a linear function; the mean square error is used as the loss function, the Adam optimizer is selected as the optimizer, the learning rate is initialized to 0.001, and the learning rate is reduced to 0.9 of the original every 50 epochs. During the training process, the training data set is input into the network in batches, the batch size is 32, the network parameters are updated through forward propagation and backward propagation, and the loss function converges until the loss function converges;
[0052] The bacteria agent adding branch agent is a composite bacteria agent adding system, which is responsible for determining the current composite bacteria agent adding amount according to the current water quality state and historical adding experience; the environmental state is composed of the water quality parameters at the current time, the composite bacteria agent adding amount at the previous time and the treatment effect data, forming a state vector, the water quality parameters are pH value, dissolved oxygen concentration, chemical oxygen demand and ammonia nitrogen concentration, and the treatment effect data is the removal rate of chemical oxygen demand and ammonia nitrogen concentration at the previous time; the action is defined as the adding amount of the composite bacteria agent, considering the precision of the actual adding device and the load of the sewage treatment system, the adding amount is in the range of [0, 100] L / h, with a step of 10 L / h, a total of 11 discrete actions; the reward function is designed to comprehensively consider the water quality standard reaching situation, the bacteria agent use efficiency and the treatment cost; the deep deterministic policy gradient algorithm is used as the specific implementation of the DRL algorithm, including the Actor network and the Critic network, the Actor network inputs the state vector and outputs the continuous adding amount action, which is processed through action space discretization and then added, the Critic network inputs the state vector and the action vector and outputs the Q value, which is used to evaluate the value of the action. Through interaction with the environment, the parameters of the Actor network and the Critic network are constantly updated to obtain the optimal adding strategy.
[0053] Step 103, input the pretreated water quality data into the mixed model, determine the required composite bacteria agent adding amount at the current time through the bacteria agent adding branch, and obtain the preliminary adding amount;
[0054] In this embodiment, the pretreated current time water quality data is fused with the actual dosage of bacteria agent added at the previous time and the treatment effect data of effluent at the previous time to form a state vector; the state vector is input into the bacteria agent adding branch of the hybrid model, the Actor network adds according to the current state vector, and after discretization processing of the action space, outputs a continuous adding amount action to obtain the preliminary adding amount of the composite bacteria agent required at the current time; the Critic network evaluates the value of the action according to the state vector and the action, and outputs a Q value, and through interaction with the environment, the parameters of the Actor network and the Critic network are updated to obtain the optimal adding strategy.
[0055] In this embodiment, in the sewage treatment system, in order to more comprehensively reflect the current running state, so as to accurately determine the adding amount of the composite bacteria agent, it is necessary to integrate various related data, collect the pretreated current time water quality data including pH value, dissolved oxygen concentration, chemical oxygen demand, ammonia nitrogen concentration and other key indicators, which reflect the water quality characteristics of the sewage at the moment. Then, the bacteria agent dosage data at the previous time is called, which reflects the last bacteria agent input condition. At the same time, the treatment effect data of effluent at the previous time is obtained, such as chemical oxygen demand removal rate and ammonia nitrogen removal rate of effluent, which directly shows the treatment effect after adding the bacteria agent last time. Finally, these data of different dimensions are combined in a specific order to form a complete state vector. This state vector is like a digital portrait of the current state of the system, containing water quality, adding history and treatment effect and other information;
[0056] The constructed state vector is input into the bacteria agent adding branch of the hybrid model, in the bacteria agent adding branch, the Actor network analyzes the input state vector, and the Actor network finds a suitable adding action in the preset action space based on the experience and rules learned by previous training and learning. Since the actual adding device can only execute a limited number of discrete adding amount levels, the Actor network needs to perform discretization processing on the action space, and divide the continuous adding amount range into multiple discrete levels. Through analysis of the state vector and screening of the action space, the Actor network outputs a continuous adding amount action, which is determined as the preliminary adding amount of the composite bacteria agent required at the current time after further processing;
[0057] When the Actor network outputs the preliminary dosing action, the Critic network evaluates the value of the action according to the input state vector and the output of the Actor network. The Q value output by the Critic network represents the expected return obtained by executing the dosing action in the current state. The higher the Q value, the more likely it is that the action will bring good treatment results. In the actual operation process of wastewater treatment, the system will put the dosing action into practice, that is, send the preliminary dosing amount instruction to the dosing device for bacteria dosing. As time goes by, the system will collect new water quality data, treatment effect data after dosing and other information. These information constitutes new environmental feedback. Based on the feedback obtained by interacting with the environment, the system will continuously update the parameters of the Actor network and the Critic network. The Actor network will adjust its decision-making strategy according to the new feedback and try to find a better dosing action. The Critic network will also correct its evaluation standard for the value of the action according to the actual effect. Through such continuous interaction with the environment and updating of network parameters, the Actor network and the Critic network will gradually cooperate and eventually obtain an optimal dosing strategy, realizing precise dosing of compound bacteria and improving the efficiency and quality of wastewater treatment.
[0058] Step 104: Obtain the water quality parameter prediction value in the next 1-2 hours through the water quality prediction branch, and dynamically adjust the preliminary dosing amount based on the water quality parameter prediction value using the MO-IPSO algorithm to obtain the optimized dosing amount.
[0059] In this embodiment, the pretreated current time water quality data and the historical water quality data of the previous 12 consecutive time points are integrated to form an input data set containing 13 time points, and a water quality parameter sequence is obtained. The Bi-LSTM layer extracts the long-term dependence of the water quality parameters in the time dimension from the water quality parameter sequence. The fully connected layer fuses the features extracted by the Bi-LSTM layer in both directions, and generates the water quality parameter prediction value in the next 1-2 hours based on the current operation state of the wastewater treatment system.
[0060] In this embodiment, in the process of wastewater treatment, the water quality state changes over time. In order to accurately predict the future water quality, the current and historical water quality conditions need to be considered comprehensively. The pretreated current time water quality data is obtained, which covers key indicators such as pH value, dissolved oxygen concentration, chemical oxygen demand, ammonia nitrogen concentration, etc. These data reflect the current characteristics of wastewater. Then, the historical water quality data of the previous 12 consecutive time points is collected, with an interval of 15 minutes between each time point, forming a time series data of nearly 3 hours. The current time data and the 12 historical time data are integrated in chronological order to form an input data set containing 13 time points, i.e. a water quality parameter sequence.
[0061] The constructed water quality parameter sequence is input into a Bi-LSTM layer for processing. The Bi-LSTM layer can deeply mine the internal relationship between water quality parameters from the time dimension. It analyzes the water quality parameter sequence from two directions, forward and reverse. In forward analysis, it advances from the past to the current time to capture how the early water quality changes affect the current water quality state. In reverse analysis, it traces back from the current time to the past to find factors in the historical data that may have a delayed impact on future water quality. Through this bidirectional processing method, the Bi-LSTM layer can effectively extract the long-term dependence of water quality parameters in the time dimension, such as the natural degradation trend of chemical oxygen demand over time and the lag response of ammonia nitrogen concentration to changes in water inflow load.
[0062] The feature vector obtained after Bi-LSTM layer processing contains rich water quality time series features. These features are input into a fully connected layer for further processing. The fully connected layer deeply fuses the features extracted by the Bi-LSTM layer in both directions, allowing various features to interact and complement each other. At the same time, the fully connected layer also considers the current operation state of the sewage treatment system, such as aeration intensity, sludge concentration, and water inflow, to comprehensively consider the influence of various factors on water quality changes. Ultimately, the fully connected layer generates water quality parameter prediction values for the next 1-2 hours through a series of calculations and analyses, with 15-minute intervals, providing prediction results for key indicators such as pH, dissolved oxygen concentration, chemical oxygen demand, and ammonia nitrogen concentration at each time point.
[0063] In this embodiment, the particle swarm is initialized, and each particle in the particle swarm represents a composite bacterial agent dosage adjustment scheme. The position vector of the particle is the adjustment value of the dosage. For each particle, the fitness value is calculated based on the water quality parameter prediction values obtained from the water quality prediction branch for the next 1-2 hours. The particle's speed and position are updated based on the individual optimal position and global optimal position. All particles in the particle swarm are non-dominantly sorted, and the particles are divided into different Pareto front surfaces. The crowding degree of each particle in its front surface is calculated. When the maximum number of iterations is reached, the particles located in the optimal Pareto front surface are selected from the last generation of particle swarm to determine the composite bacterial agent dosage adjustment scheme, and the optimized dosage is obtained.
[0064] Step 105: Send the optimized dosage to the dosing equipment to control the dosing equipment to add the composite bacterial agent according to the set dosage and dosing time.
[0065] In this embodiment, Modbus RTU communication protocol is used to realize data transmission between the hybrid model and the dosing device, which has the characteristics of stable communication and strong compatibility. In hardware connection, the control computer and the controller of the dosing device are connected through RS485 bus, the communication baud rate is set to 9600bps, the data bit is 8 bits, the stop bit is 1 bit, and the check mode is CRC check; the control computer sends the optimized dosing amount and dosing time to the controller (PLC) of the dosing device, and the PLC controls the start-stop and running frequency of the dosing pump according to the received instructions, so as to realize accurate control of the dosing amount and dosing time of the composite bacterial agent. The dosing device uses a metering pump, the flow regulation range of which is 0-100L / h, and the regulation accuracy is ±1%, which can meet the accuracy requirements of the composite bacterial agent dosing. During the dosing process, the PLC monitors the running state of the dosing pump in real time and feeds back the state information to the control computer, realizing closed-loop control of the dosing process.
[0066] Please refer to Figure 2 The structure diagram of the dynamic dosing system of the composite bacterial agent combined with water quality monitoring provided by the embodiment of the present application, the system comprises:
[0067] A data acquisition module is configured to set multiple water quality monitoring points in the sewage treatment system, collect real-time water quality parameters by using sensors, and preprocess the collected real-time water quality data to obtain preprocessed water quality data.
[0068] A model establishment module is configured to establish a hybrid model comprising a water quality prediction branch and a bacterial agent dosing branch by using historical water quality data and corresponding composite bacterial agent dosing amount and treatment effect data.
[0069] An input module is configured to input the preprocessed water quality data into the hybrid model, determine the required composite bacterial agent dosing amount at the current time through the bacterial agent dosing branch, and obtain a preliminary dosing amount.
[0070] A dynamic adjustment module is configured to obtain water quality parameter prediction values within 1-2 hours in the future through the water quality prediction branch, and dynamically adjust the preliminary dosing amount based on the water quality parameter prediction values by using the MOIPSO algorithm to obtain an optimized dosing amount.
[0071] A sending module is configured to send the optimized dosing amount to the dosing device, so that the dosing device can dose the composite bacterial agent according to the set dosing amount and dosing time.
[0072] Figure 3is a structural schematic view of a combined water quality monitoring composite microbial agent dynamic dosing equipment provided by an embodiment of the present application. The combined water quality monitoring composite microbial agent dynamic dosing equipment 300 can have relatively large differences due to different configurations or performances, and can include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, one or more storage media 330 (for example, one or more mass storage devices) storing application programs 333 or data 332. The memory 320 and the storage media 330 can be temporary storage or persistent storage. The programs stored in the storage media 330 can include one or more modules (not shown in the figure), and each module can include a series of instruction operations in the combined water quality monitoring composite microbial agent dynamic dosing equipment 300. Further, the processor 310 can be configured to communicate with the storage media 330 and execute a series of instruction operations in the storage media 330 on the combined water quality monitoring composite microbial agent dynamic dosing equipment 300 to implement the method provided by the above embodiment.
[0073] The combined water quality monitoring composite microbial agent dynamic dosing equipment 300 can also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating devices 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, and the like. Those skilled in the art can understand that the combined water quality monitoring composite microbial agent dynamic dosing equipment structure shown does not constitute a limitation on the computer equipment provided by the present application, and can include more or fewer components than shown, or combine certain components, or different component arrangements. Figure 3 The combined water quality monitoring composite microbial agent dynamic dosing equipment structure shown does not constitute a limitation on the computer equipment provided by the present application, and can include more or fewer components than shown, or combine certain components, or different component arrangements.
[0074] The present application also provides a computer readable storage medium, which can be a non-volatile computer readable storage medium or a volatile computer readable storage medium. The computer readable storage medium has instructions stored therein, and when the instructions are run on a computer, the computer executes the steps of the combined water quality monitoring composite microbial agent dynamic dosing method provided by the above embodiments.
[0075] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-described device or apparatus, unit can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0076] The integrated unit, if implemented in the form of a software function unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0077] The basic principles, main features and advantages of the present application are shown and described above. Those skilled in the art should understand that the present application is not limited by the above embodiments, and the above embodiments and descriptions in the specification are only preferred examples of the present application and are not intended to limit the present application. Without departing from the spirit and scope of the present application, various changes and improvements can be made to the present application, and these changes and improvements all fall within the scope of the claimed present application. The scope of protection of the present application is defined by the appended claims and their equivalents.
Claims
1. A dynamic dosing method of composite bacterial agent combined with water quality monitoring, characterized in that: The method comprises the following steps: Set up multiple water quality monitoring points in the sewage treatment system, use sensors to collect real-time water quality parameters, and pre-process the collected real-time water quality data to obtain pre-processed water quality data; Using historical water quality data and corresponding composite microbial agent dosage and treatment effect data, a hybrid model consisting of a water quality prediction branch and a microbial agent addition branch was established; The pre-treated water quality data is input into the hybrid model, and the dosage of the composite bacterial agent required at the current moment is determined through the bacterial agent addition branch to obtain the preliminary dosage; The water quality prediction branch obtains the predicted values of water quality parameters within the next 1-2 hours, and uses the MO-IPSO algorithm to dynamically adjust the initial dosage based on the predicted values of water quality parameters to obtain the optimized dosage; The optimized dosage is sent to the dosing equipment so as to control the dosing equipment to add the compound microbial agent according to the set dosage and dosing time.
2. The method for dynamic addition of composite bacterial agent combined with water quality monitoring according to claim 1, characterized in that: The preprocessing of the collected real-time water quality data to obtain preprocessed water quality data includes: The GAN network is used to judge abnormal data of real-time water quality data. When abnormal data appears, the data generated by the GAN network is used to replace the abnormal data. Empirical mode decomposition is used to decompose real-time water quality data after removing abnormal data into multi-scale components. The complexity of each component is calculated through sample entropy, and the threshold is dynamically selected to filter out high-frequency noise. The denoised real-time water quality data is standardized to obtain preprocessed water quality data.
3. The method for dynamic addition of composite bacterial agent combined with water quality monitoring according to claim 1, characterized in that: The hidden layer of the water quality prediction branch includes two Bi-LSTM layers, each with 64 neurons. The Bi-LSTM layer is connected to two fully connected layers. The number of neurons in the first layer is 32, and the activation function is ReLU. The number of neurons in the second layer is 4, and the activation function is a linear function.
4. The method for dynamic addition of composite bacterial agent combined with water quality monitoring according to claim 1, characterized in that: In the microbial agent addition branch, the compound microbial agent addition is defined as an intelligent agent. The environmental state is composed of the water quality data at the current moment, the compound microbial agent addition amount at the previous moment, and the treatment effect data. The action is the addition amount of the compound microbial agent. The reward function is the compliance of the effluent water quality, the efficiency of the microbial agent use, and the treatment cost.
5. The method for dynamic addition of composite bacterial agent combined with water quality monitoring according to claim 4, characterized in that: The pre-treated water quality data is input into the hybrid model, and the dosage of the composite microbial agent required at the current moment is determined through the microbial agent addition branch to obtain the preliminary dosage, including: The pre-treated water quality data at the current moment is integrated with the actual dosage of the microbial agent added at the previous moment and the treatment effect data of the effluent at the previous moment to form a state vector; The state vector is input into the microbial agent dosing branch of the hybrid model. The Actor network performs dosing based on the current state vector after discretization of the action space, outputs continuous dosing actions, and obtains the initial dosing amount of the composite microbial agent required at the current moment. The Critic network evaluates the value of the action based on the state vector and action, outputs the Q value, and continuously updates the parameters of the Actor network and the Critic network by interacting with the environment to obtain the optimal injection strategy.
6. The method for dynamic addition of composite bacterial agent combined with water quality monitoring according to claim 1, characterized in that: The water quality parameter prediction values obtained in the next 1-2 hours through the water quality prediction branch include: The pre-processed current water quality data is integrated with the historical water quality data of the previous 12 consecutive moments to form an input data set containing 13 time points, and a water quality parameter sequence is obtained; The long-term dependencies of water quality parameters in the time dimension are extracted from the water quality parameter sequence through the Bi-LSTM layer; The fully connected layer fuses the features extracted bidirectionally by the Bi-LSTM layer and generates predicted values of water quality parameters within the next 1-2 hours based on the current operating status of the sewage treatment system.
7. The method for dynamic addition of composite bacterial agent combined with water quality monitoring according to claim 1, characterized in that: The MO-IPSO algorithm is used to dynamically adjust the initial dosage based on the predicted value of the water quality parameters to obtain the optimized dosage, including: Initialize the particle swarm, where each particle represents a dosage adjustment scheme for the composite microbial agent, and the particle's position vector is the dosage adjustment value. For each particle, the fitness value is calculated based on the predicted water quality parameters within the next 1-2 hours obtained by the water quality prediction branch; Update the speed and position of the particle according to the individual optimal position and the global optimal position, perform non-dominated sorting on all particles in the particle swarm, divide the particles into different Pareto frontiers, and calculate the crowding degree of each particle in its frontier. When the maximum number of iterations is reached, the particles located on the optimal Pareto front are selected from the last generation of particle swarms to determine the dosage adjustment plan for the composite microbial agent and obtain the optimized dosage.
8. The dynamic dosing system of composite bacterial agent combined with water quality monitoring is characterized by: The system includes: The data acquisition module is used to set up multiple water quality monitoring points in the sewage treatment system, use sensors to collect real-time water quality parameters, and pre-process the collected real-time water quality data to obtain pre-processed water quality data; The model building module is used to use historical water quality data and the corresponding composite microbial agent dosage and treatment effect data to establish a hybrid model including a water quality prediction branch and a microbial agent addition branch; The input module is used to input the pre-treated water quality data into the hybrid model, determine the required dosage of the composite microbial agent at the current moment through the microbial agent addition branch, and obtain the preliminary dosage; The dynamic adjustment module is used to obtain the predicted values of water quality parameters in the next 1-2 hours through the water quality prediction branch, and dynamically adjust the initial dosage based on the predicted values of water quality parameters using the MO-IPSO algorithm to obtain the optimized dosage; The sending module is used to send the optimized dosage to the dosing device so as to control the dosing device to add the composite microbial agent according to the set dosage and dosing time.
9. A dynamic dosing device for composite bacterial agents combined with water quality monitoring, characterized in that: The dynamic dosing device for compound microbial agents combined with water quality monitoring includes a memory and at least one processor, wherein instructions are stored in the memory; the at least one processor calls the instructions in the memory so that the dynamic dosing device for compound microbial agents combined with water quality monitoring performs each step of the dynamic dosing method for compound microbial agents combined with water quality monitoring as described in any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the various steps of the method for dynamic addition of composite bacterial agent combined with water quality monitoring as described in any one of claims 1 to 7 are implemented.