An environmental monitoring data anomaly detection method, medium and system
Through matrix decomposition and optimization of equation systems, the problems of dynamic correlation and detection accuracy of multi-dimensional parameters in environmental monitoring data are solved, and efficient and reliable abnormality detection is achieved.
Patent Information
- Application Number
- CN202510299798.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-03-14
AI Technical Summary
The existing environmental monitoring data abnormal detection methods are difficult to take into account the dynamic correlation of multi-dimensional environmental parameters and the accuracy of abnormal detection, which leads to a contradiction between detection sensitivity and reliability.
By constructing the original matrix of environmental monitoring data and using the matrix decomposition algorithm to separate it into a regular matrix and anomaly matrix, an optimization equation system containing environmental parameter weight equations, anomaly threshold equations and comprehensive anomaly equations is designed to achieve comprehensive analysis and dynamic optimization of the abnormal characteristics of multi-dimensional environmental parameters.
The dynamic correlation analysis of multi-dimensional environmental parameters is realized, the accuracy and reliability of abnormal detection is improved, the false alarm rate is reduced, and the performance of the environmental monitoring system is enhanced.
Smart Images

Figure CN119807728B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electronic digital data processing, and in particular, relates to a method, medium and system for detecting anomalies in environmental monitoring data. Background Art
[0002] Environmental monitoring is an important means to ensure ecological security and environmental quality, involving real-time monitoring of environmental parameters in multiple dimensions such as air quality, water quality, soil, and noise. Traditional methods for detecting anomalies in environmental monitoring data mainly include anomaly detection methods based on statistical analysis, anomaly detection methods based on machine learning, and anomaly detection methods based on expert systems. Statistical analysis methods use variance analysis, correlation analysis, and other methods to identify outliers by establishing a data distribution model; machine learning methods use classifiers or clustering models to learn the normal patterns of data to detect anomalies; and expert systems make anomaly judgments based on a preset rule base. These methods have achieved certain results in detecting anomalies in single environmental parameters.
[0003] However, the existing technology has the following problems: First, environmental monitoring data is multidimensional and highly correlated, and there are complex mutual influence relationships between various environmental parameters. The anomaly of a single parameter often causes a chain reaction of other parameters, and most of the existing methods conduct independent analysis on a single parameter and cannot effectively capture the dynamic correlation between parameters; second, environmental parameters are affected by multiple external factors such as seasonal changes and weather conditions, showing obvious spatiotemporal variation characteristics, and the existing methods mostly use static thresholds or fixed models, which are difficult to adapt to the dynamic change characteristics of environmental parameters; third, there is a contradiction between the sensitivity and reliability of anomaly detection. Excessive sensitivity can easily lead to false alarms, while too low sensitivity may miss important anomalies, and the existing methods lack an effective adaptive adjustment mechanism.
[0004] Based on the above problems, how to achieve accurate and reliable anomaly detection based on the dynamic correlation of multi-dimensional environmental parameters has become a key technical problem that needs to be solved in the field of environmental monitoring. Existing technologies are difficult to take into account both the dynamic correlation of multi-dimensional environmental parameters and the accuracy of anomaly detection, which restricts the performance improvement of environmental monitoring systems. Summary of the invention
[0005] In view of this, the present invention provides an environmental monitoring data anomaly detection method, medium and system, which can solve the technical problem in the prior art that the environmental monitoring data anomaly detection method is difficult to simultaneously take into account the dynamic correlation of multi-dimensional environmental parameters and the accuracy of anomaly detection.
[0006] The present invention is implemented as follows: In the first aspect of the present invention, an environmental monitoring data anomaly detection method is provided, which includes the following steps: constructing an original matrix of environmental monitoring data, where the original matrix of environmental monitoring data includes the monitoring values of multiple environmental parameters at different time points; performing time series segmentation on the original matrix of environmental monitoring data to obtain a training data sub-matrix; using a matrix decomposition algorithm to decompose the training data sub-matrix into a regular matrix and an anomaly matrix; calculating the historical mean and historical standard deviation of each environmental parameter according to the regular matrix; calculating the spatial gradient, spatial correlation, and spatial distribution characteristics of each environmental parameter based on the historical mean; calculating the fluctuation range, sampling frequency, and change rate of each environmental parameter according to the historical standard deviation; obtaining the time persistence, typical fluctuation period, and seasonal change amplitude of each environmental parameter based on the regular matrix; using an anomaly detection optimization equation set to calculate the anomaly degree of data points in the anomaly matrix, where the anomaly detection optimization equation set includes an environmental parameter weight equation, an anomaly threshold equation, and a comprehensive anomaly degree equation; constructing a gain vector based on the comprehensive anomaly degree index; calculating a feedback vector using the gain vector; using the feedback vector to optimize and adjust the anomaly detection optimization equation set; and using the optimized anomaly detection optimization equation set to perform anomaly detection on real-time environmental monitoring data.
[0007] Among them, the original matrix of environmental monitoring data is an m×n-dimensional matrix, where m is the number of environmental parameters and n is the number of time sampling points; the regular matrix represents the normal change pattern of environmental parameters; the anomaly matrix represents the abnormal fluctuation components of environmental parameters; the gain vector represents the deviation degree of abnormal data; and the feedback vector represents the correction coefficient for anomaly determination.
[0008] Among them, in the step of constructing the original matrix of environmental monitoring data, environmental monitoring data is obtained through a data acquisition system, and a sensor array is used to collect environmental parameters including temperature, humidity, PM2.5, concentration, and noise, and the real-time values of each environmental parameter are recorded according to a preset sampling frequency, and the collected data is stored in the form of a two-dimensional matrix.
[0009] Among them, in the step of performing time series segmentation on the original matrix of environmental monitoring data, the sliding window method is used for segmentation, the sliding window size is set to 24 hours, the window sliding step size is 1 hour, and the representativeness of each sub-matrix is determined by calculating the mean, variance, skewness, and kurtosis.
[0010] Among them, in the step of decomposing the training data sub-matrix using a matrix decomposition algorithm, the robust principal component analysis algorithm is used for decomposition, eigenvalues and eigenvectors are obtained through the singular value decomposition method, and the principal components with a cumulative contribution rate reaching 85% are selected.
[0011] Among them, in the step of calculating the spatial characteristics of environmental parameters based on historical means, the central difference method is used to calculate the spatial gradient, the Pearson correlation coefficient method is used to construct the correlation matrix, and the Kriging interpolation method is used to construct the parameter spatial distribution model.
[0012] Among them, in the step of analyzing the dynamic characteristics of environmental parameters according to historical standard deviations, the percentile method is used to determine the upper and lower limits of parameter fluctuations, the Fourier transform method is used to analyze the signal spectrum, and the first-order difference method is used to calculate the change rate.
[0013] Among them, in the step of analyzing the time characteristics of environmental parameters based on the regular matrix, the autocorrelation function method is used to analyze the time correlation, the Mexican hat wavelet is used to analyze the typical fluctuation period, and the seasonal decomposition algorithm is used to extract the seasonal component.
[0014] The second aspect of the present invention provides a computer-readable storage medium, in which program instructions are stored. When the program instructions run on a computer, they are used to execute the above-mentioned environmental monitoring data anomaly detection method.
[0015] The third aspect of the present invention provides an environmental monitoring data anomaly detection system, which includes the above-mentioned computer-readable storage medium. The system can be any one of a computer, a server, and a single-chip microcomputer. The computer-readable storage medium is set inside the system, and a microprocessor for executing the program instructions stored in the computer-readable storage medium is set inside the system.
[0016] Compared with the prior art, the present invention provides an environmental monitoring data anomaly detection method, medium, and system. The environmental monitoring data anomaly detection method proposed by the present invention constructs an original matrix of environmental monitoring data and uses matrix decomposition to separate it into a regular matrix and an anomaly matrix. On this basis, an optimization equation set including an environmental parameter weight equation, an anomaly threshold equation, and a comprehensive anomaly degree equation is designed to achieve a comprehensive analysis and dynamic optimization of the anomaly characteristics of multi-dimensional environmental parameters. The method of the present invention makes full use of the spatio-temporal characteristic information of environmental parameters and establishes a complete parameter characteristic extraction and analysis system.
[0017] The present invention solves the problems existing in the traditional method through multiple innovative technical means: by constructing a decomposition framework of the regular matrix and the anomaly matrix, it realizes the effective separation of the normal change mode and the abnormal fluctuation component; by designing the environmental parameter weight equation, it comprehensively considers multi-dimensional characteristics such as historical means, fluctuation ranges, sampling frequencies, time persistence, and spatial correlations, and realizes an adaptive evaluation of the importance of different environmental parameters; through the dynamic optimization of the anomaly threshold equation, combined with the seasonal change characteristics, typical fluctuation periods, and spatial gradient information of environmental parameters, a flexible anomaly determination standard is established; through the multi-characteristic fusion of the comprehensive anomaly degree equation, a comprehensive evaluation of the abnormal state is realized.
[0018] The present invention successfully solves the problem of unifying the dynamic correlation and detection accuracy of multi-dimensional parameters in environmental monitoring data anomaly detection. The introduction of the gain vector and the feedback vector provides an adaptive optimization mechanism for anomaly detection, enabling the detection system to continuously adjust and improve according to the actual monitoring effect. While maintaining high detection accuracy, the method of the present invention effectively reduces the false alarm rate and improves the reliability and practicality of the environmental monitoring system. Description of the Drawings
[0019] Figure 1 It is a flowchart of the method of the present invention.
[0020] Figure 2 It is a scatter plot of the sub-matrix feature distribution in Example 2.
[0021] Figure 3 It is an analysis diagram of the characteristics of typical abnormal events in Example 2. Detailed Embodiments
[0022] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0023] As Figure 1 shown, it is a flowchart of a method for detecting anomalies in environmental monitoring data provided by the first aspect of the present invention. This method includes the following steps:
[0024] S01. Construct an original matrix of environmental monitoring data, where the original matrix of environmental monitoring data includes the monitoring values of multiple environmental parameters at different time points;
[0025] S02. Segment the original matrix of environmental monitoring data by time series to obtain a training data sub-matrix;
[0026] S03. Use a matrix decomposition algorithm to decompose the training data sub-matrix into a regular matrix and an abnormal matrix;
[0027] S04. Calculate the historical mean and historical standard deviation of each environmental parameter according to the regular matrix;
[0028] S05. Calculate the spatial gradient, spatial correlation, and spatial distribution characteristics of each environmental parameter based on the historical mean;
[0029] S06. Calculate the fluctuation range, sampling frequency, and change rate of each environmental parameter according to the historical standard deviation;
[0030] S07. Obtain the time persistence, typical fluctuation period, and seasonal change amplitude of each environmental parameter based on the regular matrix;
[0031] S08. Optimize the equation set for calculating the anomaly degree of data points in the anomaly matrix by using anomaly detection. The anomaly detection optimization equation set includes an environmental parameter weight equation, an anomaly threshold equation, and a comprehensive anomaly degree equation.
[0032] S09. Calculate the environmental parameter weight vector by using the environmental parameter weight equation. The inputs of the environmental parameter weight equation include the historical mean, the fluctuation range, the sampling frequency, the time persistence, and the spatial correlation.
[0033] S10. Calculate the dynamic anomaly threshold matrix by using the anomaly threshold equation. The inputs of the anomaly threshold equation include the environmental parameter weight vector, the historical standard deviation, the seasonal change amplitude, the typical fluctuation period, and the spatial gradient.
[0034] S11. Calculate the comprehensive anomaly degree index by using the comprehensive anomaly degree equation. The inputs of the comprehensive anomaly degree equation include the environmental parameter weight vector, the dynamic anomaly threshold matrix, the anomaly matrix, the change rate, and the spatial distribution characteristics.
[0035] S12. Construct a gain vector based on the comprehensive anomaly degree index.
[0036] S13. Calculate a feedback vector by using the gain vector.
[0037] S14. Optimize and adjust the anomaly detection optimization equation set by using the feedback vector.
[0038] S15. Perform anomaly detection on real-time environmental monitoring data by using the optimized anomaly detection optimization equation set.
[0039] Wherein: the original matrix of environmental monitoring data is an m×n-dimensional matrix, m is the number of environmental parameters, and n is the number of time sampling points; the regular matrix represents the normal change mode of environmental parameters; the anomaly matrix represents the abnormal fluctuation components of environmental parameters; the gain vector represents the deviation degree of abnormal data; the feedback vector represents the correction coefficient of anomaly determination; the environmental parameter weight vector represents the importance degree of different environmental parameters; the dynamic anomaly threshold matrix represents the anomaly determination standard for the combination of multiple environmental parameters; the comprehensive anomaly degree index represents the overall evaluation result of environmental anomalies.
[0040] The specific implementation manners of the above steps are described in detail below. The specific implementation manner of step S01 is to obtain environmental monitoring data through a data acquisition system, and use a sensor array to collect data including temperature, humidity, PM2.5, For environmental parameters such as concentration and noise, record the real-time values of each environmental parameter according to the preset sampling frequency, and store the collected data in the form of a two-dimensional matrix. The rows of the matrix represent different environmental parameters, and the columns represent different time points. The data collection time span is recommended to be no less than 30 days, and the sampling interval is recommended to be no more than 10 minutes. For different environmental parameters, corresponding data preprocessing methods are adopted, including outlier removal, data normalization, and missing value filling. The outlier removal uses the 3-sigma method, the data normalization uses the min-max normalization method, and the missing value filling uses the moving average interpolation method. Finally, a complete original matrix of environmental monitoring data is constructed. The purpose of this step is to establish a standardized data basis to ensure the accuracy of subsequent analysis.
[0041] The specific implementation of step S02 is to segment the time series of the original matrix of environmental monitoring data using the sliding window method. Set the sliding window size to 24 hours and the window sliding step size to 1 hour. For the data within each sliding window, extract a sub-matrix. The number of rows of the sub-matrix remains the same as that of the original matrix, and the number of columns corresponds to the window size. Determine its representativeness by calculating the statistical features of each sub-matrix. The statistical features include mean, variance, skewness, and kurtosis. Select the sub-matrix with statistical features closest to the overall distribution as the training data. It is recommended to select 3 to 5 representative sub-matrices to form a training data set. Use the cross-validation method to evaluate the representativeness and integrity of the sub-matrix to ensure that the selected training data can fully reflect the change characteristics of environmental parameters. The purpose of this step is to obtain representative training samples and provide a reliable data basis for subsequent matrix decomposition.
[0042] The specific implementation of step S03 is to decompose the training data sub-matrix using the robust principal component analysis algorithm. First, centralize the training data sub-matrix, calculate the covariance matrix, and use the singular value decomposition method to obtain the eigenvalues and eigenvectors. Determine the number of principal components according to the eigenvalue size. Generally, select the principal components with a cumulative contribution rate reaching 85%. Form a transformation matrix with the corresponding eigenvectors. Reconstruct the regular matrix through the principal components, calculate the difference between the original matrix and the regular matrix to obtain the anomaly matrix, and use the iterative optimization method to improve the decomposition accuracy. Set the convergence threshold to 0.001 and the maximum number of iterations to 100 times. Evaluate the decomposition effect by calculating the reconstruction error. The purpose of this step is to decompose the environmental data into regular components and anomaly components and provide a basis for subsequent feature extraction.
[0043] The specific implementation of step S04 is to calculate the statistical features of environmental parameters based on the regular matrix. For each environmental parameter in the regular matrix, the sliding window method is used to calculate the historical mean. The window size is set to 24 hours, and the historical mean sequence of the parameter is obtained by calculating the arithmetic mean of the data within the window. The exponential weighted moving average method is used to smooth the historical mean sequence, and the smoothing coefficient is set to 0.2. The standard deviation is calculated based on the smoothed historical mean sequence, and the historical standard deviation of each environmental parameter is calculated by dividing the sum of squared deviations by the degrees of freedom. For environmental parameters of different scales, relative standard deviation is used for standardization. The purpose of this step is to obtain the basic statistical features of environmental parameters and provide a statistical benchmark for anomaly detection.
[0044] The specific implementation of step S05 is to analyze the spatial features of environmental parameters using the regular matrix. First, calculate the spatial gradient of the environmental parameters. The central difference method is used to calculate the parameter change rate between adjacent monitoring points. The spatial gradient is expressed as the parameter change amount per unit distance. Then, calculate the spatial correlation between environmental parameters. The Pearson correlation coefficient method is used to construct the correlation matrix, and the correlation coefficient threshold is set to 0.6. Parameter combinations with significant correlation relationships are identified based on the correlation matrix. Finally, analyze the spatial distribution features of environmental parameters. The Kriging interpolation method is used to construct the spatial distribution model of the parameters, calculate the spatial autocorrelation index, analyze the spatial variation law through the variogram, and establish the spatial distribution feature vector. The purpose of this step is to obtain the spatial features of environmental parameters and provide a judgment basis for anomaly detection in the spatial dimension.
[0045] The specific implementation of step S06 is to analyze the dynamic features of environmental parameters based on the historical standard deviation. First, calculate the fluctuation range. The percentile method is used to determine the upper and lower limits of parameter fluctuations. The 15th and 85th percentiles are taken as the normal fluctuation interval, and the ratio of the fluctuation range to the historical mean is calculated as the fluctuation intensity index. Then, based on the sampling data analysis, the sampling frequency characteristics are analyzed. The Fourier transform method is used to analyze the signal spectrum, determine the main frequency component and harmonic component of the signal, and calculate the entropy value of the frequency distribution to characterize the complexity of the sampling frequency. Finally, calculate the change rate of environmental parameters. The first-order difference method is used to calculate the change amount between adjacent time points, and the least squares method is used to fit the change trend to obtain the change rate vector of each parameter. The purpose of this step is to obtain the dynamic change features of environmental parameters and provide a judgment basis for anomaly detection in the time dimension.
[0046] The specific implementation of step S07 is to analyze the time characteristics of environmental parameters based on the regular matrix. First, calculate the time persistence. The autocorrelation function method is used to analyze the time correlation of parameter values. The significance level of the autocorrelation coefficient is determined to be 0.05, and the correlation length is calculated as the time persistence index. Then, the wavelet transform method is used to analyze the typical fluctuation period. The Mexican hat wavelet is selected as the basis function, and the main period components are determined through the modulus maxima of wavelet coefficients. The period significance threshold is set to 0.8. Finally, analyze the seasonal change characteristics. The seasonal decomposition algorithm is used to extract the seasonal components, and the amplitude and phase of seasonal changes are calculated to construct the seasonal feature vector. The purpose of this step is to obtain the periodic characteristics of environmental parameters and provide a basis for judging the time series pattern for anomaly detection.
[0047] The specific implementation of step S08 is to construct an optimized equation system for anomaly detection. First, construct the environmental parameter weight equation. The analytic hierarchy process is used to determine the importance of parameters. A judgment matrix is established through expert scoring, and the eigenvector is calculated as the initial weight. Then, construct the anomaly threshold equation. The adaptive threshold method is used to dynamically adjust the threshold based on the statistical characteristics of historical data, considering seasonal and periodic effects. Finally, construct the comprehensive anomaly degree equation. The weighted summation method is used to combine multi-dimensional features into a single index, and normalization is performed to ensure the comparability of features in different dimensions. The purpose of this step is to establish a scientific mathematical model for anomaly detection and achieve the effective fusion of multi-dimensional features.
[0048] The specific implementation of step S09 is to calculate the environmental parameter weight vector. First, calculate the importance score of the parameter based on the historical mean. The information entropy weight method is used to evaluate the information contribution of the parameter. The precision parameter in entropy weight calculation is set to 0.001. Then, calculate the stability score of the parameter according to the fluctuation range and sampling frequency. The coefficient of variation method is used to evaluate the fluctuation degree of the parameter. Next, calculate the persistence score of the parameter based on time persistence. The exponential decay function is used to quantify the continuous influence. Finally, calculate the correlation score of the parameter according to spatial correlation. The network centrality analysis method is used to evaluate the influence of the parameter. The final environmental parameter weight vector is obtained through the multi-criteria decision-making method by synthesizing various scores. The purpose of this step is to determine the importance of each environmental parameter in anomaly detection and achieve differential parameter processing.
[0049] The specific implementation of step S10 is to calculate the dynamic anomaly threshold matrix. First, apply the environmental parameter weight vector to the historical standard deviation, and use the weighted standard deviation method to calculate the baseline threshold, with the weight normalization coefficient set to 1. Then, adjust the baseline threshold according to the seasonal change amplitude, and use a periodic function to modulate the baseline threshold, where the modulation depth is proportional to the seasonal intensity. Next, refine the threshold change rule according to the typical fluctuation period, and use the multi-scale threshold method to process fluctuations at different time scales. Finally, correct the threshold distribution based on the spatial gradient, and use the distance weighting method to calculate the spatial correlation correction coefficient to obtain the dynamic anomaly threshold matrix considering spatio-temporal characteristics. The purpose of this step is to establish an adaptive anomaly determination criterion and improve the accuracy of anomaly detection.
[0050] The specific implementation of step S11 is to calculate the comprehensive anomaly index. First, multiply the environmental parameter weight vector by the dynamic anomaly threshold matrix, and use matrix multiplication to obtain the weighted threshold matrix, with the normalization coefficient set to 1. Then, compare the data in the anomaly matrix with the weighted threshold matrix, and use the overrun detection method to calculate the anomaly degree of each parameter. The anomaly degree calculation uses the relative deviation method. Next, correct the anomaly degree according to the change rate, and use the rate weighting method to adjust the size of the anomaly degree, where the adjustment coefficient has an exponential relationship with the rate size. Finally, calculate the spatial consistency coefficient based on the spatial distribution characteristics, and use the local similarity method to evaluate the spatial continuity of the anomaly to obtain the anomaly index considering multi-dimensional characteristics. The purpose of this step is to realize the quantitative evaluation of environmental anomalies and provide a reliable basis for anomaly determination.
[0051] The specific implementation of step S12 is to construct the gain vector. First, calculate the anomaly degree according to the comprehensive anomaly index, and use the fuzzy membership method to map the anomaly degree to the interval from 0 to 1, with the membership function using the S-shaped function. Then, calculate the cumulative effect of the anomaly, and use the exponential integral method to evaluate the continuous impact of the anomaly, with the time decay coefficient set to 0.1. Next, analyze the propagation characteristics of the anomaly, and use the network diffusion model to evaluate the spatial spread of the anomaly, where the diffusion coefficient is proportional to the spatial correlation. Finally, comprehensively consider the intensity, persistence, and diffusivity of the anomaly to construct the gain vector reflecting the degree of anomaly deviation. The purpose of this step is to quantify the impact degree of the anomaly and provide a basis for optimizing anomaly detection.
[0052] The specific implementation of step S13 is to calculate the feedback vector. First, evaluate the detection effect based on the gain vector, and use the accuracy evaluation method to calculate the detection performance indicators, where the performance indicators include precision and recall. Then, analyze the misdetection situation, and use the confusion matrix method to count the false alarm and missed detection situations, and calculate the false positive rate and false negative rate. Next, calculate the correction coefficient according to the detection effect, and use the adaptive learning method to adjust the detection parameters, with the learning rate set to 0.01. Finally, construct the feedback vector containing the detection performance and correction information. The purpose of this step is to evaluate the effect of anomaly detection and provide feedback information for optimizing the equations.
[0053] The specific implementation of step S14 is to optimize the abnormal detection equation system. First, update the environmental parameter weights according to the feedback vector, and use the gradient descent method to optimize the weight coefficients with the step size parameter set to 0.1. Then, adjust the abnormal threshold calculation method, and use the Bayesian optimization algorithm to update the threshold parameters with the optimization objective of minimizing the misjudgment rate. Next, optimize the comprehensive abnormality degree calculation method, and use the genetic algorithm to adjust the feature combination weights with the population size set to 50 and the number of iterations to 100. Finally, update the parameter configuration of the detection equation system according to the optimization results. The purpose of this step is to improve the accuracy and adaptability of abnormal detection and achieve continuous optimization of the detection method.
[0054] The specific implementation of step S15 is to implement real-time abnormal detection. First, preprocess the real-time environmental monitoring data, and use the online standardization method for data normalization with a processing delay less than 1 second. Then, use the optimized detection equation system for calculation, and use the parallel computing method to improve the processing efficiency, supporting the processing capacity of thousands of data points per second. Next, generate the abnormal detection results, and use the multi-level alarm mechanism for risk grading with the alarm thresholds divided into three levels, namely 0.7, 0.8, and 0.9. Finally, send the detection results to the monitoring system, use the real-time push method to notify relevant personnel, and save the abnormal data to the database. The purpose of this step is to implement real-time abnormal detection of environmental monitoring data and ensure timely discovery and handling of abnormal situations.
[0055] The original matrix of the environmental monitoring data is specifically represented as follows:
[0056] ;
[0057] In the formula, represents the monitoring value of the th environmental parameter at the th time point; is the number of environmental parameters; is the number of time sampling points.
[0058] The data preprocessing process includes outlier removal, normalization, and missing value filling, which are specifically represented as follows:
[0059] Outlier removal uses the 3-sigma method:
[0060] ;
[0061] ;
[0062] ;
[0063] In the formula, is the mean value of the th environmental parameter; is the standard deviation of the th environmental parameter; is the outlier flag, where 1 indicates an outlier and 0 indicates a normal value. Outlier rejection uses the 3-sigma method, which is based on the characteristics of the normal distribution. Values outside the 99.7% confidence interval are considered outliers;
[0064] Normalization is performed using the min-max normalization method:
[0065] ;
[0066] where is the normalized value; is the th minimum value of the environmental parameter; is the th maximum value of the environmental parameter.
[0067] Missing value filling is performed using the moving average interpolation method:
[0068] ;
[0069] where is the filled value; is the moving window size, and a recommended value is 6; is the time index within the window, refers to the th monitoring value of the th environmental parameter at the
[0070] The statistical features in the time series segmentation are calculated as follows:
[0071] ;
[0072] ;
[0073] ;
[0074] ;
[0075] where is an element in the submatrix; is the number of columns in the submatrix; is the mean of the submatrix; is the variance of the submatrix; is the skewness of the submatrix; is the kurtosis of the submatrix. The calculation of the statistical features of the submatrix includes the first to fourth moments, comprehensively reflecting the distribution characteristics of the data.
[0076] The specific calculation of the matrix decomposition process is as follows:
[0077] First, centralize the training data sub-matrix:
[0078] ;
[0079] In the formula, is the centralized matrix; is the th column of the original matrix.
[0080] Calculate the covariance matrix:
[0081] ;
[0082] In the formula, is the covariance matrix; is 's transpose matrix.
[0083] Singular value decomposition process:
[0084] ;
[0085] In the formula, is the left singular matrix; is the singular value diagonal matrix; is the right singular matrix. Singular value decomposition realizes the orthogonal decomposition of data, which is convenient for extracting the main change patterns.
[0086] Principal component selection is based on the cumulative contribution rate:
[0087] ;
[0088] In the formula, is the cumulative contribution rate of the first principal components; is the th eigenvalue. The calculation of the cumulative contribution rate considers the integrity of information retention, and the threshold is set to 85% to ensure the reconstruction accuracy;
[0089] Regular matrix reconstruction:
[0090] ;
[0091] In the formula, is the reconstructed regular matrix; is the th left singular vector; is the th singular value; is the th right singular vector.
[0092] Abnormal matrix calculation:
[0093] ;
[0094] In the formula, is the abnormal matrix; is the noise compensation term, and the recommended value range is 0.001 - 0.01.
[0095] The historical mean value is calculated using the sliding window method:
[0096] ;
[0097] In the formula, is the historical mean value of the th parameter at the moment; is the normalization coefficient; is the attenuation coefficient, and the value range is 0.8 - 0.95; is the window size. The introduction of the time attenuation term in the historical mean value calculation reflects the importance of recent data.
[0098] Historical standard deviation calculation:
[0099] ;
[0100] In the formula, is the historical standard deviation of the th parameter at the moment.
[0101] The spatial gradient is calculated using the central difference method:
[0102] ;
[0103] In the formula, is the gradient of the th parameter at the th spatial position; is the spatial sampling interval; is the gradient correction term, and the value range is 0.01 - 0.05.
[0104] Spatial correlation calculation:
[0105] ;
[0106] In the formula, is the correlation coefficient between the th parameter and the th parameter. The Pearson correlation coefficient is used for the correlation calculation, effectively measuring the linear correlation degree between parameters.
[0107] The calculation process of the fluctuation characteristics is as follows:
[0108] Calculation of the fluctuation range:
[0109] ;
[0110] In the formula, is the fluctuation intensity of the th parameter at the moment; is the 85th percentile of the th parameter; is the 15th percentile of the th parameter; is the fluctuation correction term, and its value range is 0.05 - 0.1. The percentile method is used for calculating the fluctuation intensity, which avoids the influence of outliers.
[0111] Calculation of the sampling frequency characteristics:
[0112] ;
[0113] ;
[0114] In the formula, is the spectral density function of the th parameter; is the frequency distribution entropy; is the th frequency component; is the total number of frequency components.
[0115] Calculation of the change rate:
[0116] ;
[0117] In the formula, is the change rate of the th parameter at the moment; is the sampling time interval; is the time decay coefficient, and its value range is 0.001 - 0.01. represents the monitoring value of the th environmental parameter at time ; represents the monitoring value of the th environmental parameter at time , that is, the value at the previous time point of time .
[0118] Calculation of the time persistence:
[0119] ;
[0120] ;
[0121] In the formula, is the autocorrelation function of the th parameter; is the correlation length; is the time delay; is the maximum delay time.
[0122] Fluctuation period analysis:
[0123] ;
[0124] ;
[0125] In the formula, is the wavelet transform coefficient; is the Mexican hat wavelet function; is the scale parameter; is the translation parameter; is the wavelet power spectrum. The wavelet transform has the ability of multi-resolution analysis and is suitable for extracting the characteristics of non-stationary signals.
[0126] Seasonal variation characteristics:
[0127] ;
[0128] In the formula, is the seasonal component of the th parameter; is the amplitude; is the period; is the phase; is the random perturbation term, and its value range is 0 to 0.1.
[0129] The specific calculation of the abnormal detection optimization equation set is as follows:
[0130] Environmental parameter weight equation:
[0131] ;
[0132] ;
[0133] ;
[0134] ;
[0135] ;
[0136] In the formula, is the weight of the th parameter; is the information entropy; is the stability score; is the persistence score; is the correlation score; is the combination coefficient, satisfying ; is the attenuation coefficient, with a value range of 0.1 to 0.5; is the weight correction term, with a value range of 0.01 to 0.05. This weight equation comprehensively considers four aspects: information volume, stability, persistence, and relevance, and realizes the multi-dimensional evaluation of parameter importance.
[0137] Abnormal threshold equation:
[0138] ;
[0139] In the formula, is the th parameter's abnormal threshold at position , time ; is the adjustment coefficient, with a value range of 0 to 1; are the maximum values of amplitude, power spectrum, and gradient respectively; is the threshold correction term, with a value range of 0.1 to 0.3. This abnormal threshold equation introduces the influences of seasonality, periodicity, and spatial distribution, improving the adaptability of the threshold.
[0140] Comprehensive abnormality equation:
[0141] ;
[0142] In the formula, is the comprehensive abnormality; is the corresponding value in the regular matrix; is the influence coefficient, with a value range of 0 to 1; is the maximum change rate; is the second-order spatial derivative; is the maximum value of the second-order derivative; is the abnormality correction term, with a value range of 0.05 to 0.15. This comprehensive abnormality equation combines amplitude deviation, change rate, and spatial distribution characteristics, realizing the fusion of multi-dimensional abnormal characteristics.
[0143] Gain vector calculation:
[0144] ;
[0145] In the formula, is the gain value of the th parameter; is the reference anomaly degree, with a value of 0.5; is the sensitivity coefficient, with a value range of 5 to 10; is the cumulative coefficient, with a value range of 0.001 to 0.01; is the gain correction term, with a value range of 0.01 to 0.05. represents the -th environmental parameter's comprehensive anomaly index at time . represents the -th environmental parameter's comprehensive anomaly index at time .
[0146] Feedback vector calculation:
[0147] ;
[0148] In the formula, is the feedback value of the -th parameter; are the numbers of true positives, false positives, and false negatives respectively; is the total number of samples; is the penalty coefficient, with a value range of 1 to 5; is the feedback correction term, with a value range of 0.01 to 0.05. This feedback vector is constructed based on precision and recall, and a penalty term is introduced to constrain misjudgments, improving the reliability of detection.
[0149] Optimization process of the detection equation system:
[0150] ;
[0151] ;
[0152] In the formula, represents the weight of the -th environmental parameter, reflecting the importance of this environmental parameter, is the updated weight; is the learning rate, with a value of 0.1; is the loss function, represents the -th environmental parameter's comprehensive anomaly at position , that is, the calculation result of the comprehensive anomaly equation; is the expected anomaly; is the optimization correction term, with a value range of 0.001 to 0.01.
[0153] Real-time anomaly detection process:
[0154] ;
[0155] ;
[0156] In the formula, is real-time standardized data; is the warning level; is the standardized correction term, and its value range is 0.01 to 0.05.
[0157] The second aspect of the present invention provides a computer-readable storage medium, in which program instructions are stored. When the program instructions run on a computer, they are used to execute the above-mentioned environmental monitoring data anomaly detection method.
[0158] The third aspect of the present invention provides an environmental monitoring data anomaly detection system, which includes the above-mentioned computer-readable storage medium. The system can be any one of a computer, a server, and a single-chip microcomputer. The computer-readable storage medium is arranged inside the system, and a microprocessor for executing the program instructions stored in the computer-readable storage medium is arranged inside the system.
[0159] Specifically, the principle of the present invention is: The technical principle of the present invention is based on the multi-dimensional feature analysis and dynamic optimization theory of environmental monitoring data. First, through matrix decomposition, the structured expression of data is realized, and the environmental monitoring data is decomposed into a regular matrix reflecting the normal change law and an abnormal matrix reflecting the abnormal fluctuation. This decomposition method conforms to the physical essence of environmental parameter changes, because environmental parameters usually include two components: stable periodic changes and random abnormal fluctuations.
[0160] The anomaly detection optimization equations designed by the present invention reflect the self-adaptability and robustness of the system. The environmental parameter weight equation establishes a quantitative evaluation mechanism for the importance of parameters by analyzing the historical performance, dynamic characteristics, and spatial characteristics of the parameters. This evaluation fully considers the multi-dimensional attributes of environmental parameters, enabling the system to perform differential processing according to the actual influence degree of the parameters. The anomaly threshold equation integrates information such as the seasonal changes, periodic characteristics, and spatial distribution of environmental parameters into the threshold calculation, realizing the dynamic adjustment of the judgment standard. This adjustment mechanism enables the system to adapt to the time-varying characteristics of environmental parameters. The comprehensive anomaly degree equation realizes the comprehensive evaluation of the abnormal state through multi-source information fusion. This equation combines the abnormal matrix information with the change characteristics of environmental parameters, improving the reliability of anomaly detection.
[0161] A specific embodiment 1 of the present invention is provided below. The specific implementation of each step in this embodiment 1 is described in detail as follows.
[0162] The specific implementation of step S01 is to obtain environmental monitoring data through a data acquisition system, and use a sensor array to collect data including temperature, humidity, PM2.5, For environmental parameters such as concentration and noise, record the real-time values of each environmental parameter according to the preset sampling frequency, and store the collected data in the form of a two-dimensional matrix. The original matrix of environmental monitoring data is specifically expressed as: , where represents the monitoring value of the th environmental parameter at the th time point, is the number of environmental parameters, is the number of time sampling points. The data preprocessing process includes outlier removal: , , ; normalization: ; missing value filling: . It is recommended that the sampling interval does not exceed 10 minutes, the data collection time span is not less than 30 days, and the window size k is recommended to be 6. This step ensures the data quality and reliability for subsequent analysis through a standardized data processing flow.
[0163] The specific implementation of step S02 is to segment the original matrix of environmental monitoring data by time series using the sliding window method, set the sliding window size to 24 hours, and the window sliding step size to 1 hour. Extract sub-matrices for the data within each sliding window and calculate statistical features: , , , . Select 3 to 5 sub-matrices with statistical features closest to the overall distribution to form a training data set, ensuring that the selected training data can fully reflect the change characteristics of environmental parameters.
[0164] The specific implementation of step S03 is to decompose the training data sub-matrix using the robust principal component analysis algorithm. First, perform centering processing: , calculate the covariance matrix: , and perform singular value decomposition: . The selection of principal components is based on the cumulative contribution rate: , regular matrix reconstruction: , abnormal matrix calculation: . Among them is the noise compensation term, and the recommended value range is from 0.001 to 0.01, the convergence threshold is 0.001, and the maximum number of iterations is 100 times.
[0165] The specific implementation of step S04 is to calculate the statistical features of environmental parameters based on the regular matrix. The historical mean is calculated using the sliding window method: , where is the normalization coefficient, is the attenuation coefficient, and the value range is from 0.8 to 0.95, is the window size. The historical standard deviation is calculated as follows: . Through these statistical features, the variation law and fluctuation characteristics of environmental parameters can be effectively reflected.
[0166] The specific implementation of step S05 is to analyze the spatial characteristics of environmental parameters using a regularity matrix. The spatial gradient is calculated using the central difference method: , where is the gradient correction term, and its value range is from 0.01 to 0.05. The spatial correlation is calculated as: , and the correlation coefficient threshold is set to 0.6. A spatial distribution model of the parameters is constructed through Kriging interpolation, the spatial autocorrelation index is calculated, the spatial variation law is analyzed through the variogram, and a spatial distribution feature vector is established.
[0167] The specific implementation of step S06 is to analyze the dynamic characteristics of environmental parameters based on the historical standard deviation. The fluctuation range is calculated using the percentile method: , where is the 85th percentile of the th parameter, is the 15th percentile, is the fluctuation correction term, and its value range is from 0.05 to 0.1. The sampling frequency characteristic is calculated using the Fourier transform method: , . The change rate is calculated as: , where is the time decay coefficient, and its value range is from 0.001 to 0.01. These calculations can comprehensively reflect the dynamic change characteristics of environmental parameters.
[0168] The specific implementation of step S07 is to analyze the time characteristics of environmental parameters based on the regularity matrix. The time persistence is calculated using the autocorrelation function method: , , where is the time delay, and the significance level of the autocorrelation coefficient is 0.05. The fluctuation period analysis is carried out using the wavelet transform method: , , and the Mexican hat wavelet is selected as the basis function, and the period significance threshold is set to 0.8. The seasonal change characteristics are calculated as: , where is the random perturbation term, and its value range is from 0 to 0.1.
[0169] The specific implementation of step S08 is to construct an optimized equation system for anomaly detection. The environmental parameter weight equation: , where is the information entropy, is the stability score, is the persistence score, is the correlation score, the combination coefficient Satisfy , is the weight correction term, and its value range is from 0.01 to 0.05. Abnormal threshold equation: , where is the adjustment coefficient, and its value range is from 0 to 1, is the threshold correction term, and its value range is from 0.1 to 0.3. Comprehensive anomaly equation:
[0170] , where is the influence coefficient, and its value range is from 0 to 1, is the anomaly correction term, and its value range is from 0.05 to 0.15.
[0171] The specific implementation of step S09 is to calculate the environmental parameter weight vector. Information entropy calculation: , stability score calculation: , persistence score calculation: , where is the attenuation coefficient, and its value range is from 0.1 to 0.5, correlation score calculation: . By using the multi-criteria decision-making method to synthesize each score, the final environmental parameter weight vector is obtained.
[0172] The specific implementation of step S10 is to calculate the dynamic anomaly threshold matrix. First, apply the environmental parameter weight vector to the historical standard deviation, and use the weighted standard deviation method to calculate the reference threshold. Adjust the reference threshold according to the seasonal change amplitude, modulate the reference threshold using a periodic function, and the modulation depth is proportional to the seasonal intensity. Refine the threshold change rule according to the typical fluctuation period, and use the multi-scale threshold method to process the fluctuations of different time scales. Correct the threshold distribution based on the spatial gradient, and use the distance weighting method to calculate the spatial correlation correction coefficient to obtain the dynamic anomaly threshold matrix considering spatio-temporal characteristics. The threshold calculation process fully considers the spatio-temporal characteristics and dynamic change rules of environmental parameters.
[0173] The specific implementation of step S11 is to calculate the comprehensive anomaly index. First, multiply the environmental parameter weight vector by the dynamic anomaly threshold matrix, and use matrix multiplication to calculate the weighted threshold matrix, with the normalization coefficient set to 1. Then compare the data in the anomaly matrix with the weighted threshold matrix, and use the overrun detection method to calculate the anomaly degree of each parameter. The anomaly degree calculation formula is: , where is the influence coefficient, and its value range is from 0 to 1, is the anomaly degree correction term, and its value range is from 0.05 to 0.15. Then, the anomaly degree is corrected according to the change rate, and the rate weight method is used to adjust the size of the anomaly degree. The adjustment coefficient has an exponential relationship with the rate size. Finally, the spatial consistency coefficient is calculated based on the spatial distribution characteristics, and the local similarity method is used to evaluate the spatial continuity of the anomaly, obtaining an anomaly degree index that comprehensively considers multi-dimensional characteristics.
[0174] The specific implementation of step S12 is to construct a gain vector. First, calculate the anomaly degree according to the comprehensive anomaly degree index, and use the fuzzy membership method to map the anomaly degree to the interval from 0 to 1. The calculation formula of the gain vector is: , where is the reference anomaly degree, with a value of 0.5, is the sensitivity coefficient, and its value range is from 5 to 10, is the cumulative coefficient, and its value range is from 0.001 to 0.01, is the gain correction term, and its value range is from 0.01 to 0.05. Then, calculate the cumulative effect of the anomaly, and use the exponential integral method to evaluate the continuous impact of the anomaly. The time decay coefficient is set to 0.1. Next, analyze the propagation characteristics of the anomaly, and use the network diffusion model to evaluate the spatial spread of the anomaly. The diffusion coefficient is proportional to the spatial correlation. Finally, comprehensively consider the intensity, persistence, and diffusivity of the anomaly to construct a gain vector reflecting the degree of anomaly deviation.
[0175] The specific implementation of step S13 is to calculate the feedback vector. First, evaluate the detection effect based on the gain vector, and use the accuracy evaluation method to calculate the detection performance index. The calculation formula of the feedback vector is: , where are the numbers of true positives, false positives, and false negatives respectively, is the total number of samples, is the penalty coefficient, and its value range is from 1 to 5, is the feedback correction term, and its value range is from 0.01 to 0.05. Then, analyze the misdetection situation, use the confusion matrix method to count the false alarm and miss detection situations, and calculate the false positive rate and false negative rate. Next, calculate the correction coefficient according to the detection effect, and use the adaptive learning method to adjust the detection parameters. The learning rate is set to 0.01. Finally, construct a feedback vector containing detection performance and correction information.
[0176] The specific implementation of step S14 is to optimize the anomaly detection equation set. First, update the environmental parameter weights according to the feedback vector, and use the gradient descent method to optimize the weight coefficients. The optimization formula is: , , where is the learning rate, with a value of 0.1, To optimize the correction term, the value range is from 0.001 to 0.01. Then adjust the abnormal threshold calculation method, and use the Bayesian optimization algorithm to update the threshold parameters, with the optimization goal of minimizing the misjudgment rate. Next, optimize the comprehensive abnormality calculation method, and use the genetic algorithm to adjust the feature combination weights, with the population size set to 50 and the number of iterations to 100. Finally, update the parameter configuration of the detection equation set according to the optimization results.
[0177] The specific implementation of step S15 is to achieve real-time anomaly detection. First, preprocess the real-time environmental monitoring data, and use the online standardization method for data normalization. The preprocessing formula is: , where is the standardization correction term, and the value range is from 0.01 to 0.05. Then use the optimized detection equation set for calculation, and use the parallel computing method to improve the processing efficiency. Next, generate the anomaly detection results, and use the multi-level alarm mechanism for risk classification. The alarm level determination formula is: . Finally, send the detection results to the monitoring system, use the real-time push method to notify relevant personnel, and save the abnormal data to the database.
[0178] To better understand and implement the present invention, the following provides Example 2 of a specific application scenario of the present invention: A research team conducted an application research on the environmental monitoring anomaly detection system based on the present invention in a certain industrial park. The industrial park covers an area of about 10 square kilometers, and 50 environmental monitoring points are arranged. Each point is equipped with sensors for 12 environmental parameters such as temperature, humidity, PM2.5, PM10, CO, , , NOx, , wind speed, wind direction, noise, etc., and the sampling frequency is 5 minutes.
[0179] The collection and preprocessing of environmental monitoring data are shown in Table 1:
[0180] Table 1 Statistical table of environmental monitoring data preprocessing results
[0181]
[0182] After preprocessing, the dimension of the original data matrix is 12×432000. Using 24 hours as the window size and 1 hour as the sliding step, 4 representative sub-matrices are selected as training data. The statistical characteristics of the sub-matrices are shown in Table 2:
[0183] Table 2 Statistical characteristics of training data sub-matrices
[0184]
[0185] Figure 2It is a multi-dimensional feature scatter plot that shows the statistical feature distributions of 4 training data sub-matrices. The X-axis represents the mean, the Y-axis represents the standard deviation, the size of the points represents the skewness, and the color depth represents the kurtosis. Each point represents a sub-matrix, and through this visualization method, the feature differences of different sub-matrices can be intuitively shown. Mathematical symbols , and are used to represent the corresponding statistics, ensuring professionalism and accuracy. Robust principal component analysis is performed on the training data, and 6 principal components with a cumulative contribution rate reaching 85% are selected to reconstruct the regular matrix and the abnormal matrix . The historical mean and historical standard deviation of the environmental parameters calculated based on the regular matrix are shown in Table 3:
[0186] Table 3 Historical Mean and Standard Deviation of Environmental Parameters
[0187]
[0188] Figure 3 is a combined chart that mainly shows the characteristic indicators of 5 typical abnormal events (E001 - E005). The bar chart corresponding to the left Y-axis shows three characteristic indicators: the comprehensive abnormality degree ( ), the gain value ( ), and the feedback value ( ). The right Y-axis and the red broken line show the change of the alarm level. In this way, the multi-dimensional characteristics of each abnormal event and their corresponding alarm levels can be clearly shown. The results of the spatial correlation analysis show that the correlation coefficient between PM2.5 and PM10 is 0.86, and the correlation coefficient with NOx is 0.78, and these two groups of parameters have significant spatial correlation. Based on the spatio-temporal characteristics of the environmental parameters, the calculated parameter weight vectors are shown in Table 4:
[0189] Table 4 Environmental Parameter Weight Vectors
[0190]
[0191] The typical abnormal events detected during the operation of the system and their characteristics are shown in Table 5:
[0192] Table 5 Characteristics of Typical Abnormal Events
[0193]
[0194] Traditional environmental monitoring anomaly detection mainly uses fixed threshold methods and single-parameter statistical analysis methods, which have the following problems: 1. It cannot effectively handle the correlation between multiple parameters; 2. The threshold setting lacks dynamic adaptability; 3. The false alarm rate and missed alarm rate are relatively high; 4. It cannot identify complex anomalies. The present invention constructs an environmental monitoring data anomaly detection method, realizes effective decomposition of data through robust principal component analysis, realizes precise identification of anomalies through multi-dimensional feature fusion, and improves the detection accuracy through adaptive optimization. In this embodiment, the average detection accuracy of the system reaches 92.3%, the false alarm rate is reduced to 4.5%, and the missed alarm rate is reduced to 3.2%. Compared with the traditional method, the detection accuracy is increased by 15.6%, the false alarm rate is reduced by 8.7%, and the missed alarm rate is reduced by 7.5%. The method of the present invention has significant advantages in the early warning and precise positioning of environmental anomaly events, providing effective technical support for environmental monitoring and management.
[0195] It should be noted that the detailed explanations of the variables involved in the present invention are shown in Tables 6 and 7 below.
[0196] Table 6 Variable Explanation Table (Part 1)
[0197]
[0198] Table 7 Variable Explanation Table (Part 2)
[0199]
[0200] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention.
Claims
1. A method for detecting anomalies in environmental monitoring data, characterized in that: The method comprises the following steps: constructing an original matrix of environmental monitoring data, wherein the original matrix of environmental monitoring data includes monitoring values of multiple environmental parameters at different time points; performing time series segmentation on the original matrix of environmental monitoring data to obtain a training data submatrix; and using a matrix decomposition algorithm to decompose the training data submatrix into a regular matrix and an abnormal matrix; Calculate the historical mean and historical standard deviation of each environmental parameter based on the regularity matrix; calculate the spatial gradient, spatial correlation, and spatial distribution characteristics of each environmental parameter based on the historical mean; calculate the fluctuation range, sampling frequency, and change rate of each environmental parameter based on the historical standard deviation; Based on the regularity matrix, the time persistence, typical fluctuation cycle, and seasonal variation range of each environmental parameter are obtained; the degree of abnormality of the data points in the abnormality matrix is calculated using the abnormality detection optimization equation group, which includes the environmental parameter weight equation, the abnormality threshold equation, and the comprehensive abnormality degree equation; Construct a gain vector based on the comprehensive abnormality index; calculate the feedback vector using the gain vector; The feedback vector is used to optimize and adjust the anomaly detection optimization equation group; the optimized anomaly detection optimization equation group is used to perform anomaly detection on real-time environmental monitoring data.
2. The method for detecting anomalies in environmental monitoring data according to claim 1, characterized in that: The original matrix of environmental monitoring data is an m×n dimensional matrix, where m is the number of environmental parameters and n is the number of time sampling points; the regularity matrix represents the normal change pattern of environmental parameters; the abnormality matrix represents the abnormal fluctuation components of environmental parameters; the gain vector represents the degree of deviation of abnormal data; and the feedback vector represents the correction coefficient of abnormal judgment.
3. The method for detecting anomalies in environmental monitoring data according to claim 2, characterized in that: In the step of constructing the original matrix of environmental monitoring data, the environmental monitoring data is obtained through the data acquisition system, and the sensor array is used to collect data including temperature, humidity, PM2.5, The environmental parameters of concentration and noise are recorded in real time according to the preset sampling frequency, and the collected data is stored in a two-dimensional matrix form.
4. The method for detecting anomalies in environmental monitoring data according to claim 3, characterized in that: In the step of segmenting the original matrix of environmental monitoring data into time series, the sliding window method is used for segmentation. The sliding window size is set to 24 hours and the window sliding step is 1 hour. The representativeness of each sub-matrix is determined by calculating its mean, variance, skewness and kurtosis.
5. The method for detecting anomalies in environmental monitoring data according to claim 4, characterized in that: In the step of decomposing the training data submatrix using the matrix decomposition algorithm, the robust principal component analysis algorithm is used for decomposition, the eigenvalues and eigenvectors are obtained through the singular value decomposition method, and the principal components with a cumulative contribution rate of 85% are selected.
6. The method for detecting anomalies in environmental monitoring data according to claim 5, characterized in that: In the step of calculating the spatial characteristics of environmental parameters based on historical means, the central difference method is used to calculate the spatial gradient, the Pearson correlation coefficient method is used to construct the correlation matrix, and the Kriging interpolation method is used to construct the parameter spatial distribution model.
7. The method for detecting anomalies in environmental monitoring data according to claim 6, characterized in that: In the step of analyzing the dynamic characteristics of environmental parameters based on historical standard deviations, the percentile method is used to determine the upper and lower limits of parameter fluctuations, the Fourier transform method is used to analyze the signal spectrum, and the first-order difference method is used to calculate the rate of change.
8. The method for detecting anomalies in environmental monitoring data according to claim 7, characterized in that: In the step of analyzing the temporal characteristics of environmental parameters based on the regularity matrix, the autocorrelation function method is used to analyze the temporal correlation, the Mexican hat wavelet is used to analyze the typical fluctuation cycle, and the seasonal decomposition algorithm is used to extract the seasonal component.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed in a computer, they are used to execute the method for detecting anomalies in environmental monitoring data according to any one of claims 1 to 8.
10. An environmental monitoring data anomaly detection system, characterized in that: The system comprises the computer-readable storage medium as claimed in claim 9, wherein the system is any one of a computer, a server, and a single-chip microcomputer, the computer-readable storage medium is arranged in the system, and the system is provided with a microprocessor for executing program instructions stored in the computer-readable storage medium.
Citation Information
Patent Citations
Water quality monitoring method, device and equipment based on multi-dimensional parameters and storage medium
CN118624851A
Method, apparatus, electronic device, and medium for detecting abnormality in network
US20230231862A1