Multi-source pollutant on-line monitoring data anomaly identification method

By combining a method for identifying anomalies in online monitoring data of multi-source pollutants with change point detection and a deep learning model, the problem of identifying anomalies in multi-source pollutant monitoring data has been solved, achieving efficient and accurate anomaly detection and improving the authenticity and reliability of the data.

CN121808332APending Publication Date: 2026-04-07HENAN SNOW CITY SOFT CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-18
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing technologies are unable to effectively identify anomalies in multi-source pollutant monitoring data, especially data that meet the threshold but show abnormal trends. Furthermore, traditional methods cannot fully utilize the complementary information from multi-source data, resulting in high false alarm rates, high false negative rates, and poor interpretability.

Method used

An anomaly identification method for online monitoring data of multi-source pollutants is adopted, which combines change point detection and deep learning models. Through multivariate change point detection, LSTM-Attention model and bivariate pollutant concentration correlation analysis, efficient and accurate anomaly detection is achieved.

Benefits of technology

It improves the authenticity and reliability of pollution source monitoring data, reduces false alarm and false alarm rates, enhances regulatory effectiveness, and can identify trend-related changes in multiple pollutants.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121808332A_ABST
    Figure CN121808332A_ABST
Patent Text Reader

Abstract

The invention provides a multi-source pollutant online monitoring data anomaly identification method, relates to the technical field of monitoring data anomaly identification, and is used for solving the technical problems of high false alarm rate, high missing report rate, poor interpretability and difficulty in landing in multi-source pollution source monitoring data anomaly detection in the prior art. The method includes the following steps that monitoring data of multi-source pollutants are collected and preprocessed, and a multivariable time sequence of the monitoring data is obtained; carrying out variable-variable point change detection on the multivariable time sequence, and if a change point exists, carrying out bivariate pollutant concentration correlation change analysis on the multivariable time sequence with the change point, and judging whether the data is counterfeited or not; and otherwise, performing trend anomaly identification on the multivariable time sequence without the change point based on an LSTM-Attention model. According to the method, the rapid positioning capability of change point detection and the accurate analysis capability of deep / multi-modal learning are fused, so that efficient, accurate and explainable anomaly detection is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of anomaly identification in monitoring data, and in particular to a method for anomaly identification in online monitoring data of multi-source pollutants. Background Technology

[0002] Online pollution source monitoring systems serve as the "eyes and ears" of environmental protection, and the accuracy of their data directly impacts the effectiveness of environmental regulation. With the increasing number of monitoring points, indicators, and frequency, the processing and analysis of monitoring data has become increasingly crucial. Pollution sources monitored include particulate matter, sulfur dioxide, and nitrogen oxides. The monitoring process can be affected by factors such as sample quality, equipment malfunction, and human error, leading to anomalies that can compromise the accuracy of the data.

[0003] To better identify data anomalies, there is a growing tendency to introduce more types of data to reflect the authenticity of data from multiple perspectives. These data mainly include: 1. Multi-type monitoring indicator data: such as airflow, particulate matter (PM), sulfur dioxide (SO2), and nitrogen oxides (NOx). x 1. Data sources: 1) VOCs (volatile organic compounds); 2) Data from multiple monitoring points: The same enterprise may have multiple emission outlets / monitoring points, and there may be multiple enterprises / sites in the same area; 3) Multi-source auxiliary data: such as meteorological data (including wind speed, wind direction, temperature, humidity, and air pressure), production process data (including production load, equipment status, and process parameters), geographic information, electricity consumption, video surveillance, etc.; 4) Data from multiple time scales / frequency: Some data are collected at high frequency (such as every minute / every 5 minutes), while others are collected at low frequency (such as every hour / every day); 5) Data from multiple sources: including enterprise-side automatic monitoring systems, third-party operation and maintenance data, regulatory department platforms, and public service data such as meteorological / environmental protection data.

[0004] Existing anomaly detection methods have significant limitations and cannot meet the processing and identification requirements of the aforementioned multi-source data. For example, methods based on statistical thresholds (zero, constant, extreme values) can only identify extreme values ​​outside a fixed range and cannot detect data that meets the threshold but shows abnormal trends. Deep learning-based whole-sequence modeling methods, while capable of capturing complex patterns, are computationally expensive and sensitive to normal fluctuations, leading to a high false positive rate. Change point detection algorithms, while able to quickly locate sequence mutations, can only determine "whether a change exists" and cannot distinguish the cause of the change.

[0005] Therefore, there is an urgent need for a detection method that can combine the rapid screening capability of change point detection with the accurate identification capability of deep learning models to achieve efficient and accurate identification of pollution source data anomalies.

[0006] Currently, my country has established the world's largest, most comprehensive, and rationally distributed ecological and environmental monitoring network system, with 33,000 nationally directly monitored stations, providing crucial support for ecological and environmental protection. While strengthening monitoring capabilities, it is even more important to ensure the authenticity and reliability of monitoring data. Faced with pressure from both environmental protection and economic development, some polluting enterprises resort to falsifying data by adjusting equipment operating status, modifying operating parameters, tampering with measurement ranges, and fabricating monitoring data. Among these, adjusting status, modifying parameters, and fabricating data are simple to operate and difficult to prove, making them the most commonly used methods, resulting in underestimating data, data anomalies, and missing data.

[0007] Therefore, pollution source monitoring data quality control faces the following problems: 1) Over-reliance on single-source automatic monitoring terminal data; 2) Data analysis often employs traditional statistical analysis techniques, which can only detect low-level data quality issues; 3) The quality of uploaded online pollution source data needs improvement, making it difficult to investigate and collect evidence of data falsification. Therefore, there is an urgent need to develop an AI-based pollution source monitoring data quality control system. This system should acquire front-end base station equipment parameters and status data, system operating environment data, equipment environment data, network environment data, enterprise electricity consumption data, production operation data, monitoring station video data, and discharge permit data to achieve multi-source data aggregation and correlation analysis, thus solving the problems of single data sources and low accuracy in analyzing suspected data falsification.

[0008] The introduction of multi-source data transforms the identification of anomalies in pollution source concentration data into a multi-source time series anomaly problem, at which point the focus becomes more on:

[0009] 1. Point Anomalies: Data points that differ significantly from other data points in the time series. This means that the pollutant concentration at a certain moment is suddenly extremely high or extremely low, clearly inconsistent with the time before and after, possibly due to sudden emissions, sensor errors, data entry mistakes, etc. This moment can be understood as a turning point in the time series. Focus more on the degree of anomaly in the data itself, which can be identified using methods such as K-nearest neighbor distance, interquartile range, and moving average + standard deviation.

[0010] 2. Pattern Anomalies: Patterns that differ significantly from other patterns in their trend of change. For example, pollutant concentration data may consistently show a random distribution, but at certain times exhibit a characteristic of low concentrations during the day and high concentrations at night, indicating a change in the overall behavior pattern of the data.

[0011] 3. Subsequence Anomalies: Within the same time series, subsequences exhibit trends that are significantly different from other subsequences. In the identification of pollution source concentration anomalies, this can be interpreted as a change in the trend of pollutant concentration sequences. Previously stable concentration levels suddenly enter a phase of continuous decline, but this increase is not instantaneous (not a point anomaly), nor does the entire sequence change (not a sequence anomaly); rather, it represents an anomaly in the trend of a specific subsequence. Change point detection can identify changes in the mean and variance of a sequence, but it is not effective in identifying gradual trend changes.

[0012] 4. Sequence Anomalies: Time series that exhibit significantly different trends from other time series when compared as a whole. By comparing the sequence relationships between different monitoring points (sources), more subtle systemic anomalies can be discovered. For example, the concentrations at two adjacent monitoring points A and B were originally highly correlated, but starting from a certain day, the data at point A remained normal, while the data at point B deviated from the pattern of point A. This may indicate the emergence of a new local pollution source near point B.

[0013] Currently available methods for identifying falsified online monitoring data of pollution sources include:

[0014] 1. Statistical methods: This is currently the mainstream identification method. For example, the invention patent with publication number CN113012388A uses traditional zero-value tests, out-of-range tests, fluctuation tests, and constant-value tests for data anomaly analysis. This type of method requires specifying statistical thresholds.

[0015] 2. Machine Learning-Based Methods: These algorithms typically handle hidden and concealed fraudulent activities. For example, the invention patent with publication number CN112381697A uses a change point detection algorithm to calculate the sequence change points and then introduces algorithms such as autocorrelation coefficients and stationarity tests to detect small fluctuations and periodicity between adjacent change points. However, it does not consider the influence of multiple parameters and only considers the stationarity and periodicity of pollutant concentration data between adjacent change points, but in reality, such periodicity often exists across change points. The invention patent with publication number CN112101969A introduces a time-series sliding window technique to determine whether there are data measurement anomalies between adjacent devices based on the designed coefficient of dispersion. In practice, due to cost considerations, reference data from adjacent measuring devices is often unavailable, and due to the setting of the sliding window, its maximum coefficient of dispersion has strong local characteristics and cannot explain the overall situation.

[0016] 3. Multi-algorithm aggregation and consultation: The invention patent with publication number CN114997313A uses threshold detection, mutation point detection, weighted moving average detection, and Holt-Winter fitting detection to jointly judge point anomaly data; at the same time, it uses isolated forest to judge sequence anomalies. This method does not consider the correlation changes of multiple pollutant concentrations, and the point anomaly judgment only considers the anomalies of pollutant concentration sequences, without considering the changes of auxiliary parameters.

[0017] Pollution source monitoring data exhibits complex characteristics, including multiple types, dimensions, sources, time scales, and stakeholders. Traditional anomaly detection methods struggle to adapt, posing unprecedented challenges to ensuring data authenticity. Anomalies in pollutant concentrations are rarely isolated events but are logically related to or causally influenced by auxiliary data such as flow rate, production load, meteorological conditions, and equipment status. Current technologies exhibit the following shortcomings in addressing these issues: they lack the ability to accurately identify complex patterns and gradual trends; and they (mostly univariate / single-source analyses) fail to fully utilize the complementary information from multi-source data, resulting in a narrow scope and biased judgment in anomaly detection. Summary of the Invention

[0018] To address the technical problems of high false alarm rates, high false negative rates, poor interpretability, and difficulty in implementation in the anomaly detection of multi-source pollution source monitoring data due to the lack of multi-source correlation modeling, complex pattern recognition capabilities, accurate screening mechanisms, and business adaptability in existing technologies, this invention proposes a method for anomaly identification in online monitoring data of multi-source pollutants. By integrating the rapid localization capability of change point detection with the accurate analysis capability of deep / multimodal learning, this method achieves efficient, accurate, and interpretable anomaly detection, thereby improving the authenticity, reliability, and regulatory effectiveness of pollution source monitoring data.

[0019] To achieve the above objectives, the technical solution of the present invention is as follows: a method for identifying anomalies in online monitoring data of multi-source pollutants, comprising the following steps:

[0020] Step 1: Collect monitoring data of multiple pollutants and preprocess them to obtain a multivariate time series of the monitoring data;

[0021] Step 2: Perform multivariate change point detection on the multivariate time series. If a change point exists, proceed to Step 4; otherwise, proceed to Step 3.

[0022] Step 3: Identify trend anomalies in multivariate time series with no variable points based on the LSTM-Attention model;

[0023] Step 4: Perform bivariate pollutant concentration correlation analysis on the multivariate time series with variable points to determine whether data is falsified.

[0024] Preferably, the monitoring data of the multi-source pollutants includes data from different pollution sources and different monitoring indicators, which are classified and stored according to pollution source ID, monitoring indicator, and collection time; the monitoring indicators include particulate matter, sulfur dioxide, nitrogen oxides, and non-methane total hydrocarbons in exhaust gas, and chemical oxygen demand, ammonia nitrogen, total nitrogen, and total phosphorus in wastewater; the monitoring indicators also include auxiliary data, including operation and maintenance data, operating condition data, electricity consumption data, and pollutant discharge permit data;

[0025] The preprocessing method in step one is as follows:

[0026] Invalid data for periods outside of normal operating conditions were removed, and only monitoring data under normal production and wastewater discharge conditions were retained;

[0027] Multi-dimensional data anomaly detection rules developed using statistical methods were used to exclude abnormal sewage discharge data.

[0028] Screening for multivariate time series of pollutants that are continuous for more than 14 days, hourly, and without missing data.

[0029] Preferably, the method for implementing the multivariate change point detection is as follows:

[0030] Based on the input multivariate time series y at n time points, a loss function including weighted covariance and dynamic penalty term is set;

[0031] The optimal candidate change point is found by recursively calculating the minimum value of the loss function;

[0032] Pruning: Remove split points that are unlikely to become optimal candidate change points;

[0033] Output the best candidate change point detected after pruning.

[0034] Preferably, the loss function is

[0035]

[0036] in, It is multivariate time series data of length n. To change the number of points, Let be the index of the i-th variable point, and This represents the time interval of the i-th segment. It is the covariance matrix of the variables. It is a weight matrix of size p*p, where p is the total number of variables, and tr() is the trace of the matrix. For the i-th segment Dynamic penalty items.

[0037] Preferably, the method of finding the optimal candidate change point by recursively calculating the minimum value of the loss function is as follows:

[0038] The loss function that minimizes the multivariate time series data before time point t. Total loss value ; among which, initial conditions Candidate Variables , It is the segmentation cost of the candidate segment [s+1,t]. The minimum total loss value before the candidate change point s;

[0039] The initial candidate set is {0}, and all candidate change points are traversed. Calculate one by one Choose the minimum value as the total loss value. Update the minimum total loss value. Select the total loss value The smallest candidate change point s is taken as the optimal candidate change point before time point t and recorded as the optimal candidate change point.

[0040] Preferably, the weight matrix = elements on the diagonal Different weights are assigned to different variables, and ;

[0041] The dynamic penalty item The system adaptively adjusts to the fluctuations in pollutant concentration within each segment, and auxiliary data does not participate in the generation of the dynamic penalty term; and the dynamic penalty term...

[0042]

[0043] in, It is the basic penalty function, and Baseline_vol is the overall volatility of the data; while This represents the fluctuation of pollutant L with the largest fluctuation within the i-th segment;

[0044] The overall volatility of the data: Baseline_vol = ( );in, This represents the full-sequence monitoring data for pollutant category k;

[0045] Fluctuation of pollutant L with the largest fluctuation within the i-th segment:

[0046]

[0047] in, It is the local time series of the pollutant L with the largest fluctuation in the i-th segment;

[0048] The segmented cost It is the loss term for a single segment, and the calculation formula is: )+ ;

[0049] Update the minimum total loss value The calculation formula is: ;in, It is the total loss when a multivariate time series is divided into two segments: [1, s] and [s+1, t].

[0050] The pruning strategy is as follows: for each candidate variable point s, check whether a variable point exists. , making

[0051] +cost(s,t)

[0052] If such a change point exists, then the candidate change point s is considered not to be a change point;

[0053] The output of the detected optimal candidate change point after pruning is: Return time point index , indicating at time The statistical properties have changed significantly, where m is the number of variable points obtained.

[0054] Before setting the loss function, the time series of each variable in the multivariate time series y is normalized.

[0055] Preferably, the method for identifying trend anomalies is as follows:

[0056] Step 1: Select the concentration time series of any pollutant from the n time series with no variable points. Then, normalization is performed to obtain a normalized sequence. ;

[0057] Step 2: Use the sliding window technique to normalize the sequence. The data is processed to obtain a supervised dataset that includes the input sequence and the prediction target;

[0058] Step 3: Divide the supervised dataset into training set, validation set and test set, and use the training set to train the LSTM-Attention model;

[0059] Step 4: Determine anomalies based on the data samples in the test set.

[0060] Preferably, the method for obtaining the supervised dataset is as follows: setting the window length to 21, containing 20 hours of historical input and the target prediction for the next hour; the sliding step size is 1, and the reconstruction rule is: for the t1-th window, the input sequence is... ,in, These are the univariate normalized concentration values ​​from the past 20 hours; the prediction target is... The reconstructed dataset yields a supervised dataset.

[0061] ;

[0062] The LSTM-Attention model includes an LSTM network and a self-attention layer. The LSTM network has 64 hidden units. After filtering the concentration value input at time point t through a gating mechanism, the LSTM network extracts time-dependent features, which include the core information of the correlation weight, trend features, and fluctuation features between the concentration at time point t and the concentrations of the previous 19 time steps.

[0063] The self-attention layer includes 4 attention heads, which split the 64-dimensional feature matrix output by the LSTM network into 4 16-dimensional sub-matrices. Each attention head focuses on temporal features of different dimensions. The prediction layer extracts the 64-dimensional feature vector of the last time step output by the self-attention layer and maps it to a 1-dimensional scalar as the output result through a fully connected layer.

[0064] The loss function used in the training is mean squared error;

[0065] The Adam optimizer is used, which has adaptive learning rate characteristics, with an initial learning rate of 0.001;

[0066] Supervised datasets The dataset was divided into training, validation, and test sets in a 7:2:1 ratio to train the LSTM-Attention model to learn the temporal dependency patterns of normal data samples.

[0067] The anomaly determination includes: error anomaly determination and distribution anomaly determination;

[0068] The method for determining error anomalies is as follows: calculate the mean square error for each sample in the test set. ;in, Let be the predicted value of the LSTM-Attention model for the t1-th test sample; if the mean squared error of the sample data in all test sets is... If the percentage of data items greater than 0.001 is ≥80%, then the judgment error is too large and there is a trend deviation.

[0069] The distribution anomaly determination is based on: defining the standard deviation. Monthly standard deviation of pollutants and the standard deviation of the current training set The minimum value; compare the data samples of the test set and the training set. If more than 70% of the data samples in the test set are in […]. - 1.2 * , + 1.2 * If the data falls outside the specified range, it indicates a significant abrupt change in the data trend, suggesting potential data manipulation; among them, This represents the mean of the training set.

[0070] Preferably, the method for performing bivariate pollutant concentration correlation change analysis is as follows:

[0071] Extracting single sequences of two variables from a normalized multivariate time series y ,in, p represents the total number of variables;

[0072] Traverse each variable point, extract the local data segment containing the variable point, and obtain the correlation calculation sequence;

[0073] The correlation calculation sequence is divided into multiple segments according to the collection time, and the correlation of each segment is calculated using the Pearson correlation coefficient to obtain the correlation sequence.

[0074] The correlation sequences are sorted, and the Dixon algorithm is used to calculate the Dixon statistic corresponding to the minimum and maximum values. The variables are then judged based on the Dixon statistics. Is there any data suspected of being fabricated?

[0075] Preferably, the method for extracting local data segments containing change points to obtain the correlation calculation sequence is as follows:

[0076] With change point Centered on the data point, data from 7*24 points are collected both before and after it; if the data points change... If the distance from the start / end of the sequence is less than 168 points, then the sequence is truncated from its endpoint to form a correlation calculation sequence.

[0077]

[0078] in, and These are the points containing variables. single sequence Element;

[0079] Calculate the correlation sequence Divide the samples into 14 parts in chronological order of collection time. Each sub-segment has a dimension of 24*2; the correlation coefficient is calculated for each of the 14 segments using the Pearson correlation coefficient. The correlation sequence was obtained. ;

[0080] For correlation sequences Sort by numerical values ​​in ascending order to obtain an ordered sequence. Among them, the minimum value maximum value ;

[0081] The formula for the statistic using the Dixon algorithm: Calculate the Dixon statistic corresponding to the minimum value: The Dixon statistic corresponding to the maximum value: ;in, They are ordered sequences The 3rd and 12th elements; the calculated Dixon statistic and Respectively compared with Dixon's critical value In contrast, the Dixon statistic... Or Dixon's statistic If the correlation between variables a and b changes, it can be directly determined that there is a possibility of data fabrication.

[0082] If the maximum value Or minimum value If so, the data is suspected of being falsified.

[0083] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0084] 1. To address the technical shortcomings of existing multivariate change point algorithms, such as poor adaptability of the loss function and difficulty in capturing multi-parameter correlation changes in pollution sources, this invention provides a method for multi-source data change point detection. A novel loss function is proposed, introducing weight coefficients to assign different weights to different variables, fully reflecting business requirements. Weighted covariance is also introduced to highlight the focus on changes in pollutant concentration. The introduction of a dynamic penalty function that reflects the fluctuations in different segments better controls the generation of change points. This dynamic penalty function takes into account data fluctuations and introduces a dynamic penalty term. The change points calculated by this invention can be adapted to more rule-based detection methods, thereby reducing the computational load of the anomaly detection process.

[0085] 2. A method for judging abnormal trends of pollutants is provided. An LSTM-Attention model is constructed to predict the concentration trend of a single pollution source. A dynamic 3 sigma is introduced into the model. On the one hand, it solves the problem that pure time series prediction models (such as a single LSTM) do not have clear anomaly judgment criteria and cannot distinguish whether the prediction deviation is normal fluctuation or abnormal. On the other hand, fixed thresholds (such as static 3 sigma) cannot adapt to the dynamic changes in concentration trends and are prone to missing the gradual fraud features such as "gradual decrease in concentration", resulting in low accuracy of anomaly identification and blind spots in fraud supervision.

[0086] 3. A method is provided to determine whether the correlation between two pollutant concentration sequences has changed. This method can effectively determine whether the correlation has changed and can quickly identify changes in the trend correlation of multiple pollutants, thereby effectively solving the problem of coordinated falsification of multiple pollutant concentration data.

[0087] The combination of the above three methods provides a detection method that combines the rapid screening capability of change point detection with the accurate identification capability of deep learning models, thereby achieving efficient and accurate identification of pollution source data anomalies. Attached Figure Description

[0088] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0089] Figure 1 This is a flowchart of the present invention.

[0090] Figure 2 The flowchart for the data preprocessing of this invention

[0091] Figure 3 This is a flowchart of the multivariable change point detection of the present invention.

[0092] Figure 4 This is a flowchart of the trend anomaly recognition based on the LSTM-Attention model of the present invention.

[0093] Figure 5 This is a flowchart of the bivariate pollutant concentration correlation change analysis of the present invention.

[0094] Figure 6 This is an example graph showing a change in the trend of total phosphorus sequence for a certain enterprise.

[0095] Figure 7 This is an example graph showing the changes in the correlation between ammonia nitrogen and total nitrogen in a certain enterprise. Detailed Implementation

[0096] 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. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0097] like Figure 1As shown, a method for identifying anomalies in online monitoring data of multi-source pollutants includes the following steps:

[0098] Step 1: Collect monitoring data of multiple pollutants and preprocess them to obtain a multivariate time series of preprocessed monitoring data.

[0099] The data used in this invention primarily comes from the automatic monitoring data collected by the company's independently developed on-site investigation and evidence collection system for key pollution sources. This monitoring platform aggregates and stores data from different pollution sources and monitoring indicators collected by hardware terminals, categorizing them according to pollution source MP_ID, monitoring indicator, and collection time. The platform mainly monitors indicators for waste gas (particulate matter, sulfur dioxide, nitrogen oxides, non-methane hydrocarbons) and wastewater (chemical oxygen demand, ammonia nitrogen, total nitrogen, total phosphorus, etc.), while also integrating other auxiliary data such as operation and maintenance data, operating condition data, electricity consumption data, and discharge permit data to form a continuous and complete multi-source monitoring data resource pool.

[0100] To eliminate interference from invalid or obviously abnormal data in subsequent analysis, the acquired raw monitoring data needs to be systematically preprocessed, such as... Figure 2 As shown, the specific processing steps are described below:

[0101] First, consider the enterprise's operating conditions data. If the enterprise is in a state of malfunction, shutdown, maintenance, calibration, debugging, over-range, routine maintenance, or shutdown, the data for the corresponding period will be deemed invalid and removed, and only the monitoring data under normal production and sewage discharge conditions will be retained.

[0102] Secondly, abnormal discharge data is eliminated by using traditional statistical methods to develop multi-dimensional rules for judging data anomalies. These mainly include zero-value and constant-value judgments; abnormal flue gas parameters and missing flue gas parameters; monitoring concentrations consistently below one-tenth of emission standards, or consistently close to but not exceeding standards; suspected upper limits; and data mutations exceeding 200%. There are approximately 20 such statistical methods that can comprehensively identify abnormal discharge data from multiple dimensions.

[0103] After the above steps, the final preprocessed data meets the requirements that the production status is normal and the sewage discharge data cannot be found to be significantly abnormal.

[0104] Because it needs to consider factors such as intraday fluctuations (diurnal differences) and inter-day variations (production and allocation) of pollutant emissions, and comprehensively consider the requirements of correlation change detection algorithms and abnormal data trend prediction algorithms, this invention requires that the input data be a continuous hourly time series of pollutant concentrations for more than 14 days without any missing data. If there are a very few missing points in the time series, the nearest neighbor filling method can also be considered for filling.

[0105] Step 2: Perform multivariate change point detection on the multivariate time series. If a change point exists, proceed to Step 4; otherwise, proceed to Step 3.

[0106] The goal of change point detection is to locate specific points in pre-screened time series data. These points divide the sequence into segments, each with stable statistical properties (such as mean, variance, etc.). The locations of these change points are typically determined by minimizing a loss function. Subsequent rule analysis only needs to focus on the differences within a certain time period before and after the change point, avoiding blind analysis of the entire sequence and improving detection efficiency.

[0107] This invention proposes a multivariate change point detection method based on the traditional Pelt algorithm. Here, "multivariate" refers to the measured values ​​of monitoring indicators for wastewater or exhaust gas, as well as the measured values ​​of auxiliary data such as pressure and oxygen content. Assume the variable set is...

[0108]

[0109] Where p is the total number of variables. This represents the full-sequence monitoring data for pollutant category k, where n is the total number of time points.

[0110] like Figure 3 As shown, the detailed idea of ​​the algorithm is as follows:

[0111] Step 1: The input data is a multivariate time series of n time points from a specific sewage outlet of a certain enterprise.

[0112] y =

[0113] Among them, elements This represents the observed value of the k-th variable at time point t.

[0114] Step 2: The loss function is defined as follows:

[0115]

[0116] in, It is multivariate time series data of length n. To change the number of points, Let i be the index of the i-th variable point. This represents the time interval of the i-th segment. The trace of the matrix is ​​the core of the defined loss function. It is the covariance matrix of each variable, characterizing the fluctuation characteristics and correlations of all variables within this time interval. (trace tr) The smaller the value, the more likely it is that the i-th segment ( The more consistent the statistical properties (mean, variance) within a range, the smaller the overall loss function will be. Conversely, if the overall loss function is too large, further subdivision is needed.

[0117] It is a weight matrix of size p*p, in the following form: Considering the varying importance of different variables in anomaly detection and the ease of engineering implementation, the weight matrix... Designed as a diagonal matrix, with elements on the diagonal... Different weights can be assigned to different variables, here Weight matrix After left and right multiplication, the covariance contribution of core pollutants is amplified, ensuring that stability assessments focus on regulatory cores.

[0118] For the i-th segment ( The dynamic penalty term is adaptively adjusted based on fluctuations in pollutant concentration within each segment. Here... It is one of the m variable points. Auxiliary data such as pressure and oxygen content do not participate in the generation of the dynamic penalty term.

[0119] Since the more stable the data segment, the greater the concern regarding potential trend changes, and the fewer the abrupt changes, the larger the penalty should be. Conversely, the greater the data fluctuation, the more attention should be paid to changes in the correlation between pollutant concentrations and abrupt changes in the pollutant concentrations themselves. In this case, more abrupt changes need to be identified.

[0120]

[0121] in, This is the basic penalty function, which can be set to a fixed value according to the actual situation. Baseline_vol represents the overall data volatility, primarily using the volatility value of the pollutant with the largest fluctuation. The calculation formula is as follows:

[0122] Baseline_vol = ( )

[0123] in, For the full sequence monitoring data of pollutant of category k

[0124] and It is the i-th segment of the pollutant L with the largest fluctuation. The fluctuation within a segment reflects the local fluctuation situation. If the fluctuation within a segment is large, the penalty is light, and the algorithm allows more variable points to be generated in that segment; conversely, if the fluctuation is small, variable point generation is suppressed.

[0125]

[0126] in, It is the local time series of the pollutant L with the largest fluctuation in the i-th segment.

[0127] Step 3: Recursive Partitioning and Cost Calculation

[0128] The core of the Pelt algorithm is to find the optimal change point by recursively calculating the minimum loss. Here, we define... To minimize the total loss of the time series data before time point t, i.e., after dividing the data segment [1, t] into several stable segments, the loss function in step Step 2 is... The minimum value is then:

[0129]

[0130] Initial conditions s is a candidate variable point. After traversing all candidate change points s, the total loss value can be determined. The smallest optimal change point. It is the segmentation cost of the candidate segment [s+1,t], and is the core unit of recursive computation.

[0131] Recursive computation logic

[0132] For each time point Perform the following operations:

[0133] 1. Traverse candidate variables s

[0134] The initial candidate set is {0}. Iterate through all candidate change points. Calculate one by one Ultimately, the minimum value was chosen as the total loss value. .

[0135] 2. Calculate the segmented cost The loss term corresponding to a single segment in Step 2 is calculated using the following formula:

[0136] )+

[0137] 3. Update the minimum total loss value The calculation formula is:

[0138]

[0139] in, The minimum total loss before the candidate change point s has been calculated through preorder recursion; The total loss is the loss of dividing the sequence into two segments [1,s] and [s+1,t]. The algorithm selects the candidate change point s with the smallest value as the optimal change point before t and records the optimal candidate change point s.

[0140] Step 4: Pruning removes split points that are unlikely to become optimal candidate change points, significantly reducing computational cost. Common pruning strategies are as follows:

[0141] For each candidate change point s, check if a change point exists. , making

[0142] +cost(s,t)

[0143] If such a change point exists, then the candidate change point s is considered not to be a change point.

[0144] Step 5: Output the detected change points: Return the time point index , indicating that the statistical characteristics changed significantly at these times, and m is the number of change points obtained.

[0145] This section uses the calculation of a certain pollutant concentration and two auxiliary variables as an example to illustrate the calculation approach.

[0146] Assume the original time series matrix is: y = Where n represents n hourly time points, and p=3 corresponds to three variables: pollutant concentration, oxygen content, and pressure.

[0147] Multivariate data normalization: for each variable (The j-th variable at time t) is normalized according to the following formula:

[0148]

[0149] in, These are the maximum and minimum values ​​of the j-th variable at n time points, respectively. The normalized data are aligned according to time points to form an n*3 time series.

[0150] Considering the varying importance of different variables in anomaly detection, particularly in effectively capturing sudden changes in pollutant concentration, a weight matrix is ​​introduced: The values ​​in the diagonal of the weight matrix W represent the contributions of pollutant concentration, oxygen content, and pressure to the loss function, respectively. Off-diagonal elements are 0, indicating that the cross-influence between variables is not considered. A high weight of 0.7 ensures that the fitting bias of pollutant concentration dominates the loss function, guaranteeing that the algorithm prioritizes capturing abrupt concentration changes. A weight of 0.15 assigns some contribution to oxygen content and pressure, and their abnormal fluctuations (such as sudden pressure drops that may be accompanied by concentration changes) can help verify the authenticity of change points. The diagonal matrix structure reduces the computational complexity of the weight and covariance matrices, adapting to the needs of engineering applications.

[0151] The penalty function is set as follows:

[0152]

[0153] in, This is the base penalty function, set to 10 here; Baseline_vol is the overall data volatility, primarily using the overall volatility of pollutant concentrations, calculated as: Baseline_vol = ;in, This represents the complete sequence monitoring data of a certain pollutant. It is the i-th segment of the pollutant ( Fluctuations within the segment.

[0154] Referring to Step 2, the selected loss function is:

[0155]

[0156] Using the loss function described above, and referring to Steps 3, 4, and 5, the time point index can be obtained. This indicates that the statistical properties changed significantly at these times.

[0157] If a change point is found, i.e., a time point index If the values ​​are not empty, these change points are the core analytical objects for the subsequent step four—bivariate pollutant concentration correlation change analysis. If no change points can be detected, proceed to step three.

[0158] Step 3: Identify trend anomalies in multivariate time series with no variable points based on the LSTM-Attention model.

[0159] Monitoring data identified as having no change points by multivariate change point detection in step two cannot be directly considered normal data. In real-world scenarios, data fraudsters often evade change point detection by slowly altering data trends. This type of fraud lacks instantaneous abrupt changes but exhibits significant trend deviations over longer timescales. To address this, this invention constructs a trend anomaly detection system based on an LSTM-Attention model for time-series prediction. It identifies slow-trend manipulation-type data fraud by "predicting future values ​​from historical data → comparing the deviation between the actual and predicted values." By introducing dynamic 3-sigma to further quantify the degree of deviation, it fills the gap in existing change point detection technologies for identifying covert trend manipulation. Figure 4 As shown, the specific implementation steps are as follows:

[0160] Step 1: Perform data preprocessing on multivariate time series with no variable points.

[0161] The input data is a multivariate time series of n time points of a certain sewage outlet of a certain enterprise.

[0162] y =

[0163] Among them, elements Let represent the observed value of the j-th variable at time point t. After step two, multivariate change point detection is performed on the preprocessed monitoring data. If no change point set exists in the sequence... If m=0, then the concentration time series of a certain pollutant a is selected from the multivariate time series y.

[0164]

[0165] in, This corresponds to n time points.

[0166] The amount of pollutant data is too small; if it is directly used as network input, the vanishing gradient problem will occur, leading to training failure. Therefore, it is necessary to process the time series data. Perform normalization:

[0167]

[0168] in, It is a univariate time series The original concentration value at the t-th time point; It is a time series The global minimum value; It is a time series The global maximum value; It is the normalized concentration value at time point t, satisfying .

[0169] The sequence obtained after normalization is:

[0170]

[0171] Step 2: Sliding window reconstruction (unsupervised to supervised): The sliding window technique is used to process the preprocessed multivariate time series data to obtain a supervised dataset.

[0172] Reconstructing the dataset using the sliding window technique, with window parameters defined as follows:

[0173] 1. Window length: 21 (including 20 hours of historical input + 1 hour of forecast target).

[0174] 2. Sliding step size: 1

[0175] 3. Reconstruction rule: For the t1-th window, the input sequence is...

[0176]

[0177] The prediction target is:

[0178]

[0179] 4. Output: The reconstructed supervised dataset.

[0180] .

[0181] Step 3: Construct an LSTM-Attention model. Divide the supervised dataset into training, testing, and validation sets, and use the training set to train the LSTM-Attention model.

[0182] Model parameters: The parameters of the LSTM network include the number of hidden units, 64, which was determined by traversing the grid search {32, 64, 128}. 64 is the optimal value, achieving a balance between fitting accuracy and computational cost.

[0183] Input shape: [32,20,1], where the batch sample size is 32, the time length of the input sequence is 20, and 1 indicates that it is a univariate prediction.

[0184] Output shape: [32,20,64]. The LSTM module extracts the time-series dependent features after filtering the concentration value input at this time step using a gating mechanism. These features include the correlation weights, trend features, and fluctuation features between the concentration at this time step and the concentrations at the previous 19 time steps. The dimension is 64 to fully represent the time-series patterns and avoid overfitting.

[0185] The self-attention layer includes:

[0186] Number of attention heads: 4. The 64-dimensional feature matrix output by the LSTM module is split into 4 16-dimensional sub-matrices according to the dimensions, and each attention head focuses on the temporal features of different dimensions.

[0187] Prediction layer: Extracts the 64-dimensional feature vector from the last time step (20th time step) of the attention layer output, and maps it to a 1-dimensional scalar through a fully connected layer to achieve the transformation from "20-step sequence input to 1-step single-value prediction", thus meeting the business objective of "predicting the concentration of the next hour from the historical 20 hours".

[0188] Training configuration: The loss function used is the mean squared error (MSE) loss function, the formula of which is:

[0189] Loss=

[0190] Where N=32 is the number of training samples in a single batch; This represents the true concentration value (after normalization) of the i-th batch sample. Here, represents the model's predicted concentration value for the i-th batch of samples. .

[0191] The Adam optimizer is used, which has adaptive learning rate characteristics, with an initial learning rate of 0.001.

[0192] Dataset The dataset is divided into training, validation, and test sets in a 7:2:1 ratio to train the LSTM-Attention model and learn the temporal dependencies of normal data. The training set (70%) is used for iterative training of model parameters, learning the natural temporal dependencies of pollutant concentration sequences without inflection points. The number of samples is int(0.7*(n-20), taking integer values, representing the first 70% of the data in dataset D. The validation set (20%) is used to evaluate the model's generalization ability in real-time during training and for hyperparameter tuning. The test set (10%) consists of the last 10% of the data in dataset D. It is mainly used to calculate prediction bias and distribution characteristics, determining whether there is a slow trend of data manipulation. Because pollutant concentration sequences have strong temporal dependencies, the above dataset division is based on chronological order.

[0193] Step 4: Determine anomalies based on the data samples in the test set.

[0194] 1. Error Anomaly Detection: Calculate the mean square error for each sample in the test set.

[0195]

[0196] in, Let be the predicted value of the LSTM-Attention model for the t1-th test sample. If the mean squared error is 0.05% across all test set data... If the percentage of data items greater than 0.001 is ≥80%, then the judgment error is too large and there is a trend deviation.

[0197] 2. Distribution Anomaly Detection:

[0198] Due to business needs, a dynamic 3-sigma criterion is further introduced based on the above error assessment. Here, the standard deviation is defined as... The monthly standard deviation of this pollutant for the previous month. and the standard deviation of the current training set Minimum value:

[0199]

[0200] Comparing the test set and training set data samples, if more than 70% of the test set data is in […] - 1.2 * , + 1.2 * If the data falls outside the specified range, it indicates a significant abrupt change in the data trend, suggesting potential data manipulation. Among these, This is the mean of the current training set.

[0201] Step 4: Perform bivariate pollutant concentration correlation analysis on the multivariate time series with variable points to determine whether data is falsified.

[0202] Correlation is a statistical indicator that measures the degree and direction of the relationship between two time series. In actual production, the values ​​of two variables often exhibit a certain degree of correlation. However, if data is falsified, this correlation can be artificially altered; for example, if the correlation reverses from 0.9 to -0.8, it indicates that the data is abnormal. A turning point can potentially alter the correlation between variables.

[0203] This step, based on step two, further determines whether the correlation between any two time series has changed. For example... Figure 5 As shown, the specific implementation method is as follows:

[0204] S1: The input data is a multivariate time series of n time points from a specific sewage outlet of a certain enterprise.

[0205] y =

[0206] Among them, elements Let represent the observed value of the j-th variable at time point t. After step two, multivariate change point detection is performed on the preprocessed monitoring data. If a change point exists in the sequence... Then proceed to step 2.

[0207] S2: Pairwise variable selection and local data acquisition

[0208] For all variables, pairwise combinations Perform the following operations

[0209] 1. Variable sequence extraction: Extracting single sequences of two variables from a multivariate time series y.

[0210]

[0211] in, This corresponds to n time points.

[0212] 2. Local data extraction at variable points:

[0213] Traverse each variable point Extract the local data segment containing the variable point according to the following rules:

[0214] Target duration: based on variable points The data was collected from the center and two front / back points, totaling 336 data points. If the data points change... If the distance from the start / end of the sequence is less than 168 points, start truncating from the end of the sequence to ensure that it contains 336 data points and that it contains a variable point. The above data constitutes the correlation calculation sequence.

[0215]

[0216] in, The dimension is 336 * 2.

[0217] S3: Local Data Segmentation and Correlation Calculation

[0218] Calculate the correlation sequence Dividing the sample into 14 parts sequentially according to the collection time, we can obtain...

[0219]

[0220] Each sub-segment has a dimension of 24*2. The correlation of each of the 14 segments is calculated using the Pearson correlation coefficient, resulting in a correlation sequence. If the correlation in this sequence becomes abnormal, it indicates that the correlation between variables a and b has changed.

[0221] S4: Correlation mutation detection based on Dixon algorithm:

[0222] For the correlation sequence in step S3 Sort the values ​​in ascending order to obtain an ordered sequence:

[0223]

[0224] Among them, the minimum value is: Maximum value:

[0225] For a sample size of n=14, the statistic formula from the Dixon algorithm suitable for "two-tailed tests (simultaneously detecting maximum / minimum outliers)" is used:

[0226] 1. The Dixon statistic corresponding to the minimum value (to detect whether it is an abnormally low value):

[0227]

[0228] 2. The Dixon statistic corresponding to the maximum value (to detect whether it is an abnormally high value).

[0229]

[0230] The calculated Dixon statistic , Dixon critical value contrast

[0231] If Dixon statistic or If this is the case, it can be directly determined that the correlation between variables a and b has changed, suggesting potential data falsification. In actual business operations, if... or They also believe the data is suspected of being fabricated.

[0232] Step 5: Display of test results.

[0233] The monitoring results mainly include enterprise information, sewage outlets, monitoring factors (pollutant categories), data range (time series), and abnormal phenomena (abnormal trends, abnormal changes in correlations). This information is stored in the database and displayed on the front-end page.

[0234] Specific embodiments of the present invention are described below.

[0235] Example 1. A certain operating company in a certain city

[0236] like Figure 6As shown, on November 1, 2025, this invention detected a change in the trend of total phosphorus at the outlet of a certain operating company in a certain city. Specifically, analysis of the concentration time series from 00:00 on October 1, 2025 to 23:00 on October 30, 2025 revealed a change in the trend of total phosphorus. The trend change occurred at 04:00:00 on October 21, 2025. The mean before the trend change was 0.086, and the mean after the trend change was 0.062. After the trend change, 70% of the data fell outside the 3-sigma range of the sequence. This suggests that the company's total phosphorus data may have been falsified.

[0237] Example 2. A certain joint-stock company

[0238] like Figure 7 As shown, on November 1, 2025, this invention detected a correlation change at the wastewater discharge outlet of a certain company. Specifically, ammonia nitrogen and total nitrogen showed abnormal changes in their time series trends between October 14, 2025 and October 6, 2025, with correlation coefficients of -0.553 and 0.998, respectively. This indicates a significant difference in the correlation coefficients before and after the monitoring point. The correlation between the two pollutants reversed, suggesting possible data manipulation and potential data falsification.

[0239] In summary, as demonstrated by the practical test cases, this invention effectively addresses the practical problems of traditional data anomaly detection technologies, such as "weak identification of gradual anomalies, slow response to correlated anomalies, and poor interpretability." Its core value lies in deeply integrating "regulatory business priorities" with "statistical calculations," forming a technical solution more suited to environmental monitoring scenarios. This provides practical and reliable technical support for identifying pollution source data quality anomalies and enhances the potential for the transformation and application of the patented technology.

[0240] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for identifying anomalies in online monitoring data of multi-source pollutants, characterized in that, Includes the following steps: Step 1: Collect monitoring data of multiple pollutants and preprocess them to obtain a multivariate time series of the monitoring data; Step 2: Perform multivariate change point detection on the multivariate time series. If a change point exists, proceed to Step 4; otherwise, proceed to Step 3. Step 3: Identify trend anomalies in multivariate time series with no variable points based on the LSTM-Attention model; Step 4: Perform bivariate pollutant concentration correlation analysis on the multivariate time series with variable points to determine whether data is falsified.

2. The method for identifying anomalies in online monitoring data of multi-source pollutants according to claim 1, characterized in that, The monitoring data for the multi-source pollutants includes data from different pollution sources and different monitoring indicators, which are classified and stored according to pollution source ID, monitoring indicator, and collection time. The monitoring indicators include particulate matter, sulfur dioxide, nitrogen oxides, and non-methane total hydrocarbons in exhaust gas, and chemical oxygen demand, ammonia nitrogen, total nitrogen, and total phosphorus in wastewater. The monitoring indicators also include auxiliary data, including operation and maintenance data, operating condition data, electricity consumption data, and pollutant discharge permit data. The preprocessing method in step one is as follows: Invalid data for periods outside of normal operating conditions were removed, and only monitoring data under normal production and wastewater discharge conditions were retained; Multi-dimensional data anomaly detection rules developed using statistical methods were used to exclude abnormal sewage discharge data. Screening for multivariate time series of pollutants that are continuous for more than 14 days, hourly, and without missing data.

3. The method for identifying anomalies in online monitoring data of multi-source pollutants according to claim 1 or 2, characterized in that, The implementation method of the multivariate change point detection is as follows: Based on the input multivariate time series y at n time points, a loss function including weighted covariance and dynamic penalty term is set; The optimal candidate change point is found by recursively calculating the minimum value of the loss function; Pruning: Remove split points that are unlikely to become optimal candidate change points; Output the best candidate change point detected after pruning.

4. The method for identifying anomalies in online monitoring data of multi-source pollutants according to claim 3, characterized in that, The loss function is: in, It is multivariate time series data of length n. For the variable number of points, Let be the index of the i-th variable point, and This represents the time interval of the i-th segment. It is the covariance matrix of the variables. It is a weight matrix of size p*p, where p is the total number of variables, and tr() is the trace of the matrix. For the i-th segment Dynamic penalty items.

5. The method for identifying anomalies in online monitoring data of multi-source pollutants according to claim 4, characterized in that, The method for finding the optimal candidate change point by recursively calculating the minimum value of the loss function is as follows: The loss function that minimizes the multivariate time series data before time point t. Total loss value ; among which, initial conditions Candidate Variables , It is the segmentation cost of the candidate segment [s+1,t]. The minimum total loss value before the candidate change point s; The initial candidate set is {0}, and all candidate change points are traversed. Calculate one by one Choose the minimum value as the total loss value. Update the minimum total loss value. Select the total loss value The smallest candidate change point s is taken as the optimal candidate change point before time point t and recorded as the optimal candidate change point.

6. The method for identifying anomalies in online monitoring data of multi-source pollutants according to claim 5, characterized in that, The weight matrix = elements on the diagonal Different weights are assigned to different variables, and ; The dynamic penalty item The system adaptively adjusts to the fluctuations in pollutant concentration within each segment, and auxiliary data does not participate in the generation of the dynamic penalty term; and the dynamic penalty term... in, It is the basic penalty function, and Baseline_vol is the overall volatility of the data; while This represents the fluctuation of pollutant L with the largest fluctuation within the i-th segment; The overall volatility of the data: Baseline_vol = ( );in, This represents the full-sequence monitoring data for pollutant category k; Fluctuation of pollutant L with the largest fluctuation within the i-th segment: in, It is the local time series of the pollutant L with the largest fluctuation in the i-th segment; The segmented cost It is the loss term for a single segment, and the calculation formula is: )+ ; Update the minimum total loss value The calculation formula is: ;in, It is the total loss when a multivariate time series is divided into two segments: [1, s] and [s+1, t]. The pruning strategy is as follows: for each candidate variable point s, check whether a variable point exists. , making +cost(s,t) If such a change point exists, then the candidate change point s is considered not to be a change point; The output of the detected optimal candidate change point after pruning is: Return time point index , indicating at time The statistical properties have changed significantly, where m is the number of variable points obtained. Before setting the loss function, the time series of each variable in the multivariate time series y is normalized.

7. The method for identifying anomalies in online monitoring data of multi-source pollutants according to claim 4 or 5, characterized in that, The method for identifying trend anomalies is as follows: Step 1: Select the concentration time series of any pollutant from the n time series with no variable points. Then, normalization is performed to obtain a normalized sequence. ; Step 2: Use the sliding window technique to normalize the sequence. The data is processed to obtain a supervised dataset that includes the input sequence and the prediction target; Step 3: Divide the supervised dataset into training set, validation set and test set, and use the training set to train the LSTM-Attention model; Step 4: Determine anomalies based on the data samples in the test set.

8. The method for identifying anomalies in online monitoring data of multi-source pollutants according to claim 7, characterized in that, The method for obtaining the supervised dataset is as follows: The window length is set to 21, containing 20 hours of historical input and a 1-hour prediction target; the sliding step size is 1, and the reconstruction rule is: for the t1-th window, the input sequence is... ,in, These are the univariate normalized concentration values ​​from the past 20 hours; the prediction target is... The reconstructed dataset is a supervised dataset. ; The LSTM-Attention model includes an LSTM network and a self-attention layer. The LSTM network has 64 hidden units. After filtering the concentration value input at time point t through a gating mechanism, the LSTM network extracts time-dependent features, which include the core information of the correlation weight, trend features, and fluctuation features between the concentration at time point t and the concentrations of the previous 19 time steps. The self-attention layer includes 4 attention heads, which split the 64-dimensional feature matrix output by the LSTM network into 4 16-dimensional sub-matrices. Each attention head focuses on temporal features of different dimensions. The prediction layer extracts the 64-dimensional feature vector of the last time step output by the self-attention layer and maps it to a 1-dimensional scalar as the output result through a fully connected layer. The loss function used in the training is the mean squared error; The Adam optimizer is used, which has adaptive learning rate characteristics, with an initial learning rate of 0.001; Supervised datasets The dataset was divided into training, validation, and test sets in a 7:2:1 ratio to train the LSTM-Attention model to learn the temporal dependency patterns of normal data samples. The anomaly determination includes: error anomaly determination and distribution anomaly determination; The method for determining error anomalies is as follows: calculate the mean square error for each sample in the test set. ;in, Let be the predicted value of the LSTM-Attention model for the t1-th test sample; if the mean squared error of the sample data in all test sets is... If the percentage of data items greater than 0.001 is ≥80%, then the judgment error is too large and there is a trend deviation. The distribution anomaly determination is based on: defining the standard deviation. Monthly standard deviation of pollutants and the current standard deviation of the training set The minimum value; compare the data samples of the test set and the training set. If more than 70% of the data samples in the test set are in […]. - 1.2 * , + 1.2 * If the data falls outside the specified range, it indicates a significant abrupt change in the data trend, suggesting potential data manipulation; among them, The mean of the training set.

9. The method for identifying anomalies in online monitoring data of multi-source pollutants according to claim 7, characterized in that, The method for performing bivariate pollutant concentration correlation change analysis is as follows: Extracting single sequences of two variables from a normalized multivariate time series y ,in, p represents the total number of variables; Traverse each variable point, extract the local data segment containing the variable point, and obtain the correlation calculation sequence; The correlation calculation sequence is divided into multiple segments according to the collection time, and the correlation of each segment is calculated using the Pearson correlation coefficient to obtain the correlation sequence. The correlation sequences are sorted, and the Dixon algorithm is used to calculate the Dixon statistic corresponding to the minimum and maximum values. The variables are then judged based on the Dixon statistics. Is there any data suspected of being fabricated? 10. The method for identifying anomalies in online monitoring data of multi-source pollutants according to claim 9, characterized in that, The method for extracting local data segments containing change points to obtain the correlation calculation sequence is as follows: With change point Centered on the data point, data from 7*24 points are collected both before and after it; if the data points change... If the distance from the start / end of the sequence is less than 168 points, then the sequence is truncated from its endpoint to form a correlation calculation sequence. in, and These are the points containing variables. single sequence Element; Calculate the correlation sequence Divide the samples into 14 parts in chronological order of collection time. Each sub-segment has a dimension of 24*2; the correlation coefficient is calculated for each of the 14 segments using the Pearson correlation coefficient. The correlation sequence was obtained. ; For correlation sequences Sort by numerical values ​​in ascending order to obtain an ordered sequence. Among them, the minimum value maximum value ; The formula for the statistic using the Dixon algorithm: Calculate the Dixon statistic corresponding to the minimum value: The Dixon statistic corresponding to the maximum value: ;in, They are ordered sequences The 3rd and 12th elements; the calculated Dixon statistic and Respectively compared with Dixon's critical value In contrast, the Dixon statistic... Or Dixon's statistic If the correlation between variables a and b changes, it can be directly determined that there is a possibility of data fabrication. If the maximum value Or minimum value If so, the data is suspected of being falsified.

Citation Information

Patent Citations

  • Environmental protection data counterfeiting detection method based on time sequence sliding window discrete coefficient

    CN112101969A

  • Method for automatically identifying falsification behaviors of online monitoring data of water pollution source

    CN112381697A

  • Pollution source on-line monitoring system and on-line monitoring data counterfeiting identification analysis method

    CN113012388A

  • Anomaly detection method for ocean online monitoring data

    CN114997313A