Multi-parameter prediction method for effluent water quality and related device
By acquiring effluent water quality data and liquid level images from wastewater treatment equipment, quality assessment and adaptive weighted fusion are performed. Utilizing a dual-path feature fusion architecture and online incremental learning, the problems of data anomalies and model adaptability in wastewater effluent quality prediction are solved, achieving multi-parameter and multi-step synchronous prediction and improving the accuracy and robustness of the prediction.
Patent Information
- Application Number
- CN202610221141.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2025-05-21
- Filing Date
- 2026-02-24
- Publication Date
- 2026-06-16
Smart Images

Figure CN122221133A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wastewater treatment, and in particular to a multi-parameter prediction method and related equipment for wastewater effluent quality. Background Technology
[0002] With rapid urbanization and industrialization, the treatment and discharge of domestic and industrial wastewater have become increasingly serious problems. These issues not only directly affect residents' drinking water safety but also impact the improvement of the living environment and the sustainable use of water resources. Chemical oxygen demand (COD) and ammonia nitrogen are also relevant factors. Concentration is an important indicator for assessing water quality and accurately predicting COD and Concentration is crucial for timely adjustment, stable operation, and compliance with discharge standards in wastewater treatment.
[0003] However, existing technologies in the field of multivariate water quality prediction still face multiple challenges. Existing prediction methods often rely on a single data source, such as sensor monitoring data or image data, making it difficult to comprehensively reflect the complex changes in water quality. Furthermore, existing methods are typically based on fixed model structures and lack mechanisms for evaluating the quality of input data. When sensors drift or malfunction, abnormal data input into the model will distort the prediction results, but existing technologies struggle to identify and handle such data anomalies, reducing the reliability of the prediction system in actual operation.
[0004] More importantly, existing technologies are generally based on training models using historical data under specific operating conditions and then deploying them permanently, lacking the ability to adapt to changes in operating conditions. Conditions such as influent water quality, ambient temperature, and process parameters at wastewater treatment plants change over time, causing the predictive performance of models to gradually degrade. This necessitates data re-collection, offline training, and updates, resulting in long maintenance cycles and dependence on professional personnel, making it difficult to meet the requirements for continuous and stable operation of wastewater treatment. Furthermore, existing methods often focus on single-step predictions and lack the ability to predict multiple future time steps, making it difficult to support the early control of wastewater treatment processes.
[0005] Therefore, current methods for predicting wastewater effluent quality parameters have technical problems such as poor robustness to data anomalies, insufficient model adaptability, and lack of multi-step prediction capabilities, which need to be improved. Summary of the Invention
[0006] This application provides a multi-parameter prediction method and related equipment for wastewater effluent quality, which solves the problems of poor robustness to data anomalies and insufficient model adaptability in the prior art, and improves the accuracy and reliability of prediction.
[0007] To address the aforementioned technical problems, the embodiments of this application provide the following technical solutions:
[0008] This application provides a multi-parameter prediction method for wastewater effluent quality, comprising:
[0009] Acquire effluent quality data and wastewater level images from wastewater treatment equipment;
[0010] The effluent water quality data is assessed for quality, and data stability indicators and inter-sensor correlation indicators are calculated to identify abnormal data.
[0011] The color and texture features of the wastewater surface image are extracted and cross-validated with the effluent water quality data as a supplementary verification method for quality assessment, detecting anomalies and drift in the sensor data; the cross-validation results and the quality assessment results are used together for subsequent adaptive weighted fusion.
[0012] Based on the quality assessment results, the effluent water quality data and wastewater surface image are adaptively weighted and fused to generate multimodal data;
[0013] A trained prediction model is obtained, which adopts a dual-path feature fusion architecture. The prediction model processes the multimodal data and outputs prediction results for at least two parameters to be predicted.
[0014] Monitor prediction errors. When the mean absolute error of the sliding window exceeds a preset threshold, trigger online incremental learning of the model and update the model using new samples.
[0015] In one embodiment, the quality assessment in the aforementioned method includes: calculating the time rate of change of sensor data, and marking it as unstable data when the rate of change exceeds a preset threshold; calculating the correlation coefficient between sensors, and marking it as suspected drift data when the correlation coefficient deviates from the normal range.
[0016] In one embodiment, the aforementioned method performs adaptive weighted fusion based on the quality assessment results, including: reducing the fusion weight of data marked as unstable to a first preset value; reducing the fusion weight of data marked as suspected drift to a second preset value; maintaining the fusion weight of normal data at a standard value; and performing weighted fusion of the effluent water quality data and sewage surface image features based on the fusion weight to obtain the multimodal data.
[0017] In one embodiment, the extraction of the sewage surface image features in the aforementioned method includes: extracting the color features and texture features of the sewage surface image; the color features and texture features comprehensively reflect the working condition of the sewage and are used for cross-validation with sensor data.
[0018] In one embodiment, the extraction of color features and texture features in the aforementioned method includes:
[0019] Based on the color space, color features are extracted from the sewage surface image to obtain the color features;
[0020] Based on the local binary pattern, texture features are extracted from the sewage surface image to obtain the texture features.
[0021] In one embodiment, the online incremental learning in the aforementioned method includes:
[0022] Automatically cache newly added samples and historical key samples, wherein the historical key samples include samples whose prediction error exceeds a threshold;
[0023] The prediction model is trained in mini-batch using mixed samples; wherein the prediction model includes a network structure for temporal modeling (e.g., a temporal convolutional structure and a recurrent gating structure in a dual-path feature fusion architecture), and the online incremental learning can update all or some key parameters of the prediction model;
[0024] The model parameters are updated using a soft update method, and the updated model is deployed after successful verification.
[0025] In one embodiment, the aforementioned method processes the multimodal data through the prediction model, including: extracting feature information and time information from the multimodal data through the feature encoding module in the prediction model; and processing the feature information and time information through the prediction generation module in the prediction model to obtain a multi-parameter, multi-step synchronous prediction result.
[0026] In one embodiment, the feature encoding module in the aforementioned method adopts a dual-path parallel structure, including a short-term feature extraction path and a long-term feature extraction path; the short-term path captures the rapid fluctuation features of the data through a multi-scale convolutional structure, and the long-term path captures the long-term evolution trend of the data through a recurrent neural network structure; the outputs of the two paths are integrated through an adaptive fusion mechanism.
[0027] In one embodiment, the prediction generation module in the aforementioned method includes a context integration layer and a feature association layer; the context integration layer processes the encoded features through a temporal convolutional structure, and the cross-layer feature association mechanism associates the current state of the prediction generation module (as query Q) with the output of the feature encoding module (as key K and value V) through a query-key-value attention approach.
[0028] In one embodiment, the parameters to be predicted in the aforementioned method include chemical oxygen demand and ammonia nitrogen concentration.
[0029] Meanwhile, this application also provides a multi-parameter prediction device for wastewater effluent quality, which includes:
[0030] The acquisition module is used to acquire effluent water quality data and sewage level images from the sewage treatment equipment.
[0031] The evaluation module is used to evaluate the quality of the effluent water quality data, extract the color and texture features of the sewage surface image for cross-validation, and detect sensor drift.
[0032] The fusion module is used to adaptively weight and fuse the effluent water quality data and the sewage surface image based on the quality assessment results to generate multimodal data.
[0033] Call the module to obtain the trained prediction model;
[0034] The prediction module is used to process the multimodal data through the prediction model and output the prediction results of at least two parameters to be predicted.
[0035] The learning module is used to monitor prediction errors and trigger online incremental learning of the model when the error exceeds a preset threshold.
[0036] This application also provides a computer device including a processor and a memory, the memory storing a plurality of instructions adapted for loading by the processor to execute the steps of the above-described method. Additionally, this application provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute the steps of the above-described method.
[0037] Meanwhile, this application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium; the processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps in the above method.
[0038] Beneficial Effects: This application provides a multi-parameter prediction method and related equipment for wastewater effluent quality. The method includes: acquiring effluent quality data and wastewater surface images from wastewater treatment equipment; performing quality assessment and adaptive weighted fusion on the data to generate multimodal data; processing the multimodal data through a trained prediction model, wherein the prediction model adopts a dual-path feature fusion architecture capable of capturing features at multiple time scales; outputting prediction results for at least two parameters to be predicted; monitoring prediction errors and triggering online incremental learning of the model. Compared with current technologies, this application improves robustness to sensor anomalies through data quality assessment and adaptive fusion mechanisms; enables the model to continuously adapt to changes in operating conditions through online incremental learning mechanisms; and achieves multi-parameter, multi-step synchronous prediction of effluent quality, possessing advantages such as accurate prediction, strong robustness, and good adaptability. Attached Figure Description
[0039] The technical solution and its beneficial effects will become apparent from the following detailed description of specific embodiments of this application, in conjunction with the accompanying drawings.
[0040] Figure 1 This is a network diagram of the cloud system provided in the embodiments of this application;
[0041] Figure 2 This is a flowchart illustrating the multi-parameter prediction method provided in the embodiments of this application;
[0042] Figure 3 This is a schematic diagram of the structure of the multi-parameter prediction device provided in the embodiments of this application;
[0043] Figure 4 This is a schematic diagram of the multi-parameter prediction technique provided in the embodiments of this application;
[0044] Figure 5 This is a system schematic diagram of the multi-parameter prediction technology provided in the embodiments of this application;
[0045] Figure 6 This is a schematic diagram of the model provided in the embodiments of this application;
[0046] Figures 7 to 9 This is a schematic diagram of the model effect provided in the embodiments of this application;
[0047] Figure 10 This is a schematic diagram of the structure of the computer device provided in the embodiments of this application. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0049] In the description of the embodiments of this application, it should be understood that the terms "first," "second," etc., in the specification, claims, and drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be interchanged where appropriate so that the embodiments described herein can be implemented in an order other than that shown in the drawings or description. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion.
[0050] The methods involved in the embodiments of this application can be implemented by a server, specifically by a server in a cloud system. For example, wastewater quality data can be collected, processed, stored, and retrieved based on cloud technology, and the prediction model can be trained and updated online to ensure the effectiveness, timeliness, and reliability of data processing.
[0051] Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a collective term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies applied based on the cloud computing business model. It can form resource pools, providing flexible and convenient on-demand access. Cloud computing technology will become a crucial support. The backend services of cloud computing systems require substantial computing and storage resources, such as for training data.
[0052] The method provided in this application embodiment can be executed through a cloud system. For details, please refer to [link to relevant documentation]. Figure 1 , Figure 1 This is a network diagram of a cloud system provided in an embodiment of this application. The system may include a data terminal 101, a storage server 102, a business server 103, a training server 104, a data server 105, and a user terminal 106, wherein:
[0053] The terminal and the server can be connected directly or indirectly through wired or wireless communication, and this application does not impose any restrictions on this.
[0054] Data terminal 101 and user terminal 106 can be portable terminals such as smartphones, tablets, and laptops, or fixed terminals such as desktop computers and kiosks, but are not limited to these. Both data terminal 101 and user terminal 106 are service ports that users can use and operate. Data terminal 101 can be used to provide users with a window to log in to the storage service server for uploading data; user terminal 106 is mainly used to provide users with an operation window and display interface, and is also used to obtain, process, and display forecast data through business service 103.
[0055] There can be one or more storage servers 102, which are mainly used for storing training data, etc.
[0056] There can be one or more business servers 103, which are mainly used to acquire effluent water quality data and sewage surface images from sewage treatment equipment; perform quality assessment on the effluent water quality data and cross-validate it with the sewage surface images; perform adaptive weighted fusion based on the quality assessment results to generate multimodal data; acquire the trained prediction model; process the multimodal data through the prediction model and output the prediction results of at least two parameters to be predicted; monitor the prediction error and trigger online incremental learning of the model when necessary.
[0057] There can be one or more training servers 104, which are mainly used to train the model and update the model when online incremental learning is triggered.
[0058] There can be one or more data servers 105, mainly used for loading forecast data, etc.
[0059] In the embodiments of this application, each server can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, domain name services, security services, CDN, and big data and artificial intelligence platforms, or it can be a combination of multiple cloud servers.
[0060] In this embodiment, there may be one or more service servers 103, primarily used to acquire effluent water quality data and sewage level images from wastewater treatment equipment; perform quality assessment and adaptive weighted fusion on the data to generate multimodal data; acquire a trained prediction model; process the multimodal data through the prediction model to output prediction results for at least two parameters to be predicted; monitor prediction errors and trigger online incremental learning of the model. Compared with current technologies, this application improves robustness to sensor anomalies through data quality assessment and adaptive fusion mechanisms; enables the model to continuously adapt to changes in operating conditions through online incremental learning mechanisms; and achieves multi-parameter, multi-step synchronous prediction of effluent water quality, possessing advantages such as accurate prediction, strong robustness, and good adaptability.
[0061] It should be noted that, Figure 1 The network diagram of the cloud system shown is merely an example. The servers and scenarios described in this application embodiment are for the purpose of more clearly illustrating the technical solutions of this application embodiment and do not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the evolution of the system and the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.
[0062] With rapid urbanization and industrialization, the treatment and discharge of domestic and industrial wastewater has become an increasingly serious problem. Chemical oxygen demand (COD) and ammonia nitrogen are key pollutants. Concentration is a crucial indicator for assessing water quality, directly impacting not only the safety of drinking water for residents but also the improvement of the living environment and the sustainable use of water resources. Therefore, accurate prediction of COD and... Concentration is crucial for the timely adjustment, stable operation, and compliance with discharge standards in wastewater treatment. However, existing technologies in the field of multivariate water quality prediction still face multiple challenges and urgently require effective solutions.
[0063] This application proposes a multi-parameter prediction method for wastewater effluent quality, aiming to address multiple challenges existing in the prior art. For example... Figure 2 As shown, the method includes the following steps:
[0064] 201: Obtain the effluent water quality data of the wastewater treatment equipment and the wastewater surface image at the time corresponding to the effluent water quality data.
[0065] 202: Perform data quality assessment on the effluent water quality data and extract image features from the wastewater surface image; perform cross-validation on the effluent water quality data based on the image features, and perform adaptive weighted fusion of the effluent water quality data and the image features according to the data quality assessment results to generate multimodal data.
[0066] 203: Obtain the trained prediction model, which adopts a dual-path feature fusion architecture for multi-parameter prediction of multimodal data.
[0067] 204: Process the multimodal data using the prediction model and output the prediction results for at least two parameters to be predicted.
[0068] 205: Monitor the prediction error corresponding to the prediction result. When the average absolute error calculated based on the sliding window exceeds a preset threshold, trigger online incremental learning of the prediction model, update the prediction model weights, and generate updated prediction model parameters, which are used as the prediction model for the prediction of at least two subsequent parameters to be predicted.
[0069] That is, targeting COD and To address the concentration prediction problem, this application employs a prediction method based on multimodal data. This method acquires effluent water quality data and wastewater surface images, performs quality assessment and adaptive weighted fusion on the data to generate multimodal data, and then processes this multimodal data using a prediction model to predict at least two water quality parameters. By introducing an online incremental learning mechanism, the prediction model is updated when the prediction error meets preset conditions, thus enabling the prediction model to be continuously used for subsequent prediction tasks.
[0070] This method first assesses the quality of collected water quality sensor data by calculating data stability and inter-sensor correlation indices to identify abnormal data. Simultaneously, color and texture features are extracted from wastewater surface images, and these image features are cross-validated with corresponding water quality parameters to detect anomalies or drift in the sensor data. Color features can be obtained through color space analysis, and texture features can be obtained through methods such as local binary mode. Based on the quality assessment results, the water quality sensor data and image features are adaptively weighted and fused, and the fused data is aligned temporally to generate multimodal data. Subsequently, a prediction model based on a dual-path feature fusion architecture is used to process the multimodal data. Feature information and temporal information are extracted through the feature encoding module in the model, and the feature information is processed by the prediction generation module to predict at least two water quality parameters. When the prediction error meets preset conditions, the prediction model is updated through online incremental learning for subsequent prediction tasks.
[0071] Specifically, the prediction model employs a dual-path feature fusion architecture. It captures both rapid fluctuations and long-term evolutionary features of the data through parallel feature extraction paths, and then comprehensively processes these features using an adaptive fusion mechanism to output multi-parameter prediction results. After model deployment, the system monitors the prediction error corresponding to the prediction results. When the prediction error exceeds a preset threshold, an online incremental learning mechanism is triggered to update the model parameters using newly added samples.
[0072] Compared with existing technologies, the method in this application has different technical features in several aspects. First, by using data quality assessment and an adaptive weighted fusion mechanism, it achieves the identification and processing of abnormal sensor data, thereby enhancing the ability to respond to data anomalies. Second, through the generation and processing of multimodal data, wastewater surface image data and effluent water quality data can be used simultaneously for water quality parameter prediction. Third, by employing a dual-path feature fusion architecture to process multimodal data, the prediction model can model feature information at different time scales, thereby achieving multi-step synchronous prediction of multiple water quality parameters. Finally, through an online incremental learning mechanism, the prediction model is updated when the prediction error meets preset conditions, avoiding the performance degradation problem caused by long-term fixed prediction model parameters. This method can overcome the limitations of single-parameter prediction methods in existing technologies and is suitable for multivariate water quality prediction applications in wastewater treatment processes.
[0073] In summary, this application provides a method for predicting multiple parameters of wastewater effluent quality. By combining data quality assessment, adaptive weighted fusion, dual-path feature fusion architecture processing, and online incremental learning mechanism, it achieves the prediction of multiple water quality parameters and can update the prediction model when the prediction error meets preset conditions. It is suitable for application scenarios of wastewater treatment effluent quality prediction.
[0074] Furthermore, Figure 2 Based on effluent water quality data and wastewater surface images, multimodal data is generated, including: quality assessment of effluent water quality data and identification of abnormal data; acquisition of color and texture features of wastewater surface images; adaptive weighted fusion based on the quality assessment results, and alignment of color features, texture features, and effluent water quality data along the time dimension to obtain multimodal data.
[0075] This technical solution first assesses the quality of effluent water quality data, calculating the time-varying rate of sensor data as a stability indicator and the correlation coefficient between sensors as a correlation indicator. By acquiring color and texture features from wastewater surface images and cross-validating them with the effluent water quality data, sensor drift is detected based on the consistency analysis between image features and sensor data. Specifically, color features can be extracted based on color space, while texture features can be extracted based on Local Binary Pattern (LBP). Based on the quality assessment results, different data sources are weighted differently, maintaining standard weights for normal data and reducing the weights for abnormal data. These weighted features, aligned with the effluent water quality data over time, form a rich and reliable multimodal dataset, providing a more comprehensive and accurate data foundation for subsequent predictions.
[0076] Color features of wastewater surface images can be obtained through different color space conversion methods, such as RGB, HSV, or LAB color spaces. Texture feature extraction can be achieved by analyzing the local grayscale relationships of pixels in the image using Local Binary Pattern (LBP) to extract feature vectors reflecting the image's texture structure. These extracted color and texture features are then aligned with the effluent water quality data over time using methods such as interpolation and time series analysis to ensure data consistency at the same point in time.
[0077] Compared to existing technologies, this application utilizes a data quality assessment mechanism to effectively identify and process sensor anomalies, preventing erroneous data from contaminating the prediction model. By comprehensively utilizing the color and texture features of wastewater surface images, along with effluent water quality data, and performing adaptive weighted fusion based on the quality assessment results, high-quality multimodal data is generated, which can more comprehensively reflect water quality changes during wastewater treatment. Therefore, the prediction model can be trained and predicted based on more comprehensive, accurate, and reliable data, improving the accuracy, robustness, and reliability of predictions.
[0078] Furthermore, Figure 2 The acquisition of color and texture features from wastewater surface images includes:
[0079] Based on the color space, color features are extracted from the sewage surface image to obtain color features;
[0080] Texture features are extracted from sewage surface images based on Local Binary Pattern (LBP).
[0081] Color feature extraction methods can be implemented by converting the wastewater surface image to different color spaces, such as RGB, HSV, or Lab, and then extracting features such as color histograms and color moments from these color spaces. Specifically, the color features of the image can be described by calculating statistical characteristics such as the mean, variance, skewness, and kurtosis of each color channel, or by analyzing the distribution of the color histogram.
[0082] Texture feature extraction can be achieved using Local Binary Pattern (LBP). LBP describes the local texture pattern of an image by comparing the gray values of a central pixel with those of its neighboring pixels, generating a binary code. Specifically, for each pixel in the image, its gray value is compared with the gray values of its surrounding neighboring pixels. If the gray value of a neighboring pixel is greater than that of the central pixel, it is assigned a value of 1; otherwise, it is assigned a value of 0, thus forming a binary code sequence. By statistically analyzing the histogram distribution of the LBP codes, the texture features of a sewage surface image can be described, including texture uniformity, roughness, and directionality.
[0083] Color feature extraction and texture feature extraction describe the information of sewage surface images from different perspectives. Color features mainly reflect the color distribution of the image, while texture features reflect the local structure and pattern information of the image. By combining these two types of features, the feature information of sewage surface images can be described more comprehensively, which can be used to construct multi-parameter prediction models.
[0084] Compared to existing technologies, this application, by combining color and texture feature extraction methods, can more comprehensively capture information from sewage surface images, thereby improving the accuracy and reliability of multi-parameter prediction. Furthermore, by extracting texture features based on local binary patterns, the local structure and pattern information of the image can be effectively described, enhancing the model's sensitivity and adaptability to changes in the sewage surface.
[0085] Furthermore, Figure 2 The process involves using a prediction model to process multimodal data, including: extracting feature and temporal information from the multimodal data through a feature encoding module; and processing the feature and temporal information through a prediction generation module to obtain multi-parameter, multi-step synchronous prediction results.
[0086] The technical solution of this application aims to address the multiple challenges faced by existing technologies in multivariate water quality prediction, particularly the problem of simultaneous multi-step prediction of chemical oxygen demand (COD) and ammonia nitrogen concentration. By processing multimodal data through a dual-path feature fusion architecture, simultaneous prediction of multiple parameters can be performed based on the extraction of feature information and temporal information, thereby improving prediction accuracy and applicability.
[0087] The technical features of this application include: extracting feature information and temporal information from multimodal data through a dual-path feature encoding module, which employs a parallel structure to capture multi-timescale features of the data; and fusing the feature information through a prediction generation module, which achieves collaborative prediction of multiple parameters through a feature association mechanism. Thus, through the collaborative action of the feature encoding module and the prediction generation module, multi-parameter, multi-step synchronous prediction is achieved.
[0088] Specifically, the dual-path feature encoding module uses a parallel modeling structure to perform deep feature extraction and temporal information capture on multimodal data, ensuring the comprehensiveness of data features and the continuity of the temporal dimension. The prediction generation module, through a feature association mechanism, effectively processes and synthesizes the extracted feature information, ultimately outputting high-precision multi-parameter prediction results.
[0089] Compared with existing technologies, the advantages of this solution lie in its ability to simultaneously process multiple feature and temporal information, enabling multi-parameter, multi-step synchronous prediction and improving the accuracy and applicability of predictions. By adopting a dual-path feature fusion architecture, the potential information in multimodal data is fully explored, overcoming the problems of single-parameter prediction and high hardware costs in existing technologies, and providing an efficient and reliable multi-parameter prediction method.
[0090] Furthermore, in some embodiments, the feature encoding module adopts a dual-path parallel structure, including a short-term feature extraction path and a long-term feature extraction path; the short-term path captures the rapid fluctuation features of the data through a multi-scale convolutional structure, while the long-term path captures the long-term evolution trend of the data through a recurrent neural network structure.
[0091] The feature encoding module of this application employs dual-path parallel modeling to extract features from both the rapid changes and slow evolution of multimodal data. The two paths can extract feature information at different time scales, improving the processing capability for multimodal data. Through an adaptive fusion mechanism, the module can dynamically adjust the weights of the two paths based on temporal characteristics, achieving effective feature integration.
[0092] Specifically, short-term and long-term paths are used to extract feature information at different time scales. An adaptive fusion mechanism dynamically adjusts feature weights, ensuring the model selects the optimal feature combination based on the current data characteristics. In this way, the feature encoding module can more effectively extract feature and temporal information from multimodal data, improving prediction accuracy and robustness.
[0093] Compared with existing technologies, the dual-path feature encoding design of this application can simultaneously extract feature information at different time scales and further enhance the feature integration effect through an adaptive fusion mechanism, thereby improving the accuracy and applicability of multi-parameter prediction. Therefore, the feature encoding module proposed in this application can better handle complex water quality prediction tasks when processing multimodal data, achieving multi-parameter, multi-step synchronous prediction.
[0094] Furthermore, in some embodiments, the prediction generation module includes a context integration layer and a feature association layer; the context integration layer processes the encoded features through a temporal convolutional structure, and the feature association layer realizes feature interaction between the prediction end and the encoding end through a cross-layer attention mechanism.
[0095] In this technical solution, the prediction generation module processes feature information through context integration and cross-layer feature association. The context integration layer can effectively capture and process complex features and temporal dynamic changes in multimodal data. The cross-layer attention mechanism further enhances the feature correlation between the prediction and encoding ends, enabling the prediction module to actively query key historical features from the encoding end, thereby improving the accuracy and robustness of the prediction results.
[0096] The synergistic effect of the context integration layer and the feature association layer effectively integrates feature information from different time scales, thereby improving the model's ability to make simultaneous predictions across multiple steps. The cross-layer attention mechanism plays a crucial role in the prediction generation module, dynamically adjusting the weights between features during the prediction process, further enhancing the model's prediction accuracy.
[0097] Therefore, this application addresses the problem of insufficient accuracy in multi-step synchronous prediction in existing technologies by introducing context integration and cross-layer feature association mechanisms into the prediction generation module. Compared with existing technologies, the method of this application can more accurately predict multiple parameters in wastewater effluent quality, thus providing more reliable technical support for timely adjustment and stable operation of wastewater treatment.
[0098] Furthermore, in some embodiments, the parameters to be predicted include chemical oxygen demand and ammonia nitrogen concentration.
[0099] This application acquires effluent water quality data and wastewater surface images from wastewater treatment equipment to generate multimodal data. A trained prediction model is then used to process this data, thereby enabling the prediction of chemical oxygen demand (COD) and ammonia nitrogen concentrations. Specifically, the technical solution of this application extracts color and texture features from the wastewater surface images and aligns these features with the effluent water quality data along the time dimension to obtain multimodal data. Then, through the feature encoding module and prediction generation module in the prediction model, feature information and temporal information are extracted and processed from the multimodal data, ultimately achieving multi-step synchronous prediction of COD and ammonia nitrogen concentrations.
[0100] Based on an understanding of this application, its newly added technical features and steps can be further explained. First, chemical oxygen demand (COD) and ammonia nitrogen concentration are selected as parameters to be predicted, representing two crucial indicators in the wastewater treatment process. Second, the dual-path feature fusion architecture effectively extracts and processes various feature and temporal information, thereby improving the accuracy and reliability of the prediction. Specifically, the feature encoding module, through its dual-path parallel structure, fully mines the feature dependencies at different time scales in the data, while the prediction generation module, through a cross-layer feature association mechanism, further enhances the ability to synchronously predict multiple parameters at multiple steps.
[0101] Therefore, the technical solution proposed in this application can effectively solve the problem of insufficient single-parameter prediction and multi-step synchronous prediction capabilities in existing technologies. Through multimodal fusion processing of wastewater surface images and effluent water quality data, combined with the powerful feature extraction and processing capabilities of the dual-path feature fusion architecture, accurate prediction of chemical oxygen demand (COD) and ammonia nitrogen concentrations is achieved. This not only improves the monitoring and control capabilities of the wastewater treatment process but also provides strong support for achieving wastewater discharge standards.
[0102] Based on the content of the above embodiments, such as Figure 3 As shown, this application also proposes a multi-parameter prediction device for wastewater effluent quality, comprising:
[0103] The acquisition module 301 is used to acquire effluent water quality data and sewage level images from the sewage treatment equipment;
[0104] Processing module 302 is used to generate multimodal data based on effluent water quality data and sewage surface images;
[0105] Module 303 is called to obtain the trained prediction model;
[0106] The prediction module 304 is used to process multimodal data through a prediction model and output prediction results for at least two parameters to be predicted.
[0107] This technical solution involves acquiring effluent water quality data and wastewater surface images from wastewater treatment equipment, generating multimodal data, and processing it using a trained prediction model to output prediction results for at least two parameters. In this way, multi-parameter prediction of wastewater effluent quality can be achieved, particularly the prediction of chemical oxygen demand (COD) and ammonia nitrogen concentrations.
[0108] Specifically, the acquisition module is responsible for collecting effluent water quality data and wastewater surface images from the wastewater treatment equipment. The processing module combines this data to generate multimodal data. The calling module retrieves a pre-trained prediction model, and the prediction module uses this model to process the multimodal data to obtain prediction results for multiple parameters to be predicted.
[0109] This device is implemented by acquiring effluent water quality data and wastewater surface images from wastewater treatment equipment, generating multimodal data, and processing it through a trained prediction model. Furthermore, the processing module may include the extraction of color and texture features, and the prediction model may include the extraction and processing of feature information and temporal information.
[0110] Compared with existing technologies, the device of this application achieves multi-parameter prediction of wastewater effluent quality by combining multimodal data and a dual-path feature fusion prediction model, especially multi-step synchronous prediction of chemical oxygen demand and ammonia nitrogen concentration. This solves the problems of relying on a single parameter and high sensor cost in existing technologies, and improves the accuracy and practicality of prediction.
[0111] The present application will now be further described with reference to specific embodiments.
[0112] With rapid urbanization and industrialization, the treatment and discharge of domestic and industrial wastewater has become an increasingly serious problem. Chemical oxygen demand (COD) and ammonia nitrogen are key pollutants. Concentration is a crucial indicator for assessing water quality, directly impacting not only the safety of drinking water for residents but also the improvement of the living environment and the sustainable use of water resources. Chinese patent "CN101497260B" proposes an online COD concentration prediction system based on sensor monitoring data and a BP neural network model. This system collects sensor data in real time and makes predictions, providing a reference for water quality management. However, this method is highly dependent on sensors, resulting in high hardware costs and hindering widespread application. Furthermore, this technology can only predict based on a single parameter, making it difficult to meet the needs of multi-parameter joint prediction. Another example is Chinese patent "CN105629612A," which uses image processing technology to monitor wastewater treatment processes, visually reflecting water quality changes through image data analysis. While expanding data sources, it fails to fully exploit the potential of image features in water quality prediction, limiting the model's predictive performance and applicability. More importantly, none of the above technologies address the COD and... The ability to perform multi-step, simultaneous prediction is crucial for accurately understanding dynamic changes in water quality and achieving efficient wastewater treatment. Therefore, existing technologies still need further improvement in terms of practicality and performance.
[0113] To address the shortcomings of existing technologies, firstly, water quality parameters exhibit complex interactions and highly nonlinear variations, with data fluctuating significantly over time, posing a significant challenge to constructing high-precision prediction models. Especially in multi-parameter joint prediction and multi-step prediction, current research capabilities are insufficient to meet the demands for simultaneous, multi-step predictions in real-world wastewater treatment scenarios. This limitation significantly reduces the application value of soft sensing technologies in wastewater treatment. Secondly, most current water quality prediction methods heavily rely on expensive and frequently maintained COD and [other parameters]. Sensors pose a barrier to the application of wastewater treatment plants with limited resources (especially in economically underdeveloped areas or small wastewater treatment plants). The lack of sensors leads to insufficient water quality data collection, further increasing the risk of exceeding water quality discharge standards and making it more difficult for wastewater treatment plants to achieve compliance.
[0114] Given the deficiencies of the aforementioned background technology, the purpose of this application is to address the shortcomings of existing technologies in controlling chemical oxygen demand (COD) and ammonia nitrogen in wastewater treatment plants. To address the shortcomings of existing concentration prediction methods, a soft measurement method based on multimodal input and multi-step prediction is proposed. This method overcomes the deficiencies of existing methods in multi-parameter joint prediction, multi-step synchronous prediction, high cost, and insufficient stability under abnormal operating conditions.
[0115] Specifically, this invention constructs multimodal input data using low-cost water quality parameters and wastewater surface image data, thereby improving the ability to detect COD and... This invention improves the accuracy of soft-measurement prediction of concentration; secondly, by constructing a prediction model based on a dual-path feature fusion architecture, it effectively captures multi-timescale characteristics and nonlinear dynamic characteristics in time series, achieving multi-step synchronous prediction of target parameters; finally, it reduces the overall cost of the monitoring system by decreasing reliance on high-cost sensors. This invention provides a cost-effective and highly applicable solution for resource-constrained wastewater treatment plants, helping to improve the precise control capabilities of wastewater treatment processes, ensure water quality safety, and promote the sustainable use of water resources.
[0116] Figure 4 This is the main flowchart of the technical solution for this scenario, such as... Figure 4 As shown, the multi-step synchronous prediction method for wastewater quality parameters based on multimodal data proposed in this invention includes the following steps:
[0117] 401. Collect effluent water quality data and sewage level images from wastewater treatment plants.
[0118] To study the dynamic changes of key water quality parameters during wastewater treatment, such as Figure 5 As shown, this invention designs a 200-liter sequencing batch reactor (SBR) as the experimental platform. By collecting low-cost water quality sensor data (DO, pH, EC, ORP, SS, and water temperature) and wastewater surface images at the effluent end, this invention constructs a multimodal raw dataset to support the achievement of COD and The soft measurement model provides fundamental support.
[0119] 402. Data cleaning.
[0120] The collected water quality sensor data may be affected by noise, outliers, or missing data. Therefore, data cleaning is performed to ensure the quality of the model input data. The cleaning process includes outlier detection and removal, data imputation, and normalization to eliminate dimensional differences between different parameters and provide high-quality input data for subsequent modeling.
[0121] 403. Construct a multimodal dataset.
[0122] Color features (RGB and HSV normalized) and texture features (extracted via a local binary mode algorithm, see Formula 7-11) are extracted from the image and aligned with water quality sensor data to generate a multimodal dataset. Through multimodal data fusion, this invention overcomes the limitations of traditional soft sensing techniques for single-parameter prediction, innovatively achieving COD and... The simultaneous joint prediction of two key water quality parameters provides accurate predictive support for dynamic changes in complex water quality environments.
[0123] 404. Dataset partitioning.
[0124] The dataset generated in step 403 is divided into training, validation, and test sets in a 6:3:1 ratio. The training set is used for model training, the validation set is used for optimizing and tuning model parameters, and the test set is used to evaluate the final performance of the model.
[0125] 405. DPFF Model Construction and Validation.
[0126] The training set is input into a prediction model based on a dual-path feature fusion (DPFF) architecture for training, and the model parameters are optimized using a validation set. Finally, the test set is input into the optimized prediction model to obtain COD and The multi-step prediction results of key water quality indicators, such as the coefficient of determination (COP), are used to determine the COP. The root mean square error (RMSE) is used to evaluate the multi-step synchronous prediction performance of the model.
[0127] Furthermore, in 403, color features are primarily extracted from each image to describe the physical state of the wastewater surface, providing rich input information for the prediction of key water quality parameters. Color feature extraction involves using both RGB and HSV color spaces, calculating the red channel separately. ), green channel ( Blue Channel ) and color tone ( ), saturation ( ), brightness ( The normalized value of ) is given by the following formula:
[0128]
[0129]
[0130]
[0131]
[0132]
[0133]
[0134] In the formula, , , These represent the original values of the red, green, and blue channels of an image pixel, respectively. , , These represent the original values of hue, saturation, and brightness of a pixel, respectively. Performing the above normalization operation on the original image can help reduce the influence of ambient light on color features and more accurately reflect the distribution and changes in the color of the sewage surface.
[0135] Furthermore, in section 403, texture features are primarily extracted from each image to describe the physicochemical state of the wastewater surface. These texture features are extracted using the Local Binary Pattern (LBP) algorithm, including the basic LBP operator, rotation-invariant LBP, equivalent pattern LBP, LBP histogram features, and normalized LBP feature vectors. These features reflect the gray-level relationships and texture pattern distribution of local neighboring pixels in the image, and can describe the local microstructure and overall statistical properties of the texture.
[0136] The specific calculation formula is as follows:
[0137]
[0138]
[0139]
[0140]
[0141] In the above formula, This represents the grayscale value of the center pixel. Indicates the first The grayscale value of each neighboring pixel; This indicates the number of neighboring sampling points (usually 8, 16, or 24). Indicates the radius of the sampling circle; For a sign function, when The value is 1 if the condition is met, otherwise it is 0. This indicates a circular right shift operation, used to achieve rotation invariance; This indicates the number of transitions in the LBP pattern, used to determine whether it is an equivalent pattern; and These represent the number of rows and columns of the image, respectively. Indicates LBP mode Frequency of appearance in the image; This represents the total number of LBP patterns; For indicator functions, when The value is 1 if the condition is met, and 0 otherwise. The above texture features are obtained by circular sampling and binarization encoding of the local neighborhood of the sewage surface image using the LBP operator, extracting rotation-invariant and equivalent pattern features, comprehensively describing the local micro-patterns and overall statistical distribution characteristics of the texture in the sewage surface image, and comprehensively reflecting the spatial structural complexity of the sewage surface texture.
[0142] Furthermore, such as Figure 6As shown, the prediction model described above employs a dual-path feature fusion architecture (DPFF), comprising two core modules: the first module is a feature encoding module, used to extract features from multimodal input data and capture short-term fluctuations and long-term dependencies in the time series. The multimodal input data includes wastewater quality parameters and surface image features. Before being input into the feature encoding module, the data undergoes data quality assessment and adaptive weighting: the time change rate of the water quality sensor data is calculated as a stability indicator, and the correlation coefficient between sensors is calculated as a correlation indicator to identify unstable data and suspected drift data; color and texture features of the wastewater surface image are extracted and subjected to multi-dimensional consistency verification with the water quality sensor data; sensor drift is detected based on the synergistic analysis of image features and sensor data; and differentiated weighting is applied to each data source according to the quality assessment results, with normal data having a weight of 1.0, unstable data having a weight reduced to 0.3, and suspected drift data having a weight reduced to 0.5, generating high-quality multimodal input data. The weight values were determined through experimental optimization: although the suspected drift data has deviations, it still retains trend information, so the weight (0.5) is higher than that of the completely unstable data (0.3); the weight allocation follows the principle of "the higher the credibility, the greater the weight" to ensure the overall quality of the fused data.
[0143] The processed multimodal data is represented as follows , of which each This represents the quality-weighted feature vector at time step t, where N is the total dimension of the multimodal input features. The historical time window length used for prediction is specified. The feature encoding module includes two parallel processing paths: a short-term feature extraction path and a long-term dependency modeling path. This aims to balance computational efficiency with the ability to capture features at different time scales, thereby improving the accuracy of water quality parameter prediction. The short-term feature extraction path employs a multi-scale parallel convolutional structure, including three convolutional branches, each with a convolutional window length of [length to be specified]. The formula for short-term feature extraction is as follows: Adaptive weighted fusion is used to capture rapidly changing features at different time granularities.
[0144]
[0145] in, Indicates time step The short-term characteristic output, Indicates the window length is One-dimensional convolution operation, Indicates from time step arrive The input sequence, For the first Adaptive weight coefficients for each branch Feature Dimensions The threshold is set to 128, with each convolutional branch containing 64 kernels, maintaining computational efficiency while ensuring feature extraction capabilities. The long-term dependency modeling path employs a bidirectional gated memory structure, processing time series data in the forward and backward directions respectively to capture long-term trends and periodic patterns. The specific calculation formula is as follows:
[0146]
[0147]
[0148] in, and These represent the forward and reverse hidden state vectors, respectively. This represents a vector concatenation operation. This represents the long-term characteristics after bidirectional splicing. The GRU cell contains update gates. and reset door Historical information is selectively retained and updated through a gating mechanism. To improve the model's ability to represent nonlinear features, a short-run path is introduced. Activation functions are used to increase non-linearity; long-term paths utilize them. and The activation function performs gated computation and employs dropout regularization (dropout rate 0.1) to prevent overfitting and improve stability. Furthermore, residual connections mitigate the vanishing gradient problem, ensuring a stable gradient flow within the network.
[0149] Furthermore, the feature encoding module adaptively integrates short-term and long-term features through a gated fusion unit, further enhancing the comprehensive utilization of information at different time scales. The gated fusion unit, located at the output of the two parallel paths, dynamically evaluates the relative importance of short-term and long-term features. This unit first integrates the long-term features... By projecting the linear projection layer onto a space of the same dimension as the short-term features, we obtain... Then, by generating a fusion-gated weight vector By assigning appropriate weights to the two features, the feature fusion strategy can be flexibly adjusted according to the needs of the prediction task, thereby improving the model's adaptability to complex temporal patterns. The formula for calculating the fusion gate weights is as follows:
[0150]
[0151]
[0152] in, Represents the fusion gate weight vector. express Activation function The weight matrix is a learnable matrix. This represents the concatenation operation of short-term and long-term features (dimension 256). For bias vectors, This represents element-wise multiplication. Finally, the fused feature is obtained through gated weighted summation. This feature incorporates both short-term fluctuations and long-term trends. By integrating dual-path parallel processing and a gated fusion mechanism into the feature encoding module, the model can dynamically adjust the importance weights of features across multiple time scales. The short-term path demonstrates a higher responsiveness to predicting recent water quality mutations, while the long-term path exhibits stronger modeling capabilities for predicting periodic changes. Gated fusion automatically strikes a balance between the two based on the characteristics of the current data. This adaptive fusion mechanism significantly enhances the model's ability to capture complex temporal patterns, providing a robust feature foundation for simultaneous multi-parameter prediction.
[0153] Furthermore, such as Figure 6 As shown, the second module of the prediction model is the prediction generation module, which generates accurate multi-step synchronous prediction results based on the fused features extracted by the feature encoding module. The prediction generation module includes a context integration layer and a feature association layer. The context integration layer adopts a temporal convolutional structure, including two temporal convolutional units. The number of convolutional kernels in each layer is set to f=128, the kernel size to k=3, and the dilation rates of the two layers are set to d1=1 and d2=2, respectively, for temporal context integration of the encoded features. The feature association layer achieves feature interaction between the prediction and encoding ends through a cross-layer attention mechanism (see formulas 17-18). Here, "cross-layer" refers to the query vector coming from the prediction generation module, while the keys and values come from the output of the feature encoding module, thus enabling the decoder to dynamically focus on the encoder features. This design aims to balance model complexity and computational efficiency, while focusing on integrating and optimizing the feature information extracted by the feature encoding module. The prediction generation module integrates a cross-layer feature association mechanism, which not only optimizes the dependencies between target parameters but also, by combining soft measurement techniques, achieves better control over COD and... Multi-step prediction with equal parameters maintains high stability and accuracy over time, solving the error accumulation problem in long-term time-series predictions using traditional soft measurement techniques. The cross-layer feature association mechanism uses a query-key-value attention approach, treating the current state of the prediction generation module (as a query) as the key-value attention value. ) and the output of the feature encoding module (as key) Sum This involves associating features across layers to capture the complex dependencies between encoded features and the prediction target, thereby reducing the accumulation of prediction errors. Specifically, cross-layer feature association employs a multi-head structure, which... , , Projected to Different subspaces ( (Set to 8), attention is calculated independently for each subspace, using the following formula:
[0154]
[0155] in, It is the first Each attention head has a learnable weight matrix, and each matrix projects 128-dimensional features onto a 16-dimensional subspace. Represents the query matrix. Represents a key-value matrix. For the dimension of attention head, The function is normalized row-wise to ensure that the sum of the attention weights is 1. Then, the outputs of each attention head are concatenated with the linear layer for final integration, as shown in the following formula:
[0156]
[0157] in, The output projection matrix is a learnable matrix. Indicates splicing along the feature dimension The output of each attention head, each The dimensions after splicing are This mechanism enhances the prediction generation module's ability to model complex dependencies by allowing it to focus on multiple representation subspaces in the feature encoding output simultaneously, thus contributing to long-term prediction performance.
[0158] Furthermore, the prediction model effectively captures the interdependencies between target parameters by integrating a cross-layer feature association mechanism between the feature encoding module and the prediction generation module. Simultaneously, this mechanism models in both the temporal and feature dimensions, promoting information sharing between high-dimensional encoded features and each prediction target, thereby ensuring the consistency and balance of multi-parameter predictions. Specifically, the cross-layer feature association not only passes the global temporal context of the encoding module to the prediction module but also enables the prediction module to selectively focus on the encoded feature parts most relevant to the current prediction through a multi-head attention mechanism, achieving accurate feature matching and effective utilization. For multiple prediction targets such as chemical oxygen demand (COD) and ammonia nitrogen concentration, the cross-layer association mechanism can simultaneously model the correlation between each parameter and historical data, as well as the mutual influence between parameters, such as the degradation of COD during wastewater biological treatment. The nitrification process involves competition, and this mechanism can learn the dynamic balance between these parameters, improving the coordination of multi-parameter synchronous prediction.
[0159] The output of the prediction generation module is directly passed to the output layer, which performs dimensionality reduction through a fully connected layer, mapping the high-dimensional context features (128 dimensions) to the future. COD at each time step and Predicted value, i.e. ,in For the prediction step size (usually set to 10-20 steps), 2 represents two objective parameters (COD and ...). The fully connected layer consists of two linear transformations: the first layer maps the 128-dimensional features to a 64-dimensional intermediate representation and performs ReLU activation; the second layer maps the 64-dimensional intermediate representation to... The final predicted output of the dimension. By minimizing the predicted value. Compared with the true value loss function between The model is continuously optimized during training to improve prediction accuracy. The loss function uses the mean squared error (MSE) form:
[0160]
[0161] in, Indicates the first The first time step The predicted values of each parameter, This represents the corresponding actual value. The number of time steps to predict. Corresponding to COD and Two parameters. Model training uses the Adam optimizer (learning rate set to 0.001, momentum parameter...). The batch size was set to 32, and the training epochs were 100. An early stopping strategy was implemented by monitoring the loss function value on the validation set to prevent overfitting. Ultimately, a COD-based system based on soft measurement was achieved. Multi-step synchronous prediction.
[0162] This application constructs a time series prediction model based on dual-path feature fusion, utilizing multimodal data to achieve multi-step synchronous prediction of key water quality parameters. By fusing low-cost water quality parameters with wastewater surface image features, it significantly improves the model input quality and prediction accuracy, reducing reliance on high-cost sensors. The feature encoding module employs parallel processing via short-term multi-scale convolution and long-term gated memory to capture rapid fluctuations and long-term trends in water quality, respectively. A gated fusion mechanism is combined to adaptively integrate short-term and long-term features, optimizing the comprehensive utilization of information across multiple time scales. The prediction generation module integrates encoded features through a cross-layer feature association mechanism, capturing COD and... By analyzing the correlation between parameters, this invention enables simultaneous prediction of multiple parameters, ensuring accurate and stable results. It effectively reduces monitoring costs, supports multi-time-step prediction, and, through a dual-path architecture and adaptive fusion strategy, outperforms traditional methods in both accuracy and stability. Suitable for resource-constrained wastewater treatment scenarios, it provides an economical and efficient solution for water quality management and sustainable resource utilization.
[0163] This application designed three scenarios when verifying model performance:
[0164] The image scene uses only the color and texture features of the sewage surface image as input;
[0165] In water quality scenarios, predictions are made using only data collected by water quality sensors.
[0166] The system integrates wastewater surface image features with water quality sensor data to perform predictions using multimodal data.
[0167] like Figure 7 As shown, in the fusion scenario, the prediction accuracy of the DPFF model is significantly better than that of other scenarios and traditional models. In the 10-step prediction, COD and of The accuracy reached 0.94 and 0.95 respectively, representing an improvement of approximately 52% compared to single-modal scenarios. In the 20-step prediction, The decrease of only 1.77% demonstrates excellent long-term predictive stability. This indicates that the present invention effectively improves prediction accuracy and robustness through multimodal data fusion and attention mechanisms, providing reliable support for multi-step water quality prediction.
[0168] In multi-step prediction, the DPFF model exhibits significantly lower error accumulation than traditional models. For example, in 20-step prediction, the DPFF model's COD and... The mean squared errors (RMSE) of the two models were 13.5 mg / L and 0.35 mg / L, respectively, while the errors of the CNN-LSTM model were as high as 30.08 mg / L and 0.66 mg / L, respectively, representing error reductions of 55.1% and 47.0%. Compared with the baseline model, this invention significantly reduced error growth, improved multi-step prediction performance, and effectively addressed the needs of complex dynamic changes in water quality. Furthermore, in fusion scenarios, the DPFF model exhibited higher consistency in multi-parameter predictions. In 20-step predictions, COD and... of The difference was only 1.88%, while the difference for traditional models such as RNN and LSTM ranged from 6.50% to 9.42%, indicating that the DPFF model can better balance the prediction accuracy among multiple parameters. This consistency further verifies the superior performance and stability of this invention in multi-parameter simultaneous prediction.
[0169] like Figure 8 As shown, in the fusion scenario, by comparing the predicted values with the actual values, the DPFF model demonstrates a significant advantage in multi-step prediction. In the medium-term prediction (10 steps), the model's predicted values are in high agreement with the actual values, especially in the emission phase (time index: 120-140), COD and The mean errors were 10.34 mg / L and 0.23 mg / L, respectively, significantly lower than the baseline model. In long-term prediction (20 steps), the COD and [missing data] of the DPFF model were [missing data]. The average errors remained below 13.5 mg / L and 0.35 mg / L, respectively, demonstrating strong predictive stability and robustness. In contrast, TCN and CNN-LSTM models exhibited significant predictive lag, while LSTM and RNN struggled to accurately capture the upward trend in pollutant concentrations, further highlighting the predictive performance advantages of this invention.
[0170] like Figure 9 As shown, the DPFF model, through its dual-path feature fusion architecture and cross-layer feature association mechanism, not only improves prediction accuracy but also significantly enhances computational efficiency. In fusion scenarios, its average computation time is 3.22 seconds, approximately 35% shorter than CNN-LSTM's 5.01 seconds, meeting the requirements for real-time prediction. This efficiency satisfies the need for real-time prediction in practical applications, providing strong technical support for the intelligent and efficient management of wastewater treatment.
[0171] Accordingly, embodiments of this application also provide a computer device, which includes a server or a terminal, etc.
[0172] like Figure 10 As shown, the computer device may include a processor 1001 with one or more processing cores, a memory 1002 including one or more computer-readable storage media, an input unit 1003, a display unit 1004, a Wi-Fi module 1005, a power supply 1006, and radio frequency (RF) circuitry 1007, among other components. Those skilled in the art will understand that... Figure 10 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0173] The processor 1001 is the control center of the computer device. It connects various parts of the mobile phone through various interfaces and lines. It performs various functions of the computer device and processes data by running or executing software programs and / or modules stored in the memory 1002 and calling data stored in the memory 1002.
[0174] The memory 1002 can be used to store software programs and modules. The processor 1001 executes various functional applications and data processing by running the software programs and modules stored in the memory 1002. The input unit 1003 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0175] The display unit 1004 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of computer devices, which can be composed of graphics, text, icons, videos, and any combination thereof.
[0176] Wi-Fi is a short-range wireless transmission technology. Computer devices using the Wi-Fi module 1005 can help users send and receive emails, browse web pages, and access streaming media, providing users with wireless broadband internet access. Although Figure 10 Wi-Fi module 1005 is shown, but it is understood that it is not an essential component of computer equipment and can be omitted as needed without changing the nature of the application.
[0177] The computer device also includes a power supply 1006 (such as a battery) that supplies power to various components. Preferably, the power supply can be logically connected to the processor 1001 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system.
[0178] The radio frequency circuit 1007 can be used to receive and transmit signals during information transmission or calls. In particular, it receives downlink information from the base station and hands it over to one or more processors 1001 for processing; in addition, it transmits uplink data to the base station.
[0179] Although not shown, the computer device may also include a Bluetooth module, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 1001 in the computer device loads the executable files corresponding to the processes of one or more applications into the memory 1002 according to the following instructions, and the processor 1001 runs the applications stored in the memory 1002.
[0180] For example, by placing the computer device on the server side, the following functions can be achieved:
[0181] Acquire effluent quality data and wastewater level images from wastewater treatment equipment;
[0182] The effluent water quality data is assessed for quality and cross-validated with the wastewater surface image;
[0183] Adaptive weighted fusion is performed based on the quality assessment results to generate multimodal data;
[0184] Obtain the trained prediction model;
[0185] The multimodal data is processed by the prediction model to output prediction results for at least two parameters to be predicted.
[0186] Monitor prediction errors and trigger online incremental learning of the model when the error exceeds a preset threshold.
[0187] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the detailed description above, and they will not be repeated here.
[0188] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0189] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor and used on the server side to implement the following functions:
[0190] Acquire effluent quality data and wastewater level images from wastewater treatment equipment;
[0191] The effluent water quality data is assessed for quality and cross-validated with the wastewater surface image;
[0192] Adaptive weighted fusion is performed based on the quality assessment results to generate multimodal data; the trained prediction model is then obtained.
[0193] The multimodal data is processed by the prediction model to output prediction results for at least two parameters to be predicted.
[0194] Monitor prediction errors and trigger online incremental learning of the model when the error exceeds a preset threshold.
[0195] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0196] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0197] Since the instructions stored in the storage medium can execute the steps of any of the methods provided in the embodiments of this application, the beneficial effects that any of the methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0198] Meanwhile, embodiments of this application provide a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium.
[0199] The processor of the computer device reads the computer instructions from a computer-readable storage medium, executes the computer instructions, and causes the computer device to perform the methods provided in the various optional implementations described above. For example, the following functions can be implemented:
[0200] Acquire effluent quality data and wastewater level images from wastewater treatment equipment;
[0201] The effluent water quality data is assessed for quality and cross-validated with the wastewater surface image;
[0202] Adaptive weighted fusion is performed based on the quality assessment results to generate multimodal data;
[0203] Obtain the trained prediction model; process the multimodal data using the prediction model, and output the prediction results for at least two parameters to be predicted;
[0204] Monitor prediction errors and trigger online incremental learning of the model when the error exceeds a preset threshold.
[0205] The above provides a detailed description of a method, apparatus, computer equipment, and storage medium for predicting multiple parameters of wastewater effluent quality according to embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the technical solutions and core ideas of this application, and are not intended to limit them. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
Claims
1. A multi-parameter prediction method for wastewater effluent quality, characterized in that, include: Acquire effluent quality data and wastewater level images from wastewater treatment equipment; The effluent water quality data is assessed for quality, and data stability indicators and inter-sensor correlation indicators are calculated to identify abnormal data. Extract the color and texture features of the wastewater surface image, cross-validate them with the effluent water quality data, and detect anomalies and drifts in the sensor data. Based on the quality assessment results and drift detection results, the effluent water quality data and sewage surface image features are adaptively weighted and fused to generate multimodal data; Obtain the trained prediction model, which adopts a dual-path feature fusion architecture; The multimodal data is processed by the prediction model to output prediction results for at least two parameters to be predicted. Monitor the prediction error of the prediction results, and trigger online incremental learning of the prediction model when the prediction error meets preset conditions.
2. The multi-parameter prediction method according to claim 1, characterized in that, Generating multimodal data includes: Obtain the color and texture features of the sewage surface image; Based on the quality assessment results and drift detection results, the color features, texture features, and effluent water quality data are adaptively weighted; Align the weighted features along the time dimension: For each sensor data timestamp, use nearest neighbor matching or linear interpolation to obtain the image features at the corresponding time, generating multimodal data with consistent time series length.
3. The multi-parameter prediction method according to claim 2, characterized in that, Obtaining the color and texture features of the wastewater surface image includes: Based on the color space, color features are extracted from the sewage surface image to obtain the color features; Based on the local binary pattern, texture features are extracted from the sewage surface image to obtain the texture features.
4. The multi-parameter prediction method according to claim 1, characterized in that, Processing the multimodal data through the prediction model includes: The feature encoding module in the prediction model extracts feature information and temporal information from the multimodal data. The prediction generation module in the prediction model processes feature information and time information to obtain multi-parameter, multi-step synchronous prediction results.
5. The multi-parameter prediction method according to claim 4, characterized in that, The feature encoding module adopts a dual-path parallel structure, including a short-term feature extraction path and a long-term feature extraction path; The short-term path captures the rapid fluctuation characteristics of the data through a multi-scale convolutional structure, while the long-term path captures the long-term evolution trend of the data through a recurrent neural network structure.
6. The multi-parameter prediction method according to claim 4, characterized in that, The prediction generation module includes a context integration layer and a feature association layer; the context integration layer processes the encoded features through a temporal convolutional structure, and the feature association layer realizes feature interaction between the prediction end and the encoding end through a cross-layer attention mechanism.
7. The multi-parameter prediction method according to any one of claims 1 to 6, characterized in that, The parameters to be predicted include chemical oxygen demand and ammonia nitrogen concentration.
8. A multi-parameter prediction device for wastewater effluent quality, characterized in that, include: The acquisition module is used to acquire effluent water quality data and sewage level images from the sewage treatment equipment. The evaluation module is used to evaluate the quality of the effluent water quality data, extract the color and texture features of the sewage surface image for cross-validation, and detect sensor drift. The fusion module is used to adaptively weight and fuse the effluent water quality data and sewage surface image features based on the quality assessment results and drift detection results to generate multimodal data; Call the module to obtain the trained prediction model; The prediction module is used to process the multimodal data through the prediction model and output the prediction results of at least two parameters to be predicted. The learning module is used to monitor prediction errors and trigger online incremental learning of the model when the error exceeds a preset threshold.
9. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a plurality of instructions adapted for loading by the processor to perform the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a plurality of instructions adapted for loading by a processor to perform the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Printing press having an anilox inking unit with an associated washing device
CN101497260B
Thin film transistor array substrate and making method thereof
CN105629612A