An environmental monitoring data processing method and system based on pollution discharge permit execution report

CN122529758APending Publication Date: 2026-08-07SICHUAN ZHONGRUN ZHIYUAN ENVIRONMENTAL MONITORING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610658197.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-05-13
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0004]本发明目的之一在于提供一种基于排污许可执行报告的环境监测数据处理方法,以解决现有技术中多源异构环境监测数据因格式、频率和编码体系不统一而形成数据孤岛,导致数据融合对齐效率低下且易出错的问题

Benefits of technology

[0026]1、发明通过构建以排放口标识、污染物编码和监测方法标识为三维空间索引坐标、以统一的离散时间轴为时间维度的时空对齐张量结构,将来自自动监测系统、手工监测、工况记录、台账管理和许可限值等多种不同来源、不同频率、不同格式的异构数据,统一映射并聚合到同一正交化的规范化数据结构中,通过时间槽映射函数将精度各异的原始时间戳归一化到统一的离散时间网格上,并通过冲突聚合算子自动完成同一时间槽内冗余数据的去重处理,消除了传统系统中因各数据源独立存储而导致的数据孤岛问题,使后续的质量控制和排放量核算能够在数学上可计算的统一数据基础上进行,显著提高了多源数据融合的效率和准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122529758A_ABST
    Figure CN122529758A_ABST
Patent Text Reader

Abstract

The application discloses an environmental monitoring data processing method and system based on pollution discharge permission execution report, and belongs to the field of environmental monitoring data processing.The method comprises the following steps: obtaining multi-source environmental data flow for preprocessing and space-time alignment to generate a first data set; extracting a constraint condition field, and instantiating a dynamic quality control rule library based on the constraint condition field and working condition state information; adopting double-layer discrimination logic to process the first data set to generate a second data set after quality control, so as to distinguish between false abnormalities and real emission over-standard caused by equipment drift; taking effective data in the second data set after quality control as input, performing emission accounting operation, and outputting a third data set containing a compliance rate and a compliance margin rate; performing memory mapping corresponding to the third data set and an execution report template, and executing a three-level verification control flow to generate a correction suggestion table based on the verification result.The application reduces the misjudgment rate of abnormal data and improves the accuracy of quality control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of environmental monitoring data processing, and in particular to a method and system for processing environmental monitoring data based on discharge permit execution reports. Background Technology

[0002] With the full implementation of my country's pollutant discharge permit system, the pollutant discharge permit execution report has become the core legal document for pollutant discharge entities to report their pollutant discharge status to the ecological and environmental authorities. The quality of the execution report directly affects the effectiveness of environmental supervision and the compliance management level of pollutant discharge entities. However, in current technical practice, the preparation process of the pollutant discharge permit execution report faces multiple technical bottlenecks, which seriously restrict the end-to-end quality assurance capability of environmental monitoring data from collection to final report output.

[0003] Existing technologies have significant shortcomings in areas such as multi-source data fusion, accurate identification of abnormal data, compliant accounting in scenarios with missing data, assurance of report data quality, and full-process traceability. There is an urgent need for an environmental monitoring data processing method that can systematically solve the above problems. Summary of the Invention

[0004] One of the objectives of this invention is to provide an environmental monitoring data processing method based on the discharge permit execution report, in order to solve the problem in the prior art where multi-source heterogeneous environmental monitoring data form data silos due to inconsistent formats, frequencies and encoding systems, resulting in low data fusion and alignment efficiency and easy errors.

[0005] This invention is achieved through the following technical solution: an environmental monitoring data processing method based on a discharge permit execution report, comprising the following steps: acquiring multi-source environmental data streams; performing standardized preprocessing and spatiotemporal alignment on the multi-source environmental data streams; constructing a spatiotemporal alignment tensor with discharge outlet identifiers, pollutant codes, and monitoring method identifiers as three-dimensional spatial index coordinates to generate a first dataset; parsing the discharge permit text, extracting constraint fields, and instantiating a dynamic quality control rule base based on the constraint fields and operating condition information; processing the first dataset using a two-layer screening logic to generate a quality-controlled second dataset, wherein the rule layer of the two-layer screening logic performs initial screening on the first dataset based on the dynamic quality control rule base, and the model of the two-layer screening logic... The system performs joint discrimination on the data from the rule layer, combining anomaly detection algorithms and time-series prediction models to distinguish between false anomalies caused by equipment drift and actual emission exceedances. It reads the calculation method field, dynamically loads a matching emission calculation model from a pre-set model library, and uses valid data from the second dataset after quality control as input to perform emission calculation operations, outputting a third dataset containing compliance rate and compliance margin rate. The third dataset is then mapped to an execution report template in memory, and a three-level verification control flow is executed. A correction suggestion table is generated based on the verification results. Based on the data passing through the three-level verification control flow, a structured emission permit execution report is output, and the traceability tags and calculation logs from the entire processing process are encapsulated into a compliance archive package and written to persistent storage.

[0006] Furthermore, the output includes a third dataset containing compliance rate and compliance margin rate, comprising: at the end of each accounting period, calculating the ratio of the cumulative total emissions from the start of the permit year to the current time to the total emissions of the permit year, and subtracting the ratio to obtain the compliance margin rate; when the compliance margin rate is lower than a preset warning threshold, and the compliance margin rate is predicted to drop below zero after linear extrapolation to the end of the permit year based on the current compliance margin consumption rate, a compliance warning signal is generated.

[0007] Furthermore, the step of encapsulating the traceability tags and accounting logs of the entire processing process into a compliance archive package includes: archiving and encapsulating the original data hash value, the truth table records of each level of rule hits, the traceability tags, the emission accounting calculation logs of each time slot, and the judgment results of the three-level verification control flow; calculating a global digital signature for the encapsulated compliance archive package; and writing the compliance archive package with the attached global digital signature into the persistent storage medium.

[0008] Furthermore, the multi-source environmental data stream is standardized and preprocessed for spatiotemporal alignment, including: extracting timestamps from the multi-source environmental data stream and uniformly converting them into a standard date and time format; reorganizing the data payload according to a preset pollutant coding mapping rule; defining a three-dimensional spatial index coordinate system with emission outlet identifier set, pollutant code set, and monitoring method identifier set as three orthogonal dimensions, constructing the spatiotemporal alignment tensor, and generating the first dataset.

[0009] Further, constructing the spatiotemporal alignment tensor includes: defining a discrete time axis with a fixed time step interval; dividing the timestamps of the standard date and time format into continuous time slots according to a set time granularity; mapping the timestamps of each original data record to its corresponding time slot using a time slot mapping function, wherein the time slot mapping function determines the time slot to which the original data record belongs by dividing the difference between the original timestamp and the start time of the time axis by the time step and rounding it; within each time slot, aggregating data frames with the same three-dimensional spatial index coordinates into data blocks; detecting the continuity of time slots in each data block, inserting null value markers for missing time slots and recording the start and end timestamps of the missing time period in the missing log; deduplicating redundant data frames within the same time slot using a conflict aggregation operator; and assembling all data blocks after aggregation and deduplication into the spatiotemporal alignment tensor.

[0010] Furthermore, the conflict aggregation operator adopts a latest value priority strategy, that is, when there are multiple data frames under the same time slot and the same three-dimensional spatial index coordinate, the data frame with the latest arrival time is selected as the valid value, and the remaining redundant data frames are eliminated; when there are no data frames under a certain time slot and three-dimensional spatial index coordinate, the value at that position is marked as null.

[0011] Furthermore, based on the constraint fields and operating condition information, a dynamic quality control rule base is instantiated, including: using regular expressions and a preset discharge permit dictionary to scan the discharge permit text, extracting quantitative parameters and condition constraint clauses for each discharge outlet; converting the condition constraint clauses into Boolean logic expressions; extracting operating condition information from the ledger data, generating a Boolean time series of operating conditions, extracting a static upper limit benchmark value from the discharge permit text, and linking the Boolean time series of operating conditions with the static upper limit benchmark value through a piecewise function to construct a dynamic threshold function for operating condition linkage.

[0012] Furthermore, the value of the working condition linkage dynamic threshold function is determined based on the state value of the working condition state Boolean time series in the current time slot: when the state value indicates that the production facility is in normal production, the output of the working condition linkage dynamic threshold function is equal to the static upper limit benchmark value; when the state value indicates that the production facility is in shutdown or maintenance, the output of the working condition linkage dynamic threshold function is switched to the preset exemption threshold under the corresponding three-dimensional spatial index coordinates.

[0013] Furthermore, the dynamic quality control rule base includes: threshold rules, frequency rules, and logic rules; wherein, the threshold rules are used to determine whether the monitored values ​​exceed the permitted emission limits or hardware range boundaries; the frequency rules are used to determine whether the actual reported frequency meets the minimum monitoring frequency requirements specified in the discharge permit text; the logic rules are used to determine whether there is a logical contradiction between concentration, flow rate, and emission quantity that violates the law of conservation of mass, and the logic rules include operating condition linkage constraints. When the operating condition Boolean time series indicates a shutdown or maintenance status, the threshold in the current time window is switched from the static upper limit benchmark value to the exemption threshold, and the corresponding over-limit alarm trigger is blocked.

[0014] Furthermore, the rule layer performs initial screening on the first dataset based on the dynamic quality control rule base, including: pushing the data in the first dataset into the processing queue in chronological order; for each data node in the processing queue, performing the following parallel checks through the initial screening filter: determining whether the time slot of the data node is within the equipment operation and maintenance period recorded in the ledger data, and if so, marking it as invalid due to operation and maintenance conflict; determining whether the value of the data node exceeds the hardware range boundary of the corresponding monitoring parameter, and if so, marking it as invalid due to range overflow; marking data nodes that are not marked as invalid as passing the initial screening and sending them to the model layer.

[0015] Furthermore, the step of determining whether the time slot of a data node is within the equipment operation and maintenance period in the initial screening filter is implemented through an operation and maintenance conflict indication function: if the time slot of the current data node falls within the time interval recorded in the operation and maintenance ledger, the operation and maintenance conflict indication function takes a value of one; otherwise, it takes a value of zero. When the operation and maintenance conflict indication function takes a value of one, the data node is determined to be invalid.

[0016] Furthermore, the joint discrimination to distinguish between false anomalies caused by equipment drift and actual emission exceedances includes: calculating the anomaly score of each data node that passed the initial screening within the current time window using the isolated forest algorithm; inputting the historical normal concentration sequence and the Boolean time sequence of the operating conditions within the corresponding time window as input to the Long Short-Term Memory network to calculate the expected value of the predicted concentration at the current time node; calculating the deviation rate based on the actual monitored concentration value at the current time node and the expected value of the predicted concentration; and determining the quality control classification of each data node based on the anomaly score and the deviation rate using a joint weighting discriminant.

[0017] Furthermore, the anomaly score is calculated as follows: based on the average isolation path length of each data node in the entire isolated tree, after normalization processing by a normalization coefficient related to the sample size, the anomaly score is obtained with a value between zero and one, wherein the closer the anomaly score is to one, the higher the probability that the data node is anomaly.

[0018] Furthermore, the deviation rate is calculated as follows: the absolute difference between the actual monitored concentration value at the current time node and the expected predicted concentration value is divided by the larger of the expected predicted concentration value and a smoothing constant to obtain the deviation rate; wherein, the smoothing constant is used to prevent division by zero anomalies when the expected predicted concentration value approaches zero.

[0019] Furthermore, the joint determination logic includes: when the abnormal score of a data node is greater than a preset abnormal score threshold, and the deviation rate is less than or equal to a preset equipment drift tolerance, the data node is determined to be an equipment drift error; when the actual monitored concentration value of a data node is greater than the value of the working condition linkage dynamic threshold function in the current time slot, and the deviation rate is greater than the equipment drift tolerance, the data node is determined to be a true exceedance; if neither of the above two conditions is met, the data node is determined to be normal.

[0020] Furthermore, for data nodes that are determined to be equipment drift errors or actual exceedances, as well as data nodes marked by the rule layer as invalid due to operation and maintenance conflicts or invalid due to range overflow, corresponding traceability tags are attached; wherein, the traceability tags include equipment traceability tags, operation and maintenance traceability tags, operating condition traceability tags, and human traceability tags.

[0021] Further, the emission accounting operation includes: when the type of the accounting method field is automatic monitoring method, loading a numerical integration model from the preset model library, and performing multiplication and accumulation operations on the effective hourly concentration value and the corresponding hourly flue gas flow value in the second dataset after quality control, time slot by time; when the type of the accounting method field is material balance algorithm, loading a mass conservation equation model from the preset model library, and extracting the raw material consumption, product output and material conversion coefficient from the ledger data for calculation.

[0022] Furthermore, the emission calculation operation also includes punitive substitution data filling, specifically: detecting whether there are consecutive missing periods in the second dataset after quality control; determining whether the length of the consecutive missing periods exceeds the maximum tolerance window specified in the discharge permit text; if it exceeds the maximum tolerance window, setting the missing indicator variable of each time slot in the consecutive missing periods to one, and filling each time slot in the consecutive missing periods with the product of the upper limit of the permitted emission concentration and the historical maximum flue gas flow rate as punitive substitution data; performing emission calculation on each time slot in the accounting cycle according to a unified accounting method, wherein, in the time slots where the missing indicator variable is zero, actual effective monitoring data is used in the calculation, and in the time slots where the missing indicator variable is one, the punitive substitution data is used in the calculation.

[0023] Furthermore, the three-level verification control flow includes: integrity verification: comparing the third dataset with the monitoring factor matrix and monitoring frequency vector required by the discharge permit text element by element to detect whether there are missing monitoring factors or insufficient reporting frequency; logical verification: for each natural day, comparing the cumulative sum of hourly emissions with the daily total emission record value for that day, and determining that there is a logical contradiction when the logical conservation verification error between the two exceeds a preset rounding error threshold; compliance verification: reading the latest value of the compliance margin rate to determine whether excessive emissions have occurred or whether there is an annual risk of exceeding the total emission limit.

[0024] Another aspect of the present invention provides an environmental monitoring data processing system based on a discharge permit execution report, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements any of the environmental monitoring data processing methods based on discharge permit execution reports as described above.

[0025] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0026] 1. The invention constructs a spatiotemporally aligned tensor structure with emission outlet identification, pollutant coding, and monitoring method identification as three-dimensional spatial index coordinates and a unified discrete time axis as the time dimension. This structure maps and aggregates heterogeneous data from various sources, frequencies, and formats, such as automatic monitoring systems, manual monitoring, operating condition records, ledger management, and permit limits, into a unified orthogonal standardized data structure. A time slot mapping function normalizes the original timestamps of varying precision onto a unified discrete time grid. Furthermore, a conflict aggregation operator automatically deduplicates redundant data within the same time slot, eliminating the data silo problem caused by independent storage of data sources in traditional systems. This allows subsequent quality control and emission calculations to be performed on a mathematically computable unified data basis, significantly improving the efficiency and accuracy of multi-source data fusion.

[0027] 2. This invention constructs a dynamic threshold function linked to operating conditions, directly incorporating the Boolean time series of operating conditions as switching coefficients into the threshold calculation logic. This enables the automatic switching of the judgment threshold according to the actual production status of the enterprise. When the production facility is in normal production, the dynamic threshold equals the static upper limit benchmark value; when the production facility is in shutdown or maintenance, the dynamic threshold automatically switches to the exemption threshold. This piecewise function linkage mechanism can adapt to the changes in operating conditions of different enterprises and different emission outlets without manual intervention, eliminating the shortcomings of traditional fixed threshold alarm mechanisms that generate false exceedance alarms due to their inability to detect changes in operating conditions.

[0028] 3. This invention achieves accurate classification and identification of abnormal data by employing a two-layer discrimination logic consisting of a rule layer and a model layer connected in series. In the rule layer, deterministic invalid data is quickly filtered with minimal computational cost, including data during equipment operation and maintenance periods and data exceeding hardware range boundaries. The model layer, through the joint discrimination of the isolated forest algorithm and the long short-term memory network, utilizes the logic and operation between global anomaly detection and local time series prediction to accurately distinguish between false anomalies caused by slow drift of monitoring equipment and real emission exceedance events. When a data point appears abnormal in the global feature space, but its numerical change trend conforms to the prediction of the long short-term memory network based on historical drift trajectories, the system can accurately determine that the anomaly originates from equipment drift rather than a real emission event, thereby reducing the false judgment rate of abnormal data and improving the accuracy of quality control. Attached Figure Description

[0029] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:

[0030] Figure 1 The above is a flowchart of the overall method provided in Embodiment 1 of the present invention. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0032] Example 1

[0033] This embodiment discloses a method for processing environmental monitoring data based on discharge permit implementation reports. Figure 1 The overall method flowchart of this embodiment is shown. As can be seen from the figure, this embodiment includes the following steps:

[0034] Step 1: Acquire multi-source environmental data streams, perform standardized preprocessing and spatiotemporal alignment on the multi-source environmental data streams, construct a three-dimensional spatiotemporal aligned database based on emission outlet-pollutant-monitoring methods, and generate the first dataset.

[0035] Multi-source environmental data streams refer to a collection of raw environmental monitoring data originating from various acquisition methods and management systems. These data differ significantly in acquisition frequency, data format, transmission protocol, and storage structure. Specifically, multi-source environmental data streams include, but are not limited to, automatic monitoring data, manual monitoring data, operating condition data, ledger data, and permit limit data.

[0036] Automatic monitoring data refers to real-time monitoring records automatically collected and uploaded by online continuous emission monitoring systems (CEMS) installed at each emission point. These records typically include pollutant concentration values ​​(such as SO2, NO). x Parameters such as hourly average values ​​of particulate matter, flue gas flow rate, and flue gas temperature are collected at a frequency of once per hour or higher.

[0037] Manual monitoring data refers to discrete monitoring records obtained by certified personnel using portable instruments or sampling and testing methods in accordance with the monitoring frequency specified in the discharge permit. The collection frequency is relatively low (such as once per quarter or once per month), but it usually has high legal validity and reference value.

[0038] Operating condition data refers to records of operational parameters reflecting the actual operating status of a polluting enterprise's production facilities, including but not limited to production load rate, equipment start-up and shutdown status (normal production, shutdown, maintenance, etc.), fuel or raw material input, and product output. Operating condition data plays an important auxiliary role in judging the rationality of monitoring data.

[0039] Ledger data refers to the daily environmental management information recorded and stored by enterprises in accordance with the requirements of the pollution discharge permit management, including but not limited to equipment operation and maintenance records (such as CEMS calibration records, maintenance periods), pollution control facility operation records, raw and auxiliary material consumption ledgers, etc.

[0040] Permitted limit data refers to the various emission control indicators clearly stated in the discharge permit, including the upper limit of permitted emission concentration for each pollutant at each discharge outlet, daily emission limit, monthly emission limit, annual total emission limit, and corresponding monitoring frequency requirements.

[0041] A three-dimensional spatiotemporal aligned database refers to a standardized database that uses emission outlet identifiers, pollutant codes, and monitoring method identifiers as three-dimensional spatial index coordinates, and a unified discrete time axis as the time dimension. It maps and aggregates the aforementioned multi-source heterogeneous data into a single orthogonal data structure. The design goal of this database is to eliminate the data silo problem caused by the independent storage of database structures from different vendors in traditional systems, transforming heterogeneous, multi-source, and asynchronous raw data into a mathematically computable standardized tensor structure.

[0042] The first dataset refers to the structured dataset generated after standardization preprocessing and spatiotemporal alignment operations. Each record in this dataset corresponds to a unique time slot and three-dimensional spatial index coordinates.

[0043] In some embodiments, multi-source environmental data streams are acquired, standardized preprocessing and spatiotemporal alignment are performed on the multi-source environmental data streams, a three-dimensional spatiotemporal aligned database based on emission outlet-pollutant-monitoring methods is constructed, and a first dataset is generated, which may specifically include:

[0044] Extract timestamps from multi-source environmental data streams and convert them into ISO8601 format;

[0045] The data payload is reorganized according to the preset pollutant coding mapping rules;

[0046] Define a three-dimensional spatial index coordinate system, construct a spatiotemporal alignment tensor, and generate the first dataset.

[0047] The ISO 8601 format refers to the date and time representation standard published by the International Organization for Standardization, used to eliminate ambiguities in time representation caused by inconsistencies in time formats between different data sources. For example, automatically monitored data might be recorded with a timestamp in the format 2024-06-01 08:00:00+08:00, while manually monitored data might be recorded with a date in the format 20240601. By uniformly converting to the ISO 8601 format, the accuracy of subsequent time alignment operations can be ensured.

[0048] Pollutant coding mapping rules refer to pre-established rules used to uniformly map different names, codes, or identifiers used for the same pollutant in different data sources to a standardized code. For example, an automatic monitoring system may record sulfur dioxide as SO2, while manual monitoring records may use sulfur dioxide or the national standard code W21001. By using pollutant coding mapping rules, these can be unified into a unique standard code, thereby eliminating the data fragmentation problem caused by inconsistent naming.

[0049] A three-dimensional spatial index coordinate system refers to a three-dimensional index framework used to uniquely locate each monitoring record in a database. This coordinate system has three orthogonal dimensions: the set of emission outlets, the set of pollutants, and the set of monitoring methods. Specifically, the three-dimensional spatial index coordinate system is defined as follows: ,in This indicates the identifier of a specific emission outlet within the set of emission outlets. This represents the code of a specific pollutant in a set of pollutants. This indicates the identifier of a specific monitoring method in the set of monitoring methods (such as automatic monitoring or manual monitoring).

[0050] Understandably, by introducing a three-dimensional spatial index coordinate system, the system can accurately locate monitoring records from different data sources, targeting different emission outlets and different pollutants, to a uniquely determined spatial coordinate position, thereby providing a unified data addressing basis for subsequent time series analysis, quality control, and emission accounting.

[0051] In some embodiments, to achieve precise alignment of the aforementioned multi-source heterogeneous data in the time dimension, the system needs to discretize the continuous time axis into a sequence of equally spaced time slots, and assign each original data record to its respective time slot using a time slot mapping function. A spatiotemporal alignment tensor is constructed to generate the first dataset, including:

[0052] Define timeline The time step is ;

[0053] The ISO8601 format timestamp is divided into consecutive time slots according to the set time granularity;

[0054] Within each time slot, data frames with the same emission outlet identifier, pollutant code, and monitoring method identifier are aggregated into a data block;

[0055] Detect the continuity of time slots in each data block and handle missing and redundant cases;

[0056] A spatiotemporally aligned tensor is constructed as the first dataset.

[0057] The timeline refers to the start time set by the system. Start with a fixed time step An ordered sequence of discrete time points is formed by extending forward at intervals. For example, when the time step is... When set to 1 hour, the timeline is a sequence of equidistant time points in hourly units.

[0058] A time slot refers to the time interval defined between two adjacent discrete points on the time axis. Each time slot logically corresponds to a unique time index identifier. The system uses a time slot mapping function. Any original timestamp Mapped to its respective discrete time slot The mathematical expression for this mapping function is:

[0059]

[0060] in, The timestamp is from the original data record. The start time of the system's timeline. For time step, This is the floor function. The purpose of this mapping function is to normalize raw timestamps of varying precision onto a unified discrete-time grid, eliminating time jitter between different data sources.

[0061] Understandably, the time step The selection should be based on the maximum monitoring frequency specified in the discharge permit. For example, when the automatic monitoring data is reported once per hour, It is advisable to set it to 1 hour to ensure that no effective monitoring information is lost.

[0062] A data frame refers to a single original data record with the same three-dimensional spatial index coordinates within the same time slot. A data block refers to an aggregate of all data frames with the same three-dimensional spatial index coordinates within the same time slot.

[0063] In some embodiments, the system employs a conflict aggregation operator to process multiple redundant data points from the same data source within the same time slot. A spatiotemporal alignment tensor is constructed as the first dataset, specifically through the following steps:

[0064] For each time slot on the timeline and each coordinate point in the three-dimensional spatial index coordinate system Collect all raw data payloads that have been mapped to the time slot by the time slot mapping function and whose spatial indexes match, and aggregate them using the conflict aggregation operator to obtain the unique and definite value of the coordinate point in the time slot.

[0065] Spacetime Alignment Tensor The construct expression is:

[0066]

[0067] in, For the original data payload, This indicates that the timestamp of the data record is mapped and assigned to a time slot. , This indicates that the three-dimensional spatial index coordinates of the data record are consistent with the target coordinates. For conflict aggregation operators.

[0068] Among them, the conflict aggregation operator This refers to the deterministic selection rule used to determine a unique valid value when multiple data frames from the same data source exist within the same time slot. Specifically, the conflict aggregation operator adopts a latest-value-first strategy, i.e. The system takes the data frame with the longest arrival time (i.e., the newest) as the valid value and discards the rest of the duplicate and redundant data. When the data set corresponding to a certain time slot and spatial coordinate position is empty, that is, no valid original data record has been received at that coordinate point, the system marks the value at that position as a null value (NaN) to indicate that the data is missing.

[0069] Understandably, the conflict aggregation operator is designed to address common data retransmission and duplicate reporting issues in industrial settings. In actual deployments, due to network jitter or the retransmission mechanism of data acquisition gateways, the same monitoring record may be uploaded to the database multiple times. Without deduplication, this will lead to duplicate measurement errors in subsequent emission calculations. By employing a latest-value-first strategy, the system can automatically perform deduplication at the mathematical level, retaining the latest valid value in time sequence.

[0070] In some embodiments, the system also performs temporal slot continuity detection on the constructed spatiotemporal aligned tensor. This involves detecting temporal slot continuity in each data block and handling missing and redundant cases, including:

[0071] Traverse the data sequence corresponding to each three-dimensional spatial index coordinate point along the time axis;

[0072] If a missing time slot (i.e., the value at the corresponding position is NaN) is detected in the data sequence of a certain coordinate point, a null value marker is inserted at the missing position, and the start and end timestamps of the missing time period are recorded in the missing log for use in subsequent steps for missing data processing and triggering judgment of fault tolerance and replacement logic.

[0073] If multiple data frames from the same data source are detected within the same time slot, the latest value retention and redundancy removal have been completed by the aforementioned conflict aggregation operator.

[0074] Understandably, maintaining missing logs is crucial for subsequent steps. In step 4, during emissions calculation, the system needs to determine, based on the missing logs, whether the data loss for a certain period exceeds the maximum tolerance window stipulated in the discharge permit, and thus decide whether to trigger punitive data substitution logic.

[0075] Step 2: Parse the discharge permit text, extract the constraint fields, and instantiate the dynamic quality control rule library.

[0076] The discharge permit text refers to the electronic version of a legal document issued by the ecological and environmental authorities to a discharging entity, specifying the emission control requirements for each discharge outlet. This text includes fields for discharge outlet identification, permitted emission limits, monitoring frequency requirements, calculation methods, and various associated conditional clauses.

[0077] A dynamic quality control rule base refers to a rule engine instantiated in memory for performing real-time quality control judgments on a primary dataset. Unlike traditional static threshold comparison methods, this rule base can dynamically adjust judgment thresholds and alarm triggering conditions based on constraints parsed from the discharge permit and the company's real-time operating status. The dynamic quality control rule base includes threshold rules, frequency rules, and logical rules for constraining the matching relationship between concentration, flow rate, and emission volume.

[0078] Threshold rules refer to the upper and lower limits of values ​​set for each pollutant parameter at each emission outlet, used to identify whether the values ​​exceed the permissible emission limits or hardware range boundaries.

[0079] Frequency rules refer to the minimum monitoring frequency criteria set for each pollutant parameter at each discharge outlet, used to identify whether the actual reported frequency meets the minimum monitoring frequency requirements stipulated in the discharge permit.

[0080] Logical rules refer to the reasoning and judgment conditions used to constrain the mathematical matching relationship between concentration, flow rate and emission, and are used to identify whether there are contradictions between data that violate physical conservation laws or logical consistency.

[0081] In some embodiments, parsing the discharge permit text and instantiating a dynamic quality control rule base includes:

[0082] The permit text is scanned using regular expressions and a pre-defined pollutant discharge permit dictionary to extract quantitative parameters and conditional constraint clauses for each discharge outlet.

[0083] Transform conditional constraint clauses into deterministic Boolean logic expressions;

[0084] Construct a dynamic threshold function that links operating conditions to achieve mathematical linkage between operating conditions and thresholds.

[0085] Regular expressions are formalized tools used to match and extract specific pattern strings in unstructured or semi-structured text. A discharge permit trie is a pre-built tree-like index structure with discharge permit-specific terms and keywords as nodes, used to accelerate the location and extraction of key fields during text scanning.

[0086] Quantitative parameters refer to the emission control indicators explicitly stated in numerical form in the permit, including but not limited to the upper limit of the permitted emission concentration of each pollutant at each emission outlet, the daily emission limit, the monthly emission limit, and the annual total emission limit.

[0087] A conditional constraint clause refers to the emission control requirements specified in the permit in the form of a conditional statement. It usually includes the triggering condition and the corresponding execution action. For example, a typical conditional constraint clause is that when the production facility is shut down, the SO2 emission concentration at the emission outlet must not exceed XX mg / m³.

[0088] Boolean logic expressions refer to the transformation of natural language descriptions in conditional constraint clauses into deterministic judgment expressions connected by logical operators such as AND, OR, and NOT, enabling them to be directly executed by computers.

[0089] In some embodiments, to achieve mathematical linkage between static allowable limits and dynamic operating conditions, and to solve the problem of false alarms caused by the inability to detect changes in operating conditions in traditional fixed threshold systems, the system constructs a dynamic threshold function linked to operating conditions. The construction of the dynamic threshold function linked to operating conditions includes:

[0090] Extract working condition status information from the ledger data and define the working condition status as a Boolean time series.

[0091] Extract the static upper limit baseline value from the license text;

[0092] The Boolean time series of operating conditions is mathematically linked with the static upper limit benchmark value through a piecewise function to generate a threshold function that dynamically changes with the operating conditions.

[0093] Among them, the Boolean time series of operating conditions This refers to a binary time series extracted from ledger data, used to describe the operational status of an enterprise's production facilities within each time slot, defined as... ,in Indicates in time slot The internal production facilities are in normal operating condition. Indicates in time slot The internal production facilities are either shut down or under maintenance.

[0094] Static upper limit baseline value It refers to the upper limit of the permitted emission concentration of a certain pollutant at a certain discharge outlet under normal production conditions, which is extracted from the text of the discharge permit.

[0095] Dynamic threshold function for operating conditions The mathematical expression is:

[0096]

[0097] in, This is the static upper limit reference value applicable under normal production conditions. Boolean time series of operating conditions in time slots The value of , Exemption thresholds or extreme values ​​of physical ranges applicable under conditions of production stoppage or special operating conditions. Used as the coordinate index in three-dimensional space.

[0098] Understandably, the core design of this dynamic threshold function lies in incorporating operating condition variables. As a switching coefficient, it is directly introduced into the mathematical expression for threshold calculation. When the production facility is in normal production status, ,at this time The exemption threshold is zeroed out, and the dynamic threshold is equal to the static upper limit benchmark value under normal production conditions. When production facilities are shut down or under maintenance, At this point, the normal limit value is cleared to zero, and the dynamic threshold is switched to the exemption threshold under shutdown conditions. Through this piecewise function mechanism, the system achieves automated linkage of switching limits upon production stoppage at the mathematical logic level, adapting to the specific operating conditions of different enterprises and emission outlets without manual intervention.

[0099] In some embodiments, the logical rules specifically include operating condition linkage constraints: when operating condition data indicates that the production facility is in a shutdown or maintenance state, the system dynamically modifies the upper limit of the threshold of the automatically monitored data within the current time window (i.e., the threshold is adjusted from...). Switch to It also disables the corresponding over-limit alarm triggers to avoid false over-limit alarms caused by residual equipment readings or fluctuations in environmental background concentration during shutdown.

[0100] Understandably, the fixed threshold alarm mechanism commonly used in traditional environmental monitoring systems (i.e., triggering an alarm whenever the monitored value exceeds a fixed limit, regardless of whether the production facility is operating) is one of the core sources of false alarms. This embodiment eliminates this defect at the mathematical level through a dynamic threshold function linked to operating conditions, enabling the alarm triggering conditions to adaptively adjust to the actual production status of the enterprise.

[0101] Step 3: Process the first dataset using a two-layer screening logic to generate the second dataset after quality control.

[0102] The dual-layer screening logic refers to an anomaly data identification and classification pipeline composed of two interconnected layers: a rule layer and a model layer. The rule layer performs rapid initial screening based on deterministic rules, filtering out obviously unreasonable data records. The model layer performs more refined secondary judgments based on machine learning models, distinguishing between false anomalies caused by equipment drift and genuine emission exceedances. The design goal of the dual-layer screening logic is to address the core pain point of frequent false alarms in traditional single-threshold judgment methods, accurately distinguishing between sensor drift (false anomalies) and genuine exceedances.

[0103] The second dataset after quality control refers to the dataset generated after two-layer screening logic processing. Each data record is attached with a corresponding quality control status label (such as valid, invalid, equipment drift, actual exceedance, etc.) and a traceability label (such as equipment cause, operation and maintenance cause, operating condition cause, or human cause, etc.), which are used for emission calculation and compliance verification in subsequent steps.

[0104] In some embodiments, a two-layer screening logic is used to process the first dataset to generate a second dataset after quality control, including:

[0105] At the rule layer, the parameters of the first dataset are compared with the dynamic quality control rule base, and the initial screening data that exceed the limit, have insufficient frequency, or have logical conflicts are marked.

[0106] At the model layer, a deterministic computation pipeline based on the isolated forest algorithm and long short-term memory network is executed on the data that passes the initial screening to identify equipment drift and intermittent anomalies.

[0107] Attach source tags to the identified anomalous data. This may include the following sub-steps:

[0108] Sub-step 3.1 Rule layer processing

[0109] In some embodiments, rule-layer processing refers to pushing data from the first dataset into a processing queue in chronological order, and sequentially executing a parallel decision-making process of multiple deterministic check rules for each data node in the processing queue. Rule-layer processing includes:

[0110] The data in the first dataset are pushed into the processing queue in chronological order;

[0111] Parallel checks are performed on each data node, including: checking whether the value overflows the hardware range boundary, whether there is an interruption in the data chain that exceeds the preset time threshold, and whether the timestamp of the automatic monitoring data overlaps or conflicts with the equipment operation and maintenance period marked in the ledger data.

[0112] The processing queue refers to the sequence of data nodes to be inspected, arranged from earliest to latest according to their timestamps. A data node is a basic processing unit in the processing queue, corresponding to a data record at a specific time slot and a specific three-dimensional spatial index coordinate in the spatiotemporal alignment tensor.

[0113] Hardware measurement range boundaries refer to the physical range of values ​​that a continuous online monitoring system (CEMS) can effectively measure for a certain monitoring parameter. Readings outside this range have no physical meaning. For example, the effective measurement range of a certain model of flue gas SO2 analyzer is 0 to 2000 mg / m³. If the reading of a certain data node is negative or exceeds 2000 mg / m³, it is determined to be a range overflow.

[0114] The preset time threshold refers to the maximum allowed time interval set in advance to determine whether a data link has been interrupted. When the time interval between two adjacent valid data nodes exceeds this threshold, it is determined that the data link has been interrupted.

[0115] Intersection conflict refers to situations where the timestamp of automatic monitoring data falls within the equipment operation and maintenance period (such as calibration, maintenance, etc.) recorded in the ledger data. Monitoring data collected during the equipment operation and maintenance period may be subject to human interference and may not reflect the true emission status; therefore, it needs to be marked as invalid.

[0116] Define operation and maintenance conflict indication function If time slot If it falls within the time frame recorded in the maintenance log, then ,otherwise .

[0117] The system uses a primary screening filter. Perform rule-based judgments on each data node, and set... For data nodes in time slots and spatial coordinates The initial screening filter's decision logic is as follows, based on the given values:

[0118]

[0119] in, This indicates that the data node was deemed invalid because it was during equipment maintenance. This indicates that the data node's value exceeds the hardware range limit. And was deemed invalid. This is the maximum range value of the device corresponding to this monitoring parameter. This indicates that the data node has passed the initial screening at the rule layer and will be sent to the model layer for further judgment.

[0120] Understandably, the design principle of the rule layer is to quickly filter out deterministic invalid data with minimal computational cost, thereby reducing the computational load on subsequent model layers. Both operation and maintenance conflict checks and range overflow checks are deterministic judgments, not involving probabilistic reasoning, thus enabling preliminary screening to be completed with extremely high throughput efficiency.

[0121] Sub-step 3.2 Model layer processing

[0122] In some embodiments, model layer processing refers to processing the data marked after initial screening by the rule layer. The data node sequence is processed using a deterministic computation pipeline jointly constructed based on the Isolation Forest algorithm and Long Short-Term Memory (LSTM) network to perform bimodal anomaly detection on the data nodes. Model layer processing includes:

[0123] The isolated forest algorithm is used to calculate the high-dimensional spatial anomaly score of each data node within the current time window, thereby identifying isolated numerical mutation points.

[0124] The historical normal concentration sequence and the current operating condition identifier are used as input matrices and fed into the LSTM network to calculate the expected value of the predicted concentration at the current time point.

[0125] Calculate the deviation rate between the actual concentration and the expected predicted concentration;

[0126] The final quality control classification of data nodes is determined based on the joint discrimination of outlier scores and deviation rates.

[0127] Among them, the Isolation Forest algorithm is an unsupervised anomaly detection algorithm based on random partitioning. Its core idea is that in a high-dimensional feature space, abnormal data points can be isolated by fewer random partitions because they deviate from the main data distribution. The isolation path length (i.e., the number of steps from the root node to the leaf node) is significantly shorter than that of normal data points.

[0128] Abnormal scores This refers to the Isolation Forest algorithm as a data node. The normalized outlier metric is calculated, and its mathematical expression is:

[0129]

[0130] in, For data nodes Average isolation path length across all isolated trees For the expectation operator, To be related to sample size The relevant normalization coefficients are used to map the path length to... Within the range. A value close to 1 indicates that the data node is highly likely to be an outlier. A value close to 0.5 indicates that the data node has no obvious abnormal characteristics.

[0131] Understandably, the advantage of the Isolation Forest algorithm lies in its excellent ability to detect global structural anomalies in high-dimensional data, identifying isolated abrupt changes that deviate from the main data distribution in a multi-dimensional feature space. However, the Isolation Forest algorithm cannot distinguish the cause of the anomaly—that is, it cannot determine whether a data point marked as an anomaly is caused by a real emission exceeding the standard event or by a slow drift of the monitoring equipment. This is precisely the motivation for introducing LSTM networks to calculate the expected time-series drift.

[0132] Long Short-Term Memory (LSTM) networks are recurrent neural network architectures with gating mechanisms, capable of effectively capturing temporal dependencies and gradual trends in long-term time series. In this embodiment, the LSTM network is used to predict the expected concentration value at the current time point based on historical normal concentration data and current operating conditions.

[0133] Predicted concentration expectation The calculation method is as follows: the past time window Historical normal concentration sequence within and the sequence of operating conditions within that time window. As the input matrix, it is fed into the trained LSTM network model, which outputs the current time node. The predicted concentration value. Its mathematical expression is:

[0134]

[0135] in, This is the inference function of an LSTM network model trained on historical data. To use the time slot arrive The historical normal concentration value vector, This is a vector of Boolean values ​​representing the operating conditions within the corresponding time window.

[0136] Understandably, using the operating condition identifier as one of the input features of the LSTM network allows the network to learn the physical law that normal concentration levels have different baselines and trends under different operating conditions. For example, under full-load production conditions, the normal baseline of SO2 concentration at the emission outlet might be around 200 mg / m³, while under half-load conditions it might drop to around 100 mg / m³. By incorporating operating condition information into the prediction model, LSTM can more accurately estimate the reasonable expected concentration value under the current operating conditions.

[0137] Deviation rate This refers to the relative deviation between the actual monitored concentration value at the current time point and the expected concentration value predicted by LSTM, used to quantify the magnitude of the deviation between the actual observed value and the time-series predicted trend. The calculation formula is:

[0138]

[0139] in, This represents the actual monitored concentration value at the current time point. The expected concentration value predicted by LSTM. This is a smoothing constant used in... To prevent numerical calculation errors when the denominator is zero, the value approaches zero.

[0140] In some embodiments, the system performs final quality control classification for each data node based on a joint discriminant formula of anomaly scores and deviation rates. Joint weighting discriminant formula The judgment logic is as follows:

[0141]

[0142] in, For isolated forest anomaly score threshold, when When this occurs, it indicates that the data node has significant anomalous characteristics in the global feature space; The device drift tolerance measures the acceptable degree to which actual observations deviate from the trend predicted by the LSTM time series. The working condition linkage dynamic threshold function constructed in step S2 is used in the time slot. The value of .

[0143] (Equipment drift error) refers to the following judgment scenario: the isolated forest anomaly score of a data node exceeds the threshold (i.e., the point is judged as an anomaly in the global feature space), but at the same time, its deviation rate is less than or equal to the equipment drift tolerance (i.e., the numerical change trend of the point conforms to the prediction of LSTM based on historical drift trajectories). In this case, the system determines that the anomaly is a false anomaly caused by the slow drift of the monitoring equipment, rather than a real emission exceeding event.

[0144] (True exceedance) refers to the following judgment situation: the actual monitored concentration value of the data node exceeds the dynamic threshold of the operating condition linkage, and its deviation rate is greater than the equipment drift tolerance (that is, the value change at this point does not conform to the gradual trend of equipment drift, but rather shows a sudden exceedance that deviates significantly from the historical trend). In this case, the system determines that the anomaly is a true emission exceedance event.

[0145] (Normal) refers to the following judgment situation: the data node is neither marked as a global anomaly by the isolated forest, nor does its value exceed the dynamic threshold, or although there is a slight deviation, it is within the normal fluctuation range.

[0146] It is understandable that this joint weighting discriminant is the core creative model of the entire two-layer screening logic. Traditional anomaly detection methods rely on only a single algorithm (such as using only Isolation Forest), which indiscriminately marks all data points that deviate from the main distribution as anomalies, resulting in a large number of false alarms in environmental monitoring scenarios. A typical case is that the monitoring equipment experiences slow zero-point drift or range drift—the equipment reading may gradually deviate from the true value and eventually exceed the alarm threshold. In the eyes of Isolation Forest, this is an anomaly, but in reality, it is not a real emission exceedance event, but rather an equipment malfunction. This embodiment cleverly utilizes the logical AND operation of global judgment (Isolation Forest) and local temporal expectation deviation (LSTM) by introducing LSTM time series prediction as the second judgment dimension: when a data point appears as an anomaly in the global feature space ( However, its numerical trend perfectly matches the predictions made by LSTM based on historical drift trajectories. If the system can accurately determine that the anomaly is caused by equipment drift rather than a real emission event, it can perfectly separate equipment drift from real illegal discharge.

[0147] In some embodiments, the system is tagged as or Or marked by the rule layer , Abnormal data will be labeled with corresponding traceability tags. These tags include equipment traceability tags (corresponding to equipment drift or range overflow), maintenance traceability tags (corresponding to maintenance time period conflicts), operating condition traceability tags (corresponding to threshold switching triggered by operating condition linkage), and human traceability tags (corresponding to anomalies confirmed by manual review). These traceability tags will be transferred to subsequent steps along with the second dataset after quality control and will ultimately be packaged into a compliance file, providing a complete chain of evidence for regulatory traceability and verification.

[0148] Step 4: Read the calculation method field, dynamically load the matching emission calculation model from the preset model library, take the valid data in the second dataset after quality control as input, perform a time-based weighted calculation operation, and output a third dataset containing the compliance rate and compliance margin.

[0149] The "Accounting Method" field refers to the instruction field explicitly stated in the discharge permit document, used to determine the calculation method for the discharge volume of a specific pollutant at a particular discharge outlet. Different discharge outlets or different pollutants may be subject to different accounting methods. Common types of accounting methods include automatic monitoring methods and material balance methods.

[0150] The pre-built model library refers to a collection of callable models pre-stored within the system, containing various mathematical models for emission accounting. Each mathematical model corresponds to a specific accounting method type, and the system dynamically selects and loads the corresponding calculation model based on the accounting method field parsed from the license.

[0151] The emission accounting model is a mathematical calculation model used to convert valid monitoring data after quality control into numerical emission results. Its input is the data records marked as valid in the second dataset after quality control, and the output is the emission calculation results summarized by time period (such as day, month, quarter, year).

[0152] The third dataset refers to a structured dataset generated after the emission accounting operation, which contains the emission calculation results, compliance rate and compliance margin information of each pollutant at each emission outlet in each accounting period.

[0153] In some embodiments, the calculation method field is read, a matching emission calculation model is dynamically loaded from a pre-set model library, and a time-period-based weighted calculation operation is performed using valid data from the second dataset after quality control as input, including:

[0154] Determine the type of the accounting method field and load the corresponding accounting model;

[0155] Using the quality control data marked as valid in the second dataset after quality control as the input vector, the emission calculation is performed.

[0156] Activate the dynamic comparison engine for license limits to calculate the compliance rate and compliance margin. This may include the following sub-steps:

[0157] Sub-step 4.1 Dynamic loading and execution of the accounting model

[0158] In some embodiments, determining the type of the accounting method field and loading the corresponding accounting model includes:

[0159] If the type of the calculation method field is automatic monitoring method, then load the numerical integration model from the preset model library and perform a dot product summation operation on the effective hourly concentration and the corresponding hourly flue gas flow rate in the second dataset.

[0160] If the type of the accounting method field is material balance algorithm, then the mass conservation equation model is loaded from the preset model library, and the raw material consumption, product output and material conversion coefficient in the ledger data are extracted for algebraic calculation.

[0161] Among them, the numerical integral model refers to the time series discrete integral calculation method based on automatic monitoring data. Its calculation idea is to discretize the continuous emission process into a time step. For several time slots at intervals, the instantaneous emissions (the product of concentration and flow rate) in each time slot are summed one by one to obtain the total emissions within the accounting period.

[0162] The mass conservation equation model refers to the emission calculation method based on the principle of material balance. Its calculation idea is to back-calculate the emission amount by using the mass conservation equation based on the raw material input, product output and the migration coefficient of pollutants in the material conversion process.

[0163] In some embodiments, to address the issue of accounting bias caused by missing data in extreme scenarios, the system introduces a punitive substitution data imputation mechanism when performing emission accounting. This mechanism is applicable to situations where data loss occurs due to extreme scenarios such as network partitioning or severe equipment failure. Using the quality control data marked as valid in the second dataset after quality control as the input vector, emission calculation is performed, including:

[0164] Detect whether there are consecutive missing periods in the second dataset due to data breakage;

[0165] Determine whether the length of the missing period exceeds the maximum tolerance window stipulated in the discharge permit;

[0166] If the length of the missing period exceeds the maximum tolerance window, a replacement data filling instruction will be forcibly triggered, and the upper limit of the permitted emission concentration will be used as punitive replacement data under the most unfavorable conditions to fill the missing period.

[0167] Implement a unified emissions accounting system that includes normal integral items and punitive substitution items.

[0168] Among them, consecutive missing periods refer to the time intervals in the second dataset where multiple consecutive time slot data values ​​are marked as null (NaN) due to data chain breaks (such as communication interruption, equipment failure, etc.).

[0169] Maximum tolerance window This refers to the maximum continuous time period allowed for automatic monitoring data to be missing due to reasonable reasons (such as a brief communication interruption or equipment restart), as specified in the discharge permit. When the missing time period does not exceed the maximum tolerance window, the system can process it according to the conventional missing data handling methods (such as interpolation completion or marking missing data); when the missing time period exceeds the maximum tolerance window, the system determines that the missing data is an abnormal data break event and needs to activate the punitive replacement mechanism.

[0170] Define missing indicator variables If time slot Data is missing due to broken links and the length of the missing period exceeds the maximum tolerance window. ,but ,otherwise .

[0171] Based on the automatic monitoring integral accounting model tied to permits, the total emissions within the accounting period are calculated. The unified calculation formula is:

[0172]

[0173] in, This refers to the total number of time slots included within the accounting period. For time slots The hourly concentration values, after internal quality control, are marked as valid. For time slots The corresponding hourly flue gas flow rate value. For missing indicator variables, The permitted maximum concentration of the pollutant at the discharge outlet, as specified in the discharge permit. This refers to the historical maximum flue gas flow rate or design flow rate of the emission outlet. For time step.

[0174] Understandably, in this formula and This forms a pair of mutually exclusive logic switches. During time slots where normal data is complete, ,at this time Normal integral items take effect, punitive substitution items are eliminated, and emissions are calculated based on actual monitoring data; in time slots where data is missing due to illegal chain breaks, ,at this time Normal integral terms are eliminated, punitive substitution terms take effect, and the system forces the concentration to the maximum permitted level. The worst-case scenario combination of the historical maximum flow rate is substituted into the integral operator for calculation. This design ensures that the emission calculation results remain compliant and conservative in any extreme data missing scenario, mathematically plugging the loopholes that allow companies to evade environmental measurement due to network outages or equipment failures.

[0175] Sub-step 4.2 Dynamic comparison of permit limits and calculation of compliance margin

[0176] In some embodiments, after completing the emissions calculation for each accounting cycle, the system activates the dynamic comparison engine for permit limits to calculate in real time the percentage of the current cumulative total emissions to the total permitted annual emissions, and updates the remaining compliance margin. Activating the dynamic comparison engine for permit limits and calculating the compliance rate and compliance margin includes:

[0177] At the end of each accounting period, calculate the percentage of the current cumulative emissions to the total emissions permitted for the year;

[0178] Update the value of the remaining compliance margin register in memory;

[0179] An interrupt signal is triggered when the compliance margin falls below a preset warning threshold.

[0180] Among them, the permitted annual total emissions It refers to the maximum total amount of a certain pollutant that is allowed to be discharged from a certain discharge outlet within a permit year, as specified in the discharge permit.

[0181] The remaining compliance margin register is a data register maintained in memory by the system to store and update the remaining compliance margin value at the current moment in real time.

[0182] Compliance margin rate The calculation formula is:

[0183]

[0184] in, The start time of the licensing year. For the current moment, The emission accounting function at time The emission values, This refers to the cumulative emissions from the beginning of the year to the present moment. This refers to the permitted annual total emissions. This indicates that no emissions have been generated yet. This indicates that the cumulative emissions have just reached the permitted annual limit. This indicates that emissions have exceeded the total allowable limit.

[0185] In some embodiments, the system not only monitors whether the absolute value of the compliance margin rate is lower than the warning threshold, but also monitors the time derivative of the compliance margin rate. (i.e., the rate at which compliance margin is consumed), and uses linear extrapolation to predict future compliance trends. Specifically, when the compliance margin rate... Below the preset warning threshold At that time, and by linear extrapolating from the current emission rate, it is predicted that at the end of the permit year... The compliance margin rate will drop below zero (i.e.) The system will intercept and generate compliance warning logs and interruption signals in advance, prompting polluting enterprises to adjust their emission strategies to avoid exceeding the annual total emission limit.

[0186] Understandably, monitoring only the absolute value of the compliance margin rate is a passive, reactive approach to early warning—by the time the margin rate has fallen below the threshold, companies may have already lost the window of opportunity to adjust their emissions strategies. By simultaneously monitoring the time derivative of the margin rate and using linear extrapolation for prediction, the system can issue early warnings when the margin is still sufficient but the rate of consumption is too rapid, providing companies with ample time to adjust and enabling a shift from passive monitoring to proactive prediction.

[0187] Step 5: Map the third dataset to the preset execution report template fields in memory, execute the three-level verification control flow, and generate a correction suggestion table based on the verification results.

[0188] The execution report template refers to a standardized electronic spreadsheet template pre-set according to the format and structure stipulated by the competent authority for pollution discharge permit management. The template contains several placeholder fields for receiving and displaying emission calculation results, compliance rate information, compliance margin information, and other legally required elements.

[0189] Memory mapping refers to the operation of establishing key-value pair mappings between each data field in the third dataset and the corresponding placeholder fields in the execution report template, so that the calculation results can be automatically filled into the correct position in the report template.

[0190] The three-level verification control flow refers to the three levels of data consistency and compliance verification procedures executed sequentially by the system after memory mapping is completed and before the formal output of the execution report. These include integrity verification, logical verification, and compliance verification. The design goal of the three-level verification control flow is to address the pain points of low report quality caused by data omissions, logical contradictions, and compliance judgment biases in the traditional manual compilation of execution reports.

[0191] The Correction Recommendation Table is a structured list automatically generated by the system when any level of verification detects a failed item. It includes a problem description, pointers to the location of contradictory data, and correction suggestions. This table guides polluting enterprises in verifying and correcting problematic data. Specifically, it may include the following sub-steps:

[0192] Sub-step 5.1 Integrity Verification

[0193] In some embodiments, integrity checks are used to detect missing features, ensuring that the third dataset contains all monitoring factors and frequency requirements required by the discharge permit. Integrity checks include:

[0194] Perform a point-to-point XOR comparison between the third dataset and the monitoring factor matrix and monitoring frequency vector required by the discharge permit;

[0195] When the actual reporting frequency of a certain monitoring factor is less than the minimum frequency specified in the license, it is determined that there is a missing record.

[0196] Output the location coordinates of the specific missing factors in the automatically generated problem list.

[0197] The monitoring factor matrix is ​​a two-dimensional matrix constructed with discharge outlet identifiers as rows and pollutant codes as columns. Each element in the matrix indicates whether the discharge outlet needs to monitor that pollutant. The monitoring frequency vector is the minimum monitoring frequency value required by the discharge permit for each element that needs to be monitored in the monitoring factor matrix.

[0198] Point-to-point XOR comparison refers to the operation of comparing the actual reported monitoring records in the third-party dataset with the monitoring factor matrix required by the license element by element. For each element marked as requiring monitoring in the monitoring factor matrix, the system checks whether there is a valid monitoring record at the corresponding position in the third-party dataset and whether the frequency of that record meets the minimum requirement.

[0199] Location coordinates refer to the row and column indices that identify a missing factor in the monitoring factor matrix. They are a combination of emission outlet identifiers and pollutant codes, used to accurately locate the specific source of the missing record.

[0200] Sub-step 5.2 Logical verification

[0201] In some embodiments, logical checks are used to detect discrepancies in emission accumulation, ensuring that the integral results of high-frequency monitoring data and low-frequency aggregated data strictly conform to the law of conservation of mass. Logical checks include:

[0202] Iterate through the daily and hourly emissions of each monitoring point in the third dataset;

[0203] Perform a mathematical verification of the law of conservation of mass for any given natural day;

[0204] The logical verification is determined based on the verification results.

[0205] The mass conservation mathematical verification refers to the operation of comparing the sum of hourly emissions over 24 hours within a given natural day with the total daily emissions recorded for that day. This verification is based on a fundamental physical principle: the sum of hourly emissions within a natural day must mathematically equal the total daily emissions for that day, and there should be no deviation between the two that exceeds the truncation error range allowed by the precision of floating-point calculations.

[0206] Define logic conservation and verify error :

[0207]

[0208] in, This represents the total daily emissions recorded in the third dataset for that particular natural day. For the first day of that natural day Effective hourly concentration value over 1 hour For the first day of that natural day Effective hourly flue gas flow rate over one hour. This is a time conversion factor (in seconds) for converting hourly flow rate (volume per unit time) to total volume over one hour. This is a recalculated value of the daily emissions, calculated by integrating hourly data from the underlying hourly monitoring system.

[0209] Among them, the rounding error threshold This refers to a pre-set upper limit of the allowable deviation used to accommodate unavoidable truncation errors during floating-point accumulation calculations. When the system determines that there is an unacceptable logical contradiction between the daily emission record for that natural day and the underlying hourly data, the verification is interrupted, and a timestamp pointer containing the contradictory data and a list of correction suggestions are generated.

[0210] Understandably, the logical verification equation algebraically eliminates the possibility of report fraud or statistical errors. In traditional manual reporting processes, daily and hourly emission data are often generated by different personnel or different system processes, making it highly susceptible to fatal discrepancies between daily and hourly data due to human input errors, incorrect formula references, or inconsistencies in rounding. This verification equation enforces a rigorous numerical comparison between the integration results of high-frequency data and the aggregated low-frequency data, ensuring that the difference between the two does not exceed the truncation error range allowed by floating-point calculations, thereby guaranteeing the inherent logical consistency of the executed report at the mathematical level.

[0211] Sub-step 5.3 Compliance Verification

[0212] In some embodiments, compliance verification is used to detect the total permit usage and determine whether the current emission status complies with the total emission control requirements of the discharge permit. Compliance verification includes:

[0213] Read the compliance margin rate calculated and updated in step 4. The latest value;

[0214] Determine whether the compliance margin rate is negative (i.e., whether emissions have exceeded the total allowable limit).

[0215] Determine if the compliance margin rate is below the warning threshold. And whether there is a risk of exceeding the annual emission limit based on linear extrapolation of the current emission rate;

[0216] Output compliance status indicators (compliant, warning, exceeding standards) based on the judgment results.

[0217] Understandably, the integrity check, logical check, and compliance check in the three-level verification control flow comprehensively examine the data quality of the execution report from three independent dimensions: data completeness, data consistency, and emission compliance. Only when all three levels of verification pass will the system allow the data to be officially output as a structured execution report. If any level of verification fails, the system will generate a corresponding correction suggestion table to guide the enterprise in locating and correcting the problematic data.

[0218] Step 6: Based on the data from the three-level verification control flow, output a structured discharge permit execution report, and encapsulate the traceability tags and accounting logs of the entire processing process into a compliance file package and write it to persistent storage media.

[0219] Structured output refers to the operation of directly serializing the validated third dataset into a fixed-format spreadsheet data stream through key-value pair mapping based on the placeholder identifiers in the execution report template.

[0220] A pollutant discharge permit implementation report is a legally mandated report document prepared in accordance with the format and content requirements stipulated by the competent authority for pollutant discharge permit management, reflecting the pollutant discharge status and compliance status of the discharging entity within a certain reporting period.

[0221] A compliance archive package refers to a tamper-proof data package generated by archiving and encapsulating all intermediate processing data and metadata generated in steps 1 to 5. The contents encapsulated in the compliance archive package include, but are not limited to: the raw data hash value generated from the data preprocessing stage in step 1 (used to prove the integrity and tamper-proof nature of the raw data), the truth table records of rule hits at each level generated in steps 2 to 3 (used to record which rules each data record has been judged by and the judgment results), the traceability tags attached to the abnormal data generated in step 3, the detailed calculation log of emission accounting generated in step 4 (including the input parameters, intermediate calculation results and final output of each time slot), and the judgment results of the three-level verification generated in step 5.

[0222] In some embodiments, the system extracts all the above information, packages it, calculates and generates a global digital signature, solidifies it into a tamper-proof compliance file package, writes it to a persistent storage medium, and provides it for verification by the regulatory interface.

[0223] The global digital signature refers to the cryptographic digest value calculated from the entire contents of the compliance file package, used to ensure that the file package has not been tampered with in any way after being written to storage. When the regulatory authority retrieves the compliance file package through the verification interface, it can verify the integrity and authenticity of the file package by recalculating the digest value of the file package contents and comparing it with the stored digital signature.

[0224] Persistent storage media refers to storage devices or systems that have the ability to retain non-volatile data, including but not limited to local disk arrays, network attached storage (NAS), distributed file systems, or cloud object storage services.

[0225] Understandably, encapsulating the traceability tags and accounting logs of the entire processing process into a compliance archive, attaching a digital signature, and writing it to persistent storage aims to provide a complete, traceable, and tamper-proof chain of evidence for every data conclusion in the discharge permit enforcement report. In environmental regulatory verification scenarios, regulatory authorities not only need to review the final enforcement report data but may also need to trace the data's source, processing procedures, and quality control judgment criteria. The compliance archive provides a one-stop access point for such traceability needs.

[0226] Example 2

[0227] This embodiment discloses an environmental monitoring data processing system based on discharge permit execution reports. Specifically, this system can be integrated into an electronic device, such as a terminal or server. The terminal can be an industrial control workstation, data acquisition gateway, tablet computer, laptop computer, or personal computer (PC), etc.; the server can be a single server or a server cluster composed of multiple servers. When the electronic device is running, it can implement the environmental monitoring data processing method based on discharge permit execution reports as described in Embodiment 1.

[0228] In some embodiments, the environmental monitoring data processing system based on the discharge permit execution report can also be integrated into multiple electronic devices. For example, the environmental monitoring data processing system based on the discharge permit execution report can be integrated into multiple servers, and multiple servers can implement the environmental monitoring data processing method based on the discharge permit execution report in Embodiment 1 of this application.

[0229] In some embodiments, the server may also be implemented as a terminal.

[0230] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for processing environmental monitoring data based on discharge permit implementation reports, characterized in that, The environmental monitoring data processing method includes: Acquire multi-source environmental data streams, perform standardized preprocessing and spatiotemporal alignment on the multi-source environmental data streams, construct a spatiotemporal alignment tensor with emission outlet identifiers, pollutant codes, and monitoring method identifiers as three-dimensional spatial index coordinates, and generate the first dataset; Parse the discharge permit text, extract the constraint fields, and instantiate a dynamic quality control rule base based on the constraint fields and operating status information; A two-layer screening logic is used to process the first dataset to generate a second dataset after quality control. The rule layer of the two-layer screening logic performs initial screening on the first dataset based on the dynamic quality control rule base. The model layer of the two-layer screening logic performs joint discrimination on the data passed through the rule layer, combining anomaly detection algorithm and time series prediction model, in order to distinguish between false anomalies caused by equipment drift and actual emission exceedances. Read the calculation method field, dynamically load the matching emission calculation model from the preset model library, take the valid data in the second dataset after quality control as input, perform the emission calculation operation, and output a third dataset containing the compliance rate and compliance margin rate. The third dataset is mapped to the execution report template in memory, and a three-level verification control flow is executed. A correction suggestion table is generated based on the verification results. Based on the data from the three-level verification control flow, a structured discharge permit execution report is output, and the traceability tags and accounting logs of the entire processing process are encapsulated into a compliance file package and written to persistent storage media.

2. The environmental monitoring data processing method based on the discharge permit execution report according to claim 1, characterized in that, The multi-source environmental data stream undergoes standardization preprocessing and spatiotemporal alignment, including: The timestamps of the multi-source environmental data streams are extracted and uniformly converted into a standard date and time format; The data payload is reorganized according to the preset pollutant coding mapping rules; A three-dimensional spatial index coordinate system is defined with the emission outlet identifier set, pollutant code set, and monitoring method identifier set as three orthogonal dimensions. The spatiotemporal alignment tensor is constructed to generate the first dataset.

3. The environmental monitoring data processing method based on the discharge permit execution report according to claim 2, characterized in that, The construction of the spatiotemporal alignment tensor includes: Define a discrete time axis with fixed time steps, and divide the timestamps of the standard date and time format into continuous time slots according to the set time granularity; The time slot mapping function maps the timestamp of each original data record to its corresponding time slot. The time slot mapping function determines the time slot to which the original data record belongs by dividing the difference between the original timestamp and the start time of the time axis by the time step and rounding it down. Within each time slot, data frames with the same three-dimensional spatial index coordinates are aggregated into data blocks; The continuity of time slots in each data block is detected, null marks are inserted for missing time slots, and the start and end timestamps of the missing period are recorded in the missing log. Redundant data frames in the same time slot are deduplicated using the conflict aggregation operator. All data blocks after aggregation and deduplication are assembled into the spatiotemporal alignment tensor.

4. The environmental monitoring data processing method based on the discharge permit execution report according to claim 1, characterized in that, The instantiation of the dynamic quality control rule base based on the constraint field and operating condition information includes: The discharge permit text is scanned using regular expressions and a pre-defined discharge permit dictionary to extract quantitative parameters and conditional constraint clauses for each discharge outlet. Transform the conditional constraint clause into a Boolean logic expression; Extract operating status information from the ledger data, generate a Boolean time series of operating status, extract a static upper limit benchmark value from the pollutant discharge permit text, and link the Boolean time series of operating status with the static upper limit benchmark value through a piecewise function to construct a dynamic threshold function for operating status linkage. The value of the dynamic threshold function for the working condition linkage is determined based on the state value of the Boolean time series of the working condition in the current time slot: When the status value indicates that the production facility is in normal production status, the output of the working condition linkage dynamic threshold function is equal to the static upper limit benchmark value. When the status value indicates that the production facility is in a shutdown or maintenance state, the output of the working condition linkage dynamic threshold function is switched to the preset exemption threshold under the corresponding three-dimensional spatial index coordinates.

5. The environmental monitoring data processing method based on the discharge permit execution report according to claim 4, characterized in that, The dynamic quality control rule base includes: Threshold rules, frequency rules, and logical rules; among them, The threshold rule is used to determine whether the monitored value exceeds the permitted emission limit or the hardware range boundary. The frequency rule is used to determine whether the actual reported frequency meets the minimum monitoring frequency requirement specified in the discharge permit document; The aforementioned logical rules are used to determine whether there is a logical contradiction between concentration, flow rate, and emission that violates the law of conservation of mass. The logical rules include working condition linkage constraints. When the working condition Boolean time series indicates a shutdown or maintenance status, the threshold within the current time window is switched from the static upper limit benchmark value to the exemption threshold, and the corresponding over-limit alarm trigger is blocked.

6. The environmental monitoring data processing method based on the discharge permit execution report according to claim 1, characterized in that, The rule layer performs initial screening on the first dataset based on the dynamic quality control rule base, including: The data in the first dataset are pushed into the processing queue in chronological order; For each data node in the processing queue, the following parallel checks are performed using the initial screening filter: Determine whether the time slot of the data node is within the equipment operation and maintenance period recorded in the ledger data. If so, mark it as an invalid operation and maintenance conflict. Determine whether the value of the data node exceeds the hardware range boundary of the corresponding monitoring parameter; if so, mark it as range overflow invalid. Data nodes that are not marked as invalid are marked as having passed the initial screening and sent to the model layer.

7. The environmental monitoring data processing method based on the discharge permit implementation report according to claim 6, characterized in that, The step in the initial screening filter to determine whether the time slot of a data node falls within the equipment maintenance period is implemented through a maintenance conflict indication function: If the time slot of the current data node falls within the time interval recorded in the operation and maintenance ledger, the operation and maintenance conflict indication function takes the value of one; otherwise, it takes the value of zero. When the operation and maintenance conflict indication function takes the value of one, the data node is determined to be invalid; The joint discrimination process, used to distinguish between false anomalies caused by equipment drift and actual emissions exceeding standards, includes: The anomaly score of each data node that passed the initial screening was calculated within the current time window using the isolated forest algorithm. The historical normal concentration sequence and the corresponding time window's Boolean time sequence of operating conditions are used as inputs to the Long Short-Term Memory network to calculate the expected value of the predicted concentration at the current time node. The deviation rate is calculated based on the actual monitored concentration value at the current time point and the expected predicted concentration value. Based on the anomaly score and the deviation rate, the quality control classification of each data node is determined by a joint weighting discriminant.

8. The environmental monitoring data processing method based on the discharge permit execution report according to claim 1, characterized in that, The emission calculation operation includes: When the type of the calculation method field is automatic monitoring method, a numerical integration model is loaded from the preset model library, and the effective hourly concentration value and the corresponding hourly flue gas flow value in the second dataset after quality control are multiplied and accumulated in turn for each time slot. When the type of the accounting method field is material balance algorithm, the mass conservation equation model is loaded from the preset model library, and the raw material consumption, product output and material conversion coefficient in the ledger data are extracted for calculation. The emission accounting operation also includes punitive substitution data filling, specifically: Detect whether there are consecutive missing periods in the second dataset after quality control; Determine whether the length of the consecutive missing period exceeds the maximum tolerance window specified in the discharge permit text; If the maximum tolerance window is exceeded, the missing indicator variable for each time slot within the consecutive missing period is set to one, and The product of the permitted emission concentration limit and the historical maximum flue gas flow rate is used as punitive substitute data to fill each time slot in the continuous missing period; Emissions were calculated for each time slot within the accounting period using a unified accounting method. In the time slots where the missing indicator variable is zero, actual valid monitoring data is used in the calculation; in the time slots where the missing indicator variable is one, the punitive substitute data is used in the calculation.

9. The environmental monitoring data processing method based on the discharge permit execution report according to claim 1, characterized in that, The three-level verification control flow includes: Integrity verification: The third dataset is compared element by element with the monitoring factor matrix and monitoring frequency vector required by the discharge permit text to detect whether there are missing monitoring factors or insufficient reporting frequency; Logical verification: For each natural day, the cumulative sum of hourly emissions is compared with the total daily emissions recorded for that day. If the logical conservation verification error between the two exceeds the preset rounding error threshold, a logical contradiction is determined to exist. Compliance verification: Read the latest value of the compliance margin rate to determine whether emissions have exceeded the total limit or whether there is an annual risk of exceeding the total limit.

10. An environmental monitoring data processing system based on discharge permit execution reports, characterized in that, The environmental monitoring data processing system includes: processor; The memory stores a computer program that, when executed by a processor, implements the environmental monitoring data processing method based on the discharge permit execution report as described in any one of claims 1 to 9.