Multi-dimensional Time Series Data Anomaly Discrimination and Repair Method Based on Convolutional Neural Network
Through the method of convolutional neural network combining LSTM and Attention mechanism, the abnormal detection and repair of multi-dimensional timing data of large thermal power station units is solved, and data repair with high accuracy and high timeliness is achieved.
Patent Information
- Application Number
- CN202510443878.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-04-10
AI Technical Summary
The prior art is difficult to effectively detect and repair concealment and special abnormalities in flue gas emission data, especially in the multi-dimensional timing data of large thermal power station units, resulting in low discrimination accuracy and insufficient timeliness.
The multi-dimensional timing data exception discrimination and repair method based on convolutional neural network is adopted to form a multi-dimensional sequence correlation matrix by reading historical data. Combined with the LSTM network, Attention mechanism and deconvolution operation, the neural network model is trained to reconstruct the data and perform real-time abnormality detection and repair.
It improves the accuracy and timeliness of abnormal identification and repair of multi-dimensional timing data, can effectively detect and repair hidden and special abnormalities, and promote online application.
Smart Images

Figure CN119961847B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of real-time monitoring of flue gas emissions, and particularly relates to a method for abnormal discrimination and repair of multi-dimensional time-series data based on a convolutional neural network. Background Technique
[0002] Whether the flue gas emission data is accurate and reliable is related to whether the enterprise can master its own emission footprint and rules, and also related to whether the regulatory authorities can timely form emission reports and policies, which plays an important role in guiding the improvement of the ecological environment and the optimized development of the industry. There are 5000 to 10000 on-site measuring points arranged in large thermal power plant units to monitor the state variables such as steam, flue gas, drain water, extraction steam, exhaust steam, feed water, and air passing through in each equipment channel in real time, such as flow rate, temperature, pressure, flow, concentration, density, pressure difference, etc., and also monitor the overall coal consumption, load, plant transformer power, rotational speed, thermal efficiency, etc. of the unit in real time, and calculate and analyze the online emissions of various flue gases through the above large amount of measuring point data.
[0003] The above-mentioned measuring point data involves multiple specialties such as power plant boilers, steam turbines, environmental protection, chemistry, thermal engineering, and electrical engineering, making it very difficult to timely discover and correct hidden abnormal data. The existing abnormal detection methods for time-series data can be divided into four types: one is the statistical method; the second is the machine learning method; the third is the deep learning method; the fourth is the manual method.
[0004] The statistical learning method first calculates the mean and standard deviation of the time-series data, and then discriminates whether the new data is abnormal according to the three-sigma criterion. This method is simple to calculate, but the discrimination accuracy is low; the machine learning method uses the differences in the numerical distribution or distance density of the data at each measuring point to screen out outliers. However, this method is very sensitive to the selection of the kernel density function, and the discrimination results are unstable; the deep learning method mostly uses the LSTM long short-term memory network or its variant models to consider the time trend characteristics of the data, or uses the GCN graph convolutional network to consider the overall dependence relationship of multi-dimensional time-series data. However, the LSTM network has a certain time-delay effect, and the number of nodes and the amount of calculation of the GCN network are too large, which may affect the generalization ability and application ability of the model; the manual method is to arrange experts to make a linkage judgment on the time-series data of multiple measuring points, and use the equipment operation rules and engineering experience to screen out hidden and special abnormalities, and repair them through manual reasoning. However, this method is only applicable to static data analysis and research, and it is difficult to meet the timeliness and intelligence requirements under online working conditions. In addition, most of the existing technologies only give methods for abnormal detection, and few give scientific and practical abnormal repair methods. Summary of the Invention
[0005] Technical problems to be solved by the present invention: Provide a method for abnormal discrimination and repair of multi-dimensional time series data based on a convolutional neural network, which can effectively detect concealed and special abnormalities, and repair the abnormalities by reconstructing data through a neural network, helping to improve the accuracy and timeliness of abnormal discrimination and repair of data, and promoting online applications in engineering practice.
[0006] Technical solution: To solve the above technical problems, the technical solution adopted by the present invention is as follows:
[0007] A method for abnormal discrimination and repair of multi-dimensional time series data based on a convolutional neural network, comprising the following steps:
[0008] Step S1, read historical multi-dimensional time series data, calculate the spatial similarity of the time series data, and form an original multi-dimensional sequence correlation matrix;
[0009] Step S2, input the original multi-dimensional sequence correlation matrix into a convolutional neural network, obtain a multi-dimensional feature map, and combine an LSTM network, an Attention mechanism, and a deconvolution operation to reconstruct the original multi-dimensional sequence correlation matrix;
[0010] Step S3, train a neural network model by minimizing the reconstruction error of the correlation matrix, and save the model parameters as a file;
[0011] Step S4, load the model parameters in a real-time system, compare the measured point data obtained online with the model reconstruction data, determine whether there is an abnormality, and if so, perform repair.
[0012] Further, the implementation method of step S1 is as follows:
[0013] S11: Read the data files collected by multi-channel sensors at different times within a period of time, and organize them to form an original multi-dimensional sequence correlation matrix;
[0014] S12: Calculate the dot product similarity between pairwise multi-dimensional sequences within an s time segment to form an original multi-dimensional sequence correlation matrix.
[0015] Further, in step S11, construct a historical data table in a relational database. For each data file, loop through and read each measured point information and store it in the historical data table until the last line of the file;
[0016] Perform a sorting operation on the historical data. The sorting keywords include the measured point name and time. Then use an SQL query statement to return the sorted measured point data record set, and group the returned record set by the measured point name. The data within each group corresponds to a measured point data sequence, and normalize the measured point values within the group to form an original multi-dimensional sequence correlation matrix.
[0017] Further, in step S12, the specific implementation method is as follows: for any moment t in any measurement point data sequence, trace back s consecutive moments forward. Within the s-time segment, calculate the dot product similarity between pairwise multidimensional sequences. The formula is as follows:
[0018] ;
[0019] Among them, , respectively represent subsequences of any two measurement points . s represents the number of moments traced back, N represents the total number of measurement points, represents the dot product similarity between any two measurement points at moment t . The matrix with as elements is the original multidimensional sequence correlation matrix, respectively represent the data values of measurement points i and j at moment t - ε.
[0020] Further, the implementation method of step S2 is as follows:
[0021] S21: Input the original multidimensional sequence correlation matrix into a multi-layer convolutional neural network, calculate and obtain the multi-dimensional feature maps of the corresponding layer network, and implement spatial feature extraction;
[0022] S22: Input the multi-dimensional feature maps into an LSTM network, calculate and obtain a sequence of feature maps that fuse long-term and short-term information. Based on the Attention mechanism, perform weighted summation on the sequence of feature maps with a continuous m moments as the time window to implement time feature extraction;
[0023] S23: Use the Attention mechanism to adaptively select information related to the current moment, determine the time window length m, and form a refined output of the current hidden state by aggregating the information features within this time window ;
[0024] S24: Input the refined output of the current hidden state in S23 into a convolutional neural network, and obtain the correlation matrix reconstructed by the neural network model through multiple deconvolution and splicing operations.
[0025] Further, the specific implementation process of step S21 is as follows:
[0026] Feed the original multidimensional sequence correlation matrix into the first convolutional layer for convolutional calculation. The calculation output of this layer is the multi-dimensional feature map . Among them, is the dimension of the feature map of the first convolutional layer, is the depth of the feature map of the first convolutional layer; Assume represents the feature map of the layer, where is the dimension of the feature map of the th layer, is the depth of the feature map of the th layer. Then, the output calculation of the feature map of the th layer is as follows:
[0027] ;
[0028] Among them, represents the convolution operation, and g(.) represents the activation function. represents convolution kernels of size , is the bias term, where is the dimension of the convolution kernel of the th layer, is the depth of the feature map of the th layer, represents the output feature map of the lth layer with dimension and depth .
[0029] Furthermore, the specific implementation process of step S23 is as follows:
[0030] ;
[0031] Among them, softmax(.) represents the softmax function, Mul(.) represents the element-wise product function of tensors, and Sum(.) represents the sum function of tensor elements; represents any moment between t - m and t, where m is the number of moments in the time window of the Attention mechanism. represents the hidden state of the lth convolutional layer at time i (i ∈ (t - m, t)); represents the importance weight of the information at the previous moment, which utilizes the time information between each convolutional layer within the time window to achieve time feature extraction on the spatial feature map.
[0032] Furthermore, the specific implementation process of step S24 is as follows:
[0033] Design a convolutional decoder, and its formula is as follows:
[0034] ;
[0035] Among them, represents the transposed convolution operation, represents the concatenation operation, g(.) represents the activation function, and respectively represent the convolution kernel and bias term of the l-th deconvolution layer, represents the deconvolution output feature map of the l-th layer at time t; in the order from back to front, the of the l-th ConvLSTM is fed into the deconvolution neural network, and the output feature map is concatenated in series with the output of the (l - 1)-th ConvLSTM layer, and the concatenated matrix is further input into the next deconvolution layer; finally, the output is obtained, representing the reconstructed correlation matrix.
[0036] Furthermore, the specific implementation process of step S3 is as follows:
[0037] Define the loss function as:
[0038] ;
[0039] where represents the Frobenius norm of the matrix, N represents the total number of measurement points, and the Adam optimizer is used to minimize the above loss; represents the reconstruction error matrix at time t, represents the original multi-dimensional sequence correlation matrix; represents the reconstructed correlation matrix;
[0040] After multiple training cycles, the offline training parameters of the model are obtained, and the trained parameters are saved to the file system for the online system to load and use.
[0041] Furthermore, in step S4, when the real-time system runs, it loads the neural network model parameters, reconstructs the multi-dimensional data at the current moment through the model, compares the measured point data obtained online with the reconstructed data. If the difference in a certain dimension of data exceeds the threshold, there is an anomaly, and the multi-dimensional reconstructed data is used to repair the anomaly; at the same time, the repair time and content are recorded in the anomaly handling log, and relevant personnel are notified to conduct a source investigation of the anomaly.
[0042] Beneficial effects: Compared with the prior art, the present invention has the following advantages:
[0043] (1) The present invention can organize and form structured original multi-dimensional time series data from a large number of original data files through line-by-line reading, full-scale sorting, grouping by category, and normalization processing, which is beneficial to improving the data processing efficiency of complex neural networks.
[0044] (2) The present invention intercepts subsequences of a set length in long time series data and measures the correlation of multi-dimensional data through the dot product similarity of subsequence data. This enables a general convolutional neural network to capture the dependency relationship of multi-dimensional data, rather than constructing a more complex graph convolutional neural network, which helps to improve the practicality of the algorithm.
[0045] (3) The present invention can effectively combine a convolutional neural network, a long short-term memory network, and an Attention mechanism, comprehensively covering the temporal and spatial characteristics of multi-dimensional time-series data, and can effectively detect concealed and special anomalies.
[0046] (4) The present invention can repair anomalies based on the reconstructed data of the neural network through deconvolution and splicing operations, and send anomaly information to relevant personnel in a timely manner, which helps to improve the accuracy and timeliness of data anomaly discrimination and repair, and promotes online applications in engineering practice. Description of the Drawings
[0047] Figure 1 It is a schematic structural diagram of a method for discriminating and repairing anomalies in multi-dimensional time-series data based on a convolutional neural network. Detailed Embodiments
[0048] The following further clarifies the present invention in conjunction with specific embodiments. The embodiments are implemented on the premise of the technical solution of the present invention. It should be understood that these embodiments are only used to illustrate the present invention and not to limit the scope of the present invention.
[0049] Embodiment 1
[0050] As Figure 1 shown, the method for discriminating and repairing anomalies in multi-dimensional time-series data based on a convolutional neural network of the present application includes the following steps:
[0051] Step S1, read historical multi-dimensional time-series data, calculate the spatial similarity of the time-series data, and form a correlation matrix;
[0052] Step S2, input the correlation matrix into a convolutional neural network, obtain a multi-dimensional feature map, and combine an LSTM network, an Attention mechanism, and a deconvolution operation to reconstruct the correlation matrix;
[0053] Step S3, train the neural network model by minimizing the reconstruction error of the correlation matrix, and save the model parameters as a file;
[0054] Step S4, load the model parameters in a real-time system, compare the measured point data obtained online with the model reconstruction data, determine whether there are anomalies, and if so, perform repair.
[0055] Embodiment 2
[0056] Step S1: Read historical multi-dimensional time-series data, calculate the spatial similarity of the time-series data, and form a correlation matrix. The implementation method includes:
[0057] S11: Read the data files collected by the multi-channel sensor at different times within one year, and organize them to form an original multi-dimensional sequence correlation matrix. The specific implementation process is as follows:
[0058] Construct a historical data table in the relational database, which contains 3 fields, namely the measurement point name, the measurement point value, and the time. For each data file, loop to read the measurement point information of each row and save it to the historical data table until the last row of the file.
[0059] Use the database SQL statement to sort the historical data. The sorting keyword 1 is the measurement point name, and the keyword 2 is the time. Then use the SQL query statement to return the sorted measurement point data record set, and group the returned record set by the measurement point name. The data within each group corresponds to a measurement point data sequence, and normalize the measurement point values within the group to form the original multi-dimensional sequence correlation matrix.
[0060] S12: Calculate the dot product similarity between pairwise multi-dimensional sequences within the s time segment to form the original multi-dimensional sequence correlation matrix. The specific implementation process is as follows:
[0061] For any moment t on any measurement point data sequence, trace back s consecutive moments forward. Within the s time segment, calculate the dot product similarity between pairwise multi-dimensional sequences. The formula is as follows:
[0062] ;
[0063] Among them, , respectively represent subsequences of any two measurement points . s represents the number of traced-back moments, N represents the total number of measurement points, represents the dot product similarity between any two measurement points at moment t, and the matrix with as elements (i.e., ) is the original multi-dimensional sequence correlation matrix, respectively represent the data values of measurement points i and j at moment t - ε.
[0064] Step S2: Input the original multi-dimensional sequence correlation matrix into the convolutional neural network to obtain the multi-dimensional feature map, and combine the LSTM network, the Attention mechanism, and the deconvolution operation to reconstruct the original multi-dimensional sequence correlation matrix.
[0065] S21: Input the multi-dimensional sequence correlation matrix into the multi-layer convolutional neural network, calculate and obtain the multi-dimensional feature maps of the corresponding layer networks to achieve spatial feature extraction. The specific implementation process is as follows:
[0066] Input the original multi-dimensional sequence correlation matrix It is fed into the first convolutional layer for convolutional calculation, and the calculation output of this layer represents a multi-dimensional feature map , where represents the dimension of the feature map of the first convolutional layer, represents the depth of the feature map of the first convolutional layer. Assume that represents the feature map of the layer, where represents the dimension of the feature map of the layer, represents the depth of the feature map of the layer, then the feature map output of the layer is calculated as follows:
[0067] ;
[0068] Among them, represents the convolution operation, g(.) represents the activation function, represents convolution kernels of size , represents the bias term, where represents the dimension of the convolution kernel of the layer, represents the depth of the feature map of the layer, represents the output feature map of the l-th layer with dimension and depth .
[0069] Denote the convolutional neural network as Conv. According to engineering experience, the scaled exponential linear unit is used as the activation function in Conv, and the number of convolutional layers is set to 4 layers, denoted as Conv1~Conv4, which have 32 kernels of size 3×3×1, 64 kernels of size 3×3×32, 128 kernels of size 2×2×64, and 256 kernels of size 2×2×128 respectively. In addition, the strides of the convolution operations are set to 1×1, 2×2, 2×2, and 2×2 respectively.
[0070] S22: Input the multi-dimensional feature map into the LSTM network, calculate to obtain a sequence of feature maps that fuse long-term and short-term information, and based on the Attention mechanism, perform weighted summation on the sequence of feature maps with a continuous m-time window as the time window to achieve time feature extraction. The specific implementation process is as follows:
[0071] Denote the LSTM network based on the convolutional feature map input as ConvLSTM. According to the feature map of the l-th convolutional layer and the hidden state at the previous moment, update the hidden state , where the formula of the ConvLSTM cell is:
[0072] ;
[0073] where, represents the convolution operation, represents the Hadamard product, is the sigmoid activation function, is convolution kernels of size ; represents the bias term of the l-th layer of ConvLSTM, respectively represent the input gate, forget gate, memory cell, output gate, and hidden state of the l-th layer network at time t. When performing the convolution operation for the above items, the convolution kernel size and convolution stride of each layer are the same as the parameters of the aforementioned Conv1~Conv4.
[0074] S23: Considering that the information of previous time steps is not equally relevant to the current hidden state , the Attention mechanism is adopted to adaptively select the information relevant to the current time step. According to engineering practice, the time window length m = 5 is taken, and by aggregating the information features within this time window, a refined output of the current hidden state is formed. The specific formula is as follows:
[0075] ;
[0076] where, softmax(.) represents the normalized exponential function, Mul(.) represents the function of multiplying corresponding elements of tensors, Sum(.) represents the function of summing tensor elements, represents the importance weight of the information of previous time steps, represents the current state; represents any time step between t - m and t, m is the number of time steps of the Attention mechanism time window, represents the time step the hidden state of the l-th convolutional layer.
[0077] Based on the importance weight of the information of previous time steps, the time information between each convolutional layer within the time window is utilized to achieve time feature extraction on the spatial feature map.
[0078] S24: The refined output of the current hidden state in S23 is input into the convolutional neural network. After multiple deconvolution and splicing operations, a correlation matrix reconstructed by the neural network model is obtained. The specific implementation process is as follows:
[0079] Design a convolutional decoder, and its formula is as follows:
[0080] ;
[0081] Among them, represents the deconvolution operation, represents the concatenation operation, and g(.) represents the activation function. and represent the convolution kernel and bias term of the l-th layer deconvolution layer respectively. represents the output feature map of the l-th layer deconvolution at time t; in the order from back to front, the of the l-th layer ConvLSTM is fed into the deconvolution neural network; the output feature map is concatenated in series with the output of the (l - 1)-th layer ConvLSTM layer, and the concatenated matrix is further input into the next deconvolution layer; the final output represents the reconstructed correlation matrix.
[0082] Denote the deconvolution neural network as ReConv, and set it with 4 deconvolution layers ReConv4~ReConv1, which have 128 kernels of size 2×2×256, 64 kernels of size 2×2×128, 32 kernels of size 3×3×64, and 1 kernel of size 3×3×64 respectively. The strides of the deconvolution operations are 2×2, 2×2, 2×2, and 1×1 respectively. Thus, the feature map matrices are merged in different deconvolution layers and ConvLSTM layers to improve the performance of anomaly detection.
[0083] Step S3: Train the neural network model by minimizing the reconstruction error of the correlation matrix, and save the model parameters as a file.
[0084] Calculate the reconstruction residuals of the correlation matrices at all times, construct a loss function with the Frobenius norm of this residual, and optimize and train the model parameters through the Adam optimizer, and save the trained parameters to the file system. The specific implementation process is as follows:
[0085] Define the loss function as:
[0086] ;
[0087] Among them, represents the Frobenius norm of the matrix, N represents the total number of measurement points, represents the reconstruction error matrix at time t, and the Adam optimizer is used to minimize the above loss; represents the original multi-dimensional sequence correlation matrix; represents the reconstructed correlation matrix.
[0088] After a sufficient number of training iterations, the offline training parameters of the model are obtained, and the trained parameters are saved to the file system for the online system to load and use.
[0089] Based on the trained model, calculate the final error matrix at time t , where is the finally optimized reconstruction correlation matrix. Determine the number of elements in each column that exceed the given threshold and form a vector of the number of elements exceeding the threshold at the current time , where The value of is related to the specific dataset. In this embodiment, the dataset's
[0090] is taken as 0.005. Based on the vectors of the number of elements exceeding the threshold at all times, obtain the anomaly discrimination parameter:
[0091] where θ represents the anomaly discrimination parameter, represents the amplification factor, which is taken as 1.6 in this embodiment's dataset, Med{.} is used to take the median, represents the value of the j-th column of the vector of the number of elements exceeding the threshold at any time t.
[0092] Step S4: Load the model parameters in the real-time system, compare the measured point data obtained online with the model reconstruction data, determine whether there is an anomaly, and if so, perform repair.
[0093] When the real-time system runs, it loads the neural network model parameters, reconstructs the multi-dimensional data at the current time through the model, compares the measured point data obtained online with the reconstruction data. If the difference in a certain dimension of data exceeds the threshold, there is an anomaly, and the anomaly is repaired with the multi-dimensional reconstruction data. At the same time, record the repair time and content in the anomaly handling log and send it to the specified email to notify relevant personnel to conduct a source investigation of the anomaly. The specific implementation process is as follows:
[0094] Calculate the reconstruction error matrix of the multi-dimensional time-series data at the current time
[0095] ;
[0096] where represents the reconstruction error matrix of the multi-dimensional time-series data at the current time, represents the original multi-dimensional sequence correlation matrix; represents the reconstruction correlation matrix at the latest time; the threshold is taken as , by judging the number of elements in each column of the reconstruction error matrix that exceed , calculate and obtain the vector of the number of elements exceeding the threshold , for any j-th column element in the vector, if , it is determined that the original data corresponding to this column is abnormal and needs to be corrected.
[0097] For the data in column j with anomalies, use the elements of the reconstructed correlation matrix to replace the elements of the original correlation matrix , and correct the on-line acquired measurement data corresponding to column j according to the following formula:
[0098] ;
[0099] where s represents the number of backward moments, N represents the total number of measurement points, represents the subsequence data of moments backward from the current moment, represents the correction value.
[0100] Form a data tuple with the current measurement point serial number j, the current time t, the on-line acquired measurement data , the corrected data , record it in the exception handling log, and send it to the specified email to notify relevant personnel to conduct a search for the source of the anomaly.
[0101] The following verifies the method of the present invention using the data of a real power plant. The main data are: superheater outlet steam temperature (°C), economizer inlet feed water temperature (°C), No. 1 high-pressure heater outlet water temperature (°C), No. 2 high-pressure heater drain temperature (°C), reheater outlet steam temperature (°C), superheater desuperheating water flow (t / h), economizer inlet feed water flow (t / h), reheater accident spray water flow (t / h), soot blowing steam flow (t / h), unit coal consumption (t / h), superheater outlet steam pressure (MPa), superheater desuperheating water pressure (MPa), economizer inlet feed water pressure (MPa), reheater outlet steam pressure (MPa), reheater inlet steam pressure (MPa), carbon Car (%) as-received in the coal entering the furnace, hydrogen Har (%) as-received in the coal entering the furnace, nitrogen Nar (%) as-received in the coal entering the furnace, sulfur Sar (%) as-received in the coal entering the furnace, oxygen Oar (%) as-received in the coal entering the furnace.
[0102] Using the above data, the data set is divided into a simulation data set and a real power plant data set. The detailed information of the two data sets is shown in Table 1.
[0103] Table 1 Verification data
[0104]
[0105] Compare the method of the present invention with four types of methods, namely classification models, density estimation models, time prediction models, and graph network models.
[0106] The classification model classifies test data as abnormal or non - abnormal by learning a decision function, and is compared with the one - class classification model (SVDD) of support vector machines.
[0107] The density estimation model detects outliers through data density and is compared with the K - nearest neighbor density estimation model (KNN).
[0108] The time prediction model models the time dependence of training data and is compared with the vector autoregressive model (VAR) and the long short - term memory network (LSTM).
[0109] The graph network model models sequence data and data relationships through nodes and adjacent edges and is compared with the graph convolutional neural network (GCN).
[0110] This embodiment uses precision, recall, and F1 - score to evaluate the effectiveness and advantages of the proposed explanation method, where:
[0111] Precision represents the proportion of samples predicted as positive classes by the model that are actually positive classes.
[0112] Recall represents the proportion of samples that are actually positive classes and are correctly predicted as positive classes by the model.
[0113] F1 - score represents the harmonic mean of precision and recall and is used to comprehensively evaluate the performance of the model.
[0114] Table 2 Experimental Results
[0115]
[0116] It can be concluded from Table 2 that:
[0117] (1) The time prediction model and the graph network model perform better than the SVDD and KNN models, indicating that the two data sets contain spatio - temporal correlations.
[0118] (2) The performance of LSTM and GCN is better than that of VAR, indicating that deep learning models can capture more complex data relationships than traditional methods.
[0119] (3) Compared with other methods, this method performs best in all three metrics, and the improvement range is between 4.9% and 10.1%. It shows that the method of the present invention can effectively model the correlation and time dependence between sensor measurement points of multi - dimensional time series.
[0120] The present invention establishes a complete method for distinguishing and repairing anomalies in multi-dimensional time series data, which effectively avoids the problem that the data of multi-channel sensors on the same device are highly linked but the correlation relationship cannot be effectively utilized. A feature map extraction method based on convolutional neural networks and LSTM networks is proposed, which completely covers the time and space characteristics of multi-dimensional time series data, can effectively detect hidden and specific anomalies, and repair anomalies by reconstructing data through neural networks, which helps to improve the accuracy and timeliness of data anomaly distinction and repair, and promote online applications in engineering practice.
[0121] 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. A method for abnormal discrimination and repair of multi-dimensional time series data based on a convolutional neural network, characterized in that, It includes the following steps: Step S1: Read historical multi-dimensional time series data, calculate the spatial similarity of the time series data, and form an original multi-dimensional sequence correlation matrix. The implementation method is as follows: S11: Read the data files collected by multi-channel sensors at different times within a period of time, and organize them into original multi-dimensional time series data. Construct a historical data table in a relational database. For each data file, loop through each measurement point information and save it to the historical data table until the last row of the file; Perform a sorting operation on the historical data. The sorting keywords include the measurement point name and time. Then, use an SQL query statement to return the sorted measurement point data record set, and group the returned record set by the measurement point name. The data within each group corresponds to a measurement point data sequence, and normalize the measurement point values within the group to form an original multi-dimensional sequence correlation matrix; S12: Calculate the dot product similarity between pairwise multi-dimensional sequences within the s time segment to form an original multi-dimensional sequence correlation matrix; Step S2: Input the original multi-dimensional sequence correlation matrix into a convolutional neural network to obtain a multi-dimensional feature map, and combine the LSTM network, Attention mechanism, and deconvolution operation to reconstruct the original multi-dimensional sequence correlation matrix; Step S3: Train the neural network model by minimizing the reconstruction error of the correlation matrix, and save the model parameters as a file; Step S4: Load the model parameters in the real-time system, compare the measured point data obtained online with the model reconstruction data, and determine whether there is an anomaly. If so, perform repair. The specific implementation process is as follows: Calculate the reconstruction error matrix of the multi-dimensional time series data at the current moment ; Among them, represents the reconstruction error matrix of the multi-dimensional time series data at the current moment, represents the original multi-dimensional sequence correlation matrix; represents the reconstructed correlation matrix; the threshold is taken as , by judging the number of elements exceeding in each column of the reconstruction error matrix, the number vector of the number of elements exceeding the threshold is calculated. For any j-column element in the vector, if , it is determined that the corresponding original data in this column is abnormal and needs to be corrected. θ represents the abnormal discrimination parameter and is expressed as: ; Among them, represents the amplification factor, and Med{.} is used to take the median. represents the value of any column j of the over-threshold number vector at any time t; for the data of column j with anomalies, the elements of the reconstructed correlation matrix are used to replace the elements of the original correlation matrix , and the on-line acquired measured point data corresponding to column j is corrected according to the following formula: ; Among them, s represents the number of backtracking moments, N represents the total number of measurement points, Indicates going back to the current moment Subsequence data at each moment, Indicates the correction value; The current measurement point serial number j, the current time t, and the measurement point data obtained online , and the corrected data are combined into a data tuple, recorded in the exception handling log, and sent to the specified email to notify relevant personnel to conduct a source investigation of the exception.
2. The method for abnormal discrimination and repair of multi-dimensional time series data based on convolutional neural network according to claim 1, characterized in that, In step S12, the specific implementation method is as follows: For any moment t on any measurement point data sequence, trace back s consecutive moments forward. Within the s time segment, calculate the dot product similarity between pairwise multi-dimensional sequences. The formula is as follows: ; Among them, , respectively represent subsequences of any two measurement points , s represents the number of moments of backtracking, N represents the total number of measurement points, represents the dot product similarity between any two measurement points at time t between, and the matrix with elements is the original multi-dimensional sequence correlation matrix, respectively represent the measurement points i , j at t - ε time data values, .
3. The multi-dimensional time series data anomaly discrimination and repair method based on a convolutional neural network according to claim 1, wherein, The implementation method of step S2 is as follows: S21: Input the original multi-dimensional sequence correlation matrix into a multi-layer convolutional neural network, calculate and obtain the multi-dimensional feature maps of the corresponding layer networks to achieve spatial feature extraction; S22: Input the multi-dimensional feature maps into the LSTM network, calculate and obtain a sequence of feature maps that fuse long-term and short-term information, and based on the Attention mechanism, perform weighted summation on the sequence of feature maps with a continuous m moments as the time window to achieve time feature extraction; S23: The Attention mechanism is adopted to adaptively select the information relevant to the current moment, determine the time window length m, and form a refined output of the current hidden state by aggregating the information features within this time window. ; S24: Refined output of the current hidden state in step S23 Input it into a convolutional neural network, and through multiple deconvolution and splicing operations, obtain a correlation matrix reconstructed by the neural network model.
4. The method for abnormal discrimination and repair of multi-dimensional time series data based on a convolutional neural network according to claim 3, wherein, The specific implementation process of step S21 is as follows: Feed the original multi-dimensional sequence correlation matrix into the first convolutional layer for convolutional calculation, and the calculation output of this layer is a multi-dimensional feature map , where is the dimension of the feature map of the first convolutional layer, is the depth of the feature map of the first convolutional layer; assume represents the feature map of the th layer, where is the dimension of the feature map of the th layer, then the feature map output calculation of the layer is as follows: ; Among them, represents the convolution operation, and g(.) represents the activation function. denotes convolution kernels of size . is the bias term, where is the dimension of the convolution kernel of the th layer, is the depth of the feature map of the th layer, represents the output feature map of the l-th layer with dimension and depth .
5. The method for abnormal discrimination and repair of multi-dimensional time series data based on a convolutional neural network according to claim 3, wherein The specific implementation process of step S23 is as follows: ; Among them, softmax(.) represents the softmax function, Mul(.) represents the element-wise product function of tensors, and Sum(.) represents the sum function of tensor elements; represents any moment between t-m and t, where m is the number of moments in the time window of the Attention mechanism, represents the hidden state of the l-th convolutional layer at time i (i ∈ (t-m, t)); represents the importance weight of the information at the previous moment, and utilizes the time information between each convolutional layer within the time window to achieve time feature extraction on the spatial feature map, represents the hidden state at the current moment.
6. The method for abnormal discrimination and repair of multi-dimensional time series data based on a convolutional neural network according to claim 3, wherein, The specific implementation process of step S24 is as follows: Design a convolutional decoder, and its formula is as follows: ; Among them, represents a deconvolution operation, represents a concatenation operation, and g(.) represents an activation function, and respectively represent the convolution kernel and bias term of the l-th layer deconvolution layer, represents the deconvolution output feature map of the l-th layer at time t; in the order from back to front, the refined output of the current hidden state of the l-th layer ConvLSTM is fed into the deconvolution neural network, and the output feature map is concatenated in series with the output of the (l - 1)-th layer ConvLSTM layer, and the concatenated matrix is further input into the next deconvolution layer; the final output , represents the reconstructed correlation matrix, and ConvLSTM represents an LSTM network based on the input of convolutional feature maps.
7. The method for abnormal discrimination and repair of multi-dimensional time series data based on convolutional neural network according to claim 1, characterized in that The specific implementation process of step S3 is as follows: Define the loss function as: ; Among them, represents the F-norm of the matrix, N represents the total number of measurement points, and the Adam optimizer is used to minimize the above loss; represents the reconstruction error matrix at time t, represents the original multi-dimensional sequence correlation matrix; represents the reconstructed correlation matrix; After multiple training cycles, obtain the offline training parameters of the model, and save the trained parameters to the file system for the online system to load and use.
Citation Information
Patent Citations
Cloud network end resource multi-dimensional time sequence anomaly detection method based on multi-scale decoding
CN115169430A
Abnormity detection method based on unbalanced adversarial training convolutional auto-encoder
CN117194994A