Automatic arrangement and analysis method for sewage treatment water quality and water quantity multi-source data

By using a layered modular architecture, the automated processing of wastewater quality and quantity data is achieved, solving the problems of low efficiency, large errors, and poor reusability of traditional manual processing. This enables efficient and accurate data analysis and report generation, meeting the needs of refined operation of wastewater treatment plants.

CN123178488APending Publication Date: 2026-11-27YANGTZE ECOLOGY & ENVIRONMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611069674.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-17
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

The water quality and quantity data of existing wastewater treatment plants are stored in a scattered manner in the form of multiple Excel files and worksheets. Traditional manual processing is inefficient, has large errors, poor reusability, cannot achieve full-process automation, and is difficult to meet the needs of refined operation.

Method used

It adopts a layered and modular architecture, including a configuration rule layer, a data processing and analysis layer, and a result output layer. Through rule configuration initialization, automatic loading of multi-source data, header recognition and indicator standardization, automatic creation of date index, data aggregation and statistical analysis, trend visualization and result export, it realizes fully automated data processing and analysis.

Benefits of technology

Data integration efficiency is improved by more than 90%, the analysis cycle is shortened to a few minutes, indicators are automatically standardized, data is accurate and traceable, multi-scale analysis is supported, standard charts and reports are automatically generated, the threshold for data application is lowered, and core code can be adapted to changes in indicators without modification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178488A_ABST
    Figure CN123178488A_ABST
Patent Text Reader

Abstract

The application provides a sewage treatment water quality and quantity multi-source data automatic arrangement and analysis method, and belongs to the technical field of sewage treatment data processing.The application adopts a layered architecture of a rule configuration layer, a data processing and analysis layer and an achievement output layer, follows the principle of not changing the existing reporting habits, and sequentially executes rule configuration initialization, multi-source Excel data automatic loading, table header identification and index standardization, date index construction, multi-scale data aggregation analysis, trend visualization and standardized achievement export steps.The application embeds special calculation formulas for daily, monthly and annual average, compliance rate and standard deviation, can automatically integrate multi-file and multi-worksheet data, unifies index names, completes full-scale analysis and generates standard charts and Excel reports.The application does not need to change the existing reporting habits, improves data processing efficiency, eliminates manual errors, directly supports process optimization and operation decision-making, and is suitable for automatic management and analysis of water quality and quantity data of various sewage treatment plants.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of wastewater treatment data processing technology, and in particular to an automatic sorting and analysis method for multi-source wastewater quality and quantity data. Background Technology

[0002] In the daily operation of wastewater treatment plants, water quality and quantity data are the core basis for process optimization, environmental compliance control, and management decisions. Currently, this data is stored in multiple Excel files and worksheets, and traditional manual processing has three major drawbacks: first, low efficiency, as manually merging data is time-consuming and labor-intensive, unable to quickly respond to analytical needs; second, large errors, as manually standardizing indicator names and converting formats can easily lead to data deviations; and third, poor reusability, as analytical results lack unified standards, making traceability and long-term comparison difficult. Existing technologies cannot achieve fully automated processing and cannot meet the needs of refined wastewater treatment plant operations. Summary of the Invention

[0003] This invention proposes an automatic data processing and analysis method for multi-source wastewater quality and quantity data. This method follows the principles of not changing existing reporting habits, being application-oriented, and fully automating the entire process. It adopts a layered modular architecture consisting of a configuration rule layer, a data processing and analysis layer, and a result output layer. The entire process can be automated to process and analyze water quality and quantity data without human intervention.

[0004] To achieve the above objectives, the present invention adopts the following technical solution: An automatic data processing and analysis method for multi-source wastewater quality and quantity data is proposed. The method consists of six consecutive steps: rule configuration initialization, automatic loading of multi-source data, header identification and indicator standardization, automatic date index creation, data aggregation and statistical analysis, trend visualization and result export.

[0005] Rule configuration initialization is completed through an independent configuration file. The configuration file centrally manages the English-Chinese mapping rules of water quality indicators, the configuration of derived indicators, and the drawing style specifications. It also includes built-in influent and effluent dimension identifiers, indicator alias matching library, and date, datetime time recognition keyword library, providing a unified basis for subsequent data standardization processing.

[0006] In the multi-source data automatic loading process, the system automatically scans .xlsx and .xls format Excel files in the specified directory, automatically skips irrelevant worksheets such as directories and descriptions, batch reads valid data and removes duplicate data and invalid records, and realizes one-click integration of multi-source data.

[0007] In the header identification and indicator standardization process, the system automatically detects the data header rows, accurately identifies the inlet and outlet water dimension identifiers, and uniformly names and deduplicates similar non-standard indicators according to preset rules to ensure data consistency.

[0008] In the automatic date index creation process, the system filters date-related columns in the data, automatically parses various common date formats, and builds a time index specifically for time series analysis, providing a foundation for multi-scale data aggregation.

[0009] The data aggregation and statistical analysis process employs a three-tiered aggregation calculation method: daily, monthly, and annual. The formula for the daily average indicator is as follows: The formula for the monthly indicator average is: The formula for the annual indicator average is: , where X i This is a single monitoring value within the day. n This represents the total number of monitoring sessions conducted within the day. m This represents the number of valid monitoring days for the current month. k This represents the number of months of effective monitoring in the current year; simultaneously, the indicator characteristics of the compliance rate and standard deviation are calculated, with the compliance rate calculated using the following formula: The formula for calculating the standard deviation is: N 达标 N is the number of times the indicator meets the monitoring target. 总 Total number of monitoring sessions This represents the average value of the indicators at the corresponding time scale; it comprehensively quantifies the level of indicators and the characteristics of data fluctuations.

[0010] The trend visualization process automatically generates daily, monthly, and annual multi-dimensional water quality indicator trend charts and influent / effluent indicator comparison charts. The chart size, font, and resolution are all generated according to the preset parameters in the configuration file to ensure a unified and standardized display format.

[0011] The results export process automatically generates standardized Excel files containing raw data, aggregated results, and statistical analysis reports. These files can be directly used for data archiving, operational reporting, and process decision support.

[0012] This method is implemented based on a layered architecture. When adding or adjusting monitoring indicators, only the contents of the configuration file need to be updated to complete the adaptation. There is no need to modify the core processing code. It has good adaptability and scalability and can effectively solve the technical problems of low efficiency, large error and poor reusability of traditional manual processing mode.

[0013] Compared with the prior art, the present invention has the following beneficial effects: 1. Data integration efficiency is improved by more than 90%, the analysis cycle is shortened to a few minutes, and the entire process replaces manual copying, pasting and statistical operations. 2. Automatic standardization and matching of indicators eliminates name confusion and human calculation errors, ensuring accurate and traceable data to support precise process control; 3. Supports multi-scale analysis at daily, monthly, and yearly levels, taking into account both short-term data anomaly detection and long-term trend assessment, covering the operational analysis needs of all scenarios; 4. Automatically generates standard charts and structured Excel reports, which can be used directly for reporting, archiving, and decision-making, lowering the threshold for data application; 5. It adopts a configurable layered design, which can adapt to changes in indicators and expansion of functions without modifying the core code, making it easy for the system to iterate and upgrade. Attached Figure Description

[0014] The present invention will be further described below with reference to the accompanying drawings and embodiments: Figure 1 This is a schematic diagram illustrating the automatic integration of data from multiple Excel spreadsheets and worksheets according to an embodiment of the present invention. Figure 2 This is a schematic diagram illustrating the automatic standardization and matching of water quality indicators in an embodiment of the present invention. Figure 3 This is a daily water quality index trend chart according to an embodiment of the present invention; Figure 4 This is a comparison trend chart of monthly influent and effluent indicators in an embodiment of the present invention; Figure 5 This is a comparison chart of annual influent and effluent water index trends according to an embodiment of the present invention; Figure 6 The system automatically exports standardized Excel files for embodiments of the present invention. Detailed Implementation

[0015] The specific embodiments of the present invention will be further described in detail with reference to the accompanying drawings.

[0016] This method is deployed on an industrial-grade server with a 4-core CPU, 8GB of memory, and 500GB of high-speed storage. The operating system is Windows Server 2019 or CentOS 7.6, and the programming environment is Python 3.8 or later. It is equipped with pandas 1.3.0 data processing library, matplotlib 3.4.0 visualization library, and openpyxl 3.0.0 Excel operation library. The system is divided into three modules according to function: configuration rule layer, data processing and analysis layer, and result output layer. The configuration rules layer corresponds to the `config.py` file, which serves as the core dictionary of the system. It uniformly manages the English-Chinese mapping rules for water quality indicators, the configuration of derived indicators, and the specifications for plotting styles. It presets standard indicator names such as `COD_Influent` and `TN_Effluent`, and defines style parameters such as plotting canvas size, font, and resolution. The data processing and analysis layer consists of `data_loader.py` and `analyzer.py`, which serve as the core processing engine of the system. `data_loader.py` is responsible for loading raw water quality data and parsing date formats, while `analyzer.py` implements daily, monthly, and annual three-level aggregation of data and calculation of indicator statistical features. The output layer consists of `plotter.py` and `exporter.py`. `plotter.py` draws water quality indicator trend charts based on aggregated analysis data, while `exporter.py` generates an Excel file containing raw data statistics and plotted aggregated data statistics.

[0017] After system startup, the first step is to initialize rule configuration. The `config.py` file presets the indicator matching rules, date recognition keywords, and plotting styles, establishing an alias matching library for ammonia nitrogen (NH3N, NH3_N) and influent COD (COD). Simultaneously, `date`, `date`, and `datetime` are set as date recognition keywords. The system then automatically scans the specified data storage directory, reading all water quality and quantity data files in `.xlsx` and `.xls` formats, automatically skipping irrelevant worksheets such as directories and descriptions, and combining... Figure 1 The system integrates 1827 valid monitoring data entries from 5 raw data files and 60 worksheets into a unified structured dataset. The system automatically detects each data table header row, accurately identifies the influent and effluent dimension identifiers, and combines this with... Figure 2 According to the configuration rules, COD influent and COD in the influent are unified as COD_Influent, and ammonia nitrogen effluent and NH3_N_ effluent are unified as NH3N_Effluent, completing the standardized naming and deduplication of similar indicators. The system automatically filters date-related columns in the data, parses various common date formats such as year-month-day and month / day / year, and constructs a continuous and complete time index to support subsequent time series aggregation analysis.

[0018] Based on time indexing, the system performs daily, monthly, and annual data aggregation calculations. It calculates the averages at each level using complete formulas for daily, monthly, and annual indicator averages. Simultaneously, it uses a complete formula for compliance rate to determine the environmental compliance of indicators and a complete formula for standard deviation to characterize the degree of water quality data fluctuation. All calculations are fully automated. After the aggregation analysis is completed, the system automatically generates... Figure 3 The chart showing the daily trend of COD influent concentration in January 2023 is shown below. Figure 4 The chart showing the monthly trends of COD and BOD5 inflows and outflows in 2024 is shown below. Figure 5 The annual trend chart of ammonia nitrogen influent and effluent from 2021 to 2024 shown is generated strictly according to the preset parameters in config.py. Finally, the system automatically exports a standardized Excel file via exporter.py. This file contains complete statistical information, including raw monitoring data, aggregation results at each level, mean, median, compliance rate, and standard deviation. This information can be directly used for operational reporting, data archiving, and process adjustment decisions, significantly improving data reuse efficiency. Figure 6 As shown.

[0019] This method only requires updating the `config.py` configuration file when adding or adjusting monitoring indicators, without modifying the core processing code in `data_loader.py`, `analyzer.py`, `plotter.py`, and `exporter.py`. It can quickly adapt to the changing monitoring indicator needs of different wastewater treatment plants. Its working principle is to unify data standards through configurable rules, and collaboratively complete the entire process of data loading, cleaning, standardization, aggregation calculation, visualization, and result export through a layered modular architecture. It replaces traditional manual operations with procedural technology, fundamentally solving the technical problems of low efficiency, large errors, and poor reusability of manual processing of wastewater treatment water quality and quantity data. It transforms fragmented raw data into effective information that can directly support operational decisions and process optimization.

[0020] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. An automatic data processing and analysis method for multi-source wastewater quality and quantity data in wastewater treatment, characterized in that, Includes the following steps: Rule configuration initialization, preset indicator matching rules, date recognition keywords and plotting styles; Automatic loading of multi-source data; batch reading of water quality and quantity data files in a specified directory. Header recognition and indicator standardization: Automatically recognizes headers and standardizes non-standard indicator names into standard names; Date indexes are automatically created by parsing date formats and building time indexes. Data aggregation and statistical analysis, completing data aggregation and indicator feature calculation across multiple time scales; Trend visualization and results export: automatically generate analytical charts and export standardized data files.

2. The automatic processing and analysis method for multi-source data on wastewater quality and quantity in wastewater treatment as described in claim 1, characterized in that, The rule configuration initialization is achieved through a configuration file that centrally manages the English-Chinese mapping rules for water quality indicators, the configuration of derived indicators, and the drawing style specifications. The configuration file includes influent and effluent dimension identifiers, an indicator alias matching library, and a time recognition keyword library.

3. The automatic processing and analysis method for multi-source data on wastewater quality and quantity as described in claim 1, characterized in that, The multi-source data is automatically loaded and scanned in the specified directory for .xlsx and .xls format Excel files, skipping directories and description-related worksheets, batch reading valid data and removing duplicate data and invalid records.

4. The automatic processing and analysis method for multi-source data on wastewater quality and quantity in wastewater treatment as described in claim 1, characterized in that, The meter header identification and indicator standardization automatic detection of meter header rows identifies inlet and outlet water dimension identifiers, and uniformly names and deduplicates similar non-standard indicators according to preset rules.

5. The automatic processing and analysis method for multi-source data on wastewater quality and quantity in wastewater treatment as described in claim 1, characterized in that, The date index automatically creates date-related columns in the filtered data, automatically parses various date formats, and constructs a dedicated time index for time series analysis.

6. The automatic processing and analysis method for multi-source data on wastewater quality and quantity in wastewater treatment as described in claim 5, characterized in that, The data aggregation employs a three-level aggregation calculation method: daily, monthly, and annual. The formula for calculating the daily average index is as follows: The formula for calculating the monthly indicator average is as follows: The formula for calculating the annual average indicator is: ; where X i This is a single monitoring value within the day. n This represents the total number of monitoring sessions conducted within the day. m This represents the number of valid monitoring days for the current month. k This represents the number of months that were effectively monitored in that year.

7. The automatic processing and analysis method for multi-source data on wastewater quality and quantity in wastewater treatment as described in claim 1, characterized in that, The calculation of the indicator characteristics includes the pass rate and standard deviation. The formula for calculating the pass rate is as follows: The formula for calculating the standard deviation is: N 达标 N is the number of times the indicator meets the monitoring target. 总 Total number of monitoring sessions This represents the mean of the indicator at the corresponding time scale.

8. The automatic processing and analysis method for multi-source data on wastewater quality and quantity in wastewater treatment as described in claim 1, characterized in that, The trend visualization generates daily, monthly, and annual multi-dimensional water quality indicator trend charts and influent / effluent indicator comparison charts. The chart size, font, and resolution are generated according to the preset parameters in the configuration file.

9. The automatic processing and analysis method for multi-source data on wastewater quality and quantity in wastewater treatment as described in claim 1, characterized in that, The results are exported to generate a standardized Excel file containing raw data, aggregation results, and statistical analysis reports. The file can be directly used for data archiving, operational reporting, and process decision support.

10. The automatic processing and analysis method for multi-source data on wastewater quality and quantity in wastewater treatment as described in claim 1, characterized in that, The system adopts a layered architecture consisting of a configuration rule layer, a data processing and analysis layer, and a results output layer. When adding or adjusting monitoring indicators, only the configuration file needs to be updated, without modifying the core processing code.