A high-efficiency wastewater treatment system

By constructing a nonlinear model of the correlation matrix between water quality status labels and control decisions, the dynamic adaptability problem of existing wastewater treatment systems in the face of complex industrial wastewater is solved, enabling early identification and accurate response to water quality changes, and improving the stability and energy efficiency of the system.

CN122059467BActive Publication Date: 2026-07-03HANGZHOU KANGLIWEI ENVIRONMENTAL PROTECTION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU KANGLIWEI ENVIRONMENTAL PROTECTION TECH CO LTD
Filing Date
2026-04-17
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing wastewater treatment systems lack real-time modeling capabilities when faced with complex and rapidly changing industrial wastewater. This results in the control system being unable to dynamically adapt to changes in water quality, leading to problems such as unidentified abnormal data and response delays, which affect system stability and energy consumption.

Method used

A water quality status label building module is constructed. By analyzing the numerical fluctuation patterns in the dataset, multiple status labels are generated, and a control decision correlation matrix is ​​established to achieve nonlinear modeling and prediction, form closed-loop control logic, and dynamically select the optimal control response parameters.

Benefits of technology

It enables early identification and precise response to complex water quality changes, improves the stability and energy efficiency of wastewater treatment systems, and adapts to the dynamic changes in industrial wastewater scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122059467B_ABST
    Figure CN122059467B_ABST
Patent Text Reader

Abstract

This invention provides a high-efficiency wastewater treatment system, relating to the field of wastewater treatment technology. The system includes: a water quality status label construction module for constructing a set of water quality status labels based on a structured dataset; a control decision association modeling module for pairing and training structured datasets from historical operating cycles with control response parameter groups for each time period, and establishing a nonlinear mapping relationship between control response parameters and water quality status labels; a time-series prediction segment generation module for predicting the predicted values ​​of water quality indicators under each control response parameter group; a water quality prediction error calculation module for calculating the difference between the predicted and actual water quality indicator values ​​for the current time period; and a parameter group filtering module for sorting all control response parameter groups by average error and filtering out the control response parameter group with the minimum error under the target water quality status label. This invention improves the autonomy and accuracy of the high-efficiency wastewater treatment system.
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, and in particular to a high-efficiency wastewater treatment system. Background Technology

[0002] In existing technologies, wastewater treatment systems often rely on automated control strategies with fixed rules or preset parameters to regulate treatment processes such as pump start-up and shutdown, aeration intensity, and chemical dosage. The control system typically uses collected sensor data (such as pH, COD, ammonia nitrogen concentration, and liquid level) to make threshold judgments, which are then combined with a PLC program to execute specific operational procedures. This type of control logic depends on a rule base and cannot dynamically adapt to changes in water quality. Some systems introduce shallow models trained on historical data, such as fuzzy controllers or neural networks, to optimize control response parameters; however, these typically only cover a single treatment unit and are difficult to achieve cross-module data collaboration and global optimization.

[0003] The shortcomings of existing data control systems are particularly evident when dealing with mixed industrial wastewater treatment scenarios. Taking an intensive wastewater treatment plant in a chemical industrial park as an example, the wastewater entering the system is complex in type and fluctuates drastically in quality. Traditional control systems, lacking real-time modeling capabilities, often experience problems such as unidentified abnormal data and delayed response. For instance, when multiple water quality indicators change abruptly within a short period, the control system may still use the previous operating strategy, leading to excessively high dissolved oxygen in the aeration tank, causing a surge in energy consumption, or causing short-term sludge loss when the influent flow rate in the sedimentation tank is not adjusted in time. Due to the lack of dynamic analysis capabilities covering the entire process, existing control logic cannot guarantee the long-term stable operation of the system. Summary of the Invention

[0004] The purpose of this invention is to provide a high-efficiency wastewater treatment system, which aims to solve the problems mentioned in the background art.

[0005] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:

[0006] A high-efficiency wastewater treatment system, the system comprising:

[0007] The water quality status label construction module is used to analyze the numerical fluctuation patterns in the structured dataset and construct a water quality status label set. The water quality status label set reflects multiple typical water quality change scenarios, and each water quality status label corresponds to a set of multidimensional numerical features with upper and lower limits.

[0008] The control decision association modeling module is used to pair and train the structured dataset in the historical operation cycle with the control response parameter group of each time period, and establish a nonlinear mapping relationship between the control response parameters and the water quality status label based on the pairing results, and generate a control decision association matrix. The control decision association matrix is ​​used to characterize the association strength and influence direction between different control response parameter groups and corresponding water quality status labels.

[0009] The time-series prediction segment generation module is used to construct a group of short-term prediction segments with a sliding window structure based on the structured dataset of the current time period, and combine it with the control decision correlation matrix to predict water quality indicators under each control response parameter group, and generate a set of predicted water quality indicator values.

[0010] The water quality prediction error calculation module is used to calculate the difference between the predicted values ​​of water quality indicators and the actual values ​​of water quality indicators for the current time period, and generate a prediction error set.

[0011] The parameter group filtering module is used to sort all control response parameter groups by average error based on the prediction error set, and filter out the control response parameter group with the smallest error under the target water quality status label as the current control response parameter group.

[0012] Preferably, the water quality status label construction module includes:

[0013] The fluctuation analysis submodule is used to calculate the rate of change, mean and range of water quality status data within a target time period based on the real-time fluctuation sequence of each sensor parameter in the structured dataset, and to extract multi-dimensional time segment feature groups.

[0014] The label boundary generation submodule is used to cluster the water quality status data according to the multi-dimensional time segment feature groups, extract the upper and lower boundaries of the feature values ​​corresponding to each category, and bind the boundary with the corresponding cluster center value to generate label boundary mapping data.

[0015] The tag set generation submodule is used to match the structured data fragments of each time period with the corresponding tags based on the tag boundary mapping data, and construct a water quality status tag set.

[0016] Preferably, the control decision correlation modeling module includes:

[0017] The training sample construction submodule is used to index and bind the structured dataset in the historical operating cycle with the corresponding historical control response parameter group to form a set of control sample pairs for each time period.

[0018] The nonlinear modeling submodule is used to train a multi-layer activation mapping model based on the set of control sample pairs for different time periods through backpropagation, and generate a nonlinear modeling network that represents the relationship between the control response parameter set and the water quality status label.

[0019] The control matrix extraction submodule is used to quantify and extract the model response intensity of each water quality state label under different control response parameter groups in a nonlinear modeling network, and construct a control decision correlation matrix.

[0020] Preferably, the time-series prediction segment generation module includes:

[0021] The window construction submodule is used to select a fixed-length continuous data sequence from the structured dataset with the current time period as the reference point, and set the sliding step size to form a group of short data segments for multiple time periods.

[0022] The control group insertion submodule is used to embed the corresponding control response parameter group into the input data structure according to each short-time data segment, and construct a candidate control sequence sample set.

[0023] The prediction value generation submodule is used to call the control decision correlation matrix, calculate for each candidate control sequence sample, and output the corresponding set of predicted water quality indicators.

[0024] Preferably, the water quality prediction error calculation module includes:

[0025] The real value extraction submodule is used to extract the values ​​of each water quality status data from the structured dataset of the current time period as a sequence of real reference values;

[0026] The difference calculation submodule is used to compare the predicted water quality index value corresponding to each control response parameter group with the real reference value in the real reference value sequence item by item, calculate the difference value according to the preset error assessment method, and generate error detail entries.

[0027] The error set generation submodule is used to collect all error details and construct a prediction error set.

[0028] Preferably, the label boundary generation submodule includes:

[0029] The clustering algorithm selection unit is used to automatically select K-Means clustering or density-based DBSCAN clustering algorithm based on the distribution density, number of dimensions and number of samples of multi-dimensional time segment feature groups, classify the samples of each time segment, and obtain sample group sets corresponding to multiple cluster categories. Each sample group corresponds to a cluster number.

[0030] The boundary extraction unit is used to extract the numerical range of all samples under each cluster number according to the sample group set, calculate its distribution interval, and use the quartile method to locate the upper and lower boundaries of the distribution interval to obtain the feature boundary range set under the corresponding cluster number.

[0031] The boundary mapping unit is used to bind the feature boundary range under each cluster number to the center vector corresponding to that category based on the feature boundary range set, generate a boundary description vector, and form label boundary mapping data.

[0032] Preferably, the nonlinear modeling submodule includes:

[0033] The network structure definition unit is used to dynamically construct a feedforward neural network model containing an input layer, at least two hidden layers, and an output layer based on the input feature dimension and the number of target labels of the sample pair set controlled by time period. The hidden layers use the ReLU activation function, and the output layer uses Softmax normalization.

[0034] The loss function design unit is used to define the target loss function of the feedforward neural network as the cross-entropy loss between the predicted water quality status label and the actual label, and to introduce an L2 regularization term to constrain the model during the training process.

[0035] The parameter training unit is used to perform model training operations based on the error backpropagation mechanism with an adaptive learning rate during the training process using the Adam optimizer. It dynamically adjusts the parameter weights and bias terms of each layer in the neural network to generate a nonlinear modeling network that represents the relationship between the control response parameter set and the water quality status label.

[0036] Preferably, the difference calculation submodule includes:

[0037] The weighted error calculation unit is used to linearly combine the predicted values ​​of water quality indicators with the actual reference values ​​according to the preset weights of pH, conductivity, dissolved oxygen, temperature and turbidity for each control response parameter group to generate a preliminary set of weighted average error values.

[0038] The error suppression unit is used to penalize and weight the preliminary weighted average error values ​​that exceed the preset abnormal threshold based on the preliminary weighted average error value set, and generate the final weighted average error value set.

[0039] The error entry generation unit is used to bind the final weighted average error value with the original control response parameter group based on the final weighted average error value set, and generate error detail entries.

[0040] Preferably, the network structure definition unit includes:

[0041] The neuron number estimation subunit is used to estimate the appropriate number of neurons in the hidden layer by combining the product relationship between the two and the square root logic, based on the number of input features and the number of output label categories in the control sample pair set for the time period, and to generate a set of structural configuration parameters for network initialization.

[0042] The structure search subunit is used to select the combination with the smallest error from the candidate schemes that include multiple candidate hidden layer structures, activation function configurations and network depth combinations, using the validation set error ranking method, as the modeling structure scheme of the feedforward neural network.

[0043] The structure configuration output subunit is used to write the structure configuration parameter set and modeling structure scheme into the control configuration file, which is then called by the nonlinear modeling submodule to initialize the feedforward neural network structure.

[0044] Preferably, the weighted error calculation unit includes:

[0045] The weight configuration generation sub-unit is used to assign an initial relative weight to each water quality indicator based on the degree of influence of control errors, treatment risk level and preset discharge standards of various water quality indicators in historical treatment records.

[0046] The weight adjustment and optimization subunit is used to analyze the trend of prediction error of each water quality indicator in the current time period, use the attention mechanism to model the distribution of the influence of each water quality indicator, dynamically generate a set of error sensitivity weight vectors, and correct the initial relative weights accordingly to generate dynamic weighting factors.

[0047] The weighted error output subunit is used to proportionally multiply and sum the prediction error values ​​of each water quality indicator according to the dynamic weighting factor, and generate a preliminary weighted average error value set.

[0048] The above-described solution of the present invention has at least the following beneficial effects:

[0049] This invention proposes a high-efficiency wastewater treatment system that addresses the shortcomings of existing control strategies, such as inability to dynamically respond to water quality changes, weak predictive capabilities, and delayed control response. It constructs a data-driven intelligent control system that enables real-time prediction and dynamic control of key stages in the wastewater treatment process. Through data acquisition and processing modules, the raw monitoring data collected by multi-source sensors is cleaned, standardized, and aligned to ensure the integrity and temporal continuity of the input data. This avoids the judgment failures caused by data noise or inconsistent data structures in existing systems, laying a high-quality data foundation for subsequent predictive modeling.

[0050] Through the water quality status label construction module, the system can build multiple status labels based on water quality fluctuation patterns in historical data. Each label is bound to specific multi-dimensional feature boundaries, improving the ability to identify complex water quality changes. Compared with the limitations of traditional rule-based methods that can only make judgments based on thresholds, this labeling system has statistical robustness and dynamic adaptability, enabling it to identify abnormal states and respond earlier.

[0051] In terms of control strategy modeling, this invention constructs a control decision correlation modeling module, introduces a nonlinear modeling mechanism to learn the complex relationship between control response parameter sets and water quality status labels, and generates a control decision correlation matrix to model the entire process control path. This matrix supports the system in making predictions and evaluations based on different control combinations, thereby achieving global control coordination across modules and time periods, effectively solving the problems of "control silos" and "fragmented responses" in existing technologies.

[0052] Furthermore, the system establishes a closed-loop logic of "control combination - prediction response - error assessment" through the time-series prediction segment generation module and the water quality prediction error calculation module. This enables control decisions to be selected with the minimum error as the optimization objective, thereby achieving dynamic and adaptive control strategy output. This avoids problems such as excessive energy consumption and abnormal processing caused by using old control commands in water quality change scenarios.

[0053] In summary, this invention constructs an intelligent wastewater treatment control system with predictive and adaptive adjustment capabilities through multiple mechanisms such as data structure optimization, state label construction, control strategy modeling, and error-driven optimization. It is particularly suitable for industrial wastewater scenarios with complex and rapidly changing water composition, significantly improving the system's stability, accuracy, and energy efficiency ratio, and has good prospects for engineering application. Attached Figure Description

[0054] Figure 1 This is an architectural diagram of a high-efficiency wastewater treatment system provided by an embodiment of the present invention. Detailed Implementation

[0055] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.

[0056] like Figure 1 As shown, an embodiment of the present invention proposes a high-efficiency wastewater treatment system, the system comprising:

[0057] The data acquisition module is used to acquire raw monitoring data generated by multi-source sensing devices from the wastewater treatment process. The raw monitoring data includes water quality status data with timestamps, including pH value, conductivity, dissolved oxygen, temperature and turbidity.

[0058] The data processing module is used to perform anomaly removal, format standardization and multi-channel alignment on the raw monitoring data to generate a structured dataset. The structured dataset retains the real-time fluctuation sequence and sampling interval of each sensor parameter.

[0059] The water quality status label construction module is used to analyze the numerical fluctuation patterns in the structured dataset and construct a water quality status label set. The water quality status label set reflects multiple typical water quality change scenarios, and each water quality status label corresponds to a set of multidimensional numerical features with upper and lower limits.

[0060] The control decision association modeling module is used to pair and train the structured dataset in the historical operation cycle with the control response parameter group of each time period, and establish a nonlinear mapping relationship between the control response parameters and the water quality status label based on the pairing results, and generate a control decision association matrix. The control decision association matrix is ​​used to characterize the association strength and influence direction between different control response parameter groups and corresponding water quality status labels.

[0061] The time-series prediction segment generation module is used to construct a group of short-time prediction segments with a sliding window structure based on the structured dataset of the current time period, and combine it with the control decision correlation matrix to predict the predicted values ​​of water quality indicators under each control response parameter group.

[0062] The water quality prediction error calculation module is used to calculate the difference between the predicted and actual water quality index values ​​for the current time period and generate a prediction error set.

[0063] The parameter group filtering module is used to sort all control response parameter groups by average error based on the prediction error set, and filter out the control response parameter group with the smallest error under the target water quality status label as the current control response parameter group.

[0064] In this embodiment of the invention, the system first collects raw monitoring data from multiple key stages of the wastewater treatment process via a data acquisition module. This data comes from multi-source sensing devices, such as pH sensors, conductivity sensors, dissolved oxygen sensors, temperature probes, and turbidity detectors. Each collected data point is accurately timestamped for subsequent time-series analysis. The collected raw monitoring data reflects the real-time changes in water quality during the wastewater treatment process.

[0065] The collected raw monitoring data is sent to the data processing module for processing. In this module, the system first removes outliers from the monitoring process, such as sudden changes caused by sensor malfunction or noise interference. Then, all data is standardized to unify units, field types, and numerical precision. Finally, the system aligns data from different sensor channels to generate a structured dataset. This structured dataset not only preserves the temporal variation trajectory of the original parameters but also records the sampling interval for each parameter, facilitating windowed processing by the model.

[0066] The water quality status label building module automatically constructs a set of labels based on the change patterns in this structured dataset to distinguish different water quality conditions. These labels provide a reference framework for subsequent modeling, prediction, and control.

[0067] The function of the control decision correlation modeling module is to establish a nonlinear relationship model between historical structured data and historical control response parameter sets through paired training. The trained model outputs a control decision correlation matrix, which clearly depicts the strength and trend direction of the effect of each parameter combination on the target water quality state.

[0068] During the real-time operation phase, the time-series prediction segment generation module divides the structured dataset of the current time period into multiple short-time segments, and calls the control decision correlation matrix to predict the possible water quality index change trends under each set of control response parameters, ultimately generating a set of predicted water quality index values.

[0069] Next, the water quality prediction error calculation module compares the prediction results with the actual water quality indicators collected in real time, and generates an error set by calculating the difference. This error set reflects the prediction accuracy of each combination of control parameters.

[0070] Finally, the system uses a parameter group filtering module to sort the average error values ​​of all control response parameter groups and automatically selects the set of parameters with the smallest prediction error under the current target water quality status label. This set is then used as the control response parameter group for the current system execution. This system can effectively adapt to complex water quality changes and improve the accuracy and robustness of the control response.

[0071] The data acquisition module specifically includes:

[0072] The main function of the data acquisition module is to acquire water quality data measured by multiple sensors during the wastewater treatment process in real time. This data includes not only conventional water quality parameters such as pH, conductivity, dissolved oxygen, temperature, and turbidity, but may also include additional parameters specific to certain scenarios (such as ammonia nitrogen and COD). In this module's design, multiple sensors are used at different locations within the wastewater treatment system for real-time monitoring, and the collected raw data is transmitted to the system's central processing unit via wireless or wired networks.

[0073] Each sensor in the data acquisition module automatically timestamps its data collection, ensuring that each data record has an accurate time stamp. This is crucial for subsequent data processing and water quality prediction, as wastewater quality fluctuates significantly over time, and timestamps help accurately capture dynamic changes in water quality. For example, when the pH value in wastewater changes abnormally, the system can accurately identify the time of the problem using the timestamp, allowing for timely intervention.

[0074] In addition, the data acquisition module can perform real-time data monitoring, automatically calibrating and checking the sensors during the data acquisition process to ensure the accuracy of the acquired data and reduce errors caused by sensor malfunctions or data fluctuations. For example, the measurement values ​​of the conductivity sensor may be affected by temperature changes; the data acquisition module will automatically perform temperature compensation to ensure data accuracy.

[0075] The data processing module specifically includes:

[0076] First, in the anomaly removal phase, the data processing module uses a series of preset rules to identify and filter out erroneous or abnormal data. For example, if the sensor outputs extreme data (such as extremely high or low pH values) under certain circumstances due to malfunction or external interference, these data will be marked as outliers and removed. Anomaly detection methods can be based on simple threshold judgments or statistical methods, such as outlier removal based on standard deviation.

[0077] During the format standardization phase, the data processing module processes the output data from different sensors in a unified manner to ensure that the data is stored in a standard format and to eliminate data deviations caused by differences in different device models or sensors. Specifically, format standardization may include steps such as standardizing units (e.g., converting all temperature data to degrees Celsius), adjusting data precision, and filling in missing values.

[0078] Multi-channel alignment processing aligns the output data from different sensors according to timestamps, ensuring that all data have matching values ​​at the same point in time. For example, if one sensor collects data every minute and another sensor collects data every five minutes, the data processing module will perform time alignment on these two data sources to ensure consistency in time, thereby facilitating subsequent data analysis and modeling.

[0079] Through the data processing described above, a structured dataset is generated, containing accurate data from each sensor at each time point, and retaining real-time fluctuation sequences and sampling intervals. This processed data will provide fundamental data support for subsequent water quality status label construction and control decisions.

[0080] The parameter group filtering module specifically includes:

[0081] Error set calculation: First, the water quality prediction error calculation module calculates the error for each control response parameter group by comparing the predicted water quality values ​​with the actual measured values. These errors typically include root mean square error, absolute error, and relative error. The smaller the error value, the better the prediction effect of the control response parameter group and the higher the control accuracy.

[0082] Average Error Ranking: After calculating the error set of all control response parameter groups, the parameter group selection module sorts all parameter groups according to the magnitude of the error. At this time, a weighted average method can be used to consider the different impacts of different water quality parameters on control accuracy. For example, the error of some water quality parameters (such as dissolved oxygen) may have a greater impact on the overall treatment effect than the error of other parameters (such as temperature), so different weights may be assigned when calculating the error.

[0083] Optimal parameter set selection: By sorting the errors of all control response parameter sets, the parameter set with the smallest error is selected. This parameter set will be used as the input to the control system in the next time period, ensuring that the system can make the most accurate control response based on the latest water quality changes. For example, in a certain time period, after error calculation and sorting, the system may choose to finely adjust parameters such as aeration rate and reagent dosage to ensure that the water quality reaches the ideal state.

[0084] Through this screening mechanism, the system can dynamically select the optimal control response strategy, avoiding the problems of relying on fixed rules or manual adjustments in traditional control systems. The technical effect of this module is that, through precise error calculation and screening mechanisms, each control link in the wastewater treatment process can quickly respond to changes in water quality and always maintain an optimal control state, thereby effectively improving the overall efficiency and stability of the wastewater treatment system.

[0085] In a preferred embodiment of the present invention, the water quality status label construction module includes:

[0086] The fluctuation analysis submodule is used to calculate the rate of change, mean and range of water quality status data within a target time period based on the real-time fluctuation sequence of each sensor parameter in the structured dataset, and to extract multi-dimensional time segment feature groups.

[0087] The label boundary generation submodule is used to cluster the water quality status data according to the multi-dimensional time segment feature groups, extract the upper and lower boundaries of the feature values ​​corresponding to each category, and bind the boundary with the corresponding cluster center value to generate label boundary mapping data.

[0088] The tag set generation submodule is used to match the structured data fragments of each time period with the corresponding tags based on the tag boundary mapping data, and construct a water quality status tag set.

[0089] In this embodiment of the invention, the function of the fluctuation analysis submodule is to extract numerical features from various sensor parameters in the structured dataset. For multiple channels such as pH, conductivity, dissolved oxygen, temperature, and turbidity, the system calculates their rate of change, statistical mean, and range within a preset time window. Taking dissolved oxygen as an example, if its sampling sequence is [4.5, 4.6, 4.8, 5.0] within a certain time period, the system can calculate the average value within this window as 4.725, the range as 0.5, and the rate of change as 11%. This feature extraction is performed on the multidimensional parameter values ​​within each window to form a time segment feature group, which serves as the input basis for subsequent classification.

[0090] The label boundary generation submodule uses these feature sets to cluster water quality states. The system can employ clustering algorithms such as K-Means or DBSCAN to divide the feature sets into multiple categories. The feature value set under each category is used to statistically analyze the distribution interval, for example, performing quartile analysis on the pH distribution to extract the upper and lower boundaries of that category in that dimension. Simultaneously, the system records the cluster center values ​​as representative vectors for that category. Finally, a label boundary mapping data structure is generated to describe the numerical feature intervals corresponding to different cluster numbers.

[0091] The label set generation submodule matches structured data segments for each time period based on this boundary mapping data. If all feature values ​​in a segment fall within the upper and lower limits corresponding to a certain cluster number, then that segment will be labeled with that label. The water quality status label set constructed in this way has statistically significant boundary control, which is convenient for use as a reference in subsequent prediction and control processes.

[0092] The fluctuation analysis submodule specifically includes:

[0093] First, this submodule performs statistical analysis on the real-time water quality data collected by each sensor. For each water quality parameter (such as pH, conductivity, dissolved oxygen, temperature, turbidity, etc.), the submodule calculates its rate of change, mean, and range over the target time period.

[0094] Rate of change: This refers to the rate at which a water quality parameter changes over a time series. It is typically calculated by measuring the difference between the current value and the value at the previous moment, and then dividing the difference by the previous value. For example, if the pH value was 7.2 at the previous moment and is currently 7.5, then the rate of change is (7.5 - 7.2) / 7.2. The rate of change reveals the speed of water quality changes and helps to detect sudden changes.

[0095] Mean: This refers to the average level of a water quality parameter within a target time period. For example, if a water quality parameter is measured to be 7.2, 7.3, and 7.4 within 10 minutes, then its mean is (7.2 + 7.3 + 7.4) / 3 = 7.3. The mean reflects the overall level of the water quality parameter within that time period.

[0096] Range: This refers to the difference between the maximum and minimum values ​​of a water quality parameter within a target time period. For example, if the maximum value of a water quality parameter is 8.1 and the minimum value is 7.0 within one hour, then its range is 8.1 - 7.0 = 1.1. The range reflects the magnitude of water quality variation.

[0097] The extracted features (rate of change, mean, range) will provide basic data for the subsequent construction of water quality status labels. These feature values ​​help to identify water quality change trends and abnormal fluctuations, providing data support for label generation.

[0098] By operating the fluctuation analysis submodule, the system can more accurately capture the dynamics of water quality changes, providing reliable input for subsequent more complex analysis and prediction.

[0099] The tag set generation submodule specifically includes:

[0100] The task of the tag set generation submodule is to match the results of the fluctuation analysis with the predefined water quality state tag boundaries to construct a complete water quality state tag set. Each water quality state tag typically represents a specific water quality state, such as "normal water quality", "lightly polluted water quality", "heavily polluted water quality", etc.

[0101] In this process, the label boundary mapping data is provided by the aforementioned label boundary generation submodule, specifically including the upper and lower limits of each water quality status label and its corresponding multidimensional numerical features. The label set generation submodule then matches the structured data fragments of each time period with the corresponding labels based on these boundary conditions.

[0102] Matching method: The upper and lower boundaries of each water quality status label represent the normal range of a certain water quality parameter. When a structured data segment over a certain period of time (such as the value of parameters such as pH and dissolved oxygen at a certain moment) falls within the upper and lower boundaries of a label, the data segment will be assigned to that label. For example, if the pH value fluctuates between 6.8 and 7.2 during a certain period of time, and the upper and lower boundaries of the label "normal water quality" are 6.9 to 7.1, then the data segment will be labeled as "normal water quality".

[0103] The label set generation submodule ensures that water quality status data for each time period is reasonably classified and assigned corresponding labels, which is crucial for subsequent water quality prediction and control decisions. Through this process, the system can achieve classified monitoring and early warning of water quality, and provide accurate water quality status identification for the control decision module.

[0104] In a preferred embodiment of the present invention, the control decision association modeling module includes:

[0105] The training sample construction submodule is used to index and bind the structured dataset in the historical operating cycle with the corresponding historical control response parameter group to form a set of control sample pairs for each time period.

[0106] The nonlinear modeling submodule is used to train a multi-layer activation mapping model based on the set of control sample pairs for different time periods through backpropagation, and generate a nonlinear modeling network that represents the relationship between the control response parameter set and the water quality status label.

[0107] The control matrix extraction submodule is used to quantify and extract the model response intensity of each water quality state label under different control response parameter groups in a nonlinear modeling network, and construct a control decision correlation matrix.

[0108] In this embodiment of the invention, the function of the training sample construction submodule is to pair historical data. The system first reads the historical structured dataset and pairs it one-to-one with the control response parameter sets executed within the corresponding time period. Each pair of data samples consists of a structured data fragment (as input) and a control response parameter set (as output), and is labeled with the actual water quality state achieved by the system within that time period. The large set of time-period control sample pairs obtained after pairing will be used as modeling input.

[0109] The nonlinear modeling submodule uses the aforementioned sample pairs to train an activation mapping model. In this embodiment, a multi-layer feedforward neural network structure is employed. The model's input layer receives structured data features, and the output layer corresponds to multiple water quality status label categories. Two hidden layers are included, employing the ReLU activation function. During training, the cross-entropy loss function is used to measure the difference between the model's predictions and the actual labels, while an L2 regularization term is added to prevent overfitting. The optimizer uses the Adam algorithm, which can update with different learning rates across different parameter dimensions, thereby accelerating convergence and improving stability.

[0110] The control matrix extraction submodule is used to analyze the response characteristics of the trained neural network. The system simulates outputs under different control response parameter sets and quantifies and extracts the output probabilities corresponding to each water quality state label. These response results can be constructed into a multi-dimensional control decision correlation matrix to describe the strength and direction of the model's response to water quality states under different control parameters. This matrix will be used in subsequent prediction and control optimization processes to achieve intelligent control strategy generation driven by system data.

[0111] The training sample construction submodule specifically includes:

[0112] The training sample construction submodule creates a training sample set based on data from historical operating cycles, including combinations of water quality data and control response parameters. This set is used to train the nonlinear modeling module, enabling the model to learn the adaptation relationship of control response parameters under different water quality conditions.

[0113] In this module, the system first extracts water quality status data (such as pH value, conductivity, etc.) and corresponding control response parameters (such as aeration rate, dosage, etc.) from historical datasets. Then, it pairs the water quality status data for each time period with the corresponding control response parameters, using timestamp indexes to link these data together, forming time-period control sample pairs. Each sample pair contains the water quality changes and corresponding control response parameter combinations within a specific time period.

[0114] In this way, the training sample construction submodule provides a large amount of historical data for the subsequent nonlinear modeling submodule, enabling the modeling process to learn the complex relationship between water quality changes and control responses. Learning this relationship helps in accurately predicting water quality changes in practical applications and adjusting control strategies based on the prediction results.

[0115] For example, assuming that the COD concentration in wastewater increases from 100 mg / L to 150 mg / L in a certain historical data period, the system will record this change and pair the corresponding control response (such as increasing the dosage of chemicals) with the water quality change. Through learning from a large number of historical data samples, the system can extract patterns in water quality changes, providing a basis for future water quality prediction and control optimization.

[0116] The control matrix extraction submodule specifically includes:

[0117] The function of the control matrix extraction submodule is to extract the correlation strength between each water quality state label and the control response parameters from the nonlinear modeling network, and to construct a control decision correlation matrix. This matrix quantifies the impact of different combinations of control response parameters on water quality changes under different water quality states.

[0118] In this process, the submodule first uses a nonlinear modeling network to predict the water quality status labels and calculates the predicted response intensity of each label under different sets of control response parameters. For example, for a water quality status label for a certain period (such as "severely polluted water quality"), the system will analyze how the response intensity of the label changes under different combinations of control parameters (such as increasing aeration rate, increasing drug dosage, etc.).

[0119] By calculating these response intensities, the control matrix extraction submodule generates a control decision correlation matrix. This matrix records the association between different water quality state labels and combinations of control response parameters, providing data support for subsequent time-series prediction and control decisions. The construction of this matrix enables the system to evaluate the impact of different control responses on water quality states in real time during processing and adjust control strategies based on prediction results.

[0120] For example, when a water quality status is labeled "slightly polluted water," the control matrix may indicate that increasing aeration and dosage has a significant effect on improving water quality. However, for the "severely polluted water" label, it may indicate that simply increasing aeration is less effective, requiring comprehensive adjustment of multiple control parameters. By calculating the control decision correlation matrix, the system can make more accurate control decisions.

[0121] In a preferred embodiment of the present invention, the time-series prediction segment generation module includes:

[0122] The window construction submodule is used to select a fixed-length continuous data sequence from the structured dataset with the current time period as the reference point, and set the sliding step size to form a group of short data segments for multiple time periods.

[0123] The control group insertion submodule is used to embed the corresponding control response parameter group into the input data structure according to each short-time data segment, and construct a candidate control sequence sample set.

[0124] The prediction value generation submodule is used to call the control decision correlation matrix, calculate for each candidate control sequence sample, and output the corresponding set of predicted water quality indicators.

[0125] In this embodiment of the invention, the window construction submodule first selects a time series segment of preset length from the structured dataset, using the current system operation time period as a reference point. For example, it selects the minute-by-minute sampling values ​​from the past 10 minutes to form a time series window containing 10 data points. This type of window moves with a sliding step size, generating multiple consecutive groups of short-term data segments. Each segment contains a complete multi-channel data trajectory, ensuring that key water quality change trends are preserved. For example, if the sliding step size is 2 minutes, each time segment will partially overlap with the previous segment, thereby improving the temporal continuity of the prediction.

[0126] The role of the control group insertion submodule is to combine candidate control response parameter sets with these short-time data segments to form a complete control prediction input structure. Each short-time data segment corresponds to multiple control parameter combinations, such as forming different input samples under different aeration rates and dosages, thereby constructing a candidate control sequence sample set. This multi-combination test structure allows the system to evaluate the potential impact of each control scheme.

[0127] The prediction value generation submodule is responsible for calling the control decision correlation matrix to perform prediction calculations on the constructed candidate control sequence samples. For each set of input samples, the system outputs a corresponding set of predicted water quality indicators through the correlation matrix, including estimated values ​​of water quality states such as pH, conductivity, dissolved oxygen, temperature, and turbidity over a certain period of time. These prediction values ​​provide a basis for subsequent error assessment and parameter set selection.

[0128] Through the processing of this module, the system has achieved short-term water quality prediction capability for multiple control parameter groups, providing data support for optimizing control decisions and enhancing the system's responsiveness to complex water quality change trends.

[0129] The window construction submodule specifically includes:

[0130] The main task of the window construction submodule is to extract short data segments from a structured dataset across multiple time periods. Each segment contains water quality data within a fixed time window, the length of which is set according to the specific application scenario. Typically, the choice of time window length depends on the frequency of water quality changes and the processing objectives. For example, if the system needs to respond quickly to rapid changes in water quality, a shorter time window, such as 30 minutes, can be set; if water quality changes are relatively stable, a longer time window, such as 1 hour, can be set.

[0131] The sliding window step size refers to the distance the window moves within the time series. The size of the step size determines the degree of overlap between each data segment. If the step size is set to 1 minute, each newly generated window will overlap with the previous window for 1 minute; if the step size is set to 5 minutes, each newly generated window will overlap with the previous window for 5 minutes. Through the sliding window mechanism, the system can dynamically capture water quality change trends and ensure coverage of all water quality change data.

[0132] For example, assuming water quality parameters in a structured dataset are collected every 5 minutes, and the time window length is set to 30 minutes with a sliding step of 5 minutes, then the first window will contain water quality data from minute 0 to minute 30, the second window will contain water quality data from minute 5 to minute 35, and so on. In this way, the system can generate multiple time series segments, which can be used for subsequent prediction and analysis.

[0133] The control group insertion submodule specifically includes:

[0134] The function of the control group insertion submodule is to combine control response parameters (such as aeration rate, dosage, flow rate, etc.) with each short-time data segment to construct a candidate control sequence sample set. Each short-time data segment contains key characteristics of water quality changes, while the control response parameter set represents the specific actions to be taken based on these characteristics.

[0135] Specifically, the control group insertion submodule assigns appropriate control parameters to each short-term data segment based on historical data or preset rules. For example, during a certain period, when the pH value of the water falls below a certain threshold, it may be necessary to increase aeration or add chemicals. The control group insertion submodule saves these response parameters along with the corresponding water quality data segments, forming a candidate control sequence sample set. These sample sets will be used for subsequent predictive analysis to determine the optimal control strategy.

[0136] For example, suppose that the dissolved oxygen content in the water has decreased over a certain period of time in the past, and the control response is to increase the aeration rate and the dosage of chemicals. Then the control group insertion submodule will generate a control sequence containing "increase aeration rate and increase chemical dosage" based on this historical data, and save it as a sample along with the corresponding water quality data fragment.

[0137] The predicted value generation submodule specifically includes:

[0138] The core task of the prediction generation submodule is to use the control decision correlation matrix to predict the water quality index for each candidate control sequence sample and output the predicted value of each candidate control sequence. The control decision correlation matrix is ​​trained using historical data and represents the degree of influence of different control response parameter groups on the water quality status label.

[0139] This submodule performs calculations on each candidate control sequence sample to predict the changing trends of water quality indicators (such as pH, dissolved oxygen, COD, etc.) under different control combinations. By calculating the candidate control sequence samples, the system can predict possible changes in water quality under different control strategies, thereby providing support for subsequent control decisions.

[0140] For example, if a candidate control sequence is "increase aeration rate and decrease reagent dosage", the prediction generation submodule will calculate the changes in water quality indicators (such as pH, dissolved oxygen, etc.) under this sequence and provide a prediction result. If the prediction result shows that the control sequence helps improve water quality, then it will be selected as the optimal control strategy.

[0141] In a preferred embodiment of the present invention, the water quality prediction error calculation module includes:

[0142] The real value extraction submodule is used to extract the values ​​of each water quality status data from the structured dataset of the current time period as a sequence of real reference values;

[0143] The difference calculation submodule is used to compare the predicted water quality index value corresponding to each control response parameter group with the real reference value in the real reference value sequence item by item, calculate the difference value according to the preset error assessment method, and generate error detail entries.

[0144] The error set generation submodule is used to collect all error details and construct a prediction error set.

[0145] In this embodiment of the invention, the role of the true value extraction submodule is to ensure that each error calculation process has a comparable source of real reference values. During the execution of the control loop, the system extracts actual water quality data that has been collected and processed by sensors from the structured dataset of the current time period, including but not limited to indicators such as pH value, conductivity, dissolved oxygen, temperature, and turbidity. These data all have precise timestamps, ensuring that the extracted true values ​​and predicted values ​​are strictly aligned in the time dimension, thereby guaranteeing the timeliness and accuracy of error analysis.

[0146] The difference calculation submodule compares the predicted water quality index values ​​corresponding to each control response parameter group with the aforementioned sequence of true reference values. The system calculates the difference between each pair of predicted and true values ​​based on a preset error assessment method. This assessment method is modularly set, allowing users to select appropriate error measurement methods for different scenarios. Specifically, it can include absolute error, relative error, mean square error, etc., and also supports setting weights for different indicators based on control objectives, or employing a sensitivity correction mechanism combined with the indicator fluctuation risk level.

[0147] For example, if the predicted conductivity is 1100 μS / cm and the actual conductivity is 1000 μS / cm, the system can choose to output an absolute error of 100 μS / cm or a relative error of 10%. If the indicator is set as a high-risk indicator, the system can also amplify the error value based on the historical fluctuation frequency of the indicator to reflect its weight in the overall control evaluation. Each set of control parameters will generate a detailed error entry, recording the differences between the predicted and actual values ​​for each indicator.

[0148] The error set generation submodule is used to uniformly collect the detailed error entries generated by the above-mentioned control response parameters and construct a predicted error set. This set not only includes the total difference score for each parameter group, but also retains the error information of each indicator, serving as the basis for the subsequent control parameter screening module to judge and rank the superiority and inferiority. With the help of this module, the system can achieve a unified comparison of all control strategies and output the optimal control response parameter set based on this comparison, thereby improving the response efficiency and control accuracy of the wastewater treatment system when facing complex water quality fluctuations.

[0149] This embodiment extends the error calculation process from static matching to a general processing framework with adjustable multi-strategy and selectable difference types, providing full support for subsequent weighted processing and intelligent optimization control. It is particularly suitable for use in scenarios where water quality changes drastically in industrial wastewater and control objectives are not unique.

[0150] The error set generation submodule specifically includes:

[0151] The main task of the error set generation submodule is to summarize all the calculated error details and construct a predicted error set, which will be used for subsequent control parameter selection and optimization decisions. The predicted error set contains the errors between the predicted results and actual measured values ​​of all control response parameter groups under different water quality conditions.

[0152] During implementation, the system first calculates the difference between the predicted and actual water quality values ​​for each control response parameter group using the difference calculation submodule. This error can typically be calculated in various ways, such as mean square error (MSE), absolute error (AE), or relative error (RE). For each water quality indicator (such as pH, dissolved oxygen concentration, COD, etc.), these error indicators are calculated and stored as error detail entries.

[0153] In the error set generation submodule, all these detailed error entries are integrated to form a complete error set. For example, assuming that multiple control response parameter sets (such as different combinations of aeration and dosage) affect water quality within a certain period, the error set will contain the error data between the predicted and actual measured values ​​for each control response parameter set. The error set provides the system with a basis for performance evaluation of various control strategies and provides data support for subsequent selection of the optimal control strategy.

[0154] By systematically calculating and summarizing the errors of each control response parameter group, comprehensive basic data is provided for further error analysis, control parameter optimization, and decision-making, ensuring that the system can perform dynamic and accurate control optimization and avoiding system failure caused by errors in a single indicator.

[0155] In a preferred embodiment of the present invention, the label boundary generation submodule includes:

[0156] The clustering algorithm selection unit is used to automatically select K-Means clustering or density-based DBSCAN clustering algorithm based on the distribution density, number of dimensions and number of samples of multi-dimensional time segment feature groups, classify the samples of each time segment, and obtain sample group sets corresponding to multiple cluster categories. Each sample group corresponds to a cluster number.

[0157] The boundary extraction unit is used to extract the numerical range of all samples under each cluster number according to the sample group set, calculate its distribution interval, and use the quartile method to locate the upper and lower boundaries of the distribution interval to obtain the feature boundary range set under the corresponding cluster number.

[0158] The boundary mapping unit is used to bind the feature boundary range under each cluster number to the center vector corresponding to that category based on the feature boundary range set, generate a boundary description vector, and form label boundary mapping data.

[0159] In this embodiment of the invention, the clustering algorithm selection unit dynamically selects a suitable clustering method based on the statistical characteristics of the multidimensional time segment feature groups. When the data density of the feature groups is relatively uniform, the dimensions are few, and the distribution is approximately Gaussian, the system preferentially uses the K-Means algorithm; when the number of samples is large, the density changes drastically, or outliers are present, the system switches to the density-based DBSCAN algorithm. This selection mechanism ensures that the label boundary division is reasonable and stable under different data formats. After classification, multiple cluster categories are obtained, each category is associated with a number, and the clustering output structure contains the cluster number and the corresponding sample group set.

[0160] After receiving the aforementioned sample group set, the boundary extraction unit processes the feature distribution of each sample according to its cluster number. For each feature dimension, the system extracts the numerical range of all samples in that cluster and calculates the quartiles, using the lower quartile as the lower boundary and the upper quartile as the upper boundary to form the feature boundary range set for that cluster. In this way, the system not only avoids mean distortion but also possesses a natural resistance to outliers.

[0161] The boundary mapping unit binds the feature boundary range under each cluster number to its center vector. The center vector is the average combination of all sample features in that cluster, representing the central feature of the label. The boundary range and the center value together constitute the boundary description vector of that category. The boundary description vectors of all categories are aggregated to form the label boundary mapping data, which is used in the subsequent label matching and recognition process. Through the processing of this module, the system can achieve fine-grained construction of water quality status labels based on data clustering and with numerical boundaries as the core, enhancing the reference value of labels in subsequent predictive control.

[0162] The clustering algorithm selection unit specifically includes:

[0163] K-Means clustering algorithm: This algorithm assigns data to the nearest cluster center by calculating the distance from each data point to the cluster center. K-Means is typically used in scenarios with relatively uniform data distribution and is suitable for situations with few outliers. In this invention, the clustering algorithm selection unit can automatically decide whether to use the K-Means algorithm based on the number of samples and distribution density.

[0164] DBSCAN clustering algorithm: This density-based clustering method effectively identifies outliers in data and excludes them. DBSCAN is particularly suitable for water quality data with irregular shapes and density distributions. In practical applications, DBSCAN can identify areas of "abnormal fluctuation" in water quality data and treat them as a separate category.

[0165] The clustering algorithm selection unit automatically selects an appropriate clustering method based on the characteristics of the data. This generates a cluster number for each time period segment of water quality data during processing and assigns the water quality status data to different cluster categories. For example, in some water quality monitoring scenarios, K-Means may be used to divide stable water quality data, while the DBSCAN algorithm is more suitable when there are significant abnormal fluctuations.

[0166] The boundary extraction unit specifically includes:

[0167] The main task of the boundary extraction unit is to extract the feature range of water quality data in each cluster category and calculate the upper and lower boundaries.

[0168] Numerical range of feature dimensions: For each water quality parameter (such as pH, conductivity, dissolved oxygen, etc.), the system calculates its minimum and maximum values ​​in each cluster category to obtain the numerical range of the data. This process helps identify the fluctuation range and outliers of the data.

[0169] Iquartile Method: To accurately define the upper and lower boundaries of the data, the boundary extraction unit employs the quartile method. The quartile method defines the data distribution range by sorting the data and calculating its first quartile (Q1, below which 25% of the data falls), third quartile (Q3, below which 75% of the data falls), and interquartile range (Q3-Q1). Using this method, the system can delineate reasonable upper and lower boundaries based on the data's distribution characteristics, ensuring the accuracy of the label generation process.

[0170] The boundary extraction unit provides reliable numerical ranges for the subsequent label set generation submodule. These ranges will be used to determine the label ranges for different water quality states. For example, when the pH value range under a certain cluster is between 6.9 and 7.3, the system will label all data within that range as "normal water quality".

[0171] Specifically, the boundary mapping unit includes:

[0172] The main task of the boundary mapping unit is to map the boundary range of each cluster category to the center vector of that category, generating label boundary mapping data. Each label description includes the feature range and center location of that category; this information will be used to generate water quality status labels.

[0173] Center Vector: The "center vector" of each cluster is the mean or median of the water quality data in that cluster, representing the representative water quality state of that cluster. The system calculates the mean of all data points in each cluster to obtain the center location of that cluster.

[0174] Boundary description vectors: Boundary description vectors are formed by binding the upper and lower boundaries of cluster categories to the center vector. In this way, the system can define a precise interval and representative value for each water quality status label.

[0175] The boundary mapping unit provides the label set generation submodule with precise descriptive information for each water quality status label, which will help with subsequent water quality classification and control decisions. By mapping the boundary range and center vector of each cluster category to the label set, the system can achieve accurate water quality status identification and real-time classification.

[0176] In a preferred embodiment of the present invention, the nonlinear modeling submodule includes:

[0177] The network structure definition unit is used to dynamically construct a feedforward neural network model containing an input layer, at least two hidden layers, and an output layer based on the input feature dimension and the number of target labels of the sample pair set controlled by time period. The hidden layers use the ReLU activation function, and the output layer uses Softmax normalization.

[0178] The loss function design unit is used to define the target loss function of the feedforward neural network as the cross-entropy loss between the predicted water quality status label and the actual label, and to introduce an L2 regularization term to constrain the model during the training process.

[0179] The parameter training unit is used to perform model training operations based on the error backpropagation mechanism with an adaptive learning rate during the training process using the Adam optimizer. It dynamically adjusts the parameter weights and bias terms of each layer in the neural network to generate a nonlinear modeling network that represents the relationship between the control response parameter set and the water quality status label.

[0180] In this embodiment of the invention, the network structure definition unit dynamically constructs a feedforward neural network structure based on the input feature dimension and the number of output labels of the time-segment control sample pair set. In this embodiment, the constructed network includes an input layer, two hidden layers, and one output layer. The number of nodes in the input layer corresponds to the input feature dimension, and the number of nodes in the output layer corresponds to the number of water quality status labels. The number of nodes in the two hidden layers can be set according to empirical rules or calculated based on the sample dimension and the number of labels. The hidden layers all use the ReLU activation function to improve nonlinear expressive power, and the output layer uses the Softmax function to obtain the probability distribution of each label. When constructing the network structure, the system simultaneously generates initial weights, biases, training batch size, and learning rate configurations for subsequent training.

[0181] The loss function defined by the loss function design unit is the cross-entropy loss function, used to measure the difference between the model's predicted output and the true label. To enhance the model's generalization ability, an L2 regularization term is introduced into the loss function to suppress the risk of overfitting caused by excessively large network parameters. This constraint is added to the loss expression in the form of the sum of squared parameter weights, imposing a constraint on the overall complexity of the model. This design ensures that the model possesses both accuracy and stability.

[0182] The parameter training unit employs the Adam optimizer to train the model. The training process utilizes an error backpropagation mechanism, automatically adjusting the weights and biases of each layer in each iteration. An adaptive learning rate strategy is used to achieve efficient convergence across different parameter dimensions, preventing entrapment in local minima. During training, the system records the model's performance on the validation set for subsequent structure selection and decision correlation extraction. The final output nonlinear modeling network accurately represents the complex relationships between control response parameter sets and water quality status labels, serving as a highly efficient closed-loop predictive and control process.

[0183] The role of the network structure definition unit is to dynamically construct a suitable neural network structure by controlling the dimensionality of the sample set and the number of target labels based on the input time period. When constructing the network, the number of neurons in the input layer is determined by the number of feature dimensions of the dataset. For example, if each sample contains 6 water quality parameters (such as pH, conductivity, dissolved oxygen, temperature, etc.), then the number of neurons in the input layer is 6. The design of the network structure depends on the complexity of the target task. In this embodiment, a feedforward neural network is used, which includes an input layer, two hidden layers, and an output layer.

[0184] The loss function design unit specifically includes:

[0185] The loss function design unit is responsible for defining the objective function to be optimized during neural network training, ensuring that the model can learn the relationship between water quality state labels and control responses by minimizing the loss function. In this embodiment, the cross-entropy loss function is chosen as the objective loss function because cross-entropy is a commonly used loss function in multi-class classification problems and can effectively measure the difference between the predicted probability distribution and the actual labels.

[0186] Specifically, the cross-entropy loss function is calculated as follows: for each sample, the difference between the actual label probability and the predicted label probability is calculated. The loss function calculates the total loss for the entire dataset by summing or averaging the losses of all samples. A characteristic of the cross-entropy loss function is that the loss is higher when the difference between the predicted probability and the actual label probability is large, and lower when the difference is small. During training, this encourages the neural network to reduce prediction errors.

[0187] To avoid overfitting, the loss function design unit introduces an L2 regularization term during training. The L2 regularization term penalizes large weight values, keeping the neural network's weight vector relatively small, thereby improving the model's generalization ability. The L2 regularization term is calculated by multiplying the sum of the squares of all parameters in the weight matrix by a regularization coefficient. This regularization measure effectively reduces overfitting on the training set.

[0188] The technical advantage of the loss function design unit is that the cross-entropy loss function ensures effective training for classification tasks, while the L2 regularization term further improves the stability and generalization ability of the model and enhances the prediction accuracy of the neural network.

[0189] The parameter training unit specifically includes:

[0190] The parameter training unit's task is to train the neural network's parameters using the backpropagation algorithm and optimize the loss function to generate a nonlinear modeling network capable of accurately predicting water quality status labels. Backpropagation is a standard optimization method in neural network training; it calculates the error between the network output and the actual label, and then gradually updates the network parameters using gradient descent.

[0191] In this embodiment, the Adam optimizer is employed, a commonly used optimization algorithm in deep learning with excellent performance. The Adam optimizer combines momentum and adaptive learning rate adjustment (Adagrad), allowing it to adaptively adjust the learning rate based on the gradient of each parameter. Compared to traditional stochastic gradient descent, the Adam optimizer accelerates convergence, reduces fluctuations during training, and enables the neural network to converge to a better solution in a shorter time.

[0192] During training, the parameter training unit gradually adjusts each parameter in the network through an adaptive learning rate mechanism until the error is minimized, generating the optimal nonlinear model. This training process not only ensures accurate modeling of the relationship between water quality status labels and control response parameters, but also ensures that the model can cope with complex water quality changes and control requirements.

[0193] The technical advantage of the parameter training unit is that the use of the Adam optimizer can accelerate the model training process, optimize the accuracy of water quality prediction, and improve the real-time performance and adaptability of the control response.

[0194] In a preferred embodiment of the present invention, the difference calculation submodule includes:

[0195] The weighted error calculation unit is used to linearly combine the predicted values ​​of water quality indicators with the actual reference values ​​according to the preset weights of pH, conductivity, dissolved oxygen, temperature and turbidity for each control response parameter group to generate a preliminary set of weighted average error values.

[0196] The error suppression unit is used to penalize and weight the preliminary weighted average error values ​​that exceed the preset abnormal threshold based on the preliminary weighted average error value set, and generate the final weighted average error value set.

[0197] The error entry generation unit is used to bind the final weighted average error value with the original control response parameter group based on the final weighted average error value set, and generate error detail entries.

[0198] In this embodiment of the invention, the weighted error calculation unit compares the predicted values ​​of the corresponding water quality indicators with the actual reference values ​​for each control response parameter group. For each water quality indicator, such as pH, conductivity, dissolved oxygen, temperature, and turbidity, the system sets an initial preset weight to characterize the importance of that indicator in the control objective. For example, in a certain industrial wastewater treatment scenario, dissolved oxygen and pH may be more important than turbidity. The system linearly combines the prediction errors of each indicator with the weighting coefficients to generate a preliminary weighted average error value set for each parameter group.

[0199] The error suppression unit is used to further handle cases of abnormally high errors. When the prediction error value under a certain control parameter group is significantly higher than a set threshold, such as exceeding twice the standard deviation of the mean, the error value is marked as a high-risk item by the system and a penalty weighting factor is applied. By increasing the average error value of this control group, the risk of risky control combinations entering the final selection is effectively suppressed. This mechanism improves the system's sensitivity to fluctuations in control error, making the decision more stable and fault-tolerant.

[0200] The error entry generation unit binds each control response parameter group to its corresponding final weighted error value, forming an error detail entry. Each entry records the predicted value, the actual value, the weighted error value, and its corresponding parameter group identifier. All error entries are uniformly incorporated into the prediction error set for subsequent parameter group filtering modules to perform sorting analysis, thereby supporting a high-precision and robust parameter optimization process.

[0201] The error suppression unit specifically includes:

[0202] In this unit, the system analyzes the prediction error of each control response parameter group based on a preliminary set of weighted average error values. When the weighted average error value of a certain control parameter group deviates significantly from other groups, for example, if the error value exceeds the statistical upper bound of the current set of weighted average error values, then the error of that group is considered an "abnormally high error value". This statistical upper bound can be obtained by calculating the median and the difference between the upper and lower quartiles of the error set, and using this to construct an empirical tolerance interval.

[0203] For error values ​​exceeding the upper limit of the tolerance range, the system introduces a penalized weighting factor for correction. Specifically, for identified outliers, the system multiplies the original weighted error value by an amplification factor, which can be set between 1.2 and 2.0 depending on the degree of deviation. For example, if the predicted weighted error of a certain control parameter combination is 0.75, and this value exceeds twice the interquartile range of the median error, the system can set a factor of 1.5, resulting in a corrected error value of 1.125. This value will participate in the final ranking and evaluation of the control parameter groups.

[0204] This suppression mechanism avoids the situation where "minimal error combinations mask abnormally large error combinations" in the error ranking, improves the risk control capability of the control command output process, and ensures stable system operation.

[0205] In a preferred embodiment of the present invention, the network structure definition unit includes:

[0206] The neuron number estimation subunit is used to estimate the appropriate number of neurons in the hidden layer by combining the product relationship between the two and the square root logic, based on the number of input features and the number of output label categories in the control sample pair set for the time period, and to generate a set of structural configuration parameters for network initialization.

[0207] The structure search subunit is used to select the combination with the smallest error from the candidate schemes that include multiple candidate hidden layer structures, activation function configurations and network depth combinations, using the validation set error ranking method, as the modeling structure scheme of the feedforward neural network.

[0208] The structure configuration output subunit is used to write the structure configuration parameter set and modeling structure scheme into the control configuration file, which is then called by the nonlinear modeling submodule to initialize the feedforward neural network structure.

[0209] In this embodiment of the invention, the neuron count estimation subunit estimates the reasonable number of neurons in each hidden layer based on the number of input features and the number of output label types in the time-period control sample set. The estimation logic comprehensively considers the product relationship between the input and output dimensions as well as the model complexity control requirements. For example, when the input dimension is 20 and the output label is 5, the system can refer to empirical formulas to set the number of neurons in each layer to an approximate value of the square root of the product of the input and output dimensions. This estimation result serves as the initial structural configuration parameter input, avoiding overfitting or underfitting of the network due to manually setting unreasonable parameters.

[0210] The structure search subunit optimizes among multiple candidate network structures. The system constructs a pool of structures with different numbers of hidden layers, combinations of activation functions, and neuron distribution schemes, and uses validation set error as the performance evaluation criterion. During the search process, the system tries each structure scheme one by one, sorts the error values ​​of each structure on the validation data, and finally selects the combination with the smallest error as the network structure definition result.

[0211] The structure configuration output subunit outputs the network hierarchy, number of neurons per layer, activation function type, and other initialization parameters involved in the structure definition scheme, which guide the nonlinear modeling submodule in network construction and training. This automatic structure selection mechanism makes the model more suitable for specific data types, improving overall modeling performance.

[0212] The neuron count estimation subunit specifically includes:

[0213] Before building the neural network, the system needs to perform structure estimation based on the number of input features (i.e., the number of dimensions of each sample in the structured dataset) and the number of output label types (i.e., the number of water quality status labels identified by the system).

[0214] To balance modeling accuracy and training efficiency, the system employs a heuristic estimation method: by calculating the product of the input and output dimensions and taking the square root of that product, the system determines the suggested number of neurons for each hidden layer. For example, if the input feature dimension is 36 and the output label dimension is 9, the product is 324, and the square root of that product is 18. Therefore, the system suggests setting the number of neurons in the hidden layer to 18.

[0215] To enhance generalization ability, the system supports setting a floating window for the number of neurons, such as ±20% adjustment space, meaning the number of neurons in this example can be set to 14~22. All estimation results will be output as a set of structure configuration parameters for use in subsequent network structure search and initialization.

[0216] The structure search subunit specifically includes:

[0217] This sub-unit is responsible for the automatic search of network structures. Its core objective is to find the most suitable neural network structure for the current wastewater data characteristics from the structure pool. The structure pool is preset by the system and includes different numbers of hidden layers (such as 1, 2, or 3 layers), the number of neurons per layer (such as the cardinality fluctuation value of the output of the aforementioned estimation sub-unit), as well as activation function types (such as ReLU, LeakyReLU, Tanh, etc.) and connection methods (such as standard feedforward or residual connections, etc.).

[0218] The search process employs an exhaustive search combined with validation error evaluation. The system loads each architecture scheme sequentially and performs training and testing on the validation dataset. In the test results, each architecture configuration corresponds to a validation error metric, with common evaluation metrics being cross-entropy loss or accuracy.

[0219] Taking a specific network structure as an example: Assume the network has two hidden layers, with 20 neurons in the first layer and 10 neurons in the second, both using ReLU activation functions. This combination achieves a cross-entropy error of 0.24 and an accuracy of 92% on the validation set. If other combinations show 0.27 / 90% and 0.25 / 91%, the system determines the structure with the smallest error as the optimal structure. This structure will be used during model initialization and saved as a structural configuration parameter.

[0220] This structural search mechanism is highly versatile and is particularly suitable for practical treatment scenarios with uncertain data dimensions and large differences in water quality indicators, thus improving the network's adaptability and prediction accuracy.

[0221] In a preferred embodiment of the present invention, the weighted error calculation unit includes:

[0222] The weight configuration generation sub-unit is used to assign an initial relative weight to each water quality indicator based on the degree of influence of control errors, treatment risk level and preset discharge standards of various water quality indicators in historical treatment records.

[0223] The weight adjustment and optimization subunit is used to analyze the trend of prediction error of each water quality indicator in the current time period, use the attention mechanism to model the distribution of the influence of each water quality indicator, dynamically generate a set of error sensitivity weight vectors, and correct the initial relative weights accordingly to generate dynamic weighting factors.

[0224] The weighted error output subunit is used to proportionally multiply and sum the prediction error values ​​of each water quality indicator according to the dynamic weighting factor, and generate a preliminary weighted average error value set.

[0225] In this embodiment of the invention, the weight configuration generation subunit assesses the error impact, risk level, and regulatory standard requirements of various water quality indicators during the control process based on historical processing records, and sets the initial relative weight of each indicator. The system extracts the sensitivity level by analyzing the volatility of each indicator in historical data and its impact on treatment efficiency. For example, in scenarios with strict control over ammonia nitrogen emissions, the system can assign a higher initial weight to dissolved oxygen to emphasize its importance to the final control result.

[0226] The weight adjustment and optimization subunit models the real-time influence of different indicators based on the predicted error fluctuation trends of each water quality indicator within the current operating cycle, using an attention mechanism. The system generates an error-sensitive weight vector to dynamically adjust the initial weights. When the error fluctuates greatly, the system amplifies the influence weight of that indicator in the error calculation; conversely, it reduces its proportion. This dynamic correction process ensures that the weight factors can reflect the current data distribution in a timely manner, improving the discrimination effect of the weighted error value.

[0227] The weighted error output subunit calculates the weighted average error value for each control response parameter group by weighting the dynamic weight vector with the error of each index. This is achieved through proportional multiplication and accumulation. This set is then input into the subsequent parameter group selection module to further evaluate the control strategy and provide a basis for selecting high-quality control commands.

[0228] The weight configuration generation sub-unit specifically includes:

[0229] This sub-unit is used to reasonably initialize the weights of each water quality indicator (such as pH, conductivity, dissolved oxygen, temperature, and turbidity) before weighted error calculation. The initial weight configuration is based on three aspects: the degree of influence of historical errors, the treatment risk level, and regulatory restrictions.

[0230] First, regarding the impact of historical errors, the system reviews the degree to which prediction errors of various water quality indicators affected the success rate of the final control response over multiple past treatment cycles. For example, if slight errors in pH values ​​are found to easily lead to excessive sludge load in multiple cycles, the system records this parameter as having high error sensitivity and increases its weight.

[0231] Secondly, the system will introduce a risk level, which can be set based on industry experience or derived from water quality classification standards. For example, in the treatment of dyeing and printing wastewater, color and conductivity are often core control parameters, and their risk level is marked as "high," so they should be given a higher initial weight.

[0232] Finally, based on national or regional wastewater discharge standards (such as GB 8978-1996), compliance weights are set for each water quality indicator. For example, dissolved oxygen should not be lower than 2 mg / L, and the system can include it in the list of high-weight indicators.

[0233] The system quantifies the above three types of factors, performs weighted merging, and then normalizes them to ensure that the sum of the initial relative weights of all water quality indicators is 1. The final generated initial weight set will be used in the subsequent error assessment process.

[0234] The weight adjustment and optimization sub-unit specifically includes:

[0235] The main function of this subunit is to dynamically adjust the weights of various water quality indicators based on real-time data changes during operation, so as to more accurately reflect their impact on the effectiveness of the control strategy. The system first analyzes the fluctuation range of the prediction error of each indicator in recent time slices and statistically analyzes its changing trend.

[0236] For example, if the prediction error for dissolved oxygen is 0.2, 0.5, and 1.1 (in mg / L) in the past three time slices, it can be determined that the error is in a rapidly increasing phase. The system inputs this trend into the attention modeling module, which generates a weight distribution vector based on the amplitude, frequency, and abruptness of the error fluctuation to reflect the current "attention intensity" of each indicator.

[0237] The attention mechanism here focuses on indicators with drastic recent error fluctuations, appropriately increasing their contribution to the final weighted error. Specifically, a sliding window approach can be used to capture local fluctuations, combined with a weight normalization mechanism to generate new dynamic weight coefficients. For example, if the dynamic attention score for dissolved oxygen is 0.32, and the original static weight is 0.25, the system can adjust its dynamic weighting factor to above 0.30.

[0238] The corrected weights of all indicators will be renormalized and output as the final dynamic weighting factor, which will be used in the error weighting process.

[0239] The weighted error output subunit specifically includes:

[0240] This subunit implements the final calculation process of the weighted error. Its input is the predicted error value of each water quality indicator and the corresponding dynamic weighting factor under each control response parameter group. The system pairs the two one by one and multiplies each error value proportionally according to the corresponding weighting factor.

[0241] Subsequently, all the product results of the weights are summed to form an overall weighted average error value, which is used to comprehensively evaluate the control quality of the control response parameter group. For example, suppose the prediction errors of each index under a certain control combination are: pH=0.1, conductivity=0.2, dissolved oxygen=0.3, temperature=0.1, turbidity=0.15, and the corresponding dynamic weighting factors are: 0.25, 0.20, 0.30, 0.10, 0.15. The system will sum the product values ​​of each item to generate the weighted error value for that group.

[0242] To ensure consistency, the system outputs the weighted error set for all control parameter groups as part of the parameter group selection module. This set will then participate in the error sorting and control command selection process, thereby achieving error-driven intelligent control optimization.

[0243] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A high-efficiency wastewater treatment system, characterized in that, The system includes: The water quality status label construction module is used to analyze the numerical fluctuation patterns in the structured dataset and construct a water quality status label set. The water quality status label set reflects multiple typical water quality change scenarios, and each water quality status label corresponds to a set of multidimensional numerical features with upper and lower limits. The control decision association modeling module is used to pair and train the structured dataset in the historical operation cycle with the control response parameter group of each time period, and establish a nonlinear mapping relationship between the control response parameters and the water quality status label based on the pairing results, and generate a control decision association matrix. The control decision association matrix is ​​used to characterize the association strength and influence direction between different control response parameter groups and corresponding water quality status labels. The time-series prediction segment generation module is used to construct a group of short-term prediction segments with a sliding window structure based on the structured dataset of the current time period, and combine it with the control decision correlation matrix to predict water quality indicators under each control response parameter group, and generate a set of predicted water quality indicator values. The water quality prediction error calculation module is used to calculate the difference between the predicted water quality index values ​​and the actual water quality index values ​​for the current time period, and generate a prediction error set. The parameter group filtering module is used to sort all control response parameter groups by average error based on the prediction error set, and filter out the control response parameter group with the smallest error under the target water quality status label as the current control response parameter group.

2. The high-efficiency wastewater treatment system according to claim 1, characterized in that, The water quality status label construction module includes: The fluctuation analysis submodule is used to calculate the rate of change, mean and range of water quality status data within a target time period based on the real-time fluctuation sequence of each sensor parameter in the structured dataset, and to extract multi-dimensional time segment feature groups. The label boundary generation submodule is used to cluster the water quality status data according to the multi-dimensional time segment feature groups, extract the upper and lower boundaries of the feature values ​​corresponding to each category, and bind the boundary with the corresponding cluster center value to generate label boundary mapping data. The tag set generation submodule is used to match the structured data fragments of each time period with the corresponding tags based on the tag boundary mapping data, and construct a water quality status tag set.

3. The high-efficiency wastewater treatment system according to claim 1, characterized in that, The control decision correlation modeling module includes: The training sample construction submodule is used to index and bind the structured dataset in the historical operating cycle with the corresponding historical control response parameter group to form a set of control sample pairs for each time period. The nonlinear modeling submodule is used to train a multi-layer activation mapping model based on the set of control sample pairs for different time periods through backpropagation, and generate a nonlinear modeling network that represents the relationship between the control response parameter set and the water quality status label. The control matrix extraction submodule is used to quantify and extract the model response intensity of each water quality state label under different control response parameter groups in a nonlinear modeling network, and construct a control decision correlation matrix.

4. The high-efficiency wastewater treatment system according to claim 1, characterized in that, The time-series prediction segment generation module includes: The window construction submodule is used to select a fixed-length continuous data sequence from the structured dataset with the current time period as the reference point, and set the sliding step size to form a group of short data segments for multiple time periods. The control group insertion submodule is used to embed the corresponding control response parameter group into the input data structure according to each short-time data segment, and construct a candidate control sequence sample set. The prediction value generation submodule is used to call the control decision correlation matrix, calculate for each candidate control sequence sample, and output the corresponding set of predicted water quality indicators.

5. The high-efficiency wastewater treatment system according to claim 1, characterized in that, The water quality prediction error calculation module includes: The real value extraction submodule is used to extract the values ​​of each water quality status data from the structured dataset of the current time period as a sequence of real reference values; The difference calculation submodule is used to compare the predicted water quality index value corresponding to each control response parameter group with the real reference value in the real reference value sequence item by item, calculate the difference value according to the preset error assessment method, and generate error detail entries. The error set generation submodule is used to collect all error details and construct a prediction error set.

6. The high-efficiency wastewater treatment system according to claim 2, characterized in that, The label boundary generation submodule includes: The clustering algorithm selection unit is used to automatically select K-Means clustering or density-based DBSCAN clustering algorithm based on the distribution density, number of dimensions and number of samples of multi-dimensional time segment feature groups, classify the samples of each time segment, and obtain sample group sets corresponding to multiple cluster categories. Each sample group corresponds to a cluster number. The boundary extraction unit is used to extract the numerical range of all samples under each cluster number according to the sample group set, calculate its distribution interval, and use the quartile method to locate the upper and lower boundaries of the distribution interval to obtain the feature boundary range set under the corresponding cluster number. The boundary mapping unit is used to bind the feature boundary range under each cluster number to the center vector corresponding to that category based on the feature boundary range set, generate a boundary description vector, and form label boundary mapping data.

7. The high-efficiency wastewater treatment system according to claim 3, characterized in that, The nonlinear modeling submodule includes: The network structure definition unit is used to dynamically construct a feedforward neural network model containing an input layer, at least two hidden layers, and an output layer based on the input feature dimension and the number of target labels of the sample pair set controlled by time period. The loss function design unit is used to define the target loss function of the feedforward neural network as the cross-entropy loss between the predicted water quality status label and the actual label, and to introduce an L2 regularization term to constrain the model during the training process. The parameter training unit is used to perform model training operations based on the error backpropagation mechanism with an adaptive learning rate during the training process using the Adam optimizer. It dynamically adjusts the parameter weights and bias terms of each layer in the neural network to generate a nonlinear modeling network that represents the relationship between the control response parameter set and the water quality status label.

8. The high-efficiency wastewater treatment system according to claim 5, characterized in that, The difference calculation submodule includes: The weighted error calculation unit is used to linearly combine the predicted values ​​of water quality indicators with the actual reference values ​​according to the preset weights of pH, conductivity, dissolved oxygen, temperature and turbidity for each control response parameter group to generate a preliminary set of weighted average error values. The error suppression unit is used to penalize and weight the preliminary weighted average error values ​​that exceed the preset abnormal threshold based on the preliminary weighted average error value set, and generate the final weighted average error value set. The error entry generation unit is used to bind the final weighted average error value with the original control response parameter group based on the final weighted average error value set, and generate error detail entries.

9. A high-efficiency wastewater treatment system according to claim 7, characterized in that, The network structure definition unit includes: The neuron number estimation subunit is used to estimate the appropriate number of neurons in the hidden layer by combining the product relationship between the two and the square root logic, based on the number of input features and the number of output label categories in the control sample pair set for the time period, and to generate a set of structural configuration parameters for network initialization. The structure search subunit is used to select the combination with the smallest error from the candidate schemes that include multiple candidate hidden layer structures, activation function configurations and network depth combinations, using the validation set error ranking method, as the modeling structure scheme of the feedforward neural network. The structure configuration output subunit is used to write the structure configuration parameter set and modeling structure scheme into the control configuration file, which is then called by the nonlinear modeling submodule to initialize the feedforward neural network structure.

10. A high-efficiency wastewater treatment system according to claim 8, characterized in that, The weighted error calculation unit includes: The weight configuration generation sub-unit is used to assign an initial relative weight to each water quality indicator based on the degree of influence of control errors, treatment risk level and preset discharge standards of various water quality indicators in historical treatment records. The weight adjustment and optimization subunit is used to analyze the trend of prediction error of each water quality indicator in the current time period, use the attention mechanism to model the distribution of the influence of each water quality indicator, dynamically generate a set of error sensitivity weight vectors, and correct the initial relative weights accordingly to generate dynamic weighting factors. The weighted error output subunit is used to proportionally multiply and accumulate the prediction error values ​​of each water quality indicator according to the dynamic weighting factor, and generate a preliminary weighted average error value set.