A sewage treatment plant effluent water quality prediction method, system, device and product

CN122907178APending Publication Date: 2026-10-13四川乐尔工程技术有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510256150.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-05
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0004]传统的污水处理工艺往往依赖经验操作,缺乏实时监控和自动调整机制,同时由于污水成分复杂多变,使得现有技术难以准确预测水质变化情况,给污水处理厂的运营带来困难

Benefits of technology

[0051]本发明公开了一种污水处理厂出水水质预测方法、系统、设备及产品,可提高污水水质预测的准确性,利于提升污水处理的智能化和自动化水平。本发明利用历史进水水质时序数据和历史出水指标时序数据作为基础时间,通过模态分解得到多个子进水水质时序数据,再针对多个子进水水质时序数据分别构建多个子序列预测模型,并通过训练步骤最终得到可以实时预测污水厂出水水质的最终预测模型,基于此,本发明通过构建多个子序列预测模型,可以更准确地捕捉进水和出水之间的动态关系,且能够充分利用时间序列中的特征信息,进而提高预测精度,可有效预测出水水质变化情况,有助于节能环保及绿色施工。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122907178A_ABST
    Figure CN122907178A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of water quality prediction, and aims to provide a sewage treatment plant effluent water quality prediction method, system, device and product. The present application uses historical influent water quality time series data and historical effluent index time series data as the basis time, obtains multiple sub-influent water quality time series data through modal decomposition, then constructs multiple sub-sequence prediction models for the multiple sub-influent water quality time series data respectively, and finally obtains the final prediction model capable of real-time prediction of the sewage plant effluent water quality through the training step. Based on this, the present application can more accurately capture the dynamic relationship between the influent and the effluent by constructing multiple sub-sequence prediction models, and can fully utilize the feature information in the time series, thereby improving the prediction accuracy, effectively predicting the effluent water quality change, and being helpful for energy saving, environmental protection and green construction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of water quality prediction technology, specifically relating to a method, system, equipment, and product for predicting the effluent quality of wastewater treatment plants. Background Technology

[0002] With the rapid development of my country's economy and the acceleration of urbanization, water pollution caused by industrialization has become increasingly serious, especially the discharge of organic pollutants into water bodies, which has posed a significant threat to public health and ecosystems. In light of this, the Chinese government has elevated water environment management to a national strategy, emphasizing the necessity of strengthening ecological civilization construction and adhering to the concept of green development. The research and application of wastewater treatment technologies have been given a new mission, and developing efficient wastewater treatment technologies has become one of the key tasks in achieving the sustainable development strategy.

[0003] However, in using the prior art, the inventors discovered at least the following problems:

[0004] Traditional wastewater treatment processes often rely on experience-based operation and lack real-time monitoring and automatic adjustment mechanisms. At the same time, due to the complex and variable composition of wastewater, existing technologies struggle to accurately predict water quality changes, posing challenges to the operation of wastewater treatment plants. Summary of the Invention

[0005] The present invention aims to solve the above-mentioned technical problems to at least a certain extent. The present invention provides a method, system, equipment and product for predicting the effluent quality of wastewater treatment plants.

[0006] To achieve the above objectives, the present invention adopts the following technical solution:

[0007] In a first aspect, the present invention provides a method for predicting the effluent quality of a wastewater treatment plant, comprising:

[0008] Historical operating data of the wastewater treatment plant is acquired, and the historical operating data is aggregated at specified time intervals to obtain historical operating time series data; wherein, the historical operating time series data includes historical influent water quality time series data and historical effluent index time series data corresponding to the historical influent water quality time series data;

[0009] The historical runtime time series data is preprocessed to obtain preprocessed time series data; wherein, the preprocessed time series data includes preprocessed influent water quality time series data obtained by preprocessing the historical influent water quality time series data and preprocessed effluent index time series data obtained by preprocessing the historical effluent index time series data.

[0010] The pre-processed influent water quality time series data are subjected to mode decomposition processing to obtain multiple sub-influent water quality time series data;

[0011] Multiple subsequence prediction models are constructed for multiple sub-influent water quality time series data, and the multiple subsequence prediction models are optimized based on the multiple sub-influent water quality time series data and the pre-treated effluent index time series data to obtain multiple optimized subsequence prediction models.

[0012] Multiple optimized subsequence prediction models are fused together to obtain the final prediction model;

[0013] The real-time influent water quality time series data of the wastewater treatment plant is input into the final prediction model so that the effluent water quality prediction result of the wastewater treatment plant can be obtained based on the final prediction model.

[0014] In one possible design, the historical runtime sequence data is preprocessed to obtain preprocessed time series data, including:

[0015] The isolated forest algorithm was used to identify outliers in the historical runtime sequence data.

[0016] The KNN algorithm is used to replace outliers in the historical runtime time series data and fill in missing values ​​to obtain filled time series data.

[0017] The padded time series data is subjected to max-min normalization to obtain preprocessed time series data.

[0018] In one possible design, the pretreated influent water quality time series data is subjected to mode decomposition processing to obtain multiple sub-influent water quality time series data, including:

[0019] M distinct white noise sequences with equal root mean square (RMS) are added to the pretreated influent water quality time series data to obtain M mixed time series data corresponding one-to-one with the M white noise sequences; where M is a natural number greater than 1; the mixed time series data corresponding to the m-th white noise sequence among the M white noise sequences is represented as:

[0020] X m (t)=X(t)+n m (t);

[0021] In the formula, X(t) represents the time series data of the pretreated influent water quality, and n m (t) represents the m-th white noise sequence, where m ∈ {1, 2, ..., M};

[0022] The EMD algorithm is used to decompose M mixed time series data into M IMF component groups. Each IMF component group includes multiple IMF components obtained by decomposing the corresponding mixed time series data multiple times. For the mixed time series data X... mThe IMF component group obtained by decomposing (t) is represented as follows:

[0023] {C m,1 C m,2 , ..., C m,J};

[0024] Among them, C m,1 C m,2 , ..., C m,J For mixed time series data X m (t) is the first to the Jth IMF component obtained by performing J decompositions, where J is a natural number greater than 1;

[0025] Based on M IMF component groups, the mean values ​​of multiple IMF components in each of the M IMF component groups are obtained to obtain multiple sub-influent water quality time series data; among them, the sub-influent water quality time series data corresponding to the j-th IMF component obtained from the j-th decomposition in the M IMF component groups is represented as:

[0026]

[0027] Where j∈{1,2,……,J}.

[0028] In one possible design, multiple subsequence prediction models all employ the BiGRU model; correspondingly, multiple optimized subsequence prediction models all employ the BiGRU model based on the POS algorithm.

[0029] In one possible design, multiple sub-series prediction models are constructed for the time-series data of multiple sub-influent water quality, including:

[0030] Subsequence analysis was performed on multiple sub-influent water quality time series data, and multiple GRU computing units were constructed for each sub-influent water quality time series data.

[0031] Based on multiple GRU computing units, multiple subsequence prediction models were constructed for multiple sub-influent water quality time series data.

[0032] In one possible design, based on the time-series data of multiple sub-influent water quality and the time-series data of the pretreated effluent indicators, multiple sub-series prediction models are optimized to obtain multiple optimized sub-series prediction models, including:

[0033] The hyperparameters of multiple subsequence prediction models are used as optimization objects, and the particle population is initialized.

[0034] Based on the time series data of multiple sub-influent water quality and the time series data of the pretreated effluent indicators, the fitness value of the particles in the particle population is calculated.

[0035] For each particle, the positions of the particles in the particle population are updated according to a preset particle update formula, and the new fitness value of the particle after the position update is calculated. If the new fitness value is less than the fitness value, the particle after the position update is regarded as the optimal particle; otherwise, the particle is regarded as the optimal particle.

[0036] Determine whether the preset stopping iteration condition is met. If yes, then the optimal particle is taken as the optimal hyperparameter and then proceed to the next step; if no, then the particles in the particle population are updated to the updated particles, and then the fitness values ​​of the particles in the particle population are recalculated.

[0037] The hyperparameters of multiple subsequence prediction models are updated to their corresponding optimal hyperparameters to obtain multiple optimized subsequence prediction models.

[0038] In one possible design, multiple optimized subsequence prediction models are fused to obtain the final prediction model, including:

[0039] Multiple optimized subsequence prediction models are weighted and fused through a pre-defined fully connected layer to obtain the final prediction model.

[0040] Secondly, the present invention provides a wastewater treatment plant effluent quality prediction system, comprising:

[0041] The basic data acquisition module is used to acquire historical operating data of the wastewater treatment plant and aggregate the historical operating data at specified time intervals to obtain historical operating sequence data; wherein, the historical operating sequence data includes historical influent water quality time series data and historical effluent index time series data corresponding to the historical influent water quality time series data;

[0042] The basic data acquisition module is further configured to preprocess the historical runtime time series data to obtain preprocessed time series data; wherein, the preprocessed time series data includes preprocessed influent water quality time series data obtained by preprocessing the historical influent water quality time series data and preprocessed effluent index time series data obtained by preprocessing the historical effluent index time series data.

[0043] The modal decomposition module is communicatively connected to the basic data acquisition module and is used to perform modal decomposition processing on the preprocessed influent water quality time series data to obtain multiple sub-influent water quality time series data.

[0044] The model acquisition module is communicatively connected to the mode decomposition module. It is used to construct multiple sub-sequence prediction models for multiple sub-influent water quality time series data, and to optimize the multiple sub-sequence prediction models based on the multiple sub-influent water quality time series data and the pre-processed effluent index time series data to obtain multiple optimized sub-sequence prediction models. It is also used to fuse the multiple optimized sub-sequence prediction models to obtain the final prediction model.

[0045] The effluent prediction module is communicatively connected to the model acquisition module and is used to input the real-time influent water quality time series data of the wastewater treatment plant into the final prediction model so as to obtain the effluent water quality prediction result of the wastewater treatment plant based on the final prediction model.

[0046] Thirdly, the present invention provides an electronic device, comprising:

[0047] Memory, used to store computer program instructions; and,

[0048] A processor is configured to execute the computer program instructions to perform the operation of a wastewater treatment plant effluent quality prediction method as described in any of the preceding claims.

[0049] Fourthly, the present invention provides a computer program product, including a computer program or instructions, wherein the computer program or instructions, when executed by a computer, implement a method for predicting the effluent quality of a wastewater treatment plant as described in any of the preceding claims.

[0050] The beneficial effects of this invention are as follows:

[0051] This invention discloses a method, system, equipment, and product for predicting effluent quality from wastewater treatment plants. It improves the accuracy of wastewater quality prediction and facilitates the enhancement of the intelligence and automation level of wastewater treatment. This invention utilizes historical influent water quality time-series data and historical effluent index time-series data as the base time. Through mode decomposition, it obtains multiple sub-influent water quality time-series data. Then, it constructs multiple sub-series prediction models for each of these sub-influent water quality time-series data. Through training steps, it finally obtains a final prediction model that can predict the effluent quality of wastewater treatment plants in real time. Based on this, by constructing multiple sub-series prediction models, this invention can more accurately capture the dynamic relationship between influent and effluent, and can fully utilize the feature information in the time series, thereby improving prediction accuracy. It can effectively predict changes in effluent water quality, contributing to energy conservation, environmental protection, and green construction.

[0052] Other beneficial effects of the present invention will be further explained in the specific embodiments. Attached Figure Description

[0053] Figure 1 This is a flowchart of the wastewater treatment plant effluent quality prediction method in Example 1;

[0054] Figure 2 This is a block diagram of the wastewater treatment plant effluent quality prediction system in Example 2;

[0055] Figure 3 This is a block diagram of the electronic device in Example 3. Detailed Implementation

[0056] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.

[0057] Example 1:

[0058] This embodiment discloses a method for predicting the effluent quality of a wastewater treatment plant, which can be executed, but is not limited to, by a computer device or virtual machine with certain computing resources, such as a personal computer, smartphone, personal digital assistant or wearable device, or by a virtual machine.

[0059] like Figure 1 As shown, a method for predicting the effluent quality of a wastewater treatment plant may include, but is not limited to, the following steps:

[0060] S1. Obtain historical operating data of the wastewater treatment plant, and aggregate the historical operating data at specified time intervals to obtain historical operating sequence data; wherein, the historical operating sequence data includes historical influent water quality time-series data and historical effluent index time-series data corresponding to the historical influent water quality time-series data. It should be noted that, in this embodiment, the historical influent water quality time-series data and the historical effluent index time-series data are pre-time aligned to ensure that the data in the historical influent water quality time-series data and the data in the historical effluent index time-series data correspond one-to-one.

[0061] Specifically, in this embodiment, the historical influent water quality time series data includes time series data of multiple influent water quality parameters. These parameters include, but are not limited to, biochemical oxygen demand (BOD), chemical oxygen demand (COD), ammonia nitrogen (NH3), influent flow rate (Q), total nitrogen (TN), and / or aeration time-related indicators. No limitation is imposed here. The historical influent water quality time series data is obtained by continuously sampling and aggregating the influent of the wastewater treatment plant. The historical effluent indicator time series data includes time series data of multiple effluent water quality parameters. These parameters include... However, it is not limited to biochemical oxygen demand and effluent flow rate, nor is it restricted here. The historical effluent index time series data is obtained by continuously sampling and aggregating the effluent from the wastewater treatment plant. In addition, in this embodiment, the aggregation processing method of the historical operating data depends on the sampling frequency of each parameter. When the sampling frequency of each parameter is the same, the aggregation processing can be achieved by summarizing or averaging the sampled parameters within a specified time interval. When the sampling frequency of each parameter is different, the aggregation processing can be achieved by averaging the sampled parameters within a specified time interval.

[0062] As an example, if the specified time interval is set to T (e.g., daily), then in this embodiment, the historical influent water quality time series data obtained after aggregation processing is represented as follows:

[0063]

[0064] Among them, BOD 1,1 ..., BOD M,1 This represents the biochemical oxygen demand (BOD) of the influent during the time intervals from the first to the Mth time interval T; ...; TN 1,1 , ..., TN M,1 This represents the total nitrogen in the influent during the time intervals from the first to the Mth time interval T; M is a natural number greater than 1.

[0065] The historical water discharge index time series data are represented as follows:

[0066]

[0067] Among them, BOD 1,2 ..., BOD M,2 Q represents the biochemical oxygen demand (BOD) of the effluent during the time intervals from the first to the Mth time interval T; ...; 1,2 Q M,2 This represents the outflow rate during the time interval from the first to the Mth time interval T.

[0068] It should be understood that, in this embodiment, the time interval T and the historical time period in each column of the historical effluent index time series data correspond one-to-one with the historical influent water quality time series data.

[0069] S2. Preprocess the historical operating time series data to obtain preprocessed time series data; wherein, the preprocessed time series data includes preprocessed influent water quality time series data obtained by preprocessing the historical influent water quality time series data and preprocessed effluent index time series data obtained by preprocessing the historical effluent index time series data. It should be understood that, in this embodiment, the preprocessed influent water quality time series data and the preprocessed effluent index time series data can be obtained by preprocessing the historical influent water quality time series data and the historical effluent index time series data respectively.

[0070] In step S2, the historical runtime sequence data is preprocessed to obtain preprocessed time series data, including:

[0071] S201. The isolated forest algorithm is applied to identify outliers in the historical runtime sequence data;

[0072] Specifically, in step S201, to improve the efficiency of outlier identification, the historical runtime sequence data is pre-processed with unit unification and deduplication before outlier identification. Specifically, in the process of using the isolated forest algorithm to identify outliers in the historical runtime sequence data, a tree structure is constructed by randomly selecting features and split values ​​to identify abnormal data. In this embodiment, the isolated forest algorithm can be used to identify outliers in the historical runtime sequence data, such as abnormal influent water quality data and abnormal effluent indicator data. The specific steps of step S201 are as follows:

[0073] S2011. Randomly extract sub-sample time series data from the historical runtime time series data; for example, if the historical runtime time series data is a month's historical influent water quality time series data, the extracted sub-sample time series data may be a week's time series data randomly extracted from it.

[0074] S2012. For each subsample time series data, construct an isolation tree; during the construction of any isolation tree, take the corresponding subsample time series data as the starting point of the isolation tree (i.e., the root node, which contains all data points of the current subsample time series data), and randomly select a data point and a split value of the corresponding subsample time series data (a value randomly generated within a specified range of the selected data point) to divide the subsample time series data into two parts of time series data. Then, take the two parts of time series data as new starting points (the two parts of time series data constitute two child nodes of the isolation tree), and recursively perform the splitting process on each child node until each child node has only one data point or reaches the preset maximum tree depth;

[0075] S2013. Calculate the path length from the root node of the isolated tree to its leaf node for each data point. This path length is the number of edges traversed from the root node to its leaf node.

[0076] S2014. Calculate the anomaly score based on the path length of each data point, and take the data points whose anomaly scores exceed the preset score threshold as anomalies, until all anomalies in the historical runtime sequence data are obtained; specifically, the shorter the path length, the easier it is for the data point to be isolated, and the higher the probability that it is considered an anomaly.

[0077] S202. The KNN (k-Nearest Neighbors) algorithm is used to replace outliers in the historical runtime time series data and fill in missing values ​​in the historical runtime time series data to obtain filled time series data.

[0078] S203. Perform max-min normalization on the padded time series data to obtain preprocessed time series data.

[0079] Specifically, in step S203, if the padded time series data is represented as X', then after performing max-min normalization on the padded time series data X', the k-th data in the preprocessed time series data can be represented as:

[0080]

[0081] In the formula, x k 'x' is the k-th data in the padded time series data X'. min X' in the filled time series data X'

[0082] Minimum value, x max It is the maximum value in the filled time series data.

[0083] S3. Perform mode decomposition processing on the pretreated influent water quality time series data to obtain multiple sub-influent water quality time series data. In this embodiment, the EEMD (Ensemble Empirical Mode Decomposition) algorithm is used to perform mode decomposition processing on the pretreated influent water quality time series data to decompose the original complex time series data into multiple sub-influent water quality time series data with different frequencies and characteristics.

[0084] In step S3, the pretreated influent water quality time series data is subjected to mode decomposition processing to obtain multiple sub-influent water quality time series data, including:

[0085] S301. M different white noise sequences with equal root mean square (RMS) are added to the pretreated influent water quality time series data to obtain M mixed time series data corresponding one-to-one with the M white noise sequences; where M is a natural number greater than 1; the mixed time series data corresponding to the m-th white noise sequence among the M white noise sequences is represented as:

[0086] X m (t)=X(t)+n m (t);

[0087] In the formula, X(t) represents the time series data of the pretreated influent water quality, and n m (t) represents the m-th white noise sequence, where m ∈ {1, 2, ..., M};

[0088] It should be understood that the root mean square of the white noise sequence should be set to a smaller value than a preset root mean square threshold.

[0089] It should also be noted that, in the implementation of this embodiment, white noise sequences will be added to the pre-processed influent water quality time series data M times. The root mean square of the white noise sequences added M times is equal but the values ​​are different, in order to improve the stability of subsequent EMD decomposition and reduce the impact of noise, and ensure the stability of the influent water quality time series data results.

[0090] S302. The EMD (Empirical Mode Decomposition) algorithm is used to decompose M mixed time series data into M IMF (Intrinsic Mode Function) component groups; each IMF component group includes multiple IMF components obtained by decomposing the corresponding mixed time series data multiple times; for the mixed time series data X m The IMF component group obtained by decomposing (t) is represented as follows:

[0091] {C m,1 (t), C m,2 (t), ..., C m,J (t)};

[0092] Among them, C m,1 (t), C m,2 (t), ..., C m,J (t) represents the mixed time series data X m (t) is the first to the Jth IMF component obtained by performing J decompositions, where J is a natural number greater than 1;

[0093] It should be noted that the number of IMF components obtained after EMD decomposition of mixed time series data is fixed and is usually determined by the complexity and frequency characteristics of the original time series. For example, a complex non-stationary time series may yield more IMF components, while a simpler time series may yield fewer IMF components.

[0094] S303. Based on M IMF component groups, obtain the mean of multiple IMF components in each of the M IMF component groups to obtain multiple sub-influent water quality time series data; wherein, the sub-influent water quality time series data corresponding to the j-th IMF component obtained from the j-th decomposition in the M IMF component groups is represented as:

[0095]

[0096] Where j∈{1,2,……,J}.

[0097] It should be understood that the number of IMF components in each IMF component group is the same, and the number of sub-influent water quality time series data is the same as the number of IMF components in each IMF component group, that is, the final number of sub-influent water quality time series data is J.

[0098] It should be noted that the multiple sub-influent water quality time series data obtained in this embodiment represent the original time series data, that is, the fluctuation patterns in different frequency ranges of the pretreated influent water quality time series data, including rapidly changing high-frequency components and slowly changing low-frequency components. Together, they constitute the overall information of the pretreated influent water quality time series data, which can reflect the changes at different time scales during the sewage influent process.

[0099] In this embodiment, by performing mode decomposition on the preprocessed influent water quality time series data, it is beneficial to remove or reduce random noise in the original time series data, so that the subsequent subsequence prediction model can better capture meaningful signals, and can transform complex single time series problems into multiple simpler sub-problems, reducing model complexity, improving model training efficiency, and also helping to improve the prediction accuracy of the final prediction model.

[0100] S4. Construct multiple sub-sequence prediction models for multiple sub-influent water quality time series data, and optimize the multiple sub-sequence prediction models based on the multiple sub-influent water quality time series data and the pretreated effluent index time series data to obtain multiple optimized sub-sequence prediction models. It should be understood that, in this embodiment, when training the sub-sequence prediction model corresponding to any sub-influent water quality time series data, the any sub-influent water quality time series data is used as the input of the sub-sequence prediction model, and the pretreated effluent index time series data is used as the output of the sub-sequence prediction model, so that the sub-sequence prediction model learns the mapping relationship between the any sub-influent water quality time series data and the pretreated effluent index time series data.

[0101] In step S4, multiple subsequence prediction models all employ the BiGRU (Bidirectional Gated Recurrent Unit) model; correspondingly, multiple optimized subsequence prediction models all employ the BiGRU model based on the POS (Particle Swarm Optimization) algorithm. It should be noted that the POS-based BiGRU model can also be called the PSO-BiGRU (Particle Swarm Optimization Algorithm-Bidirectional Gated Recurrent Unit) model, which is a regression prediction model combining the particle swarm optimization algorithm and the bidirectional gated recurrent unit. It aims to optimize the parameters of the BiGRU model using the PSO algorithm, thereby improving the accuracy of the effluent water quality regression prediction results.

[0102] In this embodiment, each subsequence prediction model consists of two GRU units: a forward GRU (Gate Recurrent Unit) unit and a backward GRU unit. These units can be used to calculate the context information of the corresponding sub-influent water quality time series data, thereby capturing the bidirectional dependency relationship in the corresponding sub-influent water quality time series data.

[0103] Specifically, multiple sub-series prediction models are constructed for the time-series water quality data of multiple sub-influents, including:

[0104] S411. Subsequence analysis is performed on multiple sub-influent water quality time series data, and multiple GRU (Gate Recurrent Unit) computational units are constructed for each sub-influent water quality time series data. Specifically, the propagation method of the GRU computational units is as follows:

[0105] r t =σ(W r *[h t-1 ,x t ]);

[0106] zt =σ(W z *[h t-1 ,x t ]);

[0107]

[0108] Where, r t The reset gate for time step t controls how much information from the previous time step is forgotten; z t The update gate at time step t controls the amount of data from the previous time step that can be retained up to the current time step t; x t Indicates input data; This represents the new candidate hidden state in the GRU computational unit at time step t; h t This represents the updated hidden state of the output of the GRU computational unit at time step t; h t-1 σ() represents the updated hidden state of the output of the GRU computational unit at the previous time step t-1; σ() represents the parameter matrix; tanh() represents the hyperbolic tangent function.

[0109] S412. Based on multiple GRU computing units, multiple sub-sequence prediction models are constructed for multiple sub-influent water quality time series data. Specifically, in this embodiment, each sub-sequence prediction model adopts a BiGRU model, which consists of forward GRU units and backward GRU units. The propagation method of the BiGRU model is as follows:

[0110]

[0111] Where GRU() represents the GRU computational unit; W t and V t These represent the forward hidden state and the forward hidden state, respectively. and reverse hidden state The corresponding parameter matrix; b t This represents the offset value corresponding to the hidden state at time step t.

[0112] In this embodiment, based on the time-series data of multiple sub-influent water quality and the time-series data of the pretreated effluent indicators, multiple sub-series prediction models are optimized to obtain multiple optimized sub-series prediction models, including:

[0113] S421. The hyperparameters of multiple subsequence prediction models are used as optimization objects, and the particle population is initialized; specifically, the particle population is initialized, including the upper limit of the target search space, the lower limit of the target search space, the learning factor, the maximum number of iterations (or convergence accuracy), the upper limit of particle velocity, and the lower limit of particle velocity, and the velocity and position of each particle in the population are randomly initialized; in this embodiment, the hyperparameters of the subsequence prediction model may include parameters such as batch size and the number of hidden layer units, which are not limited here.

[0114] It should be understood that in the initial particle population, each particle represents a hyperparameter of a subsequence prediction model, that is, a corresponding subsequence prediction model can be constructed based on a single particle.

[0115] S422. Calculate the fitness value of particles in the particle population based on the time series data of multiple sub-influent water quality and the time series data of the pretreated effluent indicators;

[0116] In step S422, the time series data of multiple sub-influent water quality are used as inputs to multiple sub-sequence prediction models, and the time series data of the preprocessed effluent indicators are used as the common output of multiple sub-sequence prediction models, so as to obtain the fitness values ​​of multiple particles in the particle population.

[0117] Specifically, in this embodiment, multiple training sets and multiple test sets corresponding to the multiple sub-influent water quality time series data are extracted in chronological order from the combined data consisting of multiple sub-influent water quality time series data and the pre-processed effluent index time series data. Multiple training sets are used to train multiple sub-sequence prediction models respectively, and multiple test sets are used to predict multiple trained sub-sequence prediction models respectively, resulting in multiple sets of effluent index prediction time series data. Subsequently, based on the multiple sets of effluent index prediction time series data and the pre-processed effluent index time series data (i.e., the actual effluent index time series data) in the multiple test sets, the fitness values ​​of multiple particles in the particle population are obtained.

[0118] It should be noted that the fitness values ​​of particles in the particle population can be, but are not limited to, mean absolute error (MAE), mean squared error (MSE), mean absolute percentage error (MAPE), or root mean square error (RMSE). The smaller the corresponding MAE, MSE, MAPE, or RMSE, the higher the prediction accuracy of the corresponding trained subsequence prediction model. As an example, in this embodiment, the fitness values ​​of particles in the particle population are expressed as mean absolute error.

[0119] S423. For each particle, update the position of the particles in the particle population according to the preset particle update formula, and calculate the new fitness value of the particle after the position update. If the new fitness value is less than the fitness value, the particle after the position update is regarded as the optimal particle; otherwise, the particle is regarded as the optimal particle.

[0120] S424. Determine whether the preset stopping iteration condition is met. If yes, then the optimal particle is taken as the optimal hyperparameter, and then proceed to the next step; if no, then the particles in the particle population are updated to the updated particles, that is, return to step S422, and then recalculate the fitness value of the particles in the particle population. Specifically, in this embodiment, the stopping iteration condition is set to the number of iterations reaching the maximum number of iterations or the global optimal fitness of the particle meeting a preset threshold, which is not limited here.

[0121] It should be noted that steps S422 to S424 above are the specific steps for obtaining the optimal hyperparameters based on the particle population and using the POS algorithm.

[0122] S425. Update the hyperparameters of multiple subsequence prediction models to their corresponding optimal hyperparameters to obtain multiple optimized subsequence prediction models. It should be understood that, in this embodiment, through the above steps S422 to S424, an optimal particle population including multiple optimal particles corresponding to multiple subsequence prediction models can be obtained, and the multiple optimal particles in the optimal particle population are also the optimal hyperparameters corresponding to multiple subsequence prediction models.

[0123] S5. Fuse multiple optimized subsequence prediction models to obtain the final prediction model.

[0124] In step S5, multiple optimized subsequence prediction models are fused to obtain the final prediction model, including:

[0125] Multiple optimized subsequence prediction models are weighted and fused through a pre-defined fully connected layer to obtain the final prediction model.

[0126] S6. Input the real-time influent water quality time series data of the wastewater treatment plant into the final prediction model so as to obtain the effluent water quality prediction results (such as effluent BOD, effluent flow rate, etc.) of the wastewater treatment plant based on the final prediction model.

[0127] Specifically, in this embodiment, multiple optimized sub-sequence prediction models can obtain multiple sub-prediction results based on the real-time influent water quality time series data. In step S6, the effluent water quality prediction result is based on the fusion value of the multiple sub-prediction results, and the effluent water quality prediction result can be expressed as:

[0128] y = ∑ i σ(Wi x i +b i );

[0129] In the formula, σ() is the preset activation function, x i For the sub-prediction result of the i-th optimized subsequence prediction model, W i b is a pre-defined weight matrix that matches the prediction model of the i-th optimized subsequence. i This is a pre-defined bias vector that matches the prediction model for the i-th optimized subsequence. It should be understood that the weight matrix and bias vector are used to adjust the contribution of different optimized subsequence prediction models.

[0130] This embodiment can improve the accuracy of wastewater quality prediction and facilitate the enhancement of the intelligence and automation level of wastewater treatment. Specifically, in the implementation process, firstly, historical operating data of the wastewater treatment plant is acquired, and the historical operating data is aggregated at specified time intervals to obtain historical operating time series data. Then, the historical operating time series data is preprocessed to obtain preprocessed time series data. Subsequently, the preprocessed influent water quality time series data is subjected to mode decomposition processing to obtain multiple sub-influent water quality time series data. Then, multiple sub-sequence prediction models are constructed for each of the multiple sub-influent water quality time series data. Based on the multiple sub-influent water quality time series data and the preprocessed effluent index time series data, the multiple sub-sequence prediction models are optimized to obtain multiple optimized sub-sequence prediction models. Finally, the multiple optimized sub-sequence prediction models are fused to obtain the final prediction model. The real-time influent water quality time series data of the wastewater treatment plant is input into the final prediction model so that the effluent water quality prediction result of the wastewater treatment plant can be obtained based on the final prediction model. In this process, this embodiment uses historical influent water quality time series data and historical effluent index time series data as the base time. Multiple sub-influent water quality time series data are obtained through mode decomposition. Then, multiple sub-sequence prediction models are constructed for each of the multiple sub-influent water quality time series data. Through training steps, a final prediction model that can predict the effluent water quality of the wastewater treatment plant in real time is finally obtained. Based on this, by constructing multiple sub-sequence prediction models, this embodiment can more accurately capture the dynamic relationship between influent and effluent, and can make full use of the feature information in the time series, thereby improving the prediction accuracy. It can effectively predict the changes in effluent water quality, which is conducive to energy conservation, environmental protection and green construction.

[0131] Example 2:

[0132] This embodiment discloses a wastewater treatment plant effluent quality prediction system for implementing the wastewater treatment plant effluent quality prediction method in Embodiment 1; such as Figure 2 As shown, the wastewater treatment plant effluent quality prediction system includes:

[0133] The basic data acquisition module is used to acquire historical operating data of the wastewater treatment plant and aggregate the historical operating data at specified time intervals to obtain historical operating sequence data; wherein, the historical operating sequence data includes historical influent water quality time series data and historical effluent index time series data corresponding to the historical influent water quality time series data;

[0134] The basic data acquisition module is further configured to preprocess the historical runtime time series data to obtain preprocessed time series data; wherein, the preprocessed time series data includes preprocessed influent water quality time series data obtained by preprocessing the historical influent water quality time series data and preprocessed effluent index time series data obtained by preprocessing the historical effluent index time series data.

[0135] The modal decomposition module is communicatively connected to the basic data acquisition module and is used to perform modal decomposition processing on the preprocessed influent water quality time series data to obtain multiple sub-influent water quality time series data.

[0136] The model acquisition module is communicatively connected to the mode decomposition module. It is used to construct multiple sub-sequence prediction models for multiple sub-influent water quality time series data, and to optimize the multiple sub-sequence prediction models based on the multiple sub-influent water quality time series data and the pre-processed effluent index time series data to obtain multiple optimized sub-sequence prediction models. It is also used to fuse the multiple optimized sub-sequence prediction models to obtain the final prediction model.

[0137] The effluent prediction module is communicatively connected to the model acquisition module and is used to input the real-time influent water quality time series data of the wastewater treatment plant into the final prediction model so as to obtain the effluent water quality prediction result of the wastewater treatment plant based on the final prediction model.

[0138] It should be noted that the working process, working details and technical effects of the wastewater treatment plant effluent quality prediction system provided in this embodiment 2 can be found in embodiment 1, and will not be repeated here.

[0139] Example 3:

[0140] Based on Embodiment 1 or 2, this embodiment discloses an electronic device, which may be a smartphone, tablet computer, laptop computer, or desktop computer, etc. The electronic device may be referred to as a user terminal, portable terminal, desktop terminal, etc. Figure 3 As shown, the electronic device includes:

[0141] Memory, used to store computer program instructions; and,

[0142] A processor is used to execute the computer program instructions to perform the operation of a wastewater treatment plant effluent quality prediction method as described in any of Embodiment 1.

[0143] Specifically, processor 301 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 301 may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array). Processor 301 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 301 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen.

[0144] The memory 302 may include one or more computer-readable storage media, which may be non-transitory. The memory 302 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 302 are used to store at least one instruction, which is executed by the processor 301 to implement the wastewater treatment plant effluent quality prediction method provided in Embodiment 1 of this application.

[0145] In some embodiments, the terminal may also optionally include a communication interface 303 and at least one peripheral device. The processor 301, memory 302, and communication interface 303 can be connected via a bus or signal line. Each peripheral device can be connected to the communication interface 303 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of a radio frequency circuit 304, a display screen 305, and a power supply 306.

[0146] The communication interface 303 can be used to connect at least one I / O (Input / Output) related peripheral device to the processor 301 and the memory 302. In some embodiments, the processor 301, the memory 302, and the communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302, and the communication interface 303 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0147] The radio frequency (RF) circuit 304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 304 communicates with communication networks and other communication devices via electromagnetic signals.

[0148] Display screen 305 is used to display the UI (User Interface). The UI may include any combination of graphics, text, icons, and video.

[0149] Power supply 306 is used to supply power to various components in electronic devices.

[0150] Example 4:

[0151] Based on any one of Embodiments 1 to 3, this embodiment discloses a computer program product, including a computer program or instructions, which, when executed by a computer, implements a wastewater treatment plant effluent quality prediction method as described in any one of Embodiments 1. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0152] Obviously, those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Optionally, they can be implemented using computer-executable program code, thereby storing them in a storage device for execution by a computing device, or fabricating them separately as individual integrated circuit modules, or fabricating multiple modules or steps as a single integrated circuit module. Thus, the present invention is not limited to any particular hardware and software combination.

[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for predicting the effluent quality of a wastewater treatment plant, characterized in that, include: Historical operating data of the wastewater treatment plant is acquired, and the historical operating data is aggregated at specified time intervals to obtain historical operating time series data; wherein, the historical operating time series data includes historical influent water quality time series data and historical effluent index time series data corresponding to the historical influent water quality time series data; The historical runtime time series data is preprocessed to obtain preprocessed time series data; wherein, the preprocessed time series data includes preprocessed influent water quality time series data obtained by preprocessing the historical influent water quality time series data and preprocessed effluent index time series data obtained by preprocessing the historical effluent index time series data. The pre-processed influent water quality time series data are subjected to mode decomposition processing to obtain multiple sub-influent water quality time series data; Multiple subsequence prediction models are constructed for multiple sub-influent water quality time series data, and the multiple subsequence prediction models are optimized based on the multiple sub-influent water quality time series data and the pre-treated effluent index time series data to obtain multiple optimized subsequence prediction models. Multiple optimized subsequence prediction models are fused together to obtain the final prediction model; The real-time influent water quality time series data of the wastewater treatment plant is input into the final prediction model so that the effluent water quality prediction result of the wastewater treatment plant can be obtained based on the final prediction model.

2. The method for predicting effluent quality from a wastewater treatment plant according to claim 1, characterized in that, The historical runtime time series data is preprocessed to obtain preprocessed time series data, including: The isolated forest algorithm was used to identify outliers in the historical runtime sequence data. The KNN algorithm is used to replace outliers in the historical runtime time series data and fill in missing values ​​to obtain filled time series data. The padded time series data is subjected to max-min normalization to obtain preprocessed time series data.

3. The method for predicting effluent quality from a wastewater treatment plant according to claim 1, characterized in that, The pretreated influent water quality time series data are subjected to mode decomposition processing to obtain multiple sub-influent water quality time series data, including: M distinct white noise sequences with equal root mean square (RMS) are added to the pretreated influent water quality time series data to obtain M mixed time series data corresponding one-to-one with the M white noise sequences; where M is a natural number greater than 1; the mixed time series data corresponding to the m-th white noise sequence among the M white noise sequences is represented as: X m (t)=X(t)+n m (t); In the formula, X(t) represents the time series data of the pretreated influent water quality, and n m (t) represents the m-th white noise sequence, where m ∈ {1, 2, ..., M}; The EMD algorithm is used to decompose M mixed time series data into M IMF component groups. Each IMF component group includes multiple IMF components obtained by decomposing the corresponding mixed time series data multiple times. For the mixed time series data X... m The IMF component group obtained by decomposing (t) is represented as follows: {C m,1 ,C m,2 ,……,C m,J }; Among them, C m,1 C m,2 , ..., C m,J For mixed time series data X m (t) is the first to the Jth IMF component obtained by performing J decompositions, where J is a natural number greater than 1; Based on M IMF component groups, the mean values ​​of multiple IMF components in each of the M IMF component groups are obtained to obtain multiple sub-influent water quality time series data; among them, the sub-influent water quality time series data corresponding to the j-th IMF component obtained from the j-th decomposition in the M IMF component groups is represented as: Where j∈{1,2,……,J}.

4. The method for predicting effluent quality from a wastewater treatment plant according to claim 1, characterized in that, Multiple subsequence prediction models all employ the BiGRU model; correspondingly, multiple optimized subsequence prediction models all employ the BiGRU model based on the POS algorithm.

5. The method for predicting effluent quality from a wastewater treatment plant according to claim 4, characterized in that, Multiple sub-series prediction models were constructed for the time-series water quality data of multiple sub-influents, including: Subsequence analysis was performed on multiple sub-influent water quality time series data, and multiple GRU computing units were constructed for each sub-influent water quality time series data. Based on multiple GRU computing units, multiple subsequence prediction models were constructed for multiple sub-influent water quality time series data.

6. The method for predicting effluent quality from a wastewater treatment plant according to claim 4, characterized in that, Based on the time-series data of multiple influent water quality and the time-series data of the pretreated effluent indicators, multiple sub-series prediction models are optimized to obtain multiple optimized sub-series prediction models, including: The hyperparameters of multiple subsequence prediction models are used as optimization objects, and the particle population is initialized. Based on the time series data of multiple sub-influent water quality and the time series data of the pretreated effluent indicators, the fitness value of the particles in the particle population is calculated. For each particle, the positions of the particles in the particle population are updated according to a preset particle update formula, and the new fitness value of the particle after the position update is calculated. If the new fitness value is less than the fitness value, the particle after the position update is regarded as the optimal particle; otherwise, the particle is regarded as the optimal particle. Determine whether the preset stopping iteration condition is met. If yes, then the optimal particle is taken as the optimal hyperparameter and then proceed to the next step; if no, then the particles in the particle population are updated to the updated particles, and then the fitness values ​​of the particles in the particle population are recalculated. The hyperparameters of multiple subsequence prediction models are updated to their corresponding optimal hyperparameters to obtain multiple optimized subsequence prediction models.

7. The method for predicting effluent quality from a wastewater treatment plant according to claim 5, characterized in that, Multiple optimized subsequence prediction models are fused together to obtain the final prediction model, including: Multiple optimized subsequence prediction models are weighted and fused through a pre-defined fully connected layer to obtain the final prediction model.

8. A wastewater treatment plant effluent quality prediction system, characterized in that, include: The basic data acquisition module is used to acquire historical operating data of the wastewater treatment plant and aggregate the historical operating data at specified time intervals to obtain historical operating sequence data; wherein, the historical operating sequence data includes historical influent water quality time series data and historical effluent index time series data corresponding to the historical influent water quality time series data; The basic data acquisition module is further configured to preprocess the historical runtime time series data to obtain preprocessed time series data; wherein, the preprocessed time series data includes preprocessed influent water quality time series data obtained by preprocessing the historical influent water quality time series data and preprocessed effluent index time series data obtained by preprocessing the historical effluent index time series data. The modal decomposition module is communicatively connected to the basic data acquisition module and is used to perform modal decomposition processing on the preprocessed influent water quality time series data to obtain multiple sub-influent water quality time series data. The model acquisition module is communicatively connected to the mode decomposition module. It is used to construct multiple sub-sequence prediction models for multiple sub-influent water quality time series data, and to optimize the multiple sub-sequence prediction models based on the multiple sub-influent water quality time series data and the pre-processed effluent index time series data to obtain multiple optimized sub-sequence prediction models. It is also used to fuse the multiple optimized sub-sequence prediction models to obtain the final prediction model. The effluent prediction module is communicatively connected to the model acquisition module and is used to input the real-time influent water quality time series data of the wastewater treatment plant into the final prediction model so as to obtain the effluent water quality prediction result of the wastewater treatment plant based on the final prediction model.

9. An electronic device, characterized in that, include: Memory is used to store computer program instructions; as well as, A processor is configured to execute the computer program instructions to perform the operation of a wastewater treatment plant effluent quality prediction method as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program or instructions, characterized in that, When the computer program or the instructions are executed by the computer, they implement a method for predicting the effluent quality of a wastewater treatment plant as described in any one of claims 1 to 7.