Sewage discharge data management method based on intelligent water affair

By processing sewage discharge data through edge computing and the sewage component chemical association rule library and constructing a data logic verification map, the problem of erroneous data caused by sensor failure and transmission interruption is solved, and efficient and accurate management of sewage discharge data is achieved.

CN120746469AInactive Publication Date: 2025-10-03海南鹏源水环境治理科技有限公司
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510673921.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-23
Publication Date
2025-10-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing sewage discharge data management method lacks an automated cleaning mechanism, and erroneous data caused by sensor failure and transmission interruption cannot be filtered, resulting in low accuracy of data analysis results.

Method used

Through edge computing, sewage discharge, equipment status and environmental data are processed, and the sewage component chemical association rule library is used to identify hidden data anomalies and clean multimodal data. A data logic verification map is constructed, and automatic correction and multi-source evidence verification are performed to generate target emission data and compliance reports.

Benefits of technology

It achieves real-time localized data processing, effectively filters out erroneous data, improves data purity and accuracy, reduces manual intervention, and improves processing efficiency and the credibility of compliance reports.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120746469A_ABST
    Figure CN120746469A_ABST
Patent Text Reader

Abstract

According to the sewage discharge data management method based on the intelligent water affair, the sewage discharge data, the equipment state data and the environment data of an enterprise are subjected to edge calculation, the initial discharge data and the equipment evaluation data are generated, localized real-time processing of the data is achieved, and the transmission amount of invalid data is reduced. And performing data implicit anomaly identification and multi-modal data cleaning on the initial emission data and the equipment evaluation data based on the sewage component chemical association rule base, accurately capturing abnormal points which do not conform to chemical association rules in the data, and generating an abnormal mark list and intermediate emission data. Data association analysis is carried out based on the abnormal mark list, the intermediate emission data and enterprise operation data corresponding to the enterprise, a data logic verification map is constructed, errors in the intermediate emission data are automatically corrected according to a logic relation in the verification map, the processing efficiency is improved, and through cross verification of multiple data sources, the data processing efficiency is improved. And target emission data and a compliance report with high accuracy are generated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a sewage discharge data management method based on smart water services. Background Art

[0002] Accurate management of wastewater discharge data plays a crucial role in water environment quality assessment, pollution source regulation, and wastewater treatment optimization. Real-time, reliable discharge data enables rapid response to pollution incidents, accurate assessment of discharge compliance, and the rational allocation of wastewater treatment resources. However, existing wastewater discharge data management methods primarily rely on traditional sensor networks and manual assistance for data collection and processing, resulting in significant technical bottlenecks in data cleaning.

[0003] Existing technologies collect sewage discharge data using IoT devices such as water quality sensors and flow meters. However, they lack intelligent, automated cleaning mechanisms for abnormal scenarios such as sensor failure and transmission interruptions. When sensors experience measurement deviations due to equipment aging, contaminant adhesion, or network fluctuations leading to data transmission interruptions or disorder, these erroneous data (such as negative values, out-of-range values, and logically contradictory values) are directly fed into the data analysis process. Traditional systems are unable to identify these anomalies in real time and continue to use erroneous data for emission compliance calculations, ultimately leading regulators to misjudge a company's emission status. Summary of the Invention

[0004] The present invention proposes a sewage discharge data management method based on smart water services, which is used to solve the technical problems that the existing sewage discharge data management method lacks an automated data cleaning mechanism, and the erroneous data caused by sensor failure and transmission interruption cannot be filtered, resulting in low accuracy of data analysis results.

[0005] The technical solution of the present invention is achieved as follows:

[0006] A sewage discharge data management method based on smart water services includes the following steps:

[0007] Step S1: Obtain the enterprise's sewage discharge data, equipment status data, and environmental data, perform edge computing on the sewage discharge data, the equipment status data, and the environmental data to generate initial discharge data and equipment evaluation data;

[0008] Step S2: performing data implicit anomaly identification and multimodal data cleaning on the initial discharge data and the equipment evaluation data based on a sewage component chemical association rule library to generate an anomaly mark list and intermediate discharge data;

[0009] Step S3: performing data association analysis based on the abnormality mark list, the intermediate emission data, and the enterprise operation data corresponding to the enterprise, and constructing a data logic verification map;

[0010] Step S4: Based on the data logic verification map, the intermediate emission data is automatically corrected and verified with multi-source evidence to generate target emission data and a compliance report.

[0011] Preferably, the specific steps of step S1 are:

[0012] Step S11: Using a preset abnormal threshold library to perform threshold filtering on the sewage discharge data, the equipment status data, and the environmental data to generate sewage discharge filtering data, equipment status filtering data, and environmental filtering data;

[0013] Step S12: aligning the timestamps of the sewage discharge filtering data, the equipment status filtering data, and the environment filtering data to generate sewage discharge calibration data, equipment status calibration data, and environment calibration data;

[0014] Step S13: converting the format of the sewage discharge calibration data, the equipment status calibration data, and the environmental calibration data to construct initial discharge data;

[0015] Step S14: input the device calibration data into a preset device evaluation model to perform device evaluation and generate device evaluation data.

[0016] Preferably, the specific steps of step S14 are:

[0017] Step S141: Eliminate abnormal fluctuation data in the device calibration data to generate initial device data;

[0018] Step S142: Fill missing data in the initial device data using historical calibration data corresponding to the device calibration data to generate target device data;

[0019] Step S143: Calculate calibration accuracy, repeatability error, and drift rate using the target device data to generate device evaluation data.

[0020] Preferably, the specific steps of step S2 are:

[0021] Step S21: Calculate the isolation score of the initial emission data using an isolation forest algorithm to generate isolation score data;

[0022] Step S22: Using the LSTM time series prediction model to predict the data fluctuation range using the historical data corresponding to the initial emission data, and generating a dynamic baseline;

[0023] Step S23: performing logic verification on the isolated score data and the dynamic baseline with a preset sewage component chemical association rule library to generate logic verification data;

[0024] Step S24: adjusting the abnormal weight and level of the isolated score data according to the logic verification data to generate abnormal mark data;

[0025] Step S25: performing visual abnormality feature recognition on the sewage outlet monitoring video data corresponding to the enterprise to generate visual abnormality data;

[0026] Step S26: construct an abnormality mark list based on the timestamp by combining the visual abnormality data and the abnormality mark data;

[0027] Step S27: Remove the emission data corresponding to the abnormal mark list from the initial emission data to generate intermediate emission data.

[0028] Preferably, the specific steps of step S25 are:

[0029] S251, extracting frames of the sewage outlet monitoring video data corresponding to the enterprise to generate multiple initial single-frame image data;

[0030] S252, using the YOLOv5 model to respectively detect abnormal foam areas in the initial single-frame image data, and performing area ratio calculation to generate abnormal foam area ratio;

[0031] S253, selecting initial single-frame image data in which the abnormal foam area accounts for a greater proportion than a preset threshold, and generating a plurality of target single-frame image data;

[0032] S254, respectively calculating the HSV color space histogram of the target single-frame image data, and performing a similarity comparison between the HSV color space histogram and the corresponding normal emission sample to generate the corresponding color similarity of the target single-frame image data;

[0033] S255 , constructing visual anomaly data using the target single-frame image data whose color similarity is less than a preset similarity threshold.

[0034] Preferably, the specific steps of step S3 are:

[0035] S31, preprocessing the abnormality mark list, the intermediate emission data, and the enterprise operation data corresponding to the enterprise to generate a preprocessed data set;

[0036] S32, aligning the timestamps and device IDs of the preprocessed data in the preprocessed data set to generate a related data set;

[0037] S33. Use the associated data set to construct a data logic verification map.

[0038] Preferably, the specific steps of step S31 are:

[0039] S311, removing duplicate or erroneous tag information in the abnormal tag list, unifying the tag format, and generating a first preprocessed data set;

[0040] S312, standardizing the intermediate emission data to generate a second preprocessed data set;

[0041] S313: Structurally process the enterprise operation data corresponding to the enterprise to generate third pre-processed data;

[0042] S314 : Removing abnormal fluctuation data from the first preprocessed data set, the second preprocessed data set, and the third preprocessed data set according to a preset fluctuation threshold, to construct a preprocessed data set.

[0043] Preferably, the specific steps of step S33 are:

[0044] S331, obtaining entity data in the associated dataset;

[0045] S332: Entities in the entity data are used as nodes in a graph, and relationships between the entities are used as edges between nodes. The edges are assigned corresponding weights and types to generate an initial graph.

[0046] S333, optimizing the initial graph using a graph algorithm to generate a target graph;

[0047] S334. Use preset business rules and expert experience to verify the target graph and generate a data logic verification graph.

[0048] Preferably, the specific steps of step S4 are:

[0049] Step S41: constructing a correction scheme for the intermediate emission data based on the data logic verification map using a preset reinforcement learning model to generate candidate correction scheme data;

[0050] Step S42: Verify the candidate correction solution data using the preset multi-source evidence and the scoring rules in the data logic verification map to generate verification result data;

[0051] Step S43: Select the candidate correction solution data with the highest score in the verification result data to generate target correction solution data;

[0052] Step S44: Correcting the intermediate emission data according to the target correction scheme data to generate target emission data;

[0053] Step S45: Compare the target emission data with the terms in the data logic verification map to generate term comparison data;

[0054] Step S46: Use the clause comparison data to construct a compliance report.

[0055] Preferably, the specific steps of step S41 are:

[0056] Step S411: Using a dual Q network through a preset reinforcement learning model to select the optimal correction action corresponding to the intermediate emission data;

[0057] Step S412: When the optimal correction action is data replacement, corresponding replacement data is selected from the data logic verification map to construct first candidate correction solution data;

[0058] Step S413: When the optimal correction action is linear interpolation, corresponding adjacent normal data are selected from the data logic verification map to construct second candidate correction solution data.

[0059] Compared with the prior art, the present invention has the following beneficial effects:

[0060] This invention uses edge computing to perform preliminary processing of wastewater discharge, equipment status, and environmental data, generating initial discharge data and equipment assessment data. This enables localized, real-time data processing and reduces the amount of invalid data transmitted. It utilizes a chemical association rule library for wastewater components to identify hidden data anomalies and clean multimodal data. Leveraging the powerful analytical capabilities of the rule library, it accurately captures data anomalies that do not conform to the chemical association rules, generates an anomaly tag list, and effectively filters out erroneous data caused by sensor failures, transmission interruptions, and other factors, significantly improving data purity and ensuring data quality from the source. Data association analysis constructs a data logic verification map, combining the anomaly tag list, intermediate discharge data, and enterprise operational data to establish logical associations between the data. This eliminates data isolation and allows for examination of discharge data from the perspective of the enterprise's overall operations, providing a comprehensive and systematic logical basis for subsequent data corrections. Automated corrections and multi-source evidence verification based on the data logic verification map enable intelligent data processing, reduce manual intervention, and improve processing efficiency. Multi-source evidence verification ensures the accuracy and reliability of the corrected data through cross-validation across multiple data sources, resulting in highly reliable target discharge data and compliance reports. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only preferred embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0062] Figure 1 This is a flow chart of a sewage discharge data management method based on smart water services of the present invention;

[0063] Figure 2 This is a flow chart of step S1 of a sewage discharge data management method based on smart water services of the present invention;

[0064] Figure 3 This is a flow chart of step S2 of a sewage discharge data management method based on smart water services of the present invention;

[0065] Figure 4 This is a flow chart of step S3 of a sewage discharge data management method based on smart water services of the present invention;

[0066] Figure 5 This is a flowchart of step S4 of a sewage discharge data management method based on smart water services of the present invention. DETAILED DESCRIPTION

[0067] In order to better understand the technical content of the present invention, a specific embodiment is provided below, and the present invention is further described in conjunction with the accompanying drawings.

[0068] See also Figures 1 to 5 The present invention provides a sewage discharge data management method based on smart water services, comprising the following steps:

[0069] Step S1: Obtain the enterprise's sewage discharge data, equipment status data, and environmental data, perform edge computing on the sewage discharge data, equipment status data, and environmental data to generate initial discharge data and equipment evaluation data;

[0070] Step S2: Based on the sewage component chemical association rule library, the initial discharge data and equipment evaluation data are subjected to data implicit anomaly identification and multimodal data cleaning to generate an anomaly mark list and intermediate discharge data;

[0071] Step S3: Perform data correlation analysis based on the abnormality mark list, intermediate emission data, and the enterprise operation data corresponding to the enterprise, and construct a data logic verification map;

[0072] Step S4: Based on the data logic verification map, the intermediate emission data is automatically corrected and verified with multi-source evidence to generate target emission data and a compliance report.

[0073] In an embodiment of the present invention, sewage discharge data includes water quality indicators (COD, BOD, ammonia nitrogen, pH value, flow rate, etc.) collected in real time, with timestamps, monitoring points (such as "water inlet of pool A of sewage treatment plant"), and device IDs (such as "SENSOR_001"). Equipment status data includes sensor calibration parameters (zero value, full scale value, drift rate), equipment health score (0-100), calibration status (qualified / warning / fault), and historical fault records (such as "sensor electrode contamination in March 2025"). Environmental data includes real-time environmental parameters (temperature, humidity, rainfall, atmospheric pressure), which come from the plant environment monitoring station or third-party API (such as meteorological bureau data).

[0074] Collect enterprise sewage discharge data, equipment status data, and environmental data, all with timestamps and monitoring point information. Eliminate abnormal data that exceeds the preset threshold (such as extreme values ​​of pH <3 or >12) to generate filtered data. Synchronize the three types of data by time (allowing a tolerance of ±5 minutes) to ensure that data at the same time point are associated. Unify the data format (such as JSON) to generate initial emission data containing emission indicators, equipment status, and environmental parameters. Input equipment status data and environmental data, calculate indicators such as calibration accuracy and drift rate, and generate equipment evaluation data (such as equipment health score and next calibration recommendation). Local pre-processing of sewage discharge data, equipment status data, and environmental data is performed through edge computing, avoiding the transmission delay and storage pressure of uploading the original data directly to the cloud, and realizing real-time cleaning and preliminary analysis of data.

[0075] The wastewater component chemical association rule library includes concentration association rules, ion balance rules, and device-component association rules. Taking a typical wastewater component as an example: the concentration association rule is COD ≥ BOD × 1.5 (the typical ratio for domestic wastewater; if < 1.5, industrial wastewater may be present); the ion balance rule states that pH is negatively correlated with ammonia nitrogen concentration (pH ↑ → NH3 volatilization ↑ → ammonia nitrogen concentration ↓; a deviation > 20% triggers an anomaly); and the device-component association rule states that if the sensor drift rate is > 0.01% / day and COD is < 50 mg / L (below the detection limit), it is flagged as a "suspected sensor failure anomaly."

[0076] Chemical rule verification is performed on initial emission data to identify component ratio inconsistencies (e.g., COD / BOD < 1.5, flagged as "suspected industrial wastewater mixing anomaly"). Combined with equipment health and drift rate data from equipment assessment data, data anomalies caused by equipment performance degradation (e.g., drift rate exceeding thresholds and data fluctuation exceeding limits) are detected. Anomalies are categorized and flagged (e.g., chemical logic anomalies, equipment association anomalies, etc.), and a list of anomaly flags is generated (including anomaly time, type, and evidence). Abnormal data is processed by type: equipment anomaly data is corrected using adjacent value interpolation, chemically inconsistent data triggers manual review, and outliers are statistically analyzed and combined with environmental data to determine whether to retain them, generating intermediate emission data. A wastewater component chemical association rule library can be used to identify "hidden anomalies" (e.g., chemical imbalances between components, non-intuitive exceedances) that are difficult to detect with traditional threshold detection, avoiding missed detections due to normal single indicators but abnormal overall emission characteristics. By integrating multimodal information such as emission data, equipment status, and environmental data for cross-validation, noise data caused by equipment failure, sensor error, or environmental interference is eliminated, improving the accuracy and completeness of intermediate emission data.

[0077] Align the abnormality mark list, intermediate emission data, and enterprise operation data (production load, process stage), supplement process parameters (such as aeration rate), and form a related data set. The process of constructing the data logic verification map is as follows: (1) Define entities and relationships: Entities include equipment, abnormality type, process stage, etc.; relationships include "equipment → abnormality" and "process stage → emission index change", and assign weights (such as the association weight of equipment drift and data abnormality is 0.9). (2) Graph optimization and verification: Use graph algorithms (such as PageRank) to highlight high-frequency associations, invite water experts to correct logical errors, and generate data logic verification maps (visualizing data causal relationships, such as "equipment failure → emission data abnormality"). The logic verification map constructed by combining the abnormality mark list, intermediate emission data, and enterprise operation data (such as production load, process parameters) can mine implicit associations between data (such as the matching of production scale and sewage discharge volume, the correlation between equipment energy consumption and treatment efficiency), and form a three-dimensional verification network of "data-equipment-business". Through the logical relationships in the graph, the source of abnormal data (such as equipment failure, production violations or data collection errors) can be quickly located, and potential compliance risks can be predicted, providing decision support for enterprises to actively optimize management.

[0078] By querying the graph for data that does not have equipment anomalies but the emission data is inconsistent with production activities (such as "a sudden increase in flow during production shutdown"), a data set to be corrected is generated. Strategies are selected based on the graph relationship. For example, data deviations caused by equipment drift are corrected according to the drift rate (e.g., if the drift rate is -5%, the COD value is ×1.05); abnormal flow during production shutdown is filled with the mean value before shutdown. Multi-source evidence verification is performed on the corrected data: (1) Determine whether the corrected data is within the allowable range of equipment accuracy (e.g., equipment accuracy level A, error <±5%); (2) Verify whether the component ratio complies with the rules (e.g., COD / BOD ≥ 1.5); (3) Compare the corrected data with the historical fluctuation range for the same period (e.g., no more than ±15%). The corrected and verified data is then generated as the target emission data, with a "correction source" label (e.g., "equipment drift correction"). A compliance report is constructed using correction details, evidence chain (graph association diagram, rule matching log), and annotation of exceeded items and correction results. The report clearly states whether the data complies with the emission standards. Based on the logic verification map, the intermediate emission data is automatically corrected to reduce the cost of manual intervention, avoid human misjudgment, and improve data processing efficiency; at the same time, through multi-source evidence verification (such as combining historical data, industry standards, and equipment design parameters), the scientificity and credibility of the correction results are ensured. The present invention forms a complete closed loop of smart water data management from data collection, preprocessing, anomaly identification, logic verification to correction verification, covering the whole process control of the emission data life cycle. It solves the technical problem that the existing sewage discharge data management method lacks an automated data cleaning mechanism, and the erroneous data caused by sensor failure and transmission interruption cannot be filtered, resulting in low accuracy of data analysis results.

[0079] Preferably, the specific steps of step S1 are:

[0080] Step S11: Using a preset abnormal threshold library to perform threshold filtering on sewage discharge data, equipment status data, and environmental data to generate sewage discharge filtering data, equipment status filtering data, and environmental filtering data;

[0081] Step S12: aligning the timestamps of the sewage discharge filtering data, the equipment status filtering data, and the environmental filtering data to generate sewage discharge calibration data, equipment status calibration data, and environmental calibration data;

[0082] Step S13: converting the format of the sewage discharge calibration data, the equipment status calibration data, and the environmental calibration data to construct initial discharge data;

[0083] Step S14: input the device calibration data into a preset device evaluation model to perform device evaluation and generate device evaluation data.

[0084] The preset abnormal threshold library is based on GB8978 "Comprehensive Wastewater Discharge Standard" and equipment technical manuals, sensor factory parameters and equipment working environment requirements. It includes a database of sewage discharge data thresholds, equipment status data thresholds and environmental data thresholds. Among them, the sewage discharge data thresholds include COD: normal range [10mg / L, 500mg / L] (industrial wastewater first-level standard), exceeding the limit (<10 or >500) is marked as abnormal; flow: dynamic threshold [Q min , Q max ], where Q min =μ Q -3σ Q , Q max =μ Q +3σ Q (Calculate the mean μ based on historical 7-day data Q and standard deviation μ Q , 3σ rule to filter outliers); pH value: normal range [6, 9] (meets surface water discharge standards). Device status data thresholds include drift rate: allowable range [-0.01% / day, +0.01% / day], exceeding which is marked as "sensor drift warning"; calibration accuracy: Class A devices allow an error of ±1% FS (FS = full scale), Class B devices allow ±3% FS, exceeding which triggers a calibration request. Environmental data thresholds include temperature: normal operating temperature of the sensor [0°C, 50°C], exceeding which is considered unreliable; humidity: device tolerance range [20%, 80%], high humidity environments may cause electrode corrosion.

[0085] In an embodiment of the present invention, threshold filtering is performed on sewage discharge data, equipment status data and environmental data to generate sewage discharge filter data, equipment status filter data and environmental filter data, wherein the sewage discharge filter data only retains data that meets the discharge index threshold; the equipment status filter data is to eliminate the equipment status records with calibration deviations and drift rates exceeding the limit; the environmental filter data only retains data such as temperature and humidity under the normal working environment of the equipment. The timestamp alignment strategy adopted by the present invention allows a time tolerance of ±5 minutes, adopts sliding window matching (window size = 10 minutes), and uniformly aligns the data in the same window to the window start timestamp (such as data from 14:00-14:09 are all marked as 14:00). For missing data across windows, cubic spline interpolation is used to fill in the missing data, and the formula is as follows:

[0086] Assume that the time point t is known i The corresponding measurement value is y i , construct the cubic spline function S(t) to satisfy:

[0087] S(t i )=y i , S ' (t i)=m i , S " (t i )=M i ;

[0088] Among them, m i is the first-order derivative, M i is the second-order derivative, through boundary conditions (such as natural boundaries: S " (t1) = S " (t n )=0) to generate the calibration value S(t) of the alignment time point t.

[0089] The sewage discharge filtering data, equipment status filtering data and environmental filtering data are reorganized according to the aligned timestamps to generate sewage discharge calibration data with unified timestamps (including interpolated values ​​of indicators such as COD and flow), equipment status calibration data (including aligned equipment health, drift rate, etc.) and environmental calibration data (including aligned environmental parameters such as temperature and humidity).

[0090] The sewage discharge calibration data, equipment status calibration data, and environmental calibration data are formatted to generate initial discharge data. The sewage discharge calibration data, equipment status calibration data, environmental calibration data, and corresponding historical fault records are input into the preset equipment evaluation model. The calibration accuracy, repeatability error, and drift rate of each data are calculated using the preset equipment evaluation model. The corresponding calculation formulas are as follows:

[0091] Calibration accuracy P a : Take the average of multiple calibrations;

[0092] Repeatability error R e : The standard deviation of multiple measurements under the same conditions, reflecting the measurement stability;

[0093] Drift rate D r : Error change rate per unit time,

[0094] The preset equipment evaluation model uses the analytic hierarchy process (AHP) to determine the weights:

[0095] Equipment evaluation score = 0.4P a +0.3R e +0.3D r ;

[0096] Among them, P a Calibration accuracy (40%) directly affects data accuracy and has the highest weight; R e Repeatability error (30%) reflects the stability of the equipment and affects the reliability of the data; D rThe drift rate (30%) reflects the long-term performance degradation trend of the device. The device evaluation data is evaluated by the device calibration data using the above-mentioned device scoring formula to obtain the device evaluation data.

[0097] Preferably, the specific steps of step S14 are:

[0098] Step S141: Eliminate abnormal fluctuation data in the device calibration data to generate initial device data;

[0099] Step S142: Fill missing data in the initial device data using historical calibration data corresponding to the device calibration data to generate target device data;

[0100] Step S143: Calculate calibration accuracy, repeatability error, and drift rate using target device data to generate device evaluation data.

[0101] In this embodiment, the 3σ rule is used to identify anomalies. Specifically, any data point that deviates from the mean by more than three standard deviations is considered an anomaly. This rule then removes abnormally fluctuating data from the device calibration data, retaining valid calibration records from normal equipment operation to generate initial device data. For example, in the calibration data of a sensor, a transient jump in the COD measurement value is detected as an anomaly using the 3σ rule and removed.

[0102] The initial equipment data may contain data gaps due to long calibration intervals (e.g., no data for more than 30 days after the preset calibration period) or equipment failures that result in the loss of some calibration records. The missing data are filled using linear interpolation and historical mean filling methods. Among them, linear interpolation is applicable to the missing of continuous time series. Let the missing time point be t m , the effective time points before and after are t i , t j (t i <t m <t j ), the corresponding measurement value is y i 、y j , then the fill value is Historical mean filling: For periodic calibration data (such as calibration on the 1st of each month), if a calibration is missing, the mean of the last three calibration values ​​is used to fill in the missing data: Linear interpolation allows time intervals ≤ 7 days; if the interval exceeds 7 days, the historical mean is used. The historical mean calculation window is the last three valid calibration data. A complete device calibration time series is created, with missing values ​​filled with historical data to ensure the continuity of subsequent calculations (for example, calibration accuracy requires at least five valid data points) to obtain the target device data.

[0103] The calibration accuracy formula, repeatability error formula, and drift rate formula are used to calculate the calibration accuracy, repeatability error, and drift rate of the target device data. Finally, the weighted comprehensive score formula is used to calculate the device health score and construct the device evaluation data.

[0104] The calibration accuracy formula is:

[0105]

[0106] Among them, x k The measured value of the kth calibration; s k is the standard value corresponding to the measured value; S FS is the full-scale value of the sensor, taken from the factory parameters of the equipment (for example, the full-scale value of the COD sensor is 1000 mg / L); m is the number of valid calibrations. Accuracy level determination: If the calculated result is ≤1%, it is determined to be Class A accuracy; 1%-3% is Class B, and >3% is Class C.

[0107] The repeatability error formula is:

[0108]

[0109] in, It is the average value of multiple measurements under the same standard value (such as the average value of 10 measurements of 500 mg / L standard solution); k The measured value of the kth calibration; m is the number of valid calibrations.

[0110] The drift rate formula is:

[0111]

[0112] Where, "Current Error" is the error from the most recent calibration; "Initial Error" is the error from the first calibration after the device is put into operation; and "ΔT" is the number of days between calibrations. For example, if the calibration error is 0.5% when the device is put into operation and 1.2% 60 days later, the drift rate = (1.2% - 0.5%) / 60 = +0.0117% / day (a positive drift indicates an increasing error).

[0113] The weighted comprehensive score formula is:

[0114] Health score = 100 - 40 × calibration accuracy coefficient - 30 × repeatability error coefficient - 30 × |drift rate coefficient|;

[0115] The grade coefficient in the formula is mapped to a range of 0-1 (e.g., Grade A accuracy coefficient = 0.1, Grade B = 0.3, Grade C = 0.5) based on the quality of the indicators (the aforementioned calibration accuracy, repeatability error, and drift rate).

[0116] Preferably, the specific steps of step S2 are:

[0117] Step S21: Calculate the isolation score of the initial emission data using the isolation forest algorithm to generate isolation score data;

[0118] Step S22: Using the LSTM time series prediction model, historical data corresponding to the initial emission data is used to predict the data fluctuation range and generate a dynamic baseline;

[0119] Step S23: Performing logic verification on the isolated score data and the dynamic baseline with a preset sewage component chemical association rule library to generate logic verification data;

[0120] Step S24: adjusting the abnormal weight and level of the isolated score data according to the logic verification data to generate abnormal label data;

[0121] Step S25: Perform visual abnormality feature recognition on the sewage outlet monitoring video data corresponding to the enterprise to generate visual abnormality data;

[0122] Step S26: Construct an abnormality mark list based on the timestamp by combining the visual abnormality data and the abnormality mark data;

[0123] Step S27: Remove the emission data corresponding to the abnormal mark list from the initial emission data to generate intermediate emission data.

[0124] In an embodiment of the present invention, the initial emission data is organized into a format suitable for processing by the isolation forest algorithm, which is usually a matrix in which each row represents a sample and each column represents a feature (such as COD, ammonia nitrogen content, flow rate and other indicators). The isolation forest algorithm recursively constructs a decision tree by randomly selecting features and split points to isolate the data points. For each data point, the length of its path in the decision tree is calculated. The shorter the path, the easier it is for the data point to be isolated, that is, the more likely it is to be an outlier. For each sample in the initial emission data, its isolation score is calculated to form isolation score data. The score range is usually between 0 and 1. The closer the score is to 1, the more likely the sample is to be an outlier.

[0125] Collect historical data corresponding to the initial emissions data, including data for various emission indicators at multiple time steps. Normalize the data and scale it to a fixed range, such as [0, 1], to improve model training effectiveness. Build an LSTM (Long Short-Term Memory) time series prediction model. The LSTM model can capture long-term dependencies in time series data. The LSTM model includes the number of neurons in the input layer, LSTM layer, and output layer. Train the LSTM model using historical data, and adjust the model parameters by minimizing the error between the predicted value and the actual value (such as the mean squared error). Use the trained LSTM model to predict future emissions data and obtain the predicted value for each time step. Based on the predicted value and a certain confidence interval (such as ±3 times the standard deviation), determine the data fluctuation range and generate a dynamic baseline.

[0126] The preset sewage component chemical association rule library contains a series of chemical rules and logical relationships, such as the ratio of COD to BOD, the correlation between pH value and ammonia nitrogen content, etc.

[0127] For isolated score data, check whether the isolated score of each sample conforms to the anomaly judgment rules in the preset sewage component chemical association rule library. For example, if the isolated score of a sample exceeds the threshold set in the rule library, it is considered that the sample may be abnormal. For the dynamic baseline, check whether the emission data of each time step is within the fluctuation range of the dynamic baseline. If it exceeds the range, there may be an anomaly. At the same time, check whether the relationship between the various indicators in the emission data conforms to the chemical association rules in the rule library. For example, if the ratio of COD to BOD does not conform to the range set in the rule library, it is considered that there is a logical contradiction. The verification results are sorted to generate logical verification data, and the verification status of each sample or time step (whether it conforms to the rules, anomaly type, etc.) is recorded.

[0128] Based on the results of the logical verification data, define the adjustment rules for anomaly weights and levels. For example, if a sample has a high isolation score and violates the chemical association rules in the rule base, increase its anomaly weight and level. If only the isolation score is high, but the data meets the chemical association rules, appropriately reduce its anomaly weight and level. Traverse the isolation score data and adjust the anomaly weight and level of each sample based on the logical verification data. A weighting function can be used to calculate the adjusted anomaly weight and level. The weighting function is:

[0129] Adjusted anomaly weight = original isolation score × rule violation coefficient (determined based on the logic check result; the more rules violated, the larger the coefficient);

[0130] Anomaly levels are categorized based on the adjusted anomaly weights. For example, weights between 0 and 0.2 are considered low-level anomalies, 0.2 to 0.5 are considered medium-level anomalies, and 0.5 to 1 are considered high-level anomalies. Generate anomaly labeling data, which includes the adjusted anomaly weight and level information for each sample.

[0131] Acquire surveillance video data from enterprise sewage outlets and perform preprocessing, including video frame extraction and image enhancement, to improve image quality and clarity. Use computer vision techniques, such as object detection and image classification algorithms, to analyze the images in the video frames and generate visual anomaly data. For example, detect visual anomaly features such as abnormal sewage color, excessive foam, and abnormal suspended solids. Record the presence of visual anomaly features in each video frame, as well as the type and location of the anomaly.

[0132] Align the visual anomaly data and anomaly marker data by timestamp to ensure that information at the same time point can be linked. After traversing the aligned data, integrate the anomaly information from the visual anomaly data and anomaly marker data to construct an anomaly marker list. The anomaly marker list should include information such as the timestamp, anomaly type (e.g., data anomaly, visual anomaly), anomaly weight, and level.

[0133] Traverse the initial emission data and mark the emission data corresponding to the abnormal marking list according to the timestamp and other relevant information. Remove the data marked as abnormal from the initial emission data to obtain the intermediate emission data.

[0134] Preferably, the specific steps of step S25 are:

[0135] S251, extracting frames from the monitoring video data of the sewage outlet corresponding to the enterprise to generate multiple initial single-frame image data;

[0136] S252, using the YOLOv5 model to respectively detect abnormal foam areas in the initial single-frame image data, and performing area ratio calculation to generate abnormal foam area ratio;

[0137] S253, selecting initial single-frame image data in which the abnormal foam area accounts for a greater proportion than a preset threshold, and generating a plurality of target single-frame image data;

[0138] S254, respectively calculating the HSV color space histogram of the target single-frame image data, and performing a similarity comparison between the HSV color space histogram and the corresponding normal emission sample to generate the corresponding color similarity of the target single-frame image data;

[0139] S255: Use the target single-frame image data whose color similarity is less than a preset similarity threshold to construct visual abnormality data.

[0140] In an embodiment of the present invention, surveillance video data of an enterprise's sewage outlet is obtained, and these videos are usually stored in a common video format. An appropriate frame extraction interval is set, for example, 1 frame is extracted per second or 1 frame is extracted every 5 seconds. This depends on the frame rate of the video and actual needs. If the video frame rate is high and changes rapidly, the frame extraction interval can be appropriately increased to reduce the amount of data processed; if a more detailed analysis is required, the frame extraction interval can be reduced. Use a video processing library (such as OpenCV) to read the video frame by frame, and extract single-frame images according to the set frame extraction interval to obtain multiple initial single-frame image data. These images contain visual information of the sewage outlet at different times.

[0141] The YOLOv5 model is trained using labeled image data containing abnormal foam areas, so that the model can accurately identify abnormal foam areas in sewage outlet images. The initial single-frame image data is input into the trained YOLOv5 model, and the model will output the bounding box information of the abnormal foam area in each image (such as the coordinates of the upper left corner and lower right corner). For each image, the area of ​​the abnormal foam area is calculated. The number of pixels in the area can be calculated based on the bounding box information, and the total area of ​​the image can be calculated separately. The area of ​​the abnormal foam area is divided by the total area of ​​the image to obtain the proportion of the abnormal foam area for each initial single-frame image data.

[0142] The preset ratio threshold is a threshold for the ratio of abnormal foam areas based on actual conditions and experience. The ratio of abnormal foam areas in all initial single-frame image data is traversed, and images with a ratio greater than the preset ratio threshold are selected to obtain multiple target single-frame image data.

[0143] Calculate the histogram of the target single-frame image in the HSV (Hue Saturation Value) space for each target single-frame image data. Collect image data of the sewage outlet during normal discharge, and similarly calculate the HSV color space histogram of these normal discharge samples to generate normal discharge samples. Use the Bhattacharyya distance to measure the similarity between the HSV histogram of the target single-frame image and the histogram of the normal discharge sample. The smaller the Bhattacharyya distance, the more similar the two histograms are. For each target single-frame image, compare its HSV histogram with the histograms of all normal discharge samples, and calculate the average similarity as the color similarity of the target single-frame image.

[0144] The preset similarity threshold is a color similarity threshold set based on actual conditions and experience. The color similarity of all target single-frame image data is traversed, and images with similarity below the preset similarity threshold are selected. Relevant information about these images, such as timestamps, abnormal foam area percentage, and color similarity, is collected to construct visual anomaly data.

[0145] Preferably, the specific steps of step S3 are:

[0146] S31. Preprocess the abnormality mark list, the intermediate emission data, and the enterprise operation data corresponding to the enterprise to generate a preprocessed data set;

[0147] S32, aligning the timestamps and device IDs of the preprocessed data in the preprocessed data set to generate a related data set;

[0148] S33. Use associated data sets to construct a data logic verification map.

[0149] In this embodiment of the present invention, an anomaly tag list is collected, which contains information about previously detected emission data anomalies, such as the anomaly time, anomaly type, anomaly weight, and level. Intermediate emission data is prepared. This is the emission data after anomaly data removal, and includes various emission indicators (such as COD, ammonia nitrogen, flow rate, etc.). Enterprise operation data is obtained, covering data reflecting the production and operation status of the enterprise, such as production load rate, process stage, equipment start-up and shutdown status, etc.

[0150] Different processing methods are used for missing values ​​in the abnormal marking list, intermediate emission data and enterprise operation data. For numerical data, such as emission indicators and production load rates, the mean, median or interpolation method (such as linear interpolation, spline interpolation) can be used to fill in; for categorical data, such as process stages and equipment start and stop status, the mode can be used to fill in. Although some abnormal data have been removed from the intermediate emission data, outliers may still exist in the enterprise operation data. Statistical methods (such as the 3σ rule) or machine learning-based methods (such as isolation forests) can be used to identify and process outliers. For outliers, you can choose to delete or correct them. Standardize the numerical data so that different features have the same scale to avoid certain features from having too much influence on subsequent analysis. After the above processing, a preprocessed data set is generated. This data set contains the processed abnormal marking list, intermediate emission data and enterprise operation data. The data quality is improved and suitable for subsequent analysis and processing.

[0151] Determine a unified time granularity, such as minutes, hours, or days, and choose one based on actual needs. Sort all data in the preprocessed dataset by timestamp, and then align data from different data sources at the same time granularity. Forward filling, backward filling, or interpolation can be used to handle timestamp inconsistencies. For example, if enterprise operation data at a certain point in time is missing, but intermediate emission data exists, the enterprise operation data from the previous point in time can be used to fill in the gaps. Check whether the preprocessed dataset contains device ID information. If so, associate the data with the same device ID from different data sources. Ensure that the emission data, anomaly mark information, and enterprise operation data of each device accurately correspond. Integrate the data after the timestamps and device IDs are aligned to generate an associated dataset. The associated dataset is indexed by timestamps and device IDs and contains information such as anomaly marks, emission indicators, enterprise operation status, etc., to facilitate subsequent analysis of the logical relationship between the data.

[0152] Determine the entity types in the graph from the associated dataset. Common entities include equipment (such as sensors and sewage treatment equipment), anomaly types (such as data anomalies and equipment failure anomalies), process stages (such as biochemical treatment and sedimentation), and emission indicators (such as COD and ammonia nitrogen). Assign each entity a unique identifier to facilitate representation and querying in the graph.

[0153] Analyze the logical relationships between data in the associated datasets and define the relationship types in the graph. For example, a device might have an "occurrence" relationship with an anomaly type, indicating that a certain anomaly occurred on a particular device. Alternatively, a process stage might have an "impact" relationship with an emission indicator, indicating that different process stages have an impact on the emission indicator. Each relationship is assigned a weight, which can be determined based on data statistics or expert experience. For example, if a device is associated with a specific anomaly type in multiple anomaly events, the weight of the "occurrence" relationship can be set higher.

[0154] Use a graph database (such as Neo4j) or a graph computing framework (such as Apache Giraph) to build a data logic verification graph. Import the entities and relationships in the linked dataset into the graph database to form a node and edge structure. Optimize and verify the graph to check its integrity and consistency. For example, ensure that each entity has the correct attributes and relationships to avoid isolated nodes or incorrect relationships. The constructed data logic verification graph intuitively displays the logical relationship between anomaly markers, emission data, and enterprise operation data, and can be used for data logic verification, anomaly tracing, and trend prediction.

[0155] Preferably, the specific steps of step S31 are:

[0156] S311, removing duplicate or erroneous tag information in the abnormal tag list, and unifying the tag format to generate a first preprocessed data set;

[0157] S312, standardizing the intermediate emission data to generate a second preprocessed data set;

[0158] S313: Structurally process the enterprise operation data corresponding to the enterprise to generate third pre-processed data;

[0159] S314 , removing abnormal fluctuation data in the first preprocessing data set, the second preprocessing data set, and the third preprocessing data set according to a preset fluctuation threshold, and constructing a preprocessing data set.

[0160] In an embodiment of the present invention, the detection rules are based on timestamps (accurate to seconds) and device IDs to identify duplicate records (such as the same device having exactly the same abnormality mark at the same time point). Error mark screening includes logical contradiction detection: for example, "device calibration status = qualified" but marked as "sensor drift abnormality", which triggers manual review and then is eliminated; integrity check: Marks that are missing key information (such as no abnormality type or evidence description) are considered errors and are deleted. The cleaned abnormality mark list removes about 5%-10% of invalid data to generate a first preprocessed data set (format: JSON / CSV, including timestamp, device ID, abnormality type, evidence description, etc.).

[0161] Unify unstructured descriptions (such as "data jump" and "sensor problem") into preset enumeration values ​​(such as "transient outlier anomaly" and "device drift anomaly"); unify all timestamps into ISO 8601 format (such as "2025-04-29T14:00:00+08:00") to ensure cross-system compatibility and obtain the first preprocessed data set.

[0162] Standardization of intermediate emission data involves two steps: (1) Standardization is performed according to data type, dividing the intermediate emission data into numerical indicators and categorical indicators. Numerical indicators include COD, flow rate, pH value, etc., and are standardized using Z-score (applicable to data with normal distribution) or Min-Max standardization (applicable to non-normal distribution); categorical indicators include monitoring points (such as "water inlet" and "water outlet"), equipment models, etc., and are converted into binary vectors using One-Hot Encoding. (2) Standardization is performed for missing values ​​in the intermediate emission data. For time series data, linear interpolation or forward filling is used (for example, if the flow data for a certain hour is missing, it is filled with the average value of the previous and next hours); for equipment status data, if the equipment health is missing, it is predicted and filled using the equipment evaluation model (based on calibration accuracy and drift rate). After the above operations, the standardized second preprocessed data set is output, and all numerical indicators are dimensionless, supporting the input of subsequent machine learning models.

[0163] The unstructured data in the enterprise's operational data is structured. For example, the text description of "process adjustment" in the production log is converted into structured fields (such as "adjustment time," "adjustment parameters," and "scope of impact"); the equipment maintenance records in the Excel spreadsheet in the equipment ledger are converted into relational data (equipment ID, maintenance time, maintenance type, and maintenance results). Next, key indicators in the enterprise's operational data are extracted. For example, the load rate (%) is obtained from the enterprise ERP system and aligned by timestamp (e.g., collected every 15 minutes); the continuous production process is divided into discrete stages (e.g., "water inlet → biochemical treatment → sedimentation → water outlet"), represented by digital codes (1-4). The structured third preprocessing data includes fields such as production load rate, process stage, and equipment maintenance status, which are consistent with the time granularity of the emission data (e.g., minute level).

[0164] The preset fluctuation thresholds include the 3σ threshold and IQR (Interquartile Range) threshold used in numerical fields, and the check enumeration value legitimacy used in categorical fields (for example, whether the process stage code is 1-4, and if it exceeds, it is marked as abnormal). Among them, the normal range of the 3σ threshold is: [μ-3σ, μ+3σ], and if it exceeds, it is considered abnormal; the normal range of the IQR threshold is: [Q1-1.5IQR, Q3+1.5IQR], where IQR=Q3-Q1.

[0165] Threshold rules were applied to the numeric fields of the first, second, and third preprocessed data sets to produce the final preprocessed data set, which includes cleaned anomaly markers, standardized emissions data, and structured enterprise operation data. The rejection rate for abnormally fluctuating data was approximately 10%-15%, ensuring that data quality met logical verification requirements. For example, if the production load rate is greater than 100% (exceeding the rated load of the equipment) and the emission flow rate at the corresponding time point is greater than the historical mean + 3σ, it is determined to be an "overload operation anomaly" and the data is retained for subsequent correlation analysis.

[0166] Preferably, the specific steps of step S33 are:

[0167] S331, obtaining entity data in the associated dataset;

[0168] S332: Entities in the entity data are used as nodes in the graph, and relationships between entities are used as edges between nodes. The edges are assigned corresponding weights and types to generate an initial graph.

[0169] S333, optimizing the initial graph using a graph algorithm to generate a target graph;

[0170] S334. Use preset business rules and expert experience to verify the target map and generate a data logic verification map.

[0171] In an embodiment of the present invention, three types of core entities are extracted from the associated data set, including equipment entities, exception entities and business entities, where the equipment entities are sensors (such as "SENSOR_001") and processing equipment (such as "aeration fan A"), and the attributes include equipment ID, type, and installation location; the exception entity is the exception type (such as "sensor drift" and "overload discharge"), and the attributes include exception level, occurrence frequency, and impact indicators; the business entity is the process stage (such as "biochemical treatment") and production status (such as "load rate 80%"), and the attributes include stage name, time span, and associated equipment. The fields in the associated data set are mapped to entity attributes, for example: the equipment ID "WATER_PUMP_001" corresponds to the unique identifier of the equipment entity; the exception tag "sensor drift" corresponds to the type field of the exception entity. Using SQL query or data mapping tools, structured entity data is extracted from the associated data set to form a table containing entity ID, attributes, and associated fields.

[0172] The extracted entity data is converted into graph nodes, each node contains a unique ID and attributes (such as a health score for device nodes and an occurrence time for abnormal nodes). Based on the frequency of occurrence of relationships in the associated data set, the statistical weight is determined. For example, "sensor drift" and "low COD measurement value" occurred 20 times in the past 30 days, so the edge weight = 20 / total number of abnormalities (normalized to the range [0,1]); water engineers are invited to assign initial weights (such as 0.8, indicating a strong association) to relationships that cannot be determined through data statistics (such as "heavy rain → sudden increase in flow"). The weights and types corresponding to each entity are determined through the above steps to construct the initial graph. The initial graph contains the following key information:

[0173] Node: represents an entity in the associated data set, such as equipment entities (sensors, processing equipment, etc.), abnormal entities (sensor drift, overload emissions, etc.), business entities (process stage, production status, etc.). Each node has a unique identifier and corresponding attributes.

[0174] Edge: Represents the relationship between entities, such as equipment-anomaly (some anomaly occurs in the equipment), process-indicator (the process stage affects the emission indicator), anomaly-indicator (the anomaly type causes abnormal fluctuations in the indicator), etc. Each edge is assigned a corresponding weight and type.

[0175] In order to optimize the initial graph into the target graph, the following two graph algorithms are used:

[0176] (1) PageRank algorithm (web page ranking algorithm)

[0177] The PageRank algorithm was originally used to evaluate the importance of web pages and identify key nodes in a graph. The core idea is that the importance of a node depends not only on the number of nodes pointing to it, but also on the importance of these nodes themselves. The formula is:

[0178]

[0179] Where PR(u) is the PageRank value of node u, which is used to measure the relative importance of the node in the graph; d is the damping coefficient (usually 0.85); B u is the set of nodes pointing to node u; L(v) is the number of outgoing edges of node v.

[0180] Application: Adjust the weight of the "device-anomaly" relationship edge. If the PageRank value of a device node is higher than a set threshold (such as 0.7), the weight of its associated anomaly edge will be automatically increased by 20%. In this way, the importance of key nodes and their associated relationships in the graph is highlighted.

[0181] (2) Community Discovery Algorithm (Louvain)

[0182] The Louvain algorithm is a community discovery algorithm based on modularity optimization. Its goal is to partition closely connected nodes into distinct communities, ensuring close connections between nodes within a community and sparse connections between communities. Application: Divide nodes in a graph into distinct communities, such as the "water inlet equipment cluster" or the "biochemical treatment process community." After the division is complete, the edge weights within each community are increased by an average of 15%, strengthening connections between nodes within the community while simplifying the overall structure of the graph.

[0183] After optimizing the two graph algorithms described above, the target graph was obtained. Compared to the initial graph, the target graph exhibits the following improvements: Redundant edge filtering: Weakly correlated edges with weights less than 0.3 were removed, such as the occasional edge between "equipment restart → pH fluctuation." This reduced the number of edges by approximately 30%, making the graph more concise and highlighting core relationships. Critical path highlighting: The weights of key nodes and their relationships were increased. For example, the weight of the edge between equipment drift and COD measurement anomalies was increased from 0.6 to 0.8, making it the core relationship in the graph and easier to identify and analyze.

[0184] The preset business rules are: Rule 1: If "equipment health < 60 points" and "drift rate > 0.01% / day", then there must be an "equipment-abnormality" association edge; Rule 2: "Biological treatment stage" must be associated with the "COD / BOD degradation" related indicator node, otherwise it will be marked as an invalid relationship.

[0185] The present invention can realize automatic verification, that is, writing a script to check whether there are nodes or edges that violate the rules in the graph. For example, if a device node is found to have a health score of 55 points but no abnormal associated edges, a manual review is triggered (anomalies may be missed).

[0186] Water experts (with more than three years of experience) were invited to visually browse the graph and manually adjust obviously unreasonable relationships (for example, "heavy rain → equipment drift" actually has no direct correlation, so the weight was corrected from 0.5 to 0.1); domain-specific knowledge was supplemented: for example, in the relationship of "nitrification reaction stage → decrease in ammonia nitrogen concentration", new edges were added based on expert experience and assigned a weight of 0.9.

[0187] After the above steps, a data logic verification map is output. The data logic verification map contains 100+ nodes (30% for equipment, 20% for anomalies, and 50% for business) and 200+ valid edges (weights ≥ 0.4). It supports visual query (for example, if you enter "COD anomaly", the map highlights the association path of "sensor drift → low COD measurement value → decreased biochemical treatment efficiency").

[0188] Preferably, the specific steps of step S4 are:

[0189] Step S41: constructing a correction scheme for the intermediate emission data based on a data logic verification map using a preset reinforcement learning model to generate candidate correction scheme data;

[0190] Step S42: Verify the candidate correction solution data using the preset multi-source evidence and the scoring rules in the data logic verification map to generate verification result data;

[0191] Step S43: Select the candidate correction solution data with the highest score in the verification result data to generate target correction solution data;

[0192] Step S44: Correct the intermediate emission data according to the target correction scheme data to generate target emission data;

[0193] Step S45: Compare the target emission data with the terms in the data logic verification map to generate term comparison data;

[0194] Step S46: Use the clause comparison data to construct a compliance report.

[0195] In an embodiment of the present invention, a reinforcement learning model is preset, which is a deep Q network (DQN). The model is initialized, including setting the network structure and hyperparameters of the model (such as learning rate, discount factor, etc.). The data logic verification map is used as the environmental knowledge of the reinforcement learning model. The map contains the relationship between entities such as equipment, anomalies, and business, as well as the corresponding weights and types. This information can help the model understand the logical relationship between emission data and potential correction directions. The intermediate emission data is input into the reinforcement learning model. Based on the information in the data logic verification map, the model tries to find different solutions for correcting the intermediate emission data through continuous exploration and learning. During the learning process, the reinforcement learning model will generate a series of candidate correction solutions. Each solution may include adjustment values ​​for different emission indicators, changes to the operating status of the equipment, etc. These solutions are organized into candidate correction solution data.

[0196] The preset multi-source evidence may include historical emission data, industry standards, technical specifications of equipment, expert experience, etc. These evidences can be obtained from different data sources, sorted and pre-processed. The data logic verification map contains scoring rules, which are formulated based on the relationship between entities in the map and business logic. Each candidate correction plan is compared with the preset multi-source evidence and scored according to the scoring rules in the data logic verification map. During the verification process, check whether the plan conforms to the rules of historical data, whether it meets industry standards, whether it matches the technical specifications of the equipment, etc. The verification score and other relevant information of each candidate correction plan (such as whether it complies with certain specific rules, whether there are potential risks, etc.) are organized into verification result data.

[0197] Compare the scores of each candidate correction scheme in the verification result data. Sorting algorithms (such as bubble sort or quick sort) can be used to sort the schemes from high to low based on their scores. Select the highest-scoring scheme from the sorted candidate correction schemes. This scheme is considered the optimal correction scheme based on a comprehensive consideration of multiple sources of evidence and the graph scoring rules. The data for the selected candidate correction scheme with the highest score is organized into target correction scheme data, which includes specific correction measures and parameters.

[0198] The intermediate emissions data are modified based on the specific correction measures and parameters in the target revision plan data. For example, if the plan recommends increasing the value of a certain emission indicator by a certain percentage, the corresponding value of that indicator in the intermediate emissions data will be adjusted accordingly. After the intermediate emissions data are revised, the target emissions data is obtained.

[0199] Extract relevant clauses from the data logic verification map and compare the indicators and information in the target emissions data with the extracted clauses. Check whether the target emissions data meets the requirements specified in the map. Record the comparison results, including which indicators meet the clause requirements, which indicators deviate, and the degree of deviation. Organize these records into clause comparison data.

[0200] Design the framework of the compliance report, including the title, table of contents, abstract, main text, conclusion and other parts of the report. The main text can be organized according to different emission indicators, equipment or business processes. Integrate the information in the clause comparison data into the corresponding part of the report. Describe in detail in the report the comparison results of the target emission data and the clauses in the data logic verification map, make a positive statement for the parts that meet the requirements, and conduct a detailed analysis of the parts with deviations, including the reasons for the deviations, possible impacts, etc. Based on the analysis results of the clause comparison data, give a compliance evaluation of the target emission data in the conclusion part of the report, such as whether it is overall compliant, what major compliance issues exist, etc. At the same time, make corresponding suggestions for existing problems, such as further corrective measures, equipment maintenance suggestions, management improvement suggestions, etc. After completing the writing and editing of the report, generate the final compliance report.

[0201] Preferably, the specific steps of step S41 are:

[0202] Step S411: Using a dual Q network through a preset reinforcement learning model to select the optimal correction action corresponding to the intermediate emission data;

[0203] Step S412: When the optimal correction action is data replacement, corresponding replacement data is selected from the data logic verification map to construct first candidate correction solution data;

[0204] Step S413: When the optimal correction action is linear interpolation, corresponding adjacent normal data are selected from the data logic verification map to construct the second candidate correction solution data.

[0205] In an embodiment of the present invention, a double Q-network is an improvement to traditional Q-learning, designed to address the problem of overestimation of Q values. It comprises two Q networks: a main network (Q1) and a target network (Q2). Initially, both networks need to be initialized, including their structure (e.g., number of layers, number of neurons per layer) and parameters. The preset reinforcement learning model uses a data logic verification map and intermediate emission data as input. The data logic verification map provides information such as the logical relationships between emission data and the associations between devices and data, while the intermediate emission data is the data to be corrected. The intermediate emission data and related information in the data logic verification map (e.g., abnormal nodes, weights of associated edges, etc.) are encoded to form a state that can be processed by the reinforcement learning model. Specifically, the main network Q1 calculates the Q values ​​of all actions and then selects the index of the action with the highest Q value. The target network Q2 uses this index to determine the final action, resulting in the optimal corrective action. This dual network approach reduces overestimation of Q values, allowing for more accurate selection of the optimal corrective action.

[0206] Check whether the optimal correction action selected in step S411 is data replacement. If so, proceed to the next step. Based on the portion of the intermediate emissions data that requires correction, search the data logic verification map for corresponding replacement data. Combine the selected replacement data with the intermediate emissions data to construct the first candidate correction solution data. Specifically, replace the portion of the intermediate emissions data that requires correction with the replacement data to obtain the first candidate correction solution data.

[0207] If the optimal correction action selected in step S411 is linear interpolation, the corresponding adjacent normal data is selected from the data logic verification map. Based on information such as time sequence and device association, the normal data adjacent to the intermediate emission data requiring correction is determined in the data logic verification map. The resulting correction value replaces the abnormal portion of the intermediate emission data, thereby constructing the second candidate correction solution data.

[0208] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A sewage discharge data management method based on smart water services, characterized in that: The following steps are involved: Step S1: Obtain the enterprise's sewage discharge data, equipment status data, and environmental data, perform edge computing on the sewage discharge data, the equipment status data, and the environmental data to generate initial discharge data and equipment evaluation data; Step S2: performing data implicit anomaly identification and multimodal data cleaning on the initial discharge data and the equipment evaluation data based on a sewage component chemical association rule library to generate an anomaly mark list and intermediate discharge data; Step S3: performing data association analysis based on the abnormality mark list, the intermediate emission data, and the enterprise operation data corresponding to the enterprise, and constructing a data logic verification map; Step S4: Based on the data logic verification map, the intermediate emission data is automatically corrected and verified with multi-source evidence to generate target emission data and a compliance report.

2. A sewage discharge data management method based on smart water services according to claim 1, characterized in that: The specific steps of step S1 are: Step S11: Using a preset abnormal threshold library to perform threshold filtering on the sewage discharge data, the equipment status data, and the environmental data to generate sewage discharge filtering data, equipment status filtering data, and environmental filtering data; Step S12: aligning the timestamps of the sewage discharge filtering data, the equipment status filtering data, and the environment filtering data to generate sewage discharge calibration data, equipment status calibration data, and environment calibration data; Step S13: converting the format of the sewage discharge calibration data, the equipment status calibration data, and the environmental calibration data to construct initial discharge data; Step S14: input the device calibration data into a preset device evaluation model to perform device evaluation and generate device evaluation data.

3. A sewage discharge data management method based on smart water affairs according to claim 2, characterized in that: The specific steps of step S14 are: Step S141: Eliminate abnormal fluctuation data in the device calibration data to generate initial device data; Step S142: Fill missing data in the initial device data using historical calibration data corresponding to the device calibration data to generate target device data; Step S143: Calculate calibration accuracy, repeatability error, and drift rate using the target device data to generate device evaluation data.

4. The sewage discharge data management method based on smart water affairs according to claim 1 is characterized in that: The specific steps of step S2 are: Step S21: Calculate the isolation score of the initial emission data using an isolation forest algorithm to generate isolation score data; Step S22: Using the LSTM time series prediction model to predict the data fluctuation range using the historical data corresponding to the initial emission data, and generating a dynamic baseline; Step S23: performing logic verification on the isolated score data and the dynamic baseline with a preset sewage component chemical association rule library to generate logic verification data; Step S24: adjusting the abnormal weight and level of the isolated score data according to the logic verification data to generate abnormal mark data; Step S25: performing visual abnormality feature recognition on the sewage outlet monitoring video data corresponding to the enterprise to generate visual abnormality data; Step S26: construct an abnormality mark list based on the timestamp by combining the visual abnormality data and the abnormality mark data; Step S27: Remove the emission data corresponding to the abnormal mark list from the initial emission data to generate intermediate emission data.

5. The sewage discharge data management method based on smart water affairs according to claim 4 is characterized in that: The specific steps of step S25 are: S251, extracting frames of the sewage outlet monitoring video data corresponding to the enterprise to generate multiple initial single-frame image data; S252, using the YOLOv5 model to respectively detect abnormal foam areas in the initial single-frame image data, and performing area ratio calculation to generate abnormal foam area ratio; S253, selecting initial single-frame image data in which the abnormal foam area accounts for a greater proportion than a preset threshold, and generating a plurality of target single-frame image data; S254, respectively calculating the HSV color space histogram of the target single-frame image data, and performing a similarity comparison between the HSV color space histogram and the corresponding normal emission sample to generate the corresponding color similarity of the target single-frame image data; S255 , constructing visual anomaly data using the target single-frame image data whose color similarity is less than a preset similarity threshold.

6. A sewage discharge data management method based on smart water services according to claim 1 or 4, characterized in that: The specific steps of step S3 are: S31, preprocessing the abnormality mark list, the intermediate emission data, and the enterprise operation data corresponding to the enterprise to generate a preprocessed data set; S32, aligning the timestamps and device IDs of the preprocessed data in the preprocessed data set to generate a related data set; S33. Use the associated data set to construct a data logic verification map.

7. A sewage discharge data management method based on smart water services according to claim 6, characterized in that: The specific steps of step S31 are: S311, removing duplicate or erroneous tag information in the abnormal tag list, unifying the tag format, and generating a first preprocessed data set; S312, standardizing the intermediate emission data to generate a second preprocessed data set; S313: Structurally process the enterprise operation data corresponding to the enterprise to generate third pre-processed data; S314 , removing abnormal fluctuation data from the first preprocessed data set, the second preprocessed data set, and the third preprocessed data set according to a preset fluctuation threshold, to construct a preprocessed data set.

8. The sewage discharge data management method based on smart water services according to claim 6 is characterized in that: The specific steps of step S33 are: S331, obtaining entity data in the associated dataset; S332: Entities in the entity data are used as nodes in a graph, and relationships between the entities are used as edges between nodes. The edges are assigned corresponding weights and types to generate an initial graph. S333, optimizing the initial graph using a graph algorithm to generate a target graph; S334. Use preset business rules and expert experience to verify the target graph and generate a data logic verification graph.

9. The sewage discharge data management method based on smart water affairs according to claim 1 is characterized in that: The specific steps of step S4 are: Step S41: constructing a correction scheme for the intermediate emission data based on the data logic verification map using a preset reinforcement learning model to generate candidate correction scheme data; Step S42: Verify the candidate correction solution data using the preset multi-source evidence and the scoring rules in the data logic verification map to generate verification result data; Step S43: Select the candidate correction solution data with the highest score in the verification result data to generate target correction solution data; Step S44: Correcting the intermediate emission data according to the target correction scheme data to generate target emission data; Step S45: Compare the target emission data with the terms in the data logic verification map to generate term comparison data; Step S46: Use the clause comparison data to construct a compliance report.

10. A sewage discharge data management method based on smart water services according to claim 9, characterized in that: The specific steps of step S41 are: Step S411: Using a dual Q network through a preset reinforcement learning model to select the optimal correction action corresponding to the intermediate emission data; Step S412: When the optimal correction action is data replacement, corresponding replacement data is selected from the data logic verification map to construct first candidate correction solution data; Step S413: When the optimal correction action is linear interpolation, corresponding adjacent normal data are selected from the data logic verification map to construct second candidate correction solution data.

Citation Information

Cited By

  • Efficient data statistical processing method

    CN121958745A

  • An efficient data statistical processing method

    CN121958745B