Gas pipe network multivariable time sequence abnormity diagnosis method based on inverted converter

The inverted converter model is used to predict multi-variable time series data of the gas pipeline network, which solves the problems of difficult mapping and insufficient model performance in the existing technology, achieves better prediction accuracy and anomaly detection capabilities, and reduces the need to rely on experience. need.

CN118747337APending Publication Date: 2024-10-08CHANGZHOU WEIGE ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410691218.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2024-10-08

AI Technical Summary

Technical Problem

The existing technology is difficult to accurately map parameter space and behavior space in multi-variable time series analysis of gas pipeline networks, resulting in insufficient model performance and generalization capabilities. It also lacks a universal renormalization strategy, relies on experience and inspiration, and has a low level of automation. Poor scalability.

Method used

A multi-variable time series anomaly diagnosis method based on inverted converters is used to predict historical data by training the inverted converter model, generate future sequences, and compare with real-time data to determine the status of the pipeline network. The model framework includes embedded modules and converters The module, attention module and prediction module use the self-attention mechanism and non-linear connection module to capture multi-dimensional associations and achieve prediction.

Benefits of technology

It improves the prediction accuracy of multi-variable time series data in gas pipeline networks, enhances anomaly detection capabilities, improves system understanding, reduces model complexity and the need to rely on experience, and improves the level of automation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118747337A_ABST
    Figure CN118747337A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of energy transmission and distribution, in particular to a gas pipe network multivariable time series anomaly diagnosis method based on an inverted converter, which comprises the following steps: S1, collecting historical multivariable time series data of a pipe network to be diagnosed and constructing training data; s2, training by adopting the training data to obtain an inverted converter model; s3, predicting the historical multivariable time series data based on the inverted converter model to generate a future sequence; and S4, collecting real-time multivariable time sequence data of the to-be-diagnosed pipe network, and comparing the real-time multivariable time sequence data with the future sequence to determine the state of the to-be-diagnosed pipe network. The inversion converter model depends on conjoint analysis of embedded marks, can automatically capture correlation among multiple dimensions in multivariable time series data, further makes corresponding prediction, achieves good prediction accuracy, and is beneficial to improvement of anomaly detection and system understanding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of energy transmission and distribution, and in particular to a gas pipeline network multivariate time series anomaly diagnosis method based on an inversion converter. Background Art

[0002] A multivariate time series is a collection of time-ordered data points, where each data point consists of multiple variables or dimensions. In the context of complex systems such as gas pipeline networks, multivariate time series plays an important role in understanding and analyzing the behavior of systems over time. These systems generate a large amount of data, including measurements such as pressure, flow, temperature, acoustic signals, etc., which are recorded at different locations in the pipeline.

[0003] The parameter space of a gas network contains all the parameters that define the characteristics and behavior of the system. These parameters include, but are not limited to: pipe diameter, pipe material, operating pressure, flow rate, compressor and valve parameters, environmental factors (such as ambient temperature, humidity, soil properties), and scheduled maintenance and inspection schedules. On the other hand, the behavioral space represents the observable behaviors or variables from the system, such as: pressure changes over time, flow fluctuations, temperature changes, acoustic signals indicating potential leaks or anomalies, vibration patterns reflecting mechanical stress, hydrocarbon concentration levels, and soil moisture or groundwater level readings.

[0004] One of the key issues in multivariate time series analysis is the accurate mapping of parameter space to behavior space. This mapping is important for understanding how changes in system parameters (such as pipeline network leakage, aging of regulator components) affect observed behaviors (such as pressure changes, flow changes). The difficulty in mapping between these spaces is that the relationship between parameters and behaviors is often nonlinear and complex, which makes it challenging to model using traditional linear methods.

[0005] When analyzing multivariate time series data of gas pipeline networks, typical time series modeling techniques include: autoregressive integrated moving average (ARIMA), long short-term memory (LSTM) network, and transformer-based models. The high dimensionality of multidimensional time series data increases the complexity of the mapping and reconstruction task. Existing technologies are difficult to be directly applied to the processing of high-dimensional data, and the effect is unsatisfactory. For example, transformer-based models fuse multiple variables in the embedding of the token at each time step, and these variables are usually accompanied by temporal misalignment and different physical scales, which will cause the model to fail to learn variable-centric representations and lead to meaningless attention maps. In a typical transformer-based model, the layer normalization module normalizes the multivariate representations of the same timestamp and fuses the variables with each other. Once the collected time points do not represent the same event, this operation will introduce interaction noise between non-causal processes or delayed processes, reducing the performance of the model. Therefore, transformer-based models are weakened in capturing sequence representations and depicting multivariate correlations, further limiting their performance and generalization capabilities on multivariate time series data.

[0006] On the other hand, there are often implicit interdependencies and correlations between the variables of multivariate time series data. Feature selection and dimensionality reduction operations are often introduced in related work. Relevant features are extracted using techniques such as principal component analysis (PCA), mutual information feature selection, and dimensionality reduction methods to reduce the computational complexity of modeling. However, when researchers try to use renormalization group theory to analyze specific systems, it is not as smooth as expected. For example, developers need to design a suitable renormalization strategy for a specific system, but there is actually no set of universal normative principles to guide the design of this strategy.

[0007] These methods require complex modeling techniques to effectively capture features, are highly dependent on the experience and inspiration of the main developers, have a low level of automation, and have poor scalability. Summary of the invention

[0008] In view of the above problems existing in the prior art, a method for diagnosing abnormalities in multivariate time series of gas pipeline networks based on an inversion converter is provided.

[0009] The specific technical solutions are as follows:

[0010] A gas pipeline network multivariate time series anomaly diagnosis method based on an inversion converter, comprising:

[0011] Step S1: Collect historical multivariate time series data of the pipe network to be diagnosed and construct training data;

[0012] Step S2: using the training data to train an inverted transformer model;

[0013] Step S3: forecasting the historical multivariate time series data based on the inverted converter model to generate a future sequence;

[0014] Step S4: collecting real-time multivariate time series data for the pipe network to be diagnosed, and comparing the real-time multivariate time series data with the future sequence to determine the state of the pipe network to be diagnosed.

[0015] On the other hand, the model framework of the inverted converter model includes:

[0016] An embedding module, wherein the embedding module receives the input historical multivariate time series data and performs tag embedding on the historical multivariate time series data to form an embedded tag;

[0017] The embedded mark is used to mark the attributes of each group of the variables in the historical multivariate time series data;

[0018] a converter module, the converter module being connected to the embedding module, the converter module processing the embedded tags to determine the mutual relationship between a plurality of the embedded tags and constructing a comprehensive representation result;

[0019] A prediction module is connected to the converter module, and the prediction module projects the comprehensive representation result using a multi-layer perceptron to obtain the future sequence.

[0020] On the other hand, the model framework of the inverted transformer model further includes an attention module, and the attention module includes:

[0021] A plurality of linear projection modules connected in sequence, each of which performs feature extraction on the input historical multivariate time series data to obtain a trainable weight matrix;

[0022] The trainable weight matrix includes a query vector, a key vector, and a value vector corresponding to each set of variables;

[0023] a scoring matrix module, the scoring matrix module being connected to the linear projection module, the scoring matrix module comparing the query vector and the key vector to determine a correlation score between each pair of the query vector and the key vector;

[0024] A weight output module, wherein the weight output module generates the attention weight according to the relevance score;

[0025] The converter module also processes the variables according to the attention weights.

[0026] In another aspect, the converter module comprises:

[0027] A shared feedforward network, wherein the shared feedforward network performs multiple nonlinear transformations and feature extractions on the input historical multivariate time series data to generate a time series representation of each tag;

[0028] A non-linear connection module is used to generate the future sequence according to the time series representation and the attention weight.

[0029] On the other hand, an activation function module is further provided at the rear stage of the nonlinear connection module, and the activation function module performs nonlinear mapping processing on the output result of the nonlinear connection module.

[0030] On the other hand, between the embedded module and the converter module is also provided:

[0031] A normalization layer, wherein the normalization layer performs normalization processing on each of the embedded markers respectively so that the variable corresponding to the embedded marker conforms to a Gaussian distribution.

[0032] On the other hand, the step S1 comprises:

[0033] Step S11: collecting the historical multivariate time series data of the pipe network to be diagnosed;

[0034] Step S12: preprocessing the historical multivariate time series data to obtain preprocessed data;

[0035] Step S13: Generate the training data according to the preprocessed data.

[0036] On the other hand, the step S2 comprises:

[0037] Step S21: randomly extracting a predetermined number of variables from the training data as training input data;

[0038] Step S22: training the inverted transformer model using the training input data;

[0039] Step S23: Return to step S21 and output the inverted converter model after the iteration condition is met.

[0040] The above technical solution has the following advantages or beneficial effects:

[0041] In view of the problem that the modeling methods in the prior art are relatively complex and inefficient when analyzing the pipeline network, this solution introduces a prediction solution based on the inverted transformer model. The inverted transformer model relies on the joint analysis of embedded tags, and can automatically capture the association between multiple dimensions in multivariate time series data, and then make corresponding predictions, achieving good prediction accuracy, which is conducive to improving anomaly detection and system understanding. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The embodiments of the present invention will be described more fully with reference to the attached drawings, which are provided for illustration and description only and are not intended to limit the scope of the present invention.

[0043] Figure 1 It is an overall schematic diagram of an embodiment of the present invention;

[0044] Figure 2 A schematic diagram of an inverted converter model in an embodiment of the present invention;

[0045] Figure 3 Schematic diagram of an attention module in an embodiment of the present invention;

[0046] Figure 4 A schematic diagram of a converter module in an embodiment of the present invention;

[0047] Figure 5 This is a schematic diagram of a nonlinear connection module in an embodiment of the present invention;

[0048] Figure 6 A schematic diagram of a normalization layer in an embodiment of the present invention;

[0049] Figure 7 This is a schematic diagram of step S1 in an embodiment of the present invention;

[0050] Figure 8 Schematic diagram of step S2 in an embodiment of the present invention. DETAILED DESCRIPTION

[0051] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0052] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.

[0053] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.

[0054] The present invention comprises:

[0055] A multivariate time series anomaly diagnosis method for gas pipeline network based on inversion converter, such as Figure 1 As shown, including:

[0056] Step S1: Collect historical multivariate time series data of the pipe network to be diagnosed and construct training data;

[0057] Step S2: using training data to train an inverted transformer model;

[0058] Step S3: forecasting historical multivariate time series data based on the inverted transformer model to generate future series;

[0059] Step S4: collecting real-time multivariate time series data for the pipe network to be diagnosed, and comparing the real-time multivariate time series data with the future sequence to determine the state of the pipe network to be diagnosed.

[0060] Specifically, in order to solve the problem that the modeling methods in the prior art are relatively complex and inefficient when analyzing the pipeline network, this solution introduces a prediction solution based on the inverted transformer model. The inverted transformer model relies on the joint analysis of embedded tags, and can automatically capture the associations between multiple dimensions in multivariate time series data, and then make corresponding predictions, achieving good prediction accuracy, which is conducive to improving anomaly detection and system understanding.

[0061] In the implementation process, the above diagnostic method is mainly set as a software embodiment in a computer device, mainly including a computer or other equivalent device, which receives input multivariate time series data through a corresponding interface, and the multivariate time series data is mainly collected by various sensors and control systems arranged in the pipe network to be diagnosed. The computer processes the collected data through the above process, and compares the future sequence with the real-time input data in an online state, thereby triggering a corresponding alarm signal or other processing.

[0062] Specifically, if Figure 2 As shown in Figure 1, the model framework of the inverted converter model mainly includes:

[0063] Embedding module 1, the embedding module 1 receives input historical multivariate time series data, and performs tag embedding on the historical multivariate time series data to form an embedded tag;

[0064] Embedding tags are used to label the attributes of each group of variables in historical multivariate time series data;

[0065] A converter module 2, the converter module 2 is connected to the embedding module 1, and the converter module 2 processes the embedded tags to determine the mutual relationship between the multiple embedded tags and construct a comprehensive representation result;

[0066] Prediction module 3, prediction module 3 is connected to converter module 2, and prediction module 3 projects the comprehensive representation result using a multi-layer perceptron to obtain a future sequence.

[0067] In order to realize the processing of historical multivariate time series data, in the inverted transformer model, label embedding processing is first performed on multiple variables in the historical multivariate time series data to annotate their attributes.

[0068] Historical multivariate time series data refers to multiple time series data containing multiple groups of different variables. The variables correspond to data of multiple dimensions of the pipeline network to be diagnosed, including pressure, flow, temperature, acoustic signal data, meteorological data, pipe diameter of the pipeline system, pipeline materials, operating pressure, flow, compressor and valve parameters, environmental factors, etc. at each measuring point, which are aligned and arranged according to the time series. Historical multivariate time series data and real-time multivariate time series data are the same type of data. The name is only used to distinguish the purpose of the data, indicating that the former is pre-collected historical data and the latter is data for online prediction. The variables correspond to the above dimensions.

[0069] Assume that the data matrix of the original input historical multivariate time series data is:

[0070]

[0071] In the formula, X is the data matrix, x N is a time series, N is the number of samples, and D is the number of dimensions.

[0072] Then, through the embedding process, it can be converted into an embedding tag

[0073]

[0074] Where the superscript is the layer index.

[0075] If each time series is processed separately, we have The tag matrix H contains N number of embedded tags with dimension D.

[0076] h0,...,h N A separate representation for each time series after embedding the vector.

[0077] Based on the above processing, each labeling result h i is a vector of length D, representing the features extracted from the corresponding time series.

[0078] The labeling result is input into the subsequent converter module 2 for processing, thereby increasing the interaction between multiple labeling results and extracting features related to the prediction process, namely:

[0079] H l+1 =TrmBlock(H l ),l=0,1,...,L-1;

[0080] In the formula, H l+1 It represents the output results of each layer in the converter module 2, and l is the layer number.

[0081] After the extraction is completed, the extracted features can be applied to each time series by linear projection to extract a comprehensive representation corresponding to the multivariate time series data:

[0082] H=X·W H +b H ;

[0083] In the formula, H is the comprehensive representation result, X is the original data matrix, and W H is the weight matrix used for linear transformation, M is the number of markers, b H is the bias vector,

[0084] Based on the above processing, the time series of each variable can be comprehensively processed, and the results corresponding to each variable can be output.

[0085] Then, the prediction module 3 uses a multi-layer perceptron to perform projection processing, and this step is expressed as:

[0086]

[0087] In the formula, To predict the sequence.

[0088] Based on the above process, it is possible to extract several variables from the historical multivariate time series data, thereby predicting the predicted sequence.

[0089] On this basis, when the model is deployed online, it can predict the changes in various variable data of the pipeline network to be diagnosed within a certain period of time in the future based on the historical multivariate time series data collected in the actual machine environment, and then compare it with the actual collected data. When the data deviates, it indicates that some faults have occurred in the pipeline network to be diagnosed, which can trigger subsequent processes such as alarms.

[0090] In one embodiment, the model framework of the inverted transformer model further includes an attention module 4, such as Figure 3 As shown, the attention module 4 includes:

[0091] A plurality of linear projection modules 41 connected in sequence, each linear projection module 41 extracts features from the input historical multivariate time series data to obtain a trainable weight matrix;

[0092] The trainable weight matrix includes a query vector, a key vector, and a value vector corresponding to each set of variables;

[0093] A scoring matrix module 42, the scoring matrix module 42 is connected to the linear projection module 41, and the scoring matrix module compares the query vector and the key vector to determine the correlation score between each pair of the query vector and the key vector;

[0094] A weight output module 43, the weight output module 43 generates attention weights according to the relevance scores;

[0095] The converter module 2 also processes the variables according to the attention weights.

[0096] Specifically, in order to realize the automatic extraction process of multiple variables that are associated in multivariate time series data, the present embodiment also introduces an attention module 4 in the inverted transformer model. The inverted self-attention mechanism of the attention module 4 is used to treat the complete time series data of a single variable as an independent process, and the future correlation can be evolved from the past correlation across the attention layer. Specifically, the following steps are included:

[0097] First, multiple linear projection modules 41 are used to extract features from the input historical multivariate time series data, thereby constructing a trainable weight matrix, including:

[0098]

[0099] Where the Q matrix includes the query vector q, which represents the information that the model is querying or seeking to understand; the K matrix includes the key vector k, which is used to calculate the correlation between the query vector and the value vector; the V matrix includes the query vector v, including the actual information related to each query; and the W Q ,W K ,W V are the trainable weight matrices for linear projection, b Q ,b K ,b V is the bias vector.

[0100] Then, in the scoring matrix module 42, the scoring matrix module compares the query vector and the key vector to determine the importance or relevance of different elements in the sequence, and then generates a relevance score between each pair of query vector and key vector for characterization.

[0101] Specifically, during the processing, the score matrix module 42 uses the Pre-Softmax score matrix to calculate the correlation between the query vector and the key vector, including using the query vector and the key vector to perform a dot product calculation and passing d K The square root of is normalized in the feature dimension, that is:

[0102]

[0103] In the formula, A i,j is the relevance score, Q is the Q matrix including the query vector q, K T is the transpose of the K matrix including the key vector k, represents the i-th query vector q, k j Denotes the j-th key vector k.

[0104] Finally, the Softmax operation is used to normalize the relevance score generated by Pre-Softmax to obtain the attention weight

[0105]

[0106] Where Softmax(A) is the normalized attention weight, and A is the relevance score.

[0107] To facilitate subsequent processing, it is also multiplied by the value matrix V to calculate the weighted representation matrix W for output:

[0108] W = Softmax(A)·V.

[0109] In one embodiment, Figure 4 As shown, the converter module 2 includes:

[0110] A shared feedforward network 21, which performs multiple nonlinear transformations and feature extractions on the input historical multivariate time series data to generate a time series representation of each tag;

[0111] The non-linear connection module 22 generates a future sequence according to the time series representation.

[0112] Specifically, in order to achieve better extraction effect, in this embodiment, a shared feedforward network 21 is introduced in the converter module 2 to encode and decode the time series data, so as to extract the time series representation of each embedded tag. On this basis, the extracted time series representation is encoded, and then the nonlinear connection module 22 uses dense nonlinear connections to decode the representation of the future sequence.

[0113] Specifically, for the converter module 2, a shared feedforward network 21 is first set up to perform multiple nonlinear transformations and feature extraction on the input historical multivariate time series data. The shared feedforward network 21 includes multiple processing layers, each of which is provided with multiple neurons. For the input multiple variable time series data, nonlinear transformation and feature extraction are performed through the connection of neurons in each layer.

[0114] Based on this setup, the same FFN architecture can be applied independently to each embedding token (regardless of the variable from which the token comes). This approach helps extract sequence representations from each token in a consistent and unified way across all variables, which can lead to performance improvements when looking back on the sequence and improve the model's generalization ability to unknown variables.

[0115] At the same time, by increasing the parameters and levels of the shared feedforward network 21, approximate representation of data of various types of variables is achieved, making it conform to the universal approximation theorem.

[0116] On this basis, each embedded labeled data is encoded through a shared feedforward network and converted into a form that can be processed by the neural network, thereby better understanding and predicting patterns and trends in time series.

[0117] After the above processing, the nonlinear connection module 22 can use dense nonlinear connections for decoding to achieve effective learning of complex relationships in multiple time series, thereby obtaining a representation of the future sequence.

[0118] As an optional implementation, after the feedforward shared network 21 outputs the time series representation, a central kernel alignment similarity analysis can be performed on the time series representation and the original input time series data. When the similarity between the two reaches a preset similarity threshold, the output is performed to verify the accuracy of the time series representation output by the feedforward shared network 21.

[0119] In one embodiment, Figure 5 As shown, the non-linear connection module 22 is further provided with an activation function module 221 , and the activation function module 221 performs non-linear mapping processing on the output result of the non-linear connection module 22 .

[0120] Specifically, in the nonlinear connection module 2, a process of decoding the time series representation in multiple layers to obtain the future sequence is adopted. In order to achieve a better model convergence process, a nonlinear mapping process is also performed through the activation function module 221 to make the model data converge. The activation function is a ReLU function and a sigmoid function.

[0121] In one embodiment, Figure 6 As shown, between the embedded module 1 and the converter module 2 is also provided:

[0122] Normalization layer 5: Normalization layer 5 performs normalization processing on each embedded label so that the variable corresponding to the embedded label conforms to the Gaussian distribution.

[0123] Specifically, considering that the metrics measured between multiple variables are often inconsistent during the acquisition of multivariate time series data, this part of information will cause corresponding noise after being input into the model. In this regard, in this embodiment, after the embedded mark is generated, normalization processing is also performed through the normalization layer 5, so that multiple variables have corresponding metrics, the noise component is eliminated, and the model convergence is facilitated.

[0124] Based on the above converter model, this solution can use the following process to implement the corresponding prediction process.

[0125] In one embodiment, Figure 7 As shown, step S1 includes:

[0126] Step S11: collecting historical multivariate time series data of the pipe network to be diagnosed;

[0127] Step S12: preprocessing the historical multivariate time series data to obtain preprocessed data;

[0128] Step S13: Generate training data according to the preprocessed data.

[0129] Specifically, in order to realize the prediction process of the model, in this embodiment, historical multivariate time series data is collected in advance for the pipeline network to be diagnosed.

[0130] Historical multivariate time series data refers to multiple time series data containing multiple groups of different variables. The variables correspond to data of multiple dimensions of the pipeline network to be diagnosed, including pressure, flow, temperature, acoustic signal data, meteorological data, pipe diameter of the pipeline system, pipeline material, operating pressure, flow, compressor and valve parameters, environmental factors, etc. at each measuring point. They are aligned and arranged according to the time series.

[0131] In one embodiment, in order to achieve a more accurate prediction process, the longitude and latitude of the pipe network to be diagnosed are also obtained, and the corresponding meteorological data are obtained as input according to the longitude and latitude, thereby improving the data quality.

[0132] Then the historical multivariate time series data is preprocessed to obtain preprocessed data. The preprocessing process includes standardizing the collected time series data of multiple variables, replacing outliers and missing values ​​with adjacent values ​​using forward filling and backward filling, segmenting the time series to obtain the sequence intervals required for actual training, and pre-extracting features.

[0133] When the input data includes a gas pipeline site identifier, the gas pipeline site identifier is processed using one-hot encoding to facilitate unified modeling across sites.

[0134] Finally, the preprocessed data is divided according to the requirements of the dataset construction to form training data.

[0135] In one embodiment, Figure 8 As shown, step S2 includes:

[0136] Step S21: randomly extracting a predetermined number of variables from the training data as training input data;

[0137] Step S22: training the inverted transformer model using training input data;

[0138] Step S23: Return to step S21 until the iteration condition is met and the inverted converter model is output.

[0139] Specifically, when the model has a self-attention mechanism, it may face the problem of quadratic complexity when processing high-dimensional multivariate sequences, which means that as the length and dimension of the sequence increase, the amount of computation required to calculate self-attention will increase quadratically. To address this problem, in this embodiment, a specific model training method is adopted for the inverted transformer model with self-attention mechanism and multivariate input.

[0140] Specifically, in each training process, only a predetermined number of variables are randomly selected to train the model, thereby improving training efficiency.

[0141] In this process, assuming that N is the total number of variables and M is the predetermined number of variable subsets selected for training in each batch, then in each iteration, M variables are randomly selected from the total number of N variables, and the corresponding training data are obtained as the actual training input data, and the inverted transformer model is trained based on this part of the training input data.

[0142] After training, the loss function is used to measure the loss of the inverted transformer model, and then the variables are re-extracted until the loss meets the iteration condition and then output.

[0143] During this training process, relevant parameters can also be further adjusted according to the model performance, including changing the learning rate, improvement type, objective function, and introducing an early stopping mechanism to improve the model quality.

[0144] During the model tuning process, models including LightGBM and XGBoost can also be integrated through 5 cross-validations.

[0145] The above are only preferred embodiments of the present invention, and are not intended to limit the implementation methods and protection scope of the present invention. Those skilled in the art should be aware that all solutions obtained by equivalent substitutions and obvious changes made using the description and illustrations of the present invention should be included in the protection scope of the present invention.

Claims

1. A multivariate time series anomaly diagnosis method for gas pipeline network based on inversion converter, It is characterized in that include: Step S1: Collect historical multivariate time series data of the pipe network to be diagnosed and construct training data; Step S2: using the training data to train an inverted transformer model; Step S3: forecasting the historical multivariate time series data based on the inverted converter model to generate a future sequence; Step S4: collecting real-time multivariate time series data for the pipe network to be diagnosed, and comparing the real-time multivariate time series data with the future sequence to determine the state of the pipe network to be diagnosed.

2. The multivariate time series anomaly diagnosis method for a gas pipeline network according to claim 1, It is characterized in that The model framework of the inverted converter model includes: An embedding module, wherein the embedding module receives the input historical multivariate time series data and performs tag embedding on the historical multivariate time series data to form an embedded tag; The embedded mark is used to mark the attributes of each group of the variables in the historical multivariate time series data; a converter module, the converter module being connected to the embedding module, the converter module processing the embedded tags to determine the mutual relationship between a plurality of the embedded tags and constructing a comprehensive representation result; A prediction module is connected to the converter module, and the prediction module projects the comprehensive representation result using a multi-layer perceptron to obtain the future sequence.

3. The multivariate time series anomaly diagnosis method for a gas pipeline network according to claim 2, It is characterized in that The model framework of the inverted transformer model also includes an attention module, and the attention module includes: A plurality of linear projection modules connected in sequence, each of which performs feature extraction on the input historical multivariate time series data to obtain a trainable weight matrix; The trainable weight matrix includes a query vector, a key vector, and a value vector corresponding to each set of variables; a scoring matrix module, the scoring matrix module being connected to the linear projection module, the scoring matrix module comparing the query vector and the key vector to determine a correlation score between each pair of the query vector and the key vector; A weight output module, wherein the weight output module generates the attention weight according to the relevance score; The converter module also processes the variables according to the attention weights.

4. The tracheal network multivariate time series abnormality diagnosis method according to claim 2, It is characterized in that The converter module comprises: A shared feedforward network, wherein the shared feedforward network performs multiple nonlinear transformations and feature extractions on the input historical multivariate time series data to generate a time series representation of each embedded tag; A non-linear connection module is used to generate the future sequence according to the time series representation.

5. The tracheal network multivariate time series abnormality diagnosis method according to claim 4, It is characterized in that The non-linear connection module is further provided with an activation function module, and the activation function module performs non-linear mapping processing on the output result of the non-linear connection module.

6. The multivariate time series anomaly diagnosis method for a gas pipeline network according to claim 3, It is characterized in that Also provided between the shared feedforward network and the nonlinear connection module is: A normalization layer, wherein the normalization layer performs normalization processing on each of the time series representations respectively so that the embedded time series representation conforms to a Gaussian distribution.

7. The multivariate time series anomaly diagnosis method for a gas pipeline network according to claim 1, It is characterized in that The step S1 comprises: Step S11: collecting the historical multivariate time series data of the pipe network to be diagnosed; Step S12: preprocessing the historical multivariate time series data to obtain preprocessed data; Step S13: Generate the training data according to the preprocessed data.

8. The multivariate time series anomaly diagnosis method for a gas pipeline network according to claim 1, It is characterized in that The step S2 comprises: Step S21: randomly extracting a predetermined number of variables from the training data as training input data; Step S22: training the inverted transformer model using the training input data; Step S23: Return to step S21 and output the inverted converter model after the iteration condition is met.