A sewage treatment integrated management system and method

By using a particle walk mechanism driven by phase space reconstruction and dynamic correlation matrix, combined with residual neural networks, the problems of insufficient capture of time-varying nonlinear correlations and chaotic dynamic features among multiple nodes are solved. This enables high-precision prediction of water quality exceedance risks and adjustment of equipment parameters, thereby improving the risk prediction and control capabilities of wastewater treatment systems.

CN122355384APending Publication Date: 2026-07-10厦门国净环保科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
厦门国净环保科技有限公司
Filing Date
2026-06-08
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing technologies cannot accurately capture the time-varying nonlinear correlations and chaotic dynamic characteristics between multiple nodes, resulting in insufficient accuracy in predicting water quality exceedance risks. Furthermore, they lack the ability to capture the amplification effect of small disturbances and the risk of multi-node chain instability.

Method used

By using a particle walk mechanism driven by phase space reconstruction and dynamic correlation matrix, a trajectory feature reflecting the system's evolution path is constructed. Residual neural networks are used to accurately predict the future risks of each node, and deep learning models are combined to adjust the parameters of the sewage treatment equipment.

Benefits of technology

It significantly improves the timeliness and accuracy of water quality exceedance risk assessment. By using a dynamic correlation matrix to reflect the time-varying characteristics of system chaos and the intensity of influence between nodes, it generates high-value sequence features, enabling early prediction and graded adjustment of the direction of anomaly propagation and threatened nodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122355384A_ABST
    Figure CN122355384A_ABST
Patent Text Reader

Abstract

This invention discloses a comprehensive wastewater treatment management system and method, belonging to the field of wastewater treatment technology. The method acquires historical water quality parameter sequences and real-time process parameters for each monitoring node; performs phase space reconstruction on the historical water quality parameter sequences to obtain the attractor trajectory matrix of each node; calculates the maximum Lyapunov exponent difference between nodes and constructs a dynamic correlation matrix; uses the dynamic correlation matrix to drive virtual particles to randomly walk in the node space, with the movement probability determined by the local entropy of the current node's attractor trajectory matrix; inputs the walking trajectory sequence into a deep neural network based on a residual structure to output the water quality exceedance risk index for each node at future times; and adjusts the operating parameters of the wastewater treatment equipment based on the risk index. This application can dynamically capture the nonlinear correlation characteristics between nodes, improving the accuracy and timeliness of risk prediction for wastewater treatment systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wastewater treatment technology, specifically to a comprehensive wastewater treatment management system and method. Background Technology

[0002] Wastewater treatment plants are equipped with numerous monitoring nodes, and the water quality parameters at each node exhibit complex nonlinear fluctuations over time. Traditional wastewater management methods rely on threshold alarms for single nodes or analyze the influence relationships between nodes based on fixed correlation coefficients. When factors such as influent load and microbial activity undergo abrupt changes, the intensity and direction of the influence between nodes change accordingly. Fixed correlation models cannot reflect this dynamic evolution, leading to misjudgments of system state transitions. Some existing schemes utilize recurrent neural networks or graph neural networks to predict water quality changes, but their inputs are usually raw time series or static topological structures, failing to deeply extract the inherent chaotic dynamics of the system. The sequences of indicators such as dissolved oxygen and ammonia nitrogen in the wastewater treatment process exhibit obvious chaotic characteristics, and the coupling relationships between different operational units are implicit in the evolutionary trajectories of the multidimensional state space. Existing methods lack analysis of the geometry of multi-node attractors and the Lyapunov exponent spectrum of the system, making it difficult to characterize the exponential separation rate of adjacent orbits in the state space. This results in insufficient ability to capture the amplification effect of small perturbations and the risk of multi-node cascading instability. Furthermore, conventional deep learning models neglect the time-varying scattering characteristics of inter-node associations when constructing input features, making it difficult for training samples to represent potential sequential transmission paths. This results in poor adaptability of risk prediction results to changes in operating conditions. This technical solution aims to address how to generate effective node sequence features under nonlinear dynamic association conditions and utilize these features to achieve high-precision prediction of water quality exceedance risks, thereby guiding the adjustment of process parameters. Summary of the Invention

[0003] This invention provides a comprehensive wastewater treatment management system and method, aiming to solve the problem that existing technologies cannot accurately capture the time-varying nonlinear correlations and chaotic dynamic characteristics between multiple nodes, resulting in insufficient accuracy in predicting the risk of water quality exceeding standards. By constructing a particle walk mechanism driven by phase space reconstruction and dynamic correlation matrix, the invention can reflect the trajectory characteristics of the system evolution path, and, in conjunction with a residual neural network, achieve accurate prediction of the future risks of each node, providing a basis for adjusting equipment parameters in the wastewater treatment process.

[0004] To achieve the above objectives, the present invention provides the following technical solution: The present invention provides a comprehensive wastewater treatment management method, comprising the following steps: acquiring historical water quality parameter sequences and real-time process parameters for each monitoring node in the wastewater treatment process; performing phase space reconstruction on the historical water quality parameter sequences of each node to obtain the attractor trajectory matrix of each node; calculating the maximum Lyapunov exponent difference between each pair of nodes based on the attractor trajectory matrix of each node, and constructing a dynamic correlation matrix based on the difference; using the dynamic correlation matrix to drive a group of virtual particles to randomly walk in the node space, wherein the movement probability of the particles during each walk is determined by the local entropy of the attractor trajectory matrix of the current node; collecting the walking trajectories of all particles, using the node sequences on the walking trajectories as input, inputting them into a deep neural network based on a residual structure, and outputting the water quality exceedance risk index of each node at future times; and adjusting the operating parameters of the wastewater treatment equipment according to the water quality exceedance risk index.

[0005] As a technical solution of the present invention, when performing phase space reconstruction on the historical water quality parameter sequence of each node, the historical water quality parameter sequence of each node is rearranged according to a preset embedding dimension and time delay. Starting from the first data point in the sequence, consecutive data points are sequentially extracted to form an embedding vector. The number of elements in each embedding vector is equal to the embedding dimension, and the interval between the starting points of two adjacent embedding vectors is equal to the time delay. All embedding vectors are arranged in chronological order to form the attractor trajectory matrix of that node. Each row of the attractor trajectory matrix corresponds to an embedding vector, and each column corresponds to a different time offset dimension. Preferably, the embedding dimension is determined by the spurious nearest neighbor method, and the time delay is calculated by the mutual information method, so that the reconstructed attractor trajectory matrix can characterize the dynamic features of the water quality parameter evolution.

[0006] In calculating the maximum Lyapunov exponent difference between any two nodes, this invention calculates the evolution rate of the Euclidean distance between adjacent trajectory points in their respective attractor trajectory matrices over time for any two nodes. It then finds the nearest neighbor trajectory point for each trajectory point in each attractor trajectory matrix and calculates the distance separation coefficient between that trajectory point and its nearest neighbor trajectory point after a unit time step. The logarithm of all distance separation coefficients is taken and the average is calculated to obtain the maximum Lyapunov exponent for that node. The maximum Lyapunov exponents of the two nodes are subtracted, and the absolute value is taken to obtain the maximum Lyapunov exponent difference between the two nodes. This calculation is repeated for all node pairs to obtain the exponent difference matrix. Preferably, when finding the nearest neighbor trajectory point for each trajectory point, the time index difference between the nearest neighbor trajectory point and the current trajectory point is limited to be greater than a preset minimum time interval to avoid adjacent trajectory points falling into the same orbit, thereby ensuring that the exponent calculation reflects the true chaotic characteristics of the system.

[0007] When constructing the dynamic association matrix, each element in the exponential difference matrix is ​​normalized so that all elements' values ​​are between zero and one. Each element of the normalized exponential difference matrix is ​​then subtracted from the constant one to obtain the similarity matrix. A soft thresholding operation is performed on each row of the similarity matrix, setting similarities below a preset threshold to zero and retaining those above the preset threshold. The similarity matrix after soft thresholding is used as the dynamic association matrix. In the dynamic association matrix, non-zero elements represent relationships between corresponding nodes, while zero elements represent no relationship. This method measures the coupling strength between nodes through nonlinear dynamic similarity, eliminating weak association noise and enabling subsequent random walks to explore critical propagation paths.

[0008] When using a dynamic correlation matrix to drive a random walk of a group of virtual particles, a preset number of virtual particles are initialized, and a starting node is randomly assigned to each virtual particle. In each round of walking, for a virtual particle currently located at a certain node, all non-zero elements in the row of the dynamic correlation matrix containing that node are read, and the nodes corresponding to the non-zero elements in that row are taken as a set of candidate target nodes. The local entropy of the attractor trajectory matrix of the current node is calculated, which is obtained by calculating the entropy value of the trajectory points in the attractor trajectory matrix of the current node within the most recent several time steps. Using the reciprocal of the local entropy as the base of the movement probability, and combining it with the correlation strength from the current node to each candidate target node in the dynamic correlation matrix, the transition probability of each candidate target node is calculated. The next node is randomly selected according to the calculated transition probability, and the virtual particle is moved to that node. The walking process is repeated until the preset number of walking steps is reached.

[0009] Furthermore, the specific implementation of the particle movement probability being determined by the local entropy of the attractor trajectory matrix of the current node during each walk is as follows: In the attractor trajectory matrix of the current node, the last preset number of embedding vectors are extracted to form a local trajectory matrix. The information entropy of each column of the local trajectory matrix is ​​calculated to obtain the entropy value of each column. These entropy values ​​are then arranged into row vectors according to column order. The mean and variance of these row vectors are calculated. The variance of the row vector is divided by the mean to obtain the local entropy value. A very small constant is added to the local entropy value, and its reciprocal is taken to obtain the reciprocal of the local entropy. The reciprocal of the local entropy is multiplied by the association strength from the current node to the candidate target node in the dynamic association matrix to obtain the unnormalized transition probability. The unnormalized transition probabilities of all candidate target nodes are summed, and each unnormalized transition probability is divided by this sum to obtain the normalized movement probability. This mechanism causes particles to tend to move quickly at nodes with lower dynamic complexity, while slowing down their walks at nodes containing rich evolutionary information, thereby generating high-value sequence features.

[0010] When collecting the trajectories of all particles, the node numbers that each virtual particle passes through in each movement are recorded to form the original trajectory sequence of the particle. The original trajectory sequences of all particles are concatenated into a long sequence according to the particle number order. The consecutively repeated node numbers are deleted from the long sequence, and only the first node number of each consecutive repeated segment is retained to obtain the compressed trajectory sequence. The compressed trajectory sequence is divided into fixed-length subsequence segments. Each subsequence segment is used as the input feature of a training sample. The actual water quality exceeding the standard label at the next time step after the subsequence segment is used as the label of the sample.

[0011] When the node sequence on the wandering trajectory is input into a deep neural network based on residual structure, the node number in each subsequence segment is converted into a one-hot encoded vector. The length of each one-hot encoded vector is equal to the total number of wastewater treatment monitoring nodes. The one-hot encoded vectors corresponding to all node numbers in the subsequence segment are stacked into a three-dimensional tensor according to the order of node appearance. The three-dimensional tensor is sequentially input into the first convolutional layer, the first batch of normalization layers, and the first activation function layer of the deep neural network to obtain the first feature map. The first feature map is added to the result of the three-dimensional tensor after skip connections and input into the second convolutional layer, the second batch of normalization layers, and the second activation function layer to obtain the second feature map. The second feature map is input into the global average pooling layer and the fully connected layer. The fully connected layer outputs the water quality exceedance risk index of each node at future time. Preferably, the training method of the deep neural network based on the residual structure includes: collecting multiple sets of walk trajectory sequences and their corresponding real water quality exceedance records during the historical operation of the sewage treatment system; generating a training sample set according to the virtual particle random walk method, where each sample contains an input feature subsequence fragment and a corresponding label; calculating the error between the water quality exceedance risk index output by the deep neural network and the real label using the mean squared error loss function; calculating the gradient of the error with respect to each trainable parameter in the deep neural network using the backpropagation algorithm; updating the trainable parameters of the deep neural network according to the gradient using an adaptive moment estimation optimizer; and repeating the process until the loss function value converges to below a preset threshold. This network structure can alleviate deep training degradation and accurately capture spatiotemporal dependent features.

[0012] When adjusting the operating parameters of wastewater treatment equipment based on the water quality exceedance risk index, the water quality exceedance risk index of each node output by the deep neural network is compared with multiple preset risk level thresholds. When the water quality exceedance risk index of a certain node exceeds the first risk level threshold, an airflow adjustment command is generated for the treatment unit where that node is located. When the water quality exceedance risk index exceeds the second risk level threshold, an incremental chemical dosing command is generated for the treatment unit where that node is located. When the water quality exceedance risk index exceeds the third risk level threshold, an instruction to extend the hydraulic retention time of the treatment unit where that node is located is generated. All generated commands are packaged into control messages according to node location and sent to the programmable logic controller (PLC) of the corresponding node via industrial Ethernet. The PLC then drives the actuator to perform the adjustment. Through hierarchical response, refined preventive control of exceedance risk is achieved.

[0013] This invention also provides a comprehensive wastewater treatment management system, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, it implements the steps of the aforementioned comprehensive wastewater treatment management method. This system mines nonlinear coupling relationships between nodes through phase space reconstruction and dynamic correlation matrix mining, utilizes local entropy-driven random walks to generate sequence features characterizing pollution propagation paths, and combines deep neural networks to output risk indices and adjust process parameters in a closed loop, significantly improving the timeliness of exceedance warnings and the accuracy of control.

[0014] The technical effects and advantages provided by the present invention in the above technical solution are as follows:

[0015] The process of constructing the dynamic correlation matrix involves reconstructing the phase space of historical water quality parameter sequences for each monitoring node using the embedding dimension and time delay determined by the spurious nearest neighbor method and mutual information method, thus obtaining the attractor trajectory matrix. Based on this, the evolution rate of the Euclidean distance between adjacent trajectory points in the attractor of each node is calculated, and the nearest neighbor trajectory point satisfying the minimum time interval constraint is searched to obtain the distance separation coefficient. The maximum Lyapunov exponent for each node is obtained through statistical averaging. After taking the absolute value and normalizing the exponent differences between pairs of nodes, a soft thresholding operation is used to retain significant inter-node correlations, generating the dynamic correlation matrix. This matrix dynamically changes with the real-time updates of the water quality parameter sequences, reflecting the spatial differences in the degree of chaos in the system and the time-varying characteristics of the influence intensity between nodes, avoiding the distortion problem of static correlation assumptions under sudden changes in operating conditions.

[0016] After obtaining the dynamic correlation matrix, the virtual particle uses the reciprocal of the local entropy of the attractor trajectory matrix of the current node as a base, and calculates the transition probability to each candidate target node in combination with the correlation strength, performs a random walk, and records the node sequence. Local entropy is determined by the ratio of the variance to the mean of the information entropy of each column of the last few embedded vectors in the trajectory matrix, which can measure the degree of disorder in the local region of the attractor of that node. When the node state tends to be unstable or is close to a transition, the local entropy increases, the movement probability decreases, causing the particle to stay at the node or migrate a short distance; while in stable regions, the local entropy is small, and the particle is more inclined to propagate according to the correlation strength. This mechanism allows the particle's trajectory to simultaneously embed the node's own dynamic state and the coupling propagation characteristics between nodes. The generated trajectory sequence carries information about the potential instability order and propagation path, providing richer input features for subsequent predictions.

[0017] After compressing and segmenting the wandering trajectory sequence into fixed-length subsequences, the node numbers are converted into one-hot encodings and stacked into a three-dimensional tensor, which is then input into a deep neural network based on a residual structure. The residual network directly transmits the original tensor to deeper layers through skip connections, adding it to the feature maps after convolution and batch normalization. This effectively alleviates the gradient vanishing problem that occurs as the network deepens, enabling the network to learn deep spatiotemporal dependency patterns from the trajectory sequence. Global average pooling and fully connected layers ultimately output the water quality exceedance risk index for each node at future time. Because the input features contain the dual influence of dynamic correlations and local chaotic states on the propagation path, the trained model can predict the direction of abnormal propagation and threatened nodes in advance. When the risk index exceeds different level thresholds, it automatically generates graded adjustment instructions for air volume, chemical dosage, and hydraulic residence time, which are then applied to the corresponding processing units in a timely manner through a programmable logic controller, shortening the response delay to influx impacts and environmental disturbances. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.

[0019] Figure 1 This is a flowchart of the integrated management method for wastewater treatment;

[0020] Figure 2 This is a schematic diagram of the phase space reconstruction process;

[0021] Figure 3 This is a flowchart of the training process for a water quality exceedance risk prediction model based on virtual particle trajectories. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] See Figure 1 This invention provides a comprehensive wastewater treatment management system and method, the overall implementation of which is as follows: Historical water quality parameter sequences and real-time process parameters of each monitoring node in the wastewater treatment process are acquired; phase space reconstruction is performed on the historical water quality parameter sequences of each node to obtain the attractor trajectory matrix of each node; the maximum Lyapunov exponent difference between each pair of nodes is calculated based on the attractor trajectory matrix of each node, and a dynamic correlation matrix is ​​constructed based on this difference; a set of virtual particles are driven to randomly walk in the node space using the dynamic correlation matrix, and the movement probability of each particle during each walk is determined by the local entropy of the attractor trajectory matrix of the current node; the walking trajectories of all particles are collected, and the node sequences on the walking trajectories are used as input to a deep neural network based on a residual structure to output the water quality exceedance risk index of each node at future times; the operating parameters of the wastewater treatment equipment are adjusted according to the water quality exceedance risk index.

[0024] In specific implementation, please refer to Figure 2 The historical water quality parameter sequence for each monitoring node in the wastewater treatment process is obtained. For any given monitoring node, the historical water quality parameter sequence consists of water quality parameter values ​​collected at fixed time intervals. The total number of data points in the historical water quality parameter sequence is denoted as . Phase space reconstruction was performed on the historical water quality parameter sequence. The embedding dimension was determined using the spurious nearest neighbor method. The implementation of the spurious nearest neighbor method is as follows: [The text abruptly ends here, likely due to an incomplete sentence or a formatting error.] Initially, in the current-dimensional phase space composed of historical water quality parameter sequences, for each embedding vector constructed with the current embedding dimension, find the nearest neighbor embedding vector, calculate the Euclidean distance between the embedding vector and the nearest neighbor embedding vector, and obtain the first distance; then increase the current embedding dimension. The embedding vector is then reconstructed, and the Euclidean distance between this embedding vector and its corresponding nearest neighbor embedding vector is calculated again to obtain the second distance. The absolute value of the difference between the second distance and the first distance is divided by the first distance to obtain the distance change ratio. If the distance change ratio exceeds a preset false nearest neighbor threshold, the nearest neighbor embedding vector is determined to be a false nearest neighbor. The proportion of false nearest neighbors in all embedding vectors is counted, and the embedding dimension is gradually increased. The embedding dimension is adjusted until the proportion of false nearest neighbors falls below a preset threshold. The final determined embedding dimension. The time delay is determined using mutual information. The mutual information method is implemented by calculating sequence values ​​from historical water quality parameter sequences. With delayed sequence values Mutual information between them, among which Delay for candidate time; from The candidate time delays are gradually increased, and the mutual information values ​​under different candidate time delays are calculated. The relationship curve between the mutual information value and the candidate time delay is plotted, and the time delay corresponding to when the mutual information value reaches the first local minimum is selected as the final determined time delay. Determine the embedding dimension. and time delay Then, the historical water quality parameter sequence is rearranged. Starting from the first data point in the historical water quality parameter sequence, consecutive data points are extracted to form an embedding vector. Embedding vector Construct according to the following formula:

[0025]

[0026] in, Indicates the first Embedded vectors; This is the index of the embedded vector. The value is from arrive All integers; The total number of data points in the historical water quality parameter sequence; This represents the first [number] in the historical water quality parameter sequence. The value of each data point; The time delay is a value determined using the mutual information method. The embedding dimension is a numerical value determined using the spurious nearest neighbor method. Each embedding vector... The number of elements contained is equal to the embedding dimension. Two adjacent embedding vectors and The index interval of the starting data point in the historical water quality parameter sequence is equal to the time delay. ,Right now The starting data point is , The starting data point is The index interval between the two is The time interval corresponds to the sampling interval. All embedded vectors... according to Arranged from smallest to largest from top to bottom, they form a matrix, which is the attractor trajectory matrix of the corresponding monitoring node.

[0027] The attractor trajectory matrix has 10 rows. The number of columns is Each row of the attractor trajectory matrix corresponds to an embedding vector, and each column corresponds to a different time offset dimension. The first column represents the time offset. The dimension, the second column is the time offset. The dimension, and so on, the first The column has a time offset of The dimension is determined by the attractor trajectory matrix of each node. In practice, the maximum Lyapunov exponential difference between any two nodes is calculated based on the attractor trajectory matrix of each node. For any two monitoring nodes, the attractor trajectory matrix of each node is processed separately. For the attractor trajectory matrix of a node, the evolution rate of the Euclidean distance between adjacent trajectory points in the attractor trajectory matrix over time is calculated. Each row of the attractor trajectory matrix is ​​an embedding vector, which embeds the first row of the attractor trajectory matrix into the second row of the attractor trajectory matrix. The embedding vector is denoted as , No. The embedding vector is denoted as ,calculate and The Euclidean distance between adjacent trajectory points is used to obtain the distance between adjacent trajectory points. The distance between adjacent trajectory points is calculated sequentially for all adjacent rows in the attractor trajectory matrix to obtain a distance sequence. The evolution rate sequence is obtained by using the ratio of the change in two adjacent distances in the distance sequence to the time step.

[0028] In the attractor trajectory matrix, for each embedding vector Find the nearest neighbor embedding vector of the given embedding vector. When finding the nearest neighbor embedding vector, calculate... With all other embedding vectors in the attractor trajectory matrix The Euclidean distance between them, where To remove The embedding vector index is used outside of the current embedding vector. The time index difference between the nearest neighbor embedding vector and the current embedding vector is limited to a preset minimum time interval. The preset minimum time interval is set to one-quarter of the number of sampling points within a complete cycle. A complete cycle is determined by extracting the reciprocal of the dominant frequency after performing a Fourier transform on the historical water quality parameter sequence. Embedding vectors that satisfy the time index difference condition are then included... The embedding vector with the minimum Euclidean distance is determined as follows: The nearest neighbor embedding vector. Determine. After obtaining the nearest neighbor embedding vector, calculate The distance separation coefficient with the nearest neighbor embedding vector after a unit time step. Find the distance separation coefficient within the attractor trajectory matrix. The corresponding embedding vector after one unit time step Simultaneously, find the nearest neighbor embedding vector after one unit time step, calculate the Euclidean distance between the four, and obtain the initial time distance. Distance after unit time step The distance separation coefficient is and The ratio. Repeat the above process for all embedding vectors to obtain the distance separation coefficients of all embedding vectors. Take the logarithm of the distance separation coefficients of all embedding vectors and calculate the average to obtain the maximum Lyapunov exponent for that node. Maximum Lyapunov exponent The calculation method is as follows:

[0029]

[0030] in, This represents the maximum Lyapunov index; The unit time step is set as the sampling time interval of the historical water quality parameter sequence; This represents the total number of embedding vectors involved in the computation. Equals the number of rows in the attractor trajectory matrix minus The corresponding index increment; This is the index of the embedded vector, with a value range of 1. to ; Indicates the first The Euclidean distance between each embedding vector and its nearest neighbor embedding vector at the initial time step; Indicates the first The embedding vector and the first The nearest neighbor embedding vector of each embedding vector is the one that, after a unit time step, becomes the nearest neighbor embedding vector. The Euclidean distance is calculated. For two nodes, the maximum Lyapunov exponent of the first node is subtracted from the maximum Lyapunov exponent of the second node, and the absolute value is taken to obtain the difference in maximum Lyapunov exponents between the two nodes. This calculation is repeated for all node pairs, resulting in a matrix where the number of rows and columns equals the total number of monitored nodes. The matrix then represents the distance between the nodes. Line 1 The elements of the column represent the first... The monitoring node and the first The maximum Lyapunov exponential difference between the monitoring nodes is represented by the matrix, which serves as the exponential difference matrix.

[0031] A dynamic correlation matrix is ​​constructed based on the exponential difference matrix. Each element in the exponential difference matrix is ​​normalized by finding the element with the largest value and dividing each element of the exponential difference matrix by the element with the largest value to obtain the normalized exponential difference matrix, so that the value range of all elements is between zero and one.

[0032] Subtracting each element of the normalized exponential difference matrix from a constant 1 yields the similarity matrix. Each element in the similarity matrix represents the degree of similarity between two corresponding nodes.

[0033] A soft thresholding operation is performed on each row of the similarity matrix. The soft thresholding is performed as follows: a preset threshold is set, determined based on the connection density of the wastewater treatment system's pipe network, and is taken as the reciprocal of the average number of neighbors of a monitoring node. The average number of neighbors of a monitoring node is obtained by averaging the number of direct connections of all nodes on the process flow diagram. Each element in each row of the similarity matrix is ​​compared with the preset threshold; elements below the preset threshold are set to zero, while elements above or equal to the preset threshold retain their original values.

[0034] The similarity matrix after soft thresholding is used as the dynamic association matrix. In the dynamic association matrix, non-zero elements indicate that there is an association between corresponding nodes, and zero elements indicate that there is no association between corresponding nodes.

[0035] In practical implementation, a dynamic correlation matrix is ​​used to drive a group of virtual particles to randomly roam in the node space. A preset number of virtual particles is initialized, three times the total number of monitoring nodes, and each virtual particle is assigned a unique particle identifier. A starting node is randomly assigned to each virtual particle, the random assignment method being: generating a node in... A random integer evenly distributed between the total number of monitoring nodes and the total number of monitoring nodes is used as the starting node.

[0036] All virtual particles undergo multiple rounds of walking. In each round, the following operation is performed on each virtual particle: For a virtual particle currently located at a certain monitoring node, all elements in the row where the monitoring node is located are read from the dynamic correlation matrix. All non-zero elements with values ​​greater than zero are identified, and the monitoring nodes represented by the column indices corresponding to these non-zero elements are used to form a set of candidate target nodes.

[0037] Calculate the local entropy of the attractor trajectory matrix of the current monitoring node where the virtual particle is located. Extract the last predetermined number of embedding vectors from the attractor trajectory matrix of the monitoring node to form the local trajectory matrix. (Predetermined number) This is defined as the number of embedding vectors corresponding to a complete cycle of the historical water quality parameter sequence for this monitoring node:

[0038]

[0039] in: The number of period points corresponding to the dominant frequency is extracted by performing a Fourier transform on the historical water quality parameter sequence. This is due to the time delay. The number of rows in the local trajectory matrix is... The number of columns is the embedding dimension. The information entropy is calculated for each column of the local trajectory matrix, yielding... The entropy value of column n. For the local trajectory matrix... The column is divided into equal intervals based on the range of values ​​it contains. Each interval Values Count the number of values ​​falling into each interval and calculate the frequency of each interval. , No. Information entropy of a column for ,in It is a very small constant. Set as To avoid zeros in logarithmic calculations, the information entropy of each column is arranged into a row vector in column order, denoted as . Local entropy Calculate according to the following formula:

[0040]

[0041] in, Represents the local entropy value; For the embedding dimension; For the local trajectory matrix, the first... Information entropy of the column; row vector The mean of the information entropy of all columns in the text. The local entropy value was calculated. Then, a minimal constant is added to the local entropy value. Taking the reciprocal gives the reciprocal of the local entropy. .

[0042] For each candidate target node in the candidate target node set, the element values ​​between the current monitoring node and that candidate target node are obtained from the dynamic correlation matrix as the correlation strength. The reciprocal of the local entropy and correlation strength Multiplying these probabilities yields the unnormalized transition probability of the candidate target node.

[0043] Iterate through all candidate target nodes in the candidate target node set and calculate their respective unnormalized transition probabilities. Sum all unnormalized transition probabilities to obtain the normalized denominator. Divide each unnormalized transition probability by the normalized denominator to obtain the normalized movement probability of that candidate target node. Randomly select a candidate target node as the next node according to the calculated normalized movement probability, move the virtual particle to the selected monitoring node, and record the source node identifier and target node identifier of this movement.

[0044] In each round of walking, all virtual particles perform the above movement process once, and the walking process is repeated until the number of movements of each virtual particle reaches the preset number of walking steps. The preset number of walking steps is set to five times the total number of monitoring nodes.

[0045] In specific implementation, please refer to Figure 3 The process involves collecting the trajectories of all virtual particles. Recording the node numbers of the monitoring nodes each virtual particle passes through during each movement, forming the original trajectory sequence for that virtual particle. Concatenating all the original trajectory sequences into a long sequence based on the particle numbers (arranged in ascending order). Repeating node numbers are removed from the long sequence, retaining only the first node number of each repeating segment, resulting in a compressed trajectory sequence. This is achieved by iterating through the node numbers in the long sequence; if the current node number is the same as the immediately preceding node number, it is deleted; otherwise, it is retained. The compressed trajectory sequence is then divided into fixed-length sub-sequences, with the fixed length set to a preset number of movement steps, i.e., five times the total number of monitoring nodes. Segmentation is done using a sliding window, with the first node number of adjacent sub-sequences differing by one step in the compressed trajectory sequence. Each sub-sequence serves as the input feature for a training sample, and the actual water quality exceedance label at the next time step after the sub-sequence is used as the label for that training sample. The water quality exceedance label is derived from water quality exceedance event data recorded during the historical operation of the wastewater treatment system. For each time step, a vector is generated, with a length equal to the total number of monitoring nodes. Elements with a value of 1 indicate that the corresponding monitoring node's water quality parameter exceeds the preset discharge standard at that time step, while elements with a value of 0 indicate that the corresponding monitoring node's water quality parameter does not exceed the preset discharge standard at that time step. This vector serves as the water quality exceedance label for that time step. The time step corresponding to the last node number of the subsequence segment is denoted as time step 1. Then the time step The corresponding water quality exceeding the standard label vector is used as the label for this subsequence segment.

[0046] The node sequence along the walking trajectory is used as input to a deep neural network based on a residual structure. The node number in each subsequence segment is converted into a one-hot encoded vector, the length of which is equal to the total number of wastewater treatment monitoring nodes. The one-hot encoded vectors corresponding to all node numbers in the subsequence segment are stacked in chronological order of node appearance to form a three-dimensional tensor. The first dimension of the three-dimensional tensor is the channel dimension, with a value of 1; the second dimension is the length dimension of the subsequence segment, with a fixed value; and the third dimension is the total number of monitoring nodes. This three-dimensional tensor serves as the input data for the deep neural network based on the residual structure.

[0047] The deep neural network based on residual structures consists of a cascaded first convolutional layer, a first batch of normalization layers, a first activation function layer, skip connection branches, a second convolutional layer, a second batch of normalization layers, a second activation function layer, a global average pooling layer, and a fully connected layer. The first convolutional layer uses 64 convolutional kernels, each with a spatial size of [missing information]. The convolutional stride is 1, and the padding method maintains the spatial dimensions. The first convolutional layer receives the input 3D tensor and outputs the first convolutional feature map, which has 64 channels. The first batch of normalization layers performs batch normalization on the first convolutional feature map along the channel dimension. The first activation function layer uses a linear rectified activation function to perform a non-linear transformation on the output of the first batch of normalization layers to obtain the first feature map. Skip connections are routed through a convolutional kernel with a spatial size of... The system consists of convolutional layers that adjust the number of channels in the input 3D tensor from 1 to 64, and output a skip connection feature map. The spatial size of the skip connection feature map is the same as that of the first feature map. Figure 1 The first feature map and the jump connection feature map are added element-wise at their corresponding spatial locations and channels to obtain the residual superimposed feature map. The second convolutional layer uses 128 convolutional kernels, each with a spatial size of [missing information]. The convolutional stride is 1, and the padding method maintains the same spatial dimensions. It receives the residual superimposed feature map and outputs a second convolutional feature map with 128 channels. A second batch normalization layer performs batch normalization on the second convolutional feature map along the channel dimension. The second activation function layer uses a linear rectified activation function to perform a non-linear transformation on the output of the second batch normalization layer, obtaining the second feature map. A global average pooling layer calculates the average value of the second feature map along the spatial dimension for each channel, resulting in a feature vector of length 128. The fully connected layer takes the feature vector as input (length 128) and outputs the total number of monitoring nodes. The output vector of the fully connected layer represents the water quality exceedance risk index for each monitoring node at future times.

[0048] The training method for the deep neural network based on residual structure is as follows: Multiple sets of walk trajectory sequences generated by the virtual particle random walk method during the historical operation of the wastewater treatment system are collected, and the actual water quality exceedance records corresponding to each time step are obtained. A training sample set is constructed according to the method of generating sub-sequence fragments, and each training sample contains an input three-dimensional tensor and a label vector. The mean squared error loss function is used to calculate the error between the water quality exceedance risk index output by the deep neural network and the actual label. The expression of the mean squared error loss function is:

[0049]

[0050] in, This represents the mean squared error loss function value; The total number of training samples in the training sample set; This represents the total number of monitoring nodes. This is the index of the training sample, with a value range of [value range missing]. to ; This is the index of the monitoring node, with a value range of [value range missing]. to ; Indicates the first In the training samples, the th The predicted water quality exceedance risk index for each monitoring node is output by a deep neural network based on residual structure. Indicates the first In the training samples, the th The actual water quality exceeding the standard label value for each monitoring node is either 0 or 1.

[0051] The gradient of the mean squared error loss function with respect to each trainable parameter in the residual-based deep neural network is calculated using the backpropagation algorithm. The trainable parameters include the kernel weights and biases of the first convolutional layer, the kernel weights and biases of the skip connection branch convolutional layers, the kernel weights and biases of the second convolutional layer, the scaling factor and offset of the first batch of normalized layers, the scaling factor and offset of the second batch of normalized layers, and the weight matrix and bias vector of the fully connected layers.

[0052] The trainable parameters are updated based on gradients using an adaptive moment estimation optimizer. The hyperparameters of the adaptive moment estimation optimizer are set as follows: learning rate of 0.001, exponential decay rate of the first moment estimate of 0.9, exponential decay rate of the second moment estimate of 0.999, and numerical stability constant of [missing value]. During training, batch stochastic gradient descent is used. The training sample set is shuffled and divided into multiple batches of size 64. The loss function value and gradient are calculated for each batch and the parameters are updated. One complete training cycle is recorded as one training cycle. Multiple training cycles are repeated until the mean squared error loss function value converges to below the preset threshold of 0.001.

[0053] In practice, the operating parameters of the wastewater treatment equipment are adjusted based on the water quality exceedance risk index. The water quality exceedance risk index of each monitoring node, output by a deep neural network based on residual structures, is compared with multiple preset risk level thresholds. These preset risk level thresholds include a first risk level threshold, a second risk level threshold, and a third risk level threshold. The first risk level threshold is set to 0.3, the second risk level threshold to 0.6, and the third risk level threshold to 0.9. The criteria for setting the first risk level threshold (0.3), the second risk level threshold (0.6), and the third risk level threshold (0.9) are as follows: All water quality exceedance events recorded during the historical operation of the wastewater treatment system are acquired; the water quality exceedance risk index of each monitoring node at the time step preceding each water quality exceedance event is statistically analyzed; and the 30th percentile of the statistical results is used as the first risk level threshold, the 60th percentile as the second risk level threshold, and the 90th percentile as the third risk level threshold.

[0054] For a given monitoring node, the water quality exceedance risk index is compared to a first-level risk threshold. If the risk index exceeds the first-level threshold but does not exceed the second-level risk threshold, an airflow adjustment command is generated for the processing unit where that monitoring node is located. The airflow adjustment command includes a target node identifier, a command type code, and an airflow adjustment percentage. Calculate according to the following formula:

[0055]

[0056] in, This indicates the percentage of airflow adjustment, ranging from 0% to 50%. This is the gain coefficient for airflow regulation. The value is 0.5; This indicates the risk index of water quality exceeding standards at this monitoring node; This indicates the threshold for the first risk level. ; This indicates the threshold for the second risk level. Airflow adjustment gain coefficient The value of 0.5 is based on the following: when the water quality exceedance risk index reaches the threshold of the second risk level, the air volume adjustment percentage reaches the maximum allowable value. The upper limit of the rated adjustment range of the blower equipment in the sewage treatment system is 50%. Taking a coefficient of 0.5 ensures that at the threshold of the second risk level... It is exactly equal to 50%.

[0057] When the water quality exceedance risk index exceeds the second risk level threshold but not the third risk level threshold, a reagent dosing increment instruction is generated for the treatment unit where the monitoring node is located. The reagent dosing increment instruction includes a target node identifier, an instruction type code, and a reagent dosing increment percentage. The reagent dosing increment percentage is set according to the type of reagent actually used; for coagulants, the increment percentage is 20%; for carbon source additives, the increment percentage is 15%. The value of the reagent dosing increment percentage is determined based on the average adjustment range of different reagent dosages in historical water quality exceedance events.

[0058] When the water quality exceedance risk index exceeds the threshold of the third risk level, a hydraulic retention time extension command is generated for the treatment unit where the monitoring node is located. The hydraulic retention time extension command includes the target node identifier, command type code, and hydraulic retention time extension ratio. The hydraulic retention time extension ratio is set to 2.0, meaning the current hydraulic retention time will be extended to 2.0 times the original hydraulic retention time. The hydraulic retention time extension ratio of 2.0 is based on the fact that the volumetric safety factor of the sedimentation tank in the wastewater treatment system is 2.5, and an extension ratio of 2.0 is within the safe operating range.

[0059] All generated instructions are packaged into control messages according to the monitoring node locations. The control messages use a fixed frame format and consist of a header, a node count field, an instruction body list, and a cyclic redundancy check (CRC) code. The header occupies 2 bytes and is fixed at 0x7E7E. The node count field occupies 1 byte and indicates the number of instructions contained in the control message. Each instruction in the instruction body list occupies 6 bytes, containing a 1-byte node address, a 1-byte instruction type code, a 2-byte instruction parameter field, and a 2-byte reserved field. The CRC code occupies 2 bytes and is calculated by performing a cyclic redundancy check on all bytes from the header to the end of the instruction body list.

[0060] Control messages are sent to the programmable logic controllers (PLCs) of the corresponding monitoring nodes via Industrial Ethernet. Industrial Ethernet communication uses the Modbus TCP / IP protocol, encapsulating the control messages in the data field of the Modbus TCP message, with the target port number set to 502. Upon receiving the control message, the PLC parses the instruction type code and instruction parameter fields, and drives the corresponding actuator to perform adjustments based on the instruction type code. The correspondence between instruction type codes and actuators is as follows: Instruction type code 0x01 corresponds to airflow adjustment, and the PLC sends a frequency adjustment signal to the blower inverter through the analog output module; instruction type code 0x02 corresponds to reagent dosing increment, and the PLC controls the stroke frequency of the reagent metering pump through the digital output module; instruction type code 0x03 corresponds to hydraulic residence time extension, and the PLC controls the inverter of the outlet weir or return pump through the analog output module.

[0061] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.

Claims

1. A comprehensive wastewater treatment management method, characterized in that, Includes the following steps: Acquire historical water quality parameter sequences and real-time process parameters for each monitoring node in the wastewater treatment process; Phase space reconstruction is performed on the historical water quality parameter sequence of each node to obtain the attractor trajectory matrix of each node; The maximum Lyapunov exponential difference between each pair of nodes is calculated based on the attractor trajectory matrix of each node, and a dynamic correlation matrix is ​​constructed based on this difference. A set of virtual particles are driven to wander randomly in the node space using a dynamic correlation matrix. The probability of a particle moving during each wander is determined by the local entropy of the attractor trajectory matrix of the current node. Collect the trajectories of all particles, take the node sequence on the trajectories as input, input it into a deep neural network based on residual structure, and output the water quality exceedance risk index of each node at future time. Adjust the operating parameters of the sewage treatment equipment according to the water quality exceedance risk index.

2. The comprehensive wastewater treatment management method according to claim 1, characterized in that, The phase space reconstruction of the historical water quality parameter sequence for each node includes: The historical water quality parameter sequence of each node is rearranged according to the preset embedding dimension and time delay; Starting from the first data point in the sequence, consecutive data points are extracted to form an embedding vector; The number of elements in each embedding vector is equal to the embedding dimension; The interval between the starting points of two adjacent embedding vectors is equal to the time delay; Arrange all the embedding vectors in chronological order to form the attractor trajectory matrix of the node; Each row of the attractor trajectory matrix corresponds to an embedding vector, and each column corresponds to a different time offset dimension.

3. The comprehensive wastewater treatment management method according to claim 2, characterized in that, The embedding dimension is determined by the spurious nearest neighbor method, and the time delay is calculated by the mutual information method.

4. The comprehensive wastewater treatment management method according to claim 1, characterized in that, The calculation of the maximum Lyapunov exponential difference between each pair of nodes based on the attractor trajectory matrix of each node includes: For any two nodes, calculate the evolution rate of the Euclidean distance between adjacent trajectory points in their respective attractor trajectory matrices over time. In each attractor trajectory matrix, find the nearest neighbor trajectory point for each trajectory point and calculate the distance separation coefficient between the trajectory point and its nearest neighbor trajectory point after a unit time step; The maximum Lyapunov exponent of a node is obtained by taking the logarithm of the distance separation coefficients of all trajectory points and averaging them. The difference between the maximum Lyapunov exponents of the two nodes is obtained by subtracting the maximum Lyapunov exponents of the two nodes and taking the absolute value. Repeat the calculation for all node pairs to obtain the exponential difference matrix.

5. The integrated wastewater treatment management method according to claim 4, characterized in that, When searching for the nearest neighbor trajectory point of each trajectory point, the time index difference between the nearest neighbor trajectory point and the current trajectory point is limited to be greater than a preset minimum time interval to avoid neighboring trajectory points falling into the same track.

6. The integrated wastewater treatment management method according to claim 4, characterized in that, The construction of the dynamic association matrix based on this difference includes: Normalize each element in the exponential difference matrix so that the value range of all elements is between zero and one; Subtract each element of the normalized exponential difference matrix from the constant 1 to obtain the similarity matrix; Perform a soft thresholding operation on each row of the similarity matrix, setting the similarity below a preset threshold to zero and retaining the similarity above the preset threshold; The similarity matrix after soft thresholding is used as the dynamic association matrix; In a dynamic association matrix, non-zero elements indicate that there is an association between the corresponding nodes, while zero elements indicate that there is no association.

7. The integrated wastewater treatment management method according to claim 1, characterized in that, The method of using a dynamic correlation matrix to drive a group of virtual particles to randomly walk in the node space includes: Initialize a preset number of virtual particles and randomly assign a starting node to each virtual particle; In each round of walking, for the virtual particle currently located at a certain node, read all non-zero elements in the row of the dynamic correlation matrix where that node is located; The nodes corresponding to the non-zero elements in this row are used as the set of candidate target nodes; Calculate the local entropy of the attractor trajectory matrix of the current node. This local entropy is obtained by calculating the entropy value of the trajectory points in the attractor trajectory matrix of the current node within the most recent several time steps. Using the reciprocal of the local entropy as the base of the movement probability, and combining the association strength from the current node to each candidate target node in the dynamic association matrix, the transition probability is calculated for each candidate target node. The next node is randomly selected based on the calculated transition probability, and the virtual particle is moved to that node. Repeat the walking process until the preset number of steps is reached.

8. The comprehensive wastewater treatment management method according to claim 7, characterized in that, The probability of a particle moving during each walk is determined by the local entropy of the attractor trajectory matrix of the current node, including: In the attractor trajectory matrix of the current node, the last preset number of embedding vectors are extracted to form a local trajectory matrix; The information entropy of each column of the local trajectory matrix is ​​calculated to obtain the entropy value of each column; Arrange the entropy values ​​of each column into a row vector according to column order, and calculate the mean and variance of the row vector; Divide the variance of the row vector by its mean to obtain the local entropy value; The reciprocal of the local entropy is obtained by adding a very small constant to the local entropy value and then taking the reciprocal. Multiply the inverse of the local entropy by the association strength from the current node to the candidate target node in the dynamic association matrix to obtain the unnormalized transition probability; Sum the unnormalized transition probabilities of all candidate target nodes, and divide each unnormalized transition probability by the sum to obtain the normalized movement probability.

9. The integrated wastewater treatment management method according to claim 1, characterized in that, The collection of all particle trajectories includes: Record the node numbers that each virtual particle passes through in sequence during each walk, forming the particle's original trajectory sequence; The original trajectory sequences of all particles are concatenated into a long sequence according to the particle numbering order; The compressed trajectory sequence is obtained by removing consecutively repeating node numbers from the long sequence and keeping only the first node number of each consecutive repeating segment. The compressed trajectory sequence is divided into fixed-length subsequence segments; Each subsequence fragment serves as the input feature of a training sample, and the actual water quality exceeding the standard label at the next time step after the subsequence fragment is used as the label of that sample.

10. A comprehensive wastewater treatment management system, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the wastewater treatment integrated management method according to any one of claims 1 to 9.