CN117190078A - Abnormality detection method and system for monitoring data of hydrogen transportation pipe network - Google Patents

Abnormality detection method and system for monitoring data of hydrogen transportation pipe network Download PDF

Info

Publication number
CN117190078A
CN117190078A CN202311450870.4A CN202311450870A CN117190078A CN 117190078 A CN117190078 A CN 117190078A CN 202311450870 A CN202311450870 A CN 202311450870A CN 117190078 A CN117190078 A CN 117190078A
Authority
CN
China
Prior art keywords
time
layer
sequence
embedding
dynamic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202311450870.4A
Other languages
Chinese (zh)
Other versions
CN117190078B (en
Inventor
李敏
陈庆辉
李刚
周鸣乐
韩德隆
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Computer Science Center National Super Computing Center in Jinan
Original Assignee
Shandong Computer Science Center National Super Computing Center in Jinan
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Computer Science Center National Super Computing Center in Jinan filed Critical Shandong Computer Science Center National Super Computing Center in Jinan
Priority to CN202311450870.4A priority Critical patent/CN117190078B/en
Publication of CN117190078A publication Critical patent/CN117190078A/en
Application granted granted Critical
Publication of CN117190078B publication Critical patent/CN117190078B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method and a system for detecting abnormality of monitoring data of a hydrogen transmission pipe network, which relate to the technical field of hydrogen energy and data processing, and comprise the following steps: acquiring hydrogen transportation pipe network monitoring data of a current set time step, and extracting time variable sequence data and dynamic variable sequence data; the extracted data is input into a time sequence prediction model, the time characteristic embedding and the dynamic characteristic embedding are extracted through a time characteristic embedding layer and a dynamic characteristic embedding layer, coding is carried out through a time sequence coder and a dynamic coder respectively, the coded characteristic embedding is input into a transcoder for fusion, and a fused variable matrix is output; finally, the dynamic characteristic embedding, the time characteristic embedding after encoding and the variable matrix are input into a decoder for decoding, and a predicted value is output; and comparing the difference value between the predicted value and the actual observed value with a set threshold value, and judging whether the actual observed value is abnormal data or not. The invention realizes the accurate anomaly detection of the monitoring data of the non-stable hydrogen-conveying pipe network.

Description

Abnormality detection method and system for monitoring data of hydrogen transportation pipe network
Technical Field
The invention relates to the technical field of hydrogen energy and data processing, in particular to a method and a system for detecting abnormality of monitoring data of a hydrogen conveying pipe network.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
Currently hydrogen energy development is entering a new period, both policy and market aspects have demonstrated significant support and demand for hydrogen energy applications. In order to ensure the safety of hydrogen energy transportation, the abnormality monitoring of the hydrogen transportation pipeline is required, however, the current technology is seriously lost in the aspects of safety management and abnormality detection of the hydrogen transportation pipeline. In order to solve the problems of complex large-scale hydrogen supply scene, safety prevention and control and the like, development of an algorithm for detecting abnormality of hydrogen transmission pipe network detection data is needed, the management requirements of whole process monitoring and top layer design optimization of urban hydrogen supply are met, and large-scale popularization and application of hydrogen energy are promoted.
At present, a technology related to the abnormal detection of monitoring data of a hydrogen-conveying pipe network is not available, and the problem of large scene gap and poor generalization capability exists in the data abnormal detection technology in other fields, so that the technology cannot be applied to the scene of the hydrogen-conveying pipe network with complex lines and more aperiodic mutation data. The existing abnormality detection models cannot solve the problem of abnormality detection of the hydrogen transportation pipe network monitoring data with high randomness and mutation, and the relation between the dynamic characteristics and the time sequence characteristics of the detection data extracted by the models is not clear, so that the abnormality detection capability is poor and the efficiency is low. In addition, the pipe network characteristics such as pressure, concentration and load are difficult to fuse, so that the long sequence prediction and anomaly detection effects are poor.
Disclosure of Invention
In order to solve the defects in the prior art, the invention provides a method and a system for detecting abnormality of monitoring data of a hydrogen transportation pipe network, which are used for modeling mutation point information by adopting a non-stationarity checking attention mechanism, solving the non-stationary problem, extracting non-linear information of dynamic variable characteristics and time sequence variable characteristics deeply through a dynamic encoder and a time sequence encoder, merging all characteristic information through statistical transformation of a transcoder, improving correlation dependence among variables so as to obtain better predictability, integrating information by a decoder and carrying out more accurate stable prediction of the monitoring data, and realizing accurate abnormality detection of the monitoring data of the hydrogen transportation pipe network by comparing a predicted value with an actual value.
In a first aspect, the invention provides a method for detecting abnormality of monitoring data of a hydrogen transportation pipe network.
A hydrogen transportation pipe network monitoring data anomaly detection method comprises the following steps:
acquiring hydrogen pipe network monitoring data of a current set time step, and extracting time variable sequence data and dynamic variable sequence data of the hydrogen pipe network monitoring data;
inputting the time variable sequence data and the dynamic variable sequence data into a time sequence prediction model, and extracting time feature embedding and dynamic feature embedding through a time feature embedding layer and a dynamic feature embedding layer; then encoding the time characteristic embedding and the dynamic characteristic embedding respectively through a time sequence encoder and a dynamic encoder, inputting the encoded characteristic embedding into a transcoder for fusion, and outputting a fused variable matrix; finally, the variable matrixes after dynamic feature embedding, time feature embedding after encoding and fusion are input to a decoder for decoding, and then predicted sequence data of the next time step is output through a full connection layer;
and comparing the difference value between the predicted value and the actual observed value of the next time step with a set threshold value, and judging whether the actual observed value of the monitoring data of the hydrogen conveying pipe network is abnormal data or not.
In a second aspect, the invention provides a hydrogen transportation pipe network monitoring data anomaly detection system.
A hydrogen transfer network monitoring data anomaly detection system, comprising:
the data acquisition module is used for acquiring the hydrogen transportation pipe network monitoring data of the current set time step and extracting time variable sequence data and dynamic variable sequence data of the hydrogen transportation pipe network monitoring data;
the sequence data prediction module is used for inputting the time variable sequence data and the dynamic variable sequence data into the time sequence prediction model, and extracting time feature embedding and dynamic feature embedding through the time feature embedding layer and the dynamic feature embedding layer; then encoding the time characteristic embedding and the dynamic characteristic embedding respectively through a time sequence encoder and a dynamic encoder, inputting the encoded characteristic embedding into a transcoder for fusion, and outputting a fused variable matrix; finally, the variable matrixes after dynamic feature embedding, time feature embedding after encoding and fusion are input to a decoder for decoding, and then predicted sequence data of the next time step is output through a full connection layer;
the abnormality detection module is used for comparing the difference value between the predicted value and the actual observed value of the next time step with a set threshold value and judging whether the actual observed value of the hydrogen transportation pipe network monitoring data is abnormal data or not.
The one or more of the above technical solutions have the following beneficial effects:
1. the invention provides a method and a system for detecting abnormality of monitoring data of a hydrogen-conveying pipe network, which adopt a non-stationarity test attention mechanism to capture mutation information in dynamic characteristics through linear transformation and attention transfer, model mutation point information, accurately detect a non-stationary sequence, reduce time complexity, improve modeling capability of sequence information and solve the problem of non-stationary.
2. According to the method, nonlinear information of dynamic variable features and time sequence variable features is extracted through the depth of the dynamic encoder and the time sequence encoder, different types of features are encoded in a special stage manner, and feature influence is enhanced by improving the specificity of model feature extraction; all feature information is fused through statistical transformation of a transcoder, so that correlation dependence among variables is improved, better predictability is obtained, more accurate information is provided for a decoder, and predictability and anomaly detection capability are guaranteed; and finally, integrating information by a decoder, performing more accurate stable prediction of the monitoring data, and comparing the predicted value with the actual value to realize accurate anomaly detection of the monitoring data of the hydrogen transportation pipe network.
3. In the invention, the dynamic variable and the time variable of the monitoring data of the hydrogen transportation pipe network are respectively and linearly transformed by using the gate control residual error network and the time regularization, so that the information waste of data preprocessing is reduced, and the non-stationarity is greatly weakened.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention.
FIG. 1 is an overall block diagram of a method for detecting anomalies in monitoring data of a hydrogen-transfer network according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a dynamic feature embedding layer according to an embodiment of the present invention;
FIG. 3 is a schematic diagram showing the overall structure of a dynamic encoder, a time-series encoder, a transcoder, and a decoder according to an embodiment of the present invention;
fig. 4 is a schematic diagram of decoder output processing according to an embodiment of the invention.
Detailed Description
It should be noted that the following detailed description is exemplary only for the purpose of describing particular embodiments and is intended to provide further explanation of the invention and is not intended to limit exemplary embodiments according to the invention. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Furthermore, it will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, steps, operations, devices, components, and/or groups thereof.
Example 1
Because the non-stationarity of the time series data is weakened by preprocessing the time series data, and the Attention mechanism (namely the Attention mechanism) has natural long-range dependence modeling capability on the processing time series data, the method can provide possibility for irregular hydrogen energy data prediction, and the information dependence is enhanced by establishing an importance weight matrix of each characteristic information. Considering the potential of the attention mechanism in solving the problem of instability, the inherent non-stationary information is recovered to be time-dependent through the distinguishable attention learned from the original sequence data, which provides a better solution idea for carrying out non-stationary detection in the abnormality detection of the hydrogen-conveying pipe network monitoring data.
Specifically, in the method described in this embodiment, a stationarity test Attention mechanism is adopted to model mutation point information in the multivariate time sequence anomaly detection of monitoring data of a hydrogen-transporting pipe network, so as to solve the problem of non-stationarity; in the constructed time sequence prediction model, an embedding mechanism for classifying and encoding variable characteristics is designed, so that variable information can be input into the model with minimum loss, and the model can effectively learn information such as position, time, sequence relation and the like from variables; extracting time variable characteristics and dynamic variable characteristics, embedding time-related information into the dynamic variable characteristics, and then inputting the time-related information into a dynamic characteristic encoder and a time sequence characteristic encoder, wherein nonlinear information of the dynamic variable characteristics and the time sequence dynamic characteristics at the depth extraction position is extracted; the method comprises the steps of designing a transcoder serving as a transition layer, receiving output characteristic information from a dynamic characteristic encoder and a time sequence characteristic encoder, and fusing all characteristic information through statistical transformation to improve correlation dependence among variables so as to obtain better predictability; and finally integrating information by a decoder and realizing prediction and anomaly detection.
The method for detecting the abnormality of the monitoring data of the hydrogen transportation pipe network, as shown in fig. 1, comprises the following steps:
acquiring hydrogen pipe network monitoring data of a current set time step, and extracting time variable sequence data and dynamic variable sequence data of the hydrogen pipe network monitoring data;
inputting the time variable sequence data and the dynamic variable sequence data into a time sequence prediction model, and extracting time feature embedding and dynamic feature embedding through a time feature embedding layer and a dynamic feature embedding layer; then encoding the time characteristic embedding and the dynamic characteristic embedding respectively through a time sequence encoder and a dynamic encoder, inputting the encoded characteristic embedding into a transcoder for fusion, and outputting a fused variable matrix; finally, the variable matrixes after dynamic feature embedding, time feature embedding after encoding and fusion are input to a decoder for decoding, and then predicted sequence data of the next time step is output through a full connection layer;
and comparing the difference value between the predicted value and the actual observed value of the next time step with a set threshold value, and judging whether the actual observed value of the monitoring data of the hydrogen conveying pipe network is abnormal data or not.
In this embodiment, as shown in fig. 1, first, the hydrogen pipe network monitoring data of the current set time step is obtained, the data is used as the original data, and then the time series prediction is performed based on the obtained original data to predict the hydrogen pipe network monitoring data of the next time step. Unlike recurrent neural network RNNs, the attention mechanism requires global information in making time series predictions, including dynamic variables (e.g., flow, pressure, temperature) and time variables (e.g., year, month, week, day) in the monitored data. Without a good exploitation of these variables, the attention mechanism would not be able to capture accurate information, resulting in a reduced predictive power. Therefore, on the basis of the obtained original data, the time variable sequence data and the dynamic variable sequence data of the hydrogen transportation pipe network monitoring data are extracted.
Then, the time variable sequence data and the dynamic variable sequence data (which can be simply called time variable and dynamic variable) are input into a time sequence prediction model, and hydrogen transportation pipe network monitoring data of the next time step is predicted. The time sequence prediction model constructed by the embodiment comprises a time characteristic embedding layer, a dynamic characteristic embedding layer, a time sequence encoder, a dynamic encoder, a transcoder and a decoder, and the time sequence prediction model is described in more detail by the following matters.
(1) An embedding layer: temporal feature embedding layer and dynamic feature embedding layer
The time variable sequence data and the dynamic variable sequence data are subjected to time feature embedding and dynamic feature embedding (also called time variable features and dynamic variable features) through a time feature embedding layer and a dynamic feature embedding layer.
The time-variant sequence information (i.e., the time-variant sequence data) is a kind of smooth sequence information, and plays a role in extracting non-smooth dynamic variable sequence information. In the time feature embedding layer, firstly extracting time variable features (namely time variable features), then carrying out standardization processing on the extracted time variable features, and normalizing the extracted time variable features to be between-0.5 and 0.5, namely, the firstTime variant feature->Value of->Normalized to->The stationarity of the data can be enhanced by a normalization process, which has the formula: />;/>The method comprises the steps of carrying out a first treatment on the surface of the Wherein,representation ofnAverage value of the normalized time variable characteristic, +.>Indicate->And (5) normalizing the processed time variable characteristics.
And then the output time characteristics are embedded through linear transformation into the input dimension of the model.
The structure of the dynamic feature embedding layer is shown in fig. 2, and the dynamic feature embedding serving as the model input is obtained through accumulation time feature embedding, position embedding and dynamic variable embedding.
In the dynamic feature embedding layer, after the time feature embedding is extracted through the method, in consideration of the fact that the uniqueness and the independence of each data on the position are required to be guaranteed, the position independence can ensure that the data are accurately input into a model without ambiguity, and therefore the position embedding is carried out to save the context information. Let the extracted feature dimension beThe formula for performing the position embedding is: />,/>,/>The method comprises the steps of carrying out a first treatment on the surface of the Wherein (1)>Dynamic variable sequence representing input +.>The length of (a), i.e., the number of dynamic variables; />Representing the input dimensions of the model.
In addition, the actual dynamic data is sufficiently processed and feature selected to obtain more useful information for input into the model. For this purpose, the present embodiment proposes an embedding layer (embedding layer) based on a Gated Residual Network (GRN). The GRN has a good feature selection function, and has a better effect compared with the existing convolutional neural network CNN and long-term memory network LSTM. GR (glass fibre reinforced plastics)The GRN uses a component gating layer based on a Gated Linear Unit (GLU) to provide flexibility to suppress any part of the architecture that is not needed for a given dataset. GRN receives dynamic variables of main inputaWhile the GLU allows GRN to input to the originalaAnd carrying out contribution degree analysis. Further, the GLU layer may also be skipped entirely as desired, as the GLU output may all be near 0 to suppress non-linear contributions. The input dynamic variable is processed through GRN, and the embedding of the dynamic variable is obtained, wherein the embedding of the dynamic variable is shown as the following formula:
wherein,tanh(-) istanhThe function is activated and the function is activated,、/>representing weights and biases ∈>Representing a dot product calculation->(-) represents->Activating function->The input dimensions of the model are represented,ELU(-) isELUActivating function->Representing the input of the function, without specific meaning, here +.>=
The embedded layer accumulates the embedded values of time variable, position and dynamic variable to formFeature embedding of dimensions, obtaining feature embedding sequence as model input +.>
(2) Timing encoder and dynamic encoder
The extracted temporal feature embedding and dynamic feature embedding are encoded by a temporal encoder and a dynamic encoder, respectively. In the coding process, an Attention mechanism for checking the non-stationarity of the detection data of the hydrogen-conveying pipe network is adopted.
As shown in fig. 3, the dynamic encoder processes long sequence dynamic variable inputs for extracting the correlation of dynamic feature variables, temporal feature variables, internal and external in the sequence. The dynamic encoder comprises a non-stationarity examination Attention layer (namely an Attention layer), a one-dimensional convolution layer, a maximum pooling layer and a regularization layer which are connected in sequence. Dynamic feature embedding sequence for dynamic feature embedding layer outputThe method is input into a dynamic encoder, a non-stationarity examination attention layer performs non-stationarity examination and information correlation extraction on the sequence, evaluates the importance of each piece of information, analyzes reasons caused by different change points, and outputs a weight matrix (also called as a sequence). The Attention layer greatly adjusts the input time dimension and the dynamic dimension, outputs comprehensive indexes containing various information, and increases the connection of complex rules to a certain extent.
Attention layer pairAfter non-stationarity test of the sequence, the sequence is concentrated and the most concentrated by one-dimensional convolutionThe pooling operation extracts important characteristics of Attention information of the Attention layer, and can ensure validity and practicability of the important information. And then outputting the encoded dynamic characteristic embedding through a regularization layer (namely Add and Norm), wherein the formula is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein,SAthe sequence after attention by the non-stationarity test is shown.
A dynamic Encoder (Encoder) performs an encoding operation on all known variables, allowing the model to obtain a global view of the features.
The non-stationary check attention layer described above employs an improved self-attention mechanism. The Self-Attention mechanism is defined according to Query vectors, key Key vectors and Value vectors, namely, three tuples are used as input, the input is generally obtained by linear transformation, and then dot product operation is carried out:completion of->,/>,/>dRepresenting dimensions->、/>、/>The lengths of the Query vector, the Key vector and the Value vector are respectively represented, and the vectors are in a matrix form. In the present embodiment, the input of SA (smoothness attribute, non-smoothness verification Attention layer) is defined asXWhile Q, K, V vector is composed ofXMultiplying the weight matrix with different weight matrix to obtain linear change,namely: /> /> />Wherein->Representing a weight matrix. Through the arrangement, the model is used as a relatively independent structure, and the construction of the model is not affected.
The non-stationarity examination attention mechanism is utilized to carry out stationarity examination and information correlation extraction, and the formula is as follows:the method comprises the steps of carrying out a first treatment on the surface of the Wherein, superscriptjFeature dimension for indexing matrixj=1, …,JThe method comprises the steps of carrying out a first treatment on the surface of the Subscript ofpIndicating the target position, provided in commonPTarget length of thenp=1,…,P;/>(-) represents->Activating a function; />Representing the target positionpCalculating weights at the location; q, K, V represents a query matrix, a key matrix, a value matrix; />Representing a query matrixQAt the target positionpFeature dimension, superscript, of a placejFor indexing in target positionspUpper part of the cylinderQCharacteristic dimension of the matrix; />Representing a key matrixKAt the target positionpFeature dimension, superscript, of a placejFor indexingAt the target positionpUpper part of the cylinderKCharacteristic dimension of the matrix; />Representing the target positionpUpper firstRThe weights of the individual vectors.SACan be regarded as havingJMulti-head attention operation performed by individual head, each feature calculatedSAValue addition, attention as the current target position +.>
The above-described attention mechanism is a linear transformation of a matrix that can grasp the relationship between the raw data and the global information. The nonstationary information can not lose the information of the nonstationary information along with the normalization of the data, and the attribute can detect the nonstationary information one by one and keep the nonstationary information, and then interact with the global information. By the method, the acceptance degree of the model on complex information is improved, and stable data transmission is ensured. In addition, the self-attention dot-product operation is eliminated, and the calculation time is quickened.
The timing encoder, as shown in fig. 3, includes a Long Short-Term Memory network layer LSTM (Long Short-Term Memory), a summation and normalization layer (i.e., regularization layer), and can increase the periodic relation dependence through separate timing variable encoding. The time-dependent relationship has a positive effect on real-life traffic prediction, and after dynamic feature embedding is encoded, the individual encoded time features are embedded to provide the model with the original time-dependent relationship. The time relationship represents the periodicity and regularity of the data, and in the unknown case, the interpretability can be provided for the dynamic variable, so the time characteristic is independently encoded by the time sequence encoder, and the dependence of the periodicity relationship of the data is enhanced.
Non-stationarity can be reduced by normalization operations in the temporal feature embedding layer, which is also effective in the temporal dimension. The characteristic of the time feature itself supports the relation of the model concerned time and dynamic variable, and in order to achieve the purpose, a time sequence encoder sample-encoder is designed for encoding the time feature embedding. Time specialThe feature embedding layer effectively combs various time variables to generate a time feature embedding setSome variables are included in the collection such as month, hour, season, etc. Encoding the time characteristic variable, wherein the specific operation is as follows: the LSTM is adopted to code the time characteristic embedding, and the formula is as follows: />The method comprises the steps of carrying out a first treatment on the surface of the LSTM is adopted in modeling of long sequences, and stability of the sequences can be promoted to a certain extent by mulberry.
(3) Transcoding device
The internal relationship of the independent temporal feature codes and the combined dynamic feature codes and the links between them need to be further determined. Feature information fusion is the key to successful prediction, so that effective information needs to be quickly fused together without distortion while various variable information is reserved for model fitting and prediction.
The Transcoder (namely the Transcoder) plays a role of an information fusion transfer station, and realizes the fusion of encoders and the distribution of decoders, and comprises a self-attention layer, a non-stationarity test attention layer, a one-dimensional convolution layer and a regularization layer. Output from a timing encoderAnd output from dynamic encoder +.>I.e. the encoded temporal feature embedding and dynamic feature embedding are input into the transcoder,/-, in the decoder>Output by checking the attention layer with non-stationarity Wherein (1)>Is a homodimensional weight matrix forProviding a linear transformation can also be seen as a decoding operation of the temporal features. />And->Feature fusion is carried out through a self-attention layer self-attention, a combined variable matrix is output, and then the variable matrix is output through a one-dimensional convolution layer, wherein the formula is as follows: />The method comprises the steps of carrying out a first treatment on the surface of the Wherein,S(.) represents a self-attention operation. The +.>Will be part of the final decoder input.
(4) Decoder
The Decoder is used for merging each information and outputting a long sequence, and the long sequence is the predicted sequence required by the task. The decoder comprises a self-attention layer, a non-stationarity examination attention layer and a regularization layer, wherein a dynamic characteristic embedded (namely encoder input data) sequence carries out stationarity examination and information correlation extraction through the non-stationarity examination attention layer and the regularization layer, and outputs a first sequence; the first sequence and the output sequence of the transcoder are input into a first self-attention layer together for fusion, and a second sequence is output through the first self-attention layer and the regularization layer; the second sequence and the coded sequence output by the time sequence coder are input into a second self-attention layer for fusion, and a third sequence is output through the second self-attention layer and the regularization layer, wherein the third sequence is the predicted sequence required by the task.
As shown in fig. 4, the decoder receives the dynamic feature embedded sequence data processed by the dynamic feature embedding layer, wherein the data comprises historical data before a prediction time point, and plays a role in prediction; meanwhile, the output sequence of the transcoder is also input into the decoder as history information, and is decoded by an attention mechanism; the coded time characteristic embedded sequence output by the time sequence coder is used as a prediction result of the known data duration influence model, and the historical time point and the variable information corresponding to the prediction time point are input into the decoder together. Preferably, scalar 0 is set as a placeholder at the predicted position that was initially entered.
The internal structure of Decoder is formed from three attention layers, in which the original data is undergone the process of embedding layer, and then processed into the matrix formed from connecting the preset historical sequence number and placeholder of predicted sequence number as a group of Decoder input sequence data
Through the process ofSADecoding is carried out, and the formula is as follows:
then, the output of the transcoderThrough the first self-attention layer and +.>The fusion is carried out, and the formula is as follows:
output of time sequence encoderAnd->The fusion is carried out through the second self-attention layer, and the formula is as follows:
finally, through a fully connected layer, the decoder output will be converted into readable sequence data, which will be the final output sequence of the prediction task. The MSE loss function is selected when predicting the target sequence, and the loss propagates from the output of the decoder back to the entire model.
And finally, comparing the difference value between the predicted value and the actual observed value of the next time step with a set threshold value, and judging whether the actual observed value of the monitoring data of the hydrogen transportation pipe network is abnormal data or not.
Specifically, a time sequence prediction model is used for predicting a predicted value of the next time step, and a prediction error between an actual observed value and the predicted value is calculated. The abnormal data may cause a large prediction error, and the abnormal data is identified by a set threshold value according to the prediction error. That is, the prediction error is compared with the set threshold, and if the prediction error exceeds the set threshold, the monitoring data is marked as abnormal data, thereby realizing the function of detecting abnormality of the time series data.
Further, the actual observed value and the corresponding predicted value of each time step are compared, and a prediction error between the actual observed value and the predicted value is calculated, and various error metrics such as Mean Square Error (MSE), mean Absolute Error (MAE), etc. may be used. Carrying out statistical analysis on the prediction errors, and calculating average errors, standard deviations and the like of each time step; the threshold may be set empirically or using statistical analysis methods (e.g., 3 standard deviation principles).
According to the method for detecting the abnormality of the monitoring data of the hydrogen transportation pipe network, the Attention mechanism (Smooth Attention) for detecting the non-stationary sequence is adopted, so that modeling of a model on mutation point information is effectively improved, and the non-stationary problem can be solved; the time prediction model fully plays the advantages of a transducer, solves the problems of non-stationary sequence prediction and anomaly detection, improves accuracy by deep fusion of variable information, and reduces prediction errors by 10% compared with the average of the existing model.
Example two
The embodiment provides a hydrogen pipe network monitoring data anomaly detection system, which comprises:
the data acquisition module is used for acquiring the hydrogen transportation pipe network monitoring data of the current set time step and extracting time variable sequence data and dynamic variable sequence data of the hydrogen transportation pipe network monitoring data;
the sequence data prediction module is used for inputting the time variable sequence data and the dynamic variable sequence data into the time sequence prediction model, and extracting time feature embedding and dynamic feature embedding through the time feature embedding layer and the dynamic feature embedding layer; then encoding the time characteristic embedding and the dynamic characteristic embedding respectively through a time sequence encoder and a dynamic encoder, inputting the encoded characteristic embedding into a transcoder for fusion, and outputting a fused variable matrix; finally, the variable matrixes after dynamic feature embedding, time feature embedding after encoding and fusion are input to a decoder for decoding, and then predicted sequence data of the next time step is output through a full connection layer;
the abnormality detection module is used for comparing the difference value between the predicted value and the actual observed value of the next time step with a set threshold value and judging whether the actual observed value of the hydrogen transportation pipe network monitoring data is abnormal data or not.
The steps involved in the second embodiment correspond to those of the first embodiment of the method, and the detailed description of the second embodiment can be found in the related description section of the first embodiment.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented by general-purpose computer means, alternatively they may be implemented by program code executable by computing means, whereby they may be stored in storage means for execution by computing means, or they may be made into individual integrated circuit modules separately, or a plurality of modules or steps in them may be made into a single integrated circuit module. The present invention is not limited to any specific combination of hardware and software.
While the present invention has been described in connection with the preferred embodiments, it should be understood that the present invention is not limited to the specific embodiments, but is set forth in the following claims.

Claims (10)

1. The method for detecting the abnormality of the monitoring data of the hydrogen transmission pipe network is characterized by comprising the following steps of:
acquiring hydrogen pipe network monitoring data of a current set time step, and extracting time variable sequence data and dynamic variable sequence data of the hydrogen pipe network monitoring data;
inputting the time variable sequence data and the dynamic variable sequence data into a time sequence prediction model, and extracting time feature embedding and dynamic feature embedding through a time feature embedding layer and a dynamic feature embedding layer; then encoding the time characteristic embedding and the dynamic characteristic embedding respectively through a time sequence encoder and a dynamic encoder, inputting the encoded characteristic embedding into a transcoder for fusion, and outputting a fused variable matrix; finally, the variable matrixes after dynamic feature embedding, time feature embedding after encoding and fusion are input to a decoder for decoding, and then predicted sequence data of the next time step is output through a full connection layer;
and comparing the difference value between the predicted value and the actual observed value of the next time step with a set threshold value, and judging whether the actual observed value of the monitoring data of the hydrogen conveying pipe network is abnormal data or not.
2. The method for detecting abnormality of monitoring data of hydrogen-transporting pipe network according to claim 1, wherein the time variable sequence data is inputted into a time feature embedding layer, and the time feature embedding is extracted, comprising:
extracting time variable characteristics based on the time variable;
performing standardization processing on the extracted time variable characteristics;
and converting the time variable characteristics after the normalization processing into the input dimension of the model through linear transformation, and embedding the output time characteristics.
3. The method for detecting the abnormality of the monitoring data of the hydrogen transportation pipe network according to claim 1, wherein the time variable sequence data and the dynamic variable sequence data are input into a dynamic characteristic embedding layer, the time characteristic embedding, the position embedding and the dynamic variable embedding are extracted, and the time characteristic embedding, the position embedding and the dynamic variable embedding are accumulated to obtain the dynamic characteristic embedding.
4. The method for detecting the abnormality of the monitoring data of the hydrogen conveying pipe network according to claim 1, wherein the dynamic encoder comprises a non-stationarity test attention layer, a one-dimensional convolution layer, a maximum pooling layer and a regularization layer which are connected in sequence;
the dynamic characteristic embedding sequence output by the dynamic characteristic embedding layer is input into a dynamic encoder, the non-stationarity test attention layer carries out stationarity test and information correlation extraction on the input sequence, evaluates the importance of each piece of information and outputs a weight matrix;
the weight matrix is sequentially input into a one-dimensional convolution layer and a maximum pooling layer, important features of attention information of a non-stationarity test attention layer are extracted, and then encoded dynamic feature embedding is output through a regularization layer.
5. The method for detecting the abnormality of the monitoring data of the hydrogen transportation pipe network according to claim 1, wherein the time sequence encoder comprises a long-short-period memory network layer LSTM and a regularization layer;
the time characteristic embedding sequence output by the time characteristic embedding layer is input into a time sequence encoder, the long-short-term memory network layer LSTM encodes the time characteristic embedding, and then the regularized layer outputs the encoded time characteristic embedding.
6. The method for detecting abnormality of monitoring data of hydrogen transportation pipe network according to claim 1, wherein the transcoder comprises a self-attention layer, a non-stationarity test attention layer, a one-dimensional convolution layer and a regularization layer;
the encoded time feature embedding and dynamic feature embedding are input into a transcoder, feature fusion is carried out through a self-attention layer, and a variable matrix after combination is output through a one-dimensional convolution layer and a regularization layer.
7. The hydrogen pipe network monitoring data anomaly detection method of claim 1, wherein the decoder comprises a first self-attention layer, a second self-attention layer, a non-stationarity check attention layer and a regularization layer;
the dynamic characteristic embedded sequence carries out stationarity test and information correlation extraction through a non-stationarity test attention layer and a regularization layer, and outputs a first sequence; the first sequence and the output sequence of the transcoder are input into a first self-attention layer together for fusion, and a second sequence is output through the first self-attention layer and the regularization layer; the second sequence and the coded sequence output by the time sequence coder are input into a second self-attention layer for fusion, and a third sequence is output through the second self-attention layer and the regularization layer, wherein the third sequence is predicted sequence data of the next time step.
8. The method for detecting abnormality of monitoring data of hydrogen pipe network according to claim 1, wherein the difference between the predicted value and the actual observed value of the next time step is compared with a set threshold, and if the error exceeds the set threshold, the actual observed value of the monitoring data of the hydrogen pipe network at the current time is judged to be abnormal data.
9. The utility model provides a hydrogen pipe network monitoring data anomaly detection system which characterized in that includes:
the data acquisition module is used for acquiring the hydrogen transportation pipe network monitoring data of the current set time step and extracting time variable sequence data and dynamic variable sequence data of the hydrogen transportation pipe network monitoring data;
the sequence data prediction module is used for inputting the time variable sequence data and the dynamic variable sequence data into the time sequence prediction model, and extracting time feature embedding and dynamic feature embedding through the time feature embedding layer and the dynamic feature embedding layer; then encoding the time characteristic embedding and the dynamic characteristic embedding respectively through a time sequence encoder and a dynamic encoder, inputting the encoded characteristic embedding into a transcoder for fusion, and outputting a fused variable matrix; finally, the variable matrixes after dynamic feature embedding, time feature embedding after encoding and fusion are input to a decoder for decoding, and then predicted sequence data of the next time step is output through a full connection layer;
the abnormality detection module is used for comparing the difference value between the predicted value and the actual observed value of the next time step with a set threshold value and judging whether the actual observed value of the hydrogen transportation pipe network monitoring data is abnormal data or not.
10. The abnormality detection system for monitoring data of a hydrogen pipe network according to claim 9, wherein a difference between a predicted value and an actual observed value of a next time step is compared with a set threshold, and if the difference exceeds the set threshold, the actual observed value of the monitoring data of the hydrogen pipe network at the current time is judged to be abnormal data.
CN202311450870.4A 2023-11-03 2023-11-03 Abnormality detection method and system for monitoring data of hydrogen transportation pipe network Active CN117190078B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311450870.4A CN117190078B (en) 2023-11-03 2023-11-03 Abnormality detection method and system for monitoring data of hydrogen transportation pipe network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311450870.4A CN117190078B (en) 2023-11-03 2023-11-03 Abnormality detection method and system for monitoring data of hydrogen transportation pipe network

Publications (2)

Publication Number Publication Date
CN117190078A true CN117190078A (en) 2023-12-08
CN117190078B CN117190078B (en) 2024-02-09

Family

ID=88985377

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311450870.4A Active CN117190078B (en) 2023-11-03 2023-11-03 Abnormality detection method and system for monitoring data of hydrogen transportation pipe network

Country Status (1)

Country Link
CN (1) CN117190078B (en)

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111899224A (en) * 2020-06-30 2020-11-06 烟台市计量所 Nuclear power pipeline defect detection system based on deep learning attention mechanism
CN113326981A (en) * 2021-05-26 2021-08-31 北京交通大学 Atmospheric environment pollutant prediction model based on dynamic space-time attention mechanism
CN113944888A (en) * 2021-11-03 2022-01-18 北京软通智慧科技有限公司 Gas pipeline leakage detection method, device, equipment and storage medium
WO2022160902A1 (en) * 2021-01-28 2022-08-04 广西大学 Anomaly detection method for large-scale multivariate time series data in cloud environment
CN115654381A (en) * 2022-10-24 2023-01-31 电子科技大学 Water supply pipeline leakage detection method based on graph neural network
CN116415197A (en) * 2023-03-13 2023-07-11 海南大学 Underground pipe gallery abnormality detection network and method based on attention mechanism
CN116628621A (en) * 2023-04-14 2023-08-22 长沙理工大学 Method, device, equipment and storage medium for diagnosing abnormal event of multi-element time sequence data
CN116753471A (en) * 2023-06-15 2023-09-15 重庆中法环保研发中心有限公司 Water supply pipeline leakage multi-domain feature extraction and fusion identification method
CN116772122A (en) * 2023-06-20 2023-09-19 重庆师范大学 Natural gas pipeline leakage fault diagnosis method, system, equipment and medium
CN116796272A (en) * 2023-06-21 2023-09-22 复旦大学 Method for detecting multivariate time sequence abnormality based on transducer
CN116842323A (en) * 2023-07-20 2023-10-03 湖南建工集团有限公司 Abnormal detection method for operation data of water supply pipeline

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111899224A (en) * 2020-06-30 2020-11-06 烟台市计量所 Nuclear power pipeline defect detection system based on deep learning attention mechanism
WO2022160902A1 (en) * 2021-01-28 2022-08-04 广西大学 Anomaly detection method for large-scale multivariate time series data in cloud environment
CN113326981A (en) * 2021-05-26 2021-08-31 北京交通大学 Atmospheric environment pollutant prediction model based on dynamic space-time attention mechanism
CN113944888A (en) * 2021-11-03 2022-01-18 北京软通智慧科技有限公司 Gas pipeline leakage detection method, device, equipment and storage medium
CN115654381A (en) * 2022-10-24 2023-01-31 电子科技大学 Water supply pipeline leakage detection method based on graph neural network
CN116415197A (en) * 2023-03-13 2023-07-11 海南大学 Underground pipe gallery abnormality detection network and method based on attention mechanism
CN116628621A (en) * 2023-04-14 2023-08-22 长沙理工大学 Method, device, equipment and storage medium for diagnosing abnormal event of multi-element time sequence data
CN116753471A (en) * 2023-06-15 2023-09-15 重庆中法环保研发中心有限公司 Water supply pipeline leakage multi-domain feature extraction and fusion identification method
CN116772122A (en) * 2023-06-20 2023-09-19 重庆师范大学 Natural gas pipeline leakage fault diagnosis method, system, equipment and medium
CN116796272A (en) * 2023-06-21 2023-09-22 复旦大学 Method for detecting multivariate time sequence abnormality based on transducer
CN116842323A (en) * 2023-07-20 2023-10-03 湖南建工集团有限公司 Abnormal detection method for operation data of water supply pipeline

Also Published As

Publication number Publication date
CN117190078B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN111242377A (en) Short-term wind speed prediction method integrating deep learning and data denoising
CN114529051A (en) Long-term power load prediction method based on hierarchical residual self-attention neural network
CN115018209B (en) Long-term prediction method and equipment for operation error of digital electric energy metering system
CN113128113A (en) Poor information building load prediction method based on deep learning and transfer learning
CN112330951A (en) Method for realizing road network traffic data restoration based on generation of countermeasure network
CN114817773A (en) Time sequence prediction system and method based on multi-stage decomposition and fusion
CN114781744A (en) Deep learning multi-step long radiance prediction method based on codec
CN113988449A (en) Wind power prediction method based on Transformer model
CN110956309A (en) Flow activity prediction method based on CRF and LSTM
CN112735541A (en) Sewage treatment water quality prediction method based on simple circulation unit neural network
CN116502164A (en) Multidimensional time series data anomaly detection method, device and medium based on countermeasure training and frequency domain improvement self-attention mechanism
CN115409258A (en) Hybrid deep learning short-term irradiance prediction method
CN114841072A (en) Differential fusion Transformer-based time sequence prediction method
CN116151459A (en) Power grid flood prevention risk probability prediction method and system based on improved Transformer
CN116187498A (en) Photovoltaic power generation power prediction method based on frequency domain decomposition
CN117435997B (en) Elevator early warning and on-demand maintenance method based on transducer and time sequence compression mechanism
CN116743182B (en) Lossless data compression method
CN117190078B (en) Abnormality detection method and system for monitoring data of hydrogen transportation pipe network
CN115713044B (en) Method and device for analyzing residual life of electromechanical equipment under multi-condition switching
CN117096867A (en) Short-term power load prediction method, device, system and storage medium
CN115758273A (en) Method, device, equipment and medium for detecting time sequence data abnormity
Wang et al. Grid load forecasting based on dual attention BiGRU and DILATE loss function
CN114943368A (en) Sea surface wind speed prediction method based on Transformer
CN116128082A (en) Highway traffic flow prediction method and electronic equipment
CN113377907A (en) End-to-end task type dialogue system based on memory mask self-attention network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant