Industrial internet time series data anomaly detection method and system
By using deep learning autoencoder and density clustering algorithm in the industrial Internet timing data monitoring system, the limitations of traditional methods when processing complex timing data are solved, efficient anomaly detection is achieved, and the system flexibility and reliability are improved. reduces dependence on labeled data.
Patent Information
- Application Number
- CN202411401520.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-09
- Publication Date
- 2024-11-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The traditional industrial Internet timing data monitoring system lacks effective data processing and feature extraction mechanisms when processing complex and high-dimensional data, resulting in the inability to accurately identify and predict potential abnormal states, and rely on supervised learning methods to require a large amount of labeled data without cutting. actual.
Unsupervised learning is used for deep learning, combined with density clustering algorithms and feature dimensionality reduction technology, and time-series data are collected and preprocessed in real time, abnormal patterns are identified and abnormal detection is performed.
Improve the accuracy and efficiency of abnormal detection, reduce the dependence on expert experience and prior knowledge, and make the system more flexible and reliable in a dynamic industrial environment, and can instantly identify potential abnormalities and provide early warnings, reducing maintenance costs. and economic losses.
Smart Images

Figure CN118898045A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of industrial Internet technology, and in particular to an anomaly detection method and system for industrial Internet time series data. Background Art
[0002] In modern industrial environments, the importance of real-time monitoring systems is increasing. Especially in the context of the Industrial Internet, the collection and analysis of time series data has become crucial. Time series data, that is, data recorded in chronological order, can reflect the dynamic changes of equipment status and production processes. Traditional data monitoring systems rely on simple threshold judgments or empirical rules. These methods are often unable to cope with complex industrial data and it is difficult to effectively identify and predict potential abnormal conditions. In addition, with the rapid increase in data volume, traditional methods face severe challenges in data processing efficiency and accuracy.
[0003] In response to the above problems, the present invention aims to provide an industrial Internet time series data anomaly detection system based on deep learning technology. When processing large-scale time series data, the existing technology often lacks effective data processing and feature extraction mechanisms, resulting in the inability to accurately capture abnormal patterns of the data. In addition, existing anomaly detection systems mostly rely on supervised learning methods and require a large amount of labeled data, which is impractical in actual industrial applications.
[0004] Therefore, it is necessary to develop an anomaly detection method and system for industrial Internet time series data to improve the accuracy and efficiency of anomaly detection. Summary of the invention
[0005] Based on the above objectives, the present invention provides an industrial Internet time series data anomaly detection method and system.
[0006] The method for detecting anomalies in industrial Internet time series data includes the following steps: S1: Collect raw time series data from industrial equipment and sensors in real time, and perform denoising, smoothing, missing value filling and standardization on the raw time series data; S2: Segment the preprocessed time series data according to the preset time window to form multiple time segments; S3: A density-based clustering algorithm is used to perform multi-level clustering analysis on each time segment to identify different patterns and potential anomalies in the data; S4: Extract time domain features, frequency domain features and statistical features from the results of multi-level cluster analysis, construct a high-dimensional feature space, and use dimensionality reduction technology to perform feature dimensionality reduction processing; S5: Using historical time series data, an autoencoder model based on deep learning is used for unsupervised learning to train an autoencoder model for anomaly detection; S6: Input the real-time collected time series data into the trained autoencoder model and calculate the reconstruction error to determine whether the current time series data is abnormal; S7: Score the reconstruction error of each time segment and set an abnormal score threshold. When the score exceeds the abnormal score threshold, the corresponding time segment is marked as abnormal data.
[0007] Optionally, the S1 specifically includes: S11: Data collection, real-time collection of raw time series data from industrial equipment and sensors through the configured industrial IoT gateway; S12: Data denoising, using wavelet transform denoising method, by selecting Daubechies wavelet basis function and 5-layer decomposition, the collected original time series data is denoised; S13: Data smoothing, using the sliding average method, by setting the window size to 5 data points, the denoised time series data is smoothed; S14: Missing value filling: using linear interpolation to fill missing values in the smoothed time series data, calculating the linear relationship between the data on both sides of the missing point, and inserting the corresponding value; S15: Data standardization, applying the Z-score standardization method, by calculating the mean and standard deviation of the time series data, the time series data after filling in missing values is converted into data with zero mean and unit variance.
[0008] Optionally, the S2 specifically includes: S21: Determine the time window size. According to the operation cycle and data characteristics of the industrial equipment, set a fixed time window size T in seconds, minutes or hours; S22: Time window sliding: through the sliding window technology, the window is slid on the preprocessed time series data with a set time step S. Each sliding window forms a new time segment. The time step S must be less than or equal to the time window size T. S23: Data sharding: sharding the data in each sliding window to generate multiple time segments, each of which contains all data points in the time window T; S24: Timestamp marking, adding a timestamp mark to each time segment, recording the start time and end time of the time window.
[0009] Optionally, the S3 specifically includes: S31: Select the clustering algorithm, use the density-based clustering algorithm DBSCAN, and set specific parameters, including the minimum number of samples MinPts and the neighborhood radius ; S32: Feature extraction, extracting time domain features, frequency domain features and statistical features from each time segment, and constructing feature vectors , where each feature vector contains multi-dimensional features; S33: Neighborhood search, for each data point , calculate its The number of other data points in the neighborhood, the distance calculation formula: ,in, and Represents data points and The eigenvalue in the kth dimension, is the dimension of the feature vector; when When , the data point At data point of In the neighborhood; S34: Cluster construction, starting from a core point, recursively The core points and boundary points in the neighborhood are added to the current cluster until all the core points are The neighbors have been processed to form a cluster; S35: Repeat the above steps, and perform multi-level clustering analysis by adjusting different MinPts and values to identify different patterns and potential outliers in the data. Specifically, data points belonging to the same cluster are regarded as a pattern; data points that cannot be classified into any cluster are regarded as potential outliers.
[0010] Optionally, the S4 specifically includes: S41: Time domain feature extraction, extracting the time domain features of each time segment from the results of multi-level cluster analysis, including mean, standard deviation, autocorrelation coefficient and peak value; S42: frequency domain feature extraction, performing fast Fourier transform on each time segment to extract frequency domain features, including main frequency components, spectrum energy and spectrum entropy; S43: Statistical feature extraction, extracting statistical features of each time segment, including skewness and kurtosis; S44: Construct a high-dimensional feature space and combine the extracted time domain features, frequency domain features and statistical features into a high-dimensional feature vector , expressed as: ,in is the total number of features, Indicates Features S45: Feature dimensionality reduction, using principal component analysis to reduce the dimensionality of high-dimensional feature space.
[0011] Optionally, the S45 specifically includes: S451: Calculate the covariance matrix of the eigenvector: ,in, represents the covariance matrix, represents the i-th eigenvector, represents the mean of the eigenvector, represents the total number of eigenvectors; S452: Calculate the eigenvalues and eigenvectors of the covariance matrix; S453: Before selection The eigenvectors corresponding to the eigenvalues constitute the eigenvector matrix ,in is the feature dimension after dimensionality reduction; S454: Project the original feature vector to the new feature space. The formula is: ,in, is the feature vector after dimensionality reduction, represents the original feature vector, represents the eigenvector matrix.
[0012] Optionally, the S5 specifically includes: S51: Build an autoencoder model and design a deep neural network structure including input layer, encoder layer, bottleneck layer, decoder layer and output layer; S52: Model initialization, use the Xavier initialization method to assign initial values to the weights and biases of the autoencoder model. The specific calculation formula is: ,in, represents the initialization weight, represents the number of neurons in the input layer, represents the number of neurons in the output layer; S53: Data preparation: construct a training data set based on the results of preprocessing, segmentation, feature extraction and dimensionality reduction of historical time series data. , expressed as: ,in Indicates feature vectors, represents the total number of eigenvectors; S54: Model training, using the gradient descent method to train the autoencoder model to minimize the reconstruction error. The loss function calculation formula is: ,in, represents the loss function, Indicates input feature vector, Indicates The reconstruction result of the output feature vector is represents the total number of eigenvectors; S55: Model verification, using historical time series data for verification, and judging whether the model is overfitting or underfitting by comparing the reconstruction error of the verification data with the reconstruction error of the training data.
[0013] Optionally, the S6 specifically includes: S61: After preprocessing and feature extraction of the real-time collected time series data, a real-time feature vector is generated: ,in, is the total number of features, Indicates Features S62: Real-time feature vector Input to the input layer of the trained autoencoder model, pass through the encoder layer, bottleneck layer and decoder layer, and generate a reconstructed feature vector ; S63: Calculate the reconstruction error, for the input feature vector and reconstruct the eigenvector Perform element-by-element error calculation, the specific formula is: ,in, represents the reconstruction error, represents the real-time feature vector, represents the reconstructed feature vector.
[0014] Optionally, the S7 specifically includes: S71: Reconstruction error based on calculation Calculating anomaly score , the specific formula is: ,in, represents the abnormality score, represents the mean of the historical reconstruction error, represents the standard deviation of the historical reconstruction error; S72: Setting anomaly scoring thresholds based on statistical analysis of historical data ; S73: Score the anomaly and anomaly scoring threshold For comparison, , the time segment is marked as abnormal data.
[0015] The industrial Internet time series data anomaly detection system is used to implement the above-mentioned industrial Internet time series data anomaly detection method, and includes the following modules: Data acquisition preprocessing module: It is configured in multiple industrial equipment and sensors to collect raw time series data in real time and preprocess the raw time series data, including denoising, smoothing, filling missing values and standardization. Data segmentation module: receives the preprocessed time series data and segments the data according to the preset time window to form multiple time segments; Multi-level cluster analysis module: receives time segments from the data segmentation module and uses density-based clustering algorithms to perform multi-level cluster analysis on each time segment to identify different patterns and potential anomalies in the data; Feature extraction and dimensionality reduction module: obtains clustering results from the multi-level clustering analysis module, extracts time domain features, frequency domain features and statistical features, and performs feature dimensionality reduction processing through dimensionality reduction technology to construct a high-dimensional feature space; Anomaly detection model training module: Using historical time series data and the reduced-dimensional features from the feature extraction and dimensionality reduction module, the deep learning-based autoencoder model is used for unsupervised learning to train an autoencoder model for anomaly detection. Real-time detection module: After the real-time collected time series data is processed by the data collection preprocessing module, it is input into the trained autoencoder model to calculate the reconstruction error to determine whether there is an abnormality in the current time series data; Abnormal scoring and marking module: Based on the reconstruction error provided by the real-time detection module, each time segment is scored and an abnormal scoring threshold is set. When the score exceeds the abnormal scoring threshold, the corresponding time segment is marked as abnormal data.
[0016] Beneficial effects of the present invention: The present invention, by adopting advanced deep learning technology, especially the autoencoder model, effectively solves the limitations of traditional methods in processing complex and high-dimensional data. It can automatically extract key features from a large amount of unlabeled real-time data and perform effective anomaly detection. This method improves the accuracy of anomaly detection and reduces dependence on expert experience and prior knowledge, making the system more flexible and reliable in a dynamically changing industrial environment.
[0017] The present invention, through real-time data processing and rapid response, enables any potential anomalies to be instantly identified and marked, greatly enhancing the monitoring capability of the production system. Through systematic data analysis and learning, the system can not only provide early warning of possible equipment failures and production anomalies, but also provide data support for maintenance decisions, thereby effectively reducing maintenance costs and potential economic losses, and improving the efficiency and safety of the entire industrial production. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only for the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 Schematic diagram of a method for detecting anomalies in time series data according to an embodiment of the present invention; Figure 2 Schematic diagram of a time series data anomaly detection system according to an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. At the same time, it is explained here that in order to make the embodiments more detailed, the following embodiments are the best and preferred embodiments, and those skilled in the art may also adopt other alternatives to implement some known technologies; and the accompanying drawings are only for more specific description of the embodiments, and are not intended to specifically limit the present invention.
[0021] It should be noted that the references to "one embodiment", "embodiment", "exemplary embodiments", "some embodiments" and the like in the specification indicate that the embodiments described may include specific features, structures or characteristics, but not every embodiment may include the specific features, structures or characteristics. In addition, when a specific feature, structure or characteristic is described in conjunction with an embodiment, it should be within the knowledge of a person skilled in the art to implement such feature, structure or characteristic in conjunction with other embodiments (whether or not explicitly described).
[0022] In general, a term can be understood, at least in part, from its use in context. For example, depending, at least in part, on the context, the term "one or more" as used herein can be used to describe any feature, structure, or characteristic in the singular sense, or can be used to describe a combination of features, structures, or characteristics in the plural sense. Additionally, the term "based on" can be understood as not necessarily intended to convey an exclusive set of factors, but can instead, depending, at least in part, on the context, allow for the presence of other factors that are not necessarily explicitly described.
[0023] like Figure 1 As shown, the method for detecting anomalies in industrial Internet time series data includes the following steps: S1: Data collection and preprocessing: real-time collection of raw time series data from industrial equipment and sensors, and denoising, smoothing, filling missing values and standardization of the raw time series data to improve data quality and consistency; S2: Data segmentation: segment the preprocessed time series data according to the preset time window to form multiple time segments, in preparation for subsequent independent analysis; S3: Multi-level cluster analysis, using density-based clustering algorithm to perform multi-level cluster analysis on each time segment to identify different patterns and potential anomalies in the data; S4: Feature extraction and dimensionality reduction: extract time domain features, frequency domain features and statistical features from the results of multi-level clustering analysis, construct a high-dimensional feature space, and use dimensionality reduction technology to perform feature dimensionality reduction processing to reduce data dimensions and retain important information; S5: Anomaly detection model training: using historical time series data, the autoencoder model based on deep learning is used for unsupervised learning to train the autoencoder model for anomaly detection; S6: Real-time detection: input the real-time collected time series data into the trained autoencoder model and calculate the reconstruction error to determine whether the current time series data is abnormal. S7: Anomaly scoring: scoring the reconstruction error of each time segment and setting an anomaly scoring threshold. When the score exceeds the anomaly scoring threshold, the corresponding time segment is marked as abnormal data.
[0024] S1 specifically includes: S11: Data acquisition, real-time acquisition of raw time series data from industrial equipment and sensors through the configured Industrial Internet of Things (IIoT) gateway. The Industrial Internet of Things gateway communicates with industrial equipment and sensors through wireless sensor networks (such as ZigBee, LoRa, Wi-Fi) or wired sensor networks (such as Ethernet, Modbus). The IIoT gateway is responsible for aggregating data from various sensors and devices, and performing preliminary protocol conversion and data format unification to standardize data from different devices and sensors into a unified format. It also standardizes data through MQTT, HTTP or other industrial protocols to ensure real-time and integrity of data. S12: Data denoising, using wavelet transform denoising method, by selecting Daubechies wavelet basis function and 5-layer decomposition, the collected original time series data is denoised to eliminate high-frequency noise; S13: Data smoothing, using the sliding average method, by setting the window size to 5 data points, the denoised time series data is smoothed to reduce data fluctuations; S14: Missing value filling: using linear interpolation to fill missing values in the smoothed time series data, calculating the linear relationship between the data on both sides of the missing point, and inserting the corresponding value; S15: Data standardization, using the Z-score standardization method, by calculating the mean and standard deviation of the time series data, the time series data after filling in missing values is converted into data with zero mean and unit variance; Through the above steps, the accuracy and consistency of data processing are ensured, the data quality is effectively improved, and a good foundation is laid for subsequent anomaly detection.
[0025] S2 specifically includes: S21: Determine the time window size. According to the operation cycle and data characteristics of the industrial equipment, set a fixed time window size T in seconds, minutes or hours; S22: Time window sliding: Through the sliding window technology, the window is slid on the preprocessed time series data with a set time step S. Each sliding window forms a new time segment. The time step S must be less than or equal to the time window size T to achieve overlapping sliding windows. S23: Data sharding: sharding the data in each sliding window to generate multiple time segments, each of which contains all data points in the time window T; S24: Timestamp marking, adding a timestamp mark to each time segment, recording the start time and end time of the time window, so as to facilitate subsequent independent analysis and comparison; through the method of the above steps, it is described in detail how to segment the preprocessed time series data according to the preset time window to form multiple time segments, thus achieving effective data segmentation and time marking, facilitating subsequent independent analysis and anomaly detection, and improving the accuracy and efficiency of data processing.
[0026] The multi-level clustering analysis of each time segment in S3 specifically includes: S31: Select the clustering algorithm, use the density-based clustering algorithm DBSCAN (Density-Based Spatial Clustering of Applications with Noise), and set specific parameters, including the minimum number of samples MinPts and the neighborhood radius ; S32: Feature extraction, extracting time domain features, frequency domain features and statistical features from each time segment, and constructing feature vectors , where each feature vector contains multi-dimensional features; S33: Neighborhood search, for each data point , calculate its The number of other data points in the neighborhood, the distance calculation formula: ,in, and Represents data points and The eigenvalue in the kth dimension, is the dimension of the feature vector; when When , the data point At data point of In the neighborhood; S34: Cluster construction, starting from a core point (the number of data points in its neighborhood is not less than MinPts), recursively The core points and boundary points in the neighborhood are added to the current cluster until all the core points are The neighbors have been processed to form a cluster; S35: Repeat the above steps, and conduct multi-level clustering analysis by adjusting different MinPts and values to identify different patterns and potential anomalies in the data. Specifically, data points belonging to the same cluster are regarded as a pattern, and the characteristics and center point coordinates of each pattern are recorded; data points that cannot be classified into any cluster are regarded as potential anomalies. These points are usually located in sparse areas of data distribution and have significantly different characteristics. The design of the above steps realizes the effective application of clustering algorithms and result evaluation, ensures the accuracy and reliability of data analysis, and facilitates subsequent anomaly detection.
[0027] S4 specifically includes: S41: Time domain feature extraction, extracting the time domain features of each time segment from the results of multi-level clustering analysis, including mean, standard deviation, autocorrelation coefficient and peak value; the specific calculation formula is as follows: Mean: ,in, represents the mean, represents the total number of data points, Indicates data points; Standard Deviation: ,in, represents the standard deviation, represents the mean, represents the total number of data points, Indicates data points; Autocorrelation coefficient (taking lag k as an example): ,in, represents the autocorrelation coefficient at lag k, represents the total number of data points, and Indicates and data points, represents the mean; Peak: ,in, represents the peak value, represents the i-th data point; S42: Frequency domain feature extraction, perform fast Fourier transform (FFT) on each time segment to extract frequency domain features, including primary frequency components, spectral energy, and spectral entropy. The specific calculation formula is as follows: Fast Fourier Transform: ,in, represents the Fourier transform result of frequency f, represents the i-th data point, represents the total number of data points, represents the imaginary unit, Indicates frequency; Main frequency components: extract the frequency components with the largest amplitude from the FFT results; Spectral energy: ,in, represents the spectrum energy, represents the Fourier transform result of frequency f, Represents the total number of data points; Spectral entropy: ,in, represents the spectral entropy, represents the normalized power spectral density of frequency, Indicates frequency The Fourier transform result of S43: Statistical feature extraction, extracting the statistical features of each time segment, including skewness and kurtosis. The specific calculation formula is as follows: Skewness: ,in, represents the skewness, represents the total number of data points, represents the i-th data point, represents the mean, represents standard deviation; Kurtosis: ,in, represents the kurtosis, represents the total number of data points, represents the i-th data point, represents the mean, represents standard deviation; S44: Construct a high-dimensional feature space and combine the extracted time domain features, frequency domain features and statistical features into a high-dimensional feature vector , expressed as: ,in is the total number of features, Indicates Features S45: Feature dimensionality reduction, using principal component analysis (PCA) to reduce the dimensionality of high-dimensional feature space; through the above steps and methods, it describes the extraction of time domain features, frequency domain features and statistical features from the results of multi-level clustering analysis, the construction of high-dimensional feature space, and the use of principal component analysis to perform feature dimensionality reduction. Each sub-step uses specific technical methods and formula explanations to achieve the effective application of feature extraction and dimensionality reduction, ensuring the accuracy and reliability of data processing.
[0028] The feature dimensionality reduction in S45 specifically includes: S451: Calculate the covariance matrix of the eigenvector: ,in, represents the covariance matrix, represents the i-th eigenvector, represents the mean of the eigenvector, represents the total number of eigenvectors; S452: Calculate the eigenvalues and eigenvectors of the covariance matrix; S453: Before selection The eigenvectors corresponding to the eigenvalues constitute the eigenvector matrix ,in is the feature dimension after dimensionality reduction; S454: Project the original feature vector to the new feature space. The formula is: ,in, is the feature vector after dimensionality reduction, represents the original feature vector, represents the eigenvector matrix.
[0029] The autoencoder model trained for anomaly detection in S5 specifically includes: S51: Construct an autoencoder model and design a deep neural network structure including an input layer, an encoder layer, a bottleneck layer, a decoder layer, and an output layer; the number of neurons in the input layer is equal to the dimension of the high-dimensional feature vector; the encoder layer is used to gradually reduce the number of neurons and compress the input data; the bottleneck layer has the least number of neurons and represents the low-dimensional representation of the data; the decoder layer gradually increases the number of neurons and reconstructs the input data; the number of neurons in the output layer is equal to the number of neurons in the input layer; S52: Model initialization, use the Xavier initialization method to assign initial values to the weights and biases of the autoencoder model. The specific calculation formula is: ,in, represents the initialization weight, represents the number of neurons in the input layer, represents the number of neurons in the output layer; S53: Data preparation: construct a training data set based on the results of preprocessing, segmentation, feature extraction and dimensionality reduction of historical time series data. , expressed as: ,in Indicates feature vectors, represents the total number of eigenvectors; S54: Model training, using gradient descent method (such as Adam optimizer) to train the autoencoder model to minimize the reconstruction error. The loss function calculation formula is: ,in, represents the loss function, Indicates input feature vector, Indicates The reconstruction result of the output feature vector is represents the total number of eigenvectors; S55: Model verification, using historical time series data for verification, by comparing the reconstruction error of the verification data with the reconstruction error of the training data, judging whether the model is overfitting or underfitting; The above steps describe how to use historical time series data and adopt an autoencoder model based on deep learning for unsupervised learning to train an autoencoder model for anomaly detection, thus achieving effective training and verification of the autoencoder model and ensuring the accuracy and reliability of the anomaly detection model.
[0030] S6 specifically includes: S61: After preprocessing and feature extraction of the real-time collected time series data, a real-time feature vector is generated: ,in, is the total number of features, Indicates Features S62: Real-time feature vector Input to the input layer of the trained autoencoder model, pass through the encoder layer, bottleneck layer and decoder layer, and generate a reconstructed feature vector ; S63: Calculate the reconstruction error, for the input feature vector and reconstruct the eigenvector Perform element-by-element error calculation, the specific formula is: ,in, represents the reconstruction error, represents the real-time feature vector, represents the reconstructed feature vector.
[0031] S7 specifically includes: S71: Reconstruction error based on calculation Calculating anomaly score , the specific formula is: ,in, represents the abnormality score, represents the mean of the historical reconstruction error, represents the standard deviation of the historical reconstruction error; S72: Setting anomaly scoring thresholds based on statistical analysis of historical data ; S73: Score the anomaly and anomaly scoring threshold For comparison, , the time segment is marked as abnormal data.
[0032] like Figure 2 As shown, the industrial Internet time series data anomaly detection system is used to implement the above-mentioned industrial Internet time series data anomaly detection, including the following modules: Data acquisition preprocessing module: It is configured in multiple industrial equipment and sensors to collect raw time series data in real time and preprocess the raw time series data, including denoising, smoothing, filling missing values and standardization, to improve data quality and consistency; Data segmentation module: receives preprocessed time series data and segments the data according to the preset time window to form multiple time segments in preparation for subsequent analysis; Multi-level cluster analysis module: receives time segments from the data segmentation module and uses density-based clustering algorithms to perform multi-level cluster analysis on each time segment to identify different patterns and potential anomalies in the data; Feature extraction and dimensionality reduction module: obtains clustering results from the multi-level clustering analysis module, extracts time domain features, frequency domain features and statistical features, and performs feature dimensionality reduction processing through dimensionality reduction techniques such as principal component analysis (PCA) to construct a high-dimensional feature space; Anomaly detection model training module: Using historical time series data and the reduced-dimensional features from the feature extraction and dimensionality reduction module, the deep learning-based autoencoder model is used for unsupervised learning to train an autoencoder model for anomaly detection. Real-time detection module: After the real-time collected time series data is processed by the data collection preprocessing module, it is input into the trained autoencoder model to calculate the reconstruction error to determine whether there is an abnormality in the current time series data; Abnormal scoring and marking module: Based on the reconstruction error provided by the real-time detection module, each time segment is scored and an abnormal scoring threshold is set. When the score exceeds the abnormal scoring threshold, the corresponding time segment is marked as abnormal data.
[0033] The present invention covers any substitution, modification, equivalent method and scheme made on the essence and scope of the present invention. In order to make the public have a thorough understanding of the present invention, specific details are described in detail in the following preferred embodiments of the present invention, but those skilled in the art can fully understand the present invention without the description of these details. In addition, in order to avoid unnecessary confusion about the essence of the present invention, well-known methods, processes, procedures, components and circuits are not described in detail.
[0034] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. An industrial Internet time series data anomaly detection method, characterized in that: The following steps are involved: S1: Collect raw time series data from industrial equipment and sensors in real time, and perform denoising, smoothing, missing value filling and standardization on the raw time series data; S2: Segment the preprocessed time series data according to the preset time window to form multiple time segments; S3: A density-based clustering algorithm is used to perform multi-level clustering analysis on each time segment to identify different patterns and potential anomalies in the data; S4: Extract time domain features, frequency domain features and statistical features from the results of multi-level cluster analysis, construct a high-dimensional feature space, and use dimensionality reduction technology to perform feature dimensionality reduction processing; S5: Using historical time series data, an autoencoder model based on deep learning is used for unsupervised learning to train an autoencoder model for anomaly detection; S6: Input the real-time collected time series data into the trained autoencoder model and calculate the reconstruction error to determine whether the current time series data is abnormal; S7: Score the reconstruction error of each time segment and set an abnormal score threshold. When the score exceeds the abnormal score threshold, the corresponding time segment is marked as abnormal data.
2. The method for detecting anomalies in industrial Internet time series data according to claim 1 is characterized in that: The S1 specifically includes: S11: Data collection, real-time collection of raw time series data from industrial equipment and sensors through the configured industrial IoT gateway; S12: Data denoising, using wavelet transform denoising method, by selecting Daubechies wavelet basis function and 5-layer decomposition, the collected original time series data is denoised; S13: Data smoothing, using the sliding average method, by setting the window size to 5 data points, the denoised time series data is smoothed; S14: Missing value filling: using linear interpolation to fill missing values in the smoothed time series data, calculating the linear relationship between the data on both sides of the missing point, and inserting the corresponding value; S15: Data standardization, applying the Z-score standardization method, by calculating the mean and standard deviation of the time series data, the time series data after filling in missing values is converted into data with zero mean and unit variance.
3. The method for detecting anomaly of industrial Internet time series data according to claim 1 is characterized in that: The S2 specifically includes: S21: Determine the time window size. According to the operation cycle and data characteristics of the industrial equipment, set a fixed time window size T in seconds, minutes or hours; S22: Time window sliding: through the sliding window technology, the window is slid on the preprocessed time series data with a set time step S. Each sliding window forms a new time segment. The time step S must be less than or equal to the time window size T. S23: Data sharding: sharding the data in each sliding window to generate multiple time segments, each of which contains all data points in the time window T; S24: Timestamp marking, adding a timestamp mark to each time segment, recording the start time and end time of the time window.
4. The method for detecting anomalies in industrial Internet time series data according to claim 1, characterized in that: The S3 specifically includes: S31: Select the clustering algorithm, use the density-based clustering algorithm DBSCAN, and set specific parameters, including the minimum number of samples MinPts and the neighborhood radius ; S32: Feature extraction, extracting time domain features, frequency domain features and statistical features from each time segment, and constructing feature vectors , where each feature vector contains multi-dimensional features; S33: Neighborhood search, for each data point , calculate its The number of other data points in the neighborhood, the distance calculation formula: ,in, and Represents data points and The eigenvalue in the kth dimension, is the dimension of the feature vector; when When , the data point At data point of In the neighborhood; S34: Cluster construction, starting from a core point, recursively The core points and boundary points in the neighborhood are added to the current cluster until all the core points are The neighbors have been processed to form a cluster; S35: Repeat the above steps, and perform multi-level clustering analysis by adjusting different MinPts and values to identify different patterns and potential outliers in the data. Specifically, data points belonging to the same cluster are regarded as a pattern; data points that cannot be classified into any cluster are regarded as potential outliers.
5. The method for detecting anomaly of industrial Internet time series data according to claim 1, characterized in that: The S4 specifically includes: S41: Time domain feature extraction, extracting the time domain features of each time segment from the results of multi-level cluster analysis, including mean, standard deviation, autocorrelation coefficient and peak value; S42: frequency domain feature extraction, performing fast Fourier transform on each time segment to extract frequency domain features, including main frequency components, spectrum energy and spectrum entropy; S43: Statistical feature extraction, extracting statistical features of each time segment, including skewness and kurtosis; S44: Construct a high-dimensional feature space and combine the extracted time domain features, frequency domain features and statistical features into a high-dimensional feature vector , expressed as: ,in is the total number of features, Indicates Features S45: Feature dimensionality reduction, using principal component analysis to reduce the dimensionality of high-dimensional feature space.
6. The method for detecting anomalies in industrial Internet time series data according to claim 1, characterized in that: The S45 specifically includes: S451: Calculate the covariance matrix of the eigenvector: ,in, represents the covariance matrix, represents the i-th eigenvector, represents the mean of the eigenvector, represents the total number of eigenvectors; S452: Calculate the eigenvalues and eigenvectors of the covariance matrix; S453: Before selection The eigenvectors corresponding to the eigenvalues constitute the eigenvector matrix ,in is the feature dimension after dimensionality reduction; S454: Project the original feature vector to the new feature space. The formula is: ,in, is the feature vector after dimensionality reduction, represents the original feature vector, represents the eigenvector matrix.
7. The method for detecting anomalies in industrial Internet time series data according to claim 1, characterized in that: The S5 specifically includes: S51: Build an autoencoder model and design a deep neural network structure including input layer, encoder layer, bottleneck layer, decoder layer and output layer; S52: Model initialization, use the Xavier initialization method to assign initial values to the weights and biases of the autoencoder model. The specific calculation formula is: ,in, represents the initialization weight, represents the number of neurons in the input layer, represents the number of neurons in the output layer; S53: Data preparation: construct a training data set based on the results of preprocessing, segmentation, feature extraction and dimensionality reduction of historical time series data. , expressed as: ,in Indicates feature vectors, represents the total number of eigenvectors; S54: Model training, using the gradient descent method to train the autoencoder model to minimize the reconstruction error. The loss function calculation formula is: ,in, represents the loss function, Indicates input feature vector, Indicates The reconstruction result of the output feature vector is represents the total number of eigenvectors; S55: Model verification, using historical time series data for verification, and judging whether the model is overfitting or underfitting by comparing the reconstruction error of the verification data with the reconstruction error of the training data.
8. The method for detecting anomalies in industrial Internet time series data according to claim 1, characterized in that: The S6 specifically includes: S61: After preprocessing and feature extraction of the real-time collected time series data, a real-time feature vector is generated: ,in, is the total number of features, Indicates Features S62: Real-time feature vector Input to the input layer of the trained autoencoder model, pass through the encoder layer, bottleneck layer and decoder layer, and generate a reconstructed feature vector ; S63: Calculate the reconstruction error, for the input feature vector and reconstruct the eigenvector Perform element-by-element error calculation, the specific formula is: ,in, represents the reconstruction error, represents the real-time feature vector, represents the reconstructed feature vector.
9. The method for detecting anomalies in industrial Internet time series data according to claim 1, characterized in that: The S7 specifically includes: S71: Reconstruction error based on calculation Calculating anomaly score , the specific formula is: ,in, represents the abnormality score, represents the mean of the historical reconstruction error, represents the standard deviation of the historical reconstruction error; S72: Setting anomaly scoring thresholds based on statistical analysis of historical data ; S73: Score the anomaly and anomaly scoring threshold For comparison, , the time segment is marked as abnormal data.
10. An industrial Internet time series data anomaly detection system, used to implement the industrial Internet time series data anomaly detection method according to any one of claims 1 to 9, characterized in that: Includes the following modules: Data acquisition preprocessing module: It is configured in multiple industrial equipment and sensors to collect raw time series data in real time and preprocess the raw time series data, including denoising, smoothing, filling missing values and standardization. Data segmentation module: receives the preprocessed time series data and segments the data according to the preset time window to form multiple time segments; Multi-level cluster analysis module: receives time segments from the data segmentation module and uses density-based clustering algorithms to perform multi-level cluster analysis on each time segment to identify different patterns and potential anomalies in the data; Feature extraction and dimensionality reduction module: obtains clustering results from the multi-level clustering analysis module, extracts time domain features, frequency domain features and statistical features, and performs feature dimensionality reduction processing through dimensionality reduction technology to construct a high-dimensional feature space; Anomaly detection model training module: Using historical time series data and the reduced-dimensional features from the feature extraction and dimensionality reduction module, the deep learning-based autoencoder model is used for unsupervised learning to train an autoencoder model for anomaly detection. Real-time detection module: After the real-time collected time series data is processed by the data collection preprocessing module, it is input into the trained autoencoder model to calculate the reconstruction error to determine whether there is an abnormality in the current time series data; Abnormal scoring and marking module: Based on the reconstruction error provided by the real-time detection module, each time segment is scored and an abnormal scoring threshold is set. When the score exceeds the abnormal scoring threshold, the corresponding time segment is marked as abnormal data.
Citation Information
Cited By
Production data management system based on artificial intelligence
CN119203010A
Abnormal state assessment method used in solar cell operation process
CN119813956A
A method for evaluating abnormal states during the operation of a solar cell
CN119813956B
Multi-working-condition abnormal mode recognition method for edge cloud cooperative equipment
CN119830176A
Power consumption behavior diagnosis system and method based on anomaly detection model
CN119918005A
