CN115078894A - Method, device and equipment for detecting abnormity of electric power machine room and readable storage medium - Google Patents

Method, device and equipment for detecting abnormity of electric power machine room and readable storage medium Download PDF

Info

Publication number
CN115078894A
CN115078894A CN202211002791.2A CN202211002791A CN115078894A CN 115078894 A CN115078894 A CN 115078894A CN 202211002791 A CN202211002791 A CN 202211002791A CN 115078894 A CN115078894 A CN 115078894A
Authority
CN
China
Prior art keywords
data
vector matrix
stage
decoder
reconstruction
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
CN202211002791.2A
Other languages
Chinese (zh)
Other versions
CN115078894B (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.)
Zhaoqing Power Supply Bureau of Guangdong Power Grid Co Ltd
Original Assignee
Zhaoqing Power Supply Bureau of Guangdong Power Grid Co Ltd
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 Zhaoqing Power Supply Bureau of Guangdong Power Grid Co Ltd filed Critical Zhaoqing Power Supply Bureau of Guangdong Power Grid Co Ltd
Priority to CN202211002791.2A priority Critical patent/CN115078894B/en
Publication of CN115078894A publication Critical patent/CN115078894A/en
Application granted granted Critical
Publication of CN115078894B publication Critical patent/CN115078894B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R31/00Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01DMEASURING NOT SPECIALLY ADAPTED FOR A SPECIFIC VARIABLE; ARRANGEMENTS FOR MEASURING TWO OR MORE VARIABLES NOT COVERED IN A SINGLE OTHER SUBCLASS; TARIFF METERING APPARATUS; MEASURING OR TESTING NOT OTHERWISE PROVIDED FOR
    • G01D21/00Measuring or testing not otherwise provided for
    • G01D21/02Measuring two or more variables by means not covered by a single other subclass
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

The invention relates to the technical field of electric power machine room detection, and discloses a method, a device and equipment for detecting abnormality of an electric power machine room and a readable storage medium. The method comprises the steps of constructing a first vector matrix and a second vector matrix by using multi-dimensional sensor time sequence data of a target electric power machine room, inputting the first vector matrix and the second vector matrix into a trained deep learning network model to obtain corresponding reconstruction data, and determining abnormal data based on abnormal scores of the reconstruction data; the deep learning network model includes a first encoder, a second encoder, a first decoder, and a second decoder. In the deep learning network model, the Transfomer is reconstructed into a countermeasure network similar to a GAN type, the multi-head attention layer of the Transfomer is optimized by using an abnormal multi-head attention mechanism, and the accuracy and the stability of the abnormal detection of the electric power machine room can be effectively improved.

Description

Method, device and equipment for detecting abnormity of electric power machine room and readable storage medium
Technical Field
The invention relates to the technical field of electric power machine room detection, in particular to a method, a device and equipment for detecting abnormity of an electric power machine room and a readable storage medium.
Background
When a certain device in the electric power machine room breaks down, the safe operation of the electric power device is threatened, and therefore real-time detection on the faults of the electric power machine room is necessary. The process of detecting the fault of the electric power machine room according to the monitoring data of the electric power machine room can be simplified into the process of detecting abnormal points in the machine room monitoring time sequence.
However, outliers are often rare and hidden by a large number of normal points, which makes detection and marking of outliers difficult and expensive. Early methods for detecting anomalies in a time series attempted to build a mathematical model that fits perfectly within the given data and treated the outliers as anomalies. These methods distinguish between normal and abnormal samples by measuring the distance between each sample or the density of each point. Therefore, in order to obtain good experimental results, it is necessary to find a model that can perfectly fit real data, but when the situation is complicated and the data is affected by various factors, it is difficult to describe the data in the real world using a single model.
The deep learning algorithm is used as an important part of artificial intelligence, and can effectively solve the problems of limited stability and generalization of most of traditional methods. Deep learning is a characterization learning, and the reconstructed model plays an important role in an anomaly detection task. Transformer is a deep learning structure that appeared in 2017 and when used as a reconstruction model achieved excellent performance in many tasks of natural language processing and computer vision. The method has the advantages that the method uses the Transformer to carry out anomaly detection, has more effective detection effect compared with other traditional time-dependent models, and the Transformer can focus on global characteristics more effectively compared with an LSTM (long short-term memory network) or a recurrent neural network. The GAN (generation countermeasure network) style deep learning network also achieves a less good effect in this respect with respect to time series reconstruction.
Disclosure of Invention
The invention provides a method, a device and equipment for detecting the abnormity of an electric power machine room and a readable storage medium, and solves the technical problem of how to improve the accuracy and stability of the abnormity detection of the electric power machine room.
The invention provides a method for detecting the abnormity of an electric power machine room in a first aspect, which comprises the following steps:
constructing an input vector matrix according to multi-dimensional sensor time sequence data of a target electric power machine room, acquiring a previous sequence of the input vector matrix by using a window with a preset length, constructing a first vector matrix according to the previous sequence, and fusing the previous sequence and the input vector matrix to obtain a second vector matrix;
inputting the first vector matrix and the second vector matrix into a trained deep learning network model to obtain corresponding reconstruction data; the deep learning network model comprises a first encoder, a second encoder, a first decoder and a second decoder, wherein the first encoder comprises a multi-head attention layer and a feedforward layer, the second encoder comprises a mask multi-head attention layer and an abnormal multi-head attention layer, the abnormal multi-head attention layer is used for calculating a priori association and sequence association, calculating association difference according to the priori association and the sequence association, and amplifying the association difference between normal data and abnormal data by using a maximum minimum strategy;
and scoring the reconstructed data to obtain an abnormal score, and if the abnormal score exceeds a score threshold value, judging that the corresponding machine room equipment is abnormal.
According to one possible implementation of the first aspect of the invention, the first decoder and the second decoder each comprise a feedforward layer and an activation function.
According to an implementation manner of the first aspect of the present invention, the inputting the first vector matrix and the second vector matrix into a trained deep learning network model to obtain corresponding reconstruction data includes:
performing two-stage data reconstruction according to the first vector matrix and the second vector matrix; when data reconstruction of the first stage is carried out, taking an all-zero matrix as a focus score; when data reconstruction of a second stage is carried out, calculating the deviation norm of the first stage according to the reconstructed output of the first decoder in the first stage and the second vector matrix, combining the deviation norm and the first vector matrix, adding the combined deviation norm and the first vector matrix with position codes, and taking the obtained result as a focus score;
wherein the data reconstruction at each stage comprises:
combining the first vector matrix and the focus fraction, and adding a result obtained by combining and a position code as the input of the first encoder to obtain a first data characteristic output by the first encoder;
adding the second vector matrix and the position code into a mask multi-head attention layer of the second encoder, adding the obtained result and the corresponding original input and normalizing to obtain a second data characteristic;
inputting the first data characteristic and the second data characteristic into an abnormal multi-head attention layer of the second encoder, adding the obtained result and the second data characteristic, and normalizing to obtain a third data characteristic;
and taking the third data characteristic as the input of the first decoder and the second decoder to obtain the reconstructed output of the first decoder and the second decoder.
According to an implementable manner of the first aspect of the present invention, the performing of the two-stage data reconstruction according to the first vector matrix and the second vector matrix comprises:
in the first stage of data reconstruction, the following loss function is used:
Figure 744391DEST_PATH_IMAGE001
in the formula (I), the compound is shown in the specification,
Figure 860115DEST_PATH_IMAGE002
indicating the corresponding loss of the first stage,
Figure 762212DEST_PATH_IMAGE003
in order to train the parameters of the device,
Figure 242872DEST_PATH_IMAGE004
in order to train the number of rounds,
Figure 863209DEST_PATH_IMAGE005
for the first decoder output after reconstruction in the first stage,
Figure 454727DEST_PATH_IMAGE006
for the said second vector matrix to be said,
Figure 211331DEST_PATH_IMAGE007
for the second decoder output after reconstruction in the second stage,
Figure 128471DEST_PATH_IMAGE008
in order to lose the parameters of the process,
Figure 970525DEST_PATH_IMAGE009
is the correlation difference;
in the second stage of data reconstruction, the following loss function is used:
Figure 428051DEST_PATH_IMAGE010
in the formula (I), the compound is shown in the specification,
Figure 242423DEST_PATH_IMAGE011
the corresponding loss in the second stage is indicated,
Figure 127203DEST_PATH_IMAGE012
and outputting the second decoder after the reconstruction of the first stage.
According to an implementable manner of the first aspect of the present invention, the scoring the reconstruction data to obtain an anomaly score includes:
scoring the reconstructed data according to the following scoring formula:
Figure 394236DEST_PATH_IMAGE014
in the formula (I), the compound is shown in the specification,
Figure 655453DEST_PATH_IMAGE015
the number of the abnormal points is represented,
Figure 324332DEST_PATH_IMAGE005
for the first decoder output after reconstruction in the first stage,
Figure 380013DEST_PATH_IMAGE006
for the said second vector matrix to be said,
Figure 134342DEST_PATH_IMAGE007
for the second decoder output after reconstruction in the second stage,
Figure 933671DEST_PATH_IMAGE009
in order to correlate the differences, the correlation data is,
Figure 519373DEST_PATH_IMAGE016
to normalizeA function of the number.
According to an implementation manner of the first aspect of the present invention, if the abnormal score exceeds a score threshold, determining that the corresponding machine room device is abnormal includes:
determining the score threshold by a POT model based on the anomaly score.
According to an implementable manner of the first aspect of the present invention, the constructing an input vector matrix from the multidimensional sensor time-series data of the target electric power machine room comprises:
when an input vector matrix is constructed, the corresponding multidimensional sensor time sequence is subjected to normalization processing according to the following formula:
Figure 949217DEST_PATH_IMAGE017
in the formula (I), the compound is shown in the specification,
Figure 253160DEST_PATH_IMAGE018
for multidimensional sensor time series
Figure 528283DEST_PATH_IMAGE019
To middle
Figure 234071DEST_PATH_IMAGE020
The number of the vectors is such that,
Figure 569237DEST_PATH_IMAGE021
is a pair of
Figure 360476DEST_PATH_IMAGE018
The result obtained after the normalization treatment is carried out,
Figure 439290DEST_PATH_IMAGE022
for multidimensional sensor time series
Figure 23022DEST_PATH_IMAGE019
The vector with the smallest median mode is used,
Figure 794669DEST_PATH_IMAGE023
for multidimensional sensor time series
Figure 807624DEST_PATH_IMAGE019
The vector of the largest of the median modes,
Figure 690130DEST_PATH_IMAGE024
is a very small vector that prevents zero division.
A second aspect of the present invention provides an abnormality detection device for an electric power machine room, including:
the data preparation module is used for constructing an input vector matrix according to the multi-dimensional sensor time sequence data of the target electric power machine room, acquiring a previous sequence of the input vector matrix by using a window with a preset length, constructing a first vector matrix according to the previous sequence, and fusing the previous sequence and the input vector matrix to obtain a second vector matrix;
the anomaly detection module is used for inputting the first vector matrix and the second vector matrix into a trained deep learning network model to obtain corresponding reconstruction data; the deep learning network model comprises a first encoder, a second encoder, a first decoder and a second decoder, wherein the first encoder comprises a multi-head attention layer and a feedforward layer, the second encoder comprises a mask multi-head attention layer and an abnormal multi-head attention layer, the abnormal multi-head attention layer is used for calculating a priori association and sequence association, calculating association difference according to the priori association and the sequence association, and amplifying the association difference between normal data and abnormal data by using a maximum minimum strategy;
and the abnormity judgment module is used for scoring the reconstruction data to obtain an abnormity score, and judging that the corresponding machine room equipment is abnormal if the abnormity score exceeds a score threshold value.
According to one possible implementation of the second aspect of the invention, the first decoder and the second decoder each comprise a feedforward layer and an activation function.
According to an implementable manner of the second aspect of the present invention, the abnormality detection module includes:
the data reconstruction unit is used for performing two-stage data reconstruction according to the first vector matrix and the second vector matrix; when data reconstruction of the first stage is carried out, taking an all-zero matrix as a focus score; when data reconstruction of a second stage is carried out, calculating the deviation norm of the first stage according to the reconstructed output of the first decoder in the first stage and the second vector matrix, combining the deviation norm and the first vector matrix, adding the combined deviation norm and the first vector matrix to position codes, and taking the obtained result as a focus score;
when the data reconstruction unit performs data reconstruction at each stage, the data reconstruction unit is specifically configured to:
combining the first vector matrix and the focus fraction, and adding a result obtained by combining and a position code as the input of the first encoder to obtain a first data characteristic output by the first encoder;
adding the second vector matrix and the position code into a mask multi-head attention layer of the second encoder, adding the obtained result and the corresponding original input and normalizing to obtain a second data characteristic;
inputting the first data characteristic and the second data characteristic into an abnormal multi-head attention layer of the second encoder, adding the obtained result and the second data characteristic, and normalizing to obtain a third data characteristic;
and taking the third data characteristic as the input of the first decoder and the second decoder to obtain the reconstructed output of the first decoder and the second decoder.
According to an implementable aspect of the second aspect of the present invention, when the data reconstruction unit performs two-stage data reconstruction according to the first vector matrix and the second vector matrix, the data reconstruction unit is specifically configured to:
in the first stage of data reconstruction, the following loss function is used:
Figure 104931DEST_PATH_IMAGE001
in the formula (I), the compound is shown in the specification,
Figure 47479DEST_PATH_IMAGE002
indicating the corresponding loss of the first stage,
Figure 547730DEST_PATH_IMAGE003
in order to train the parameters of the device,
Figure 30664DEST_PATH_IMAGE004
in order to train the number of rounds,
Figure 503234DEST_PATH_IMAGE005
for the first decoder output after reconstruction in the first stage,
Figure 679000DEST_PATH_IMAGE006
for the said second vector matrix to be said,
Figure 604231DEST_PATH_IMAGE007
for the second decoder output after reconstruction in the second stage,
Figure 890856DEST_PATH_IMAGE008
in order to lose the parameters of the process,
Figure 952353DEST_PATH_IMAGE009
is the correlation difference;
in the second stage of data reconstruction, the following loss function is used:
Figure 299020DEST_PATH_IMAGE010
in the formula (I), the compound is shown in the specification,
Figure 711547DEST_PATH_IMAGE011
the corresponding loss in the second stage is indicated,
Figure 801863DEST_PATH_IMAGE012
and outputting the second decoder after the reconstruction of the first stage.
According to an implementable manner of the second aspect of the present invention, the abnormality determination module includes:
an anomaly scoring unit, configured to score the reconstruction data according to the following scoring formula:
Figure 45762DEST_PATH_IMAGE025
in the formula (I), the compound is shown in the specification,
Figure 235435DEST_PATH_IMAGE015
the number of the abnormal points is represented,
Figure 197575DEST_PATH_IMAGE005
for the first decoder output after reconstruction in the first stage,
Figure 763686DEST_PATH_IMAGE006
for the said second vector-matrix is the said second vector-matrix,
Figure 127671DEST_PATH_IMAGE007
for the second decoder output after reconstruction in the second stage,
Figure 550562DEST_PATH_IMAGE009
in order to correlate the differences, the correlation data is,
Figure 937681DEST_PATH_IMAGE016
is a normalized exponential function.
According to an implementable manner of the second aspect of the present invention, the abnormality determination module further includes:
and the threshold setting unit is used for determining the score threshold value through a POT model based on the abnormal score.
According to an enabling mode of the second aspect of the invention, the data preparation module comprises:
the data normalization unit is used for performing normalization processing on the corresponding multidimensional sensor time sequence according to the following formula when an input vector matrix is constructed:
Figure 369799DEST_PATH_IMAGE017
in the formula (I), the compound is shown in the specification,
Figure 260395DEST_PATH_IMAGE018
for multidimensional sensor time series
Figure 119767DEST_PATH_IMAGE019
To middle
Figure 728602DEST_PATH_IMAGE020
The number of the vectors is such that,
Figure 964412DEST_PATH_IMAGE021
is a pair of
Figure 975093DEST_PATH_IMAGE018
The result obtained after the normalization treatment is carried out,
Figure 5366DEST_PATH_IMAGE022
for multidimensional sensor time series
Figure 101498DEST_PATH_IMAGE019
The vector with the smallest median modulus is used,
Figure 875419DEST_PATH_IMAGE023
for multidimensional sensor time series
Figure 802924DEST_PATH_IMAGE019
The vector of the largest of the median modes,
Figure 941781DEST_PATH_IMAGE024
is a very small vector that prevents zero division.
A third aspect of the present invention provides an abnormality detection apparatus for an electric power machine room, including:
a memory to store instructions; the instruction is used for realizing the method for detecting the abnormity of the electric power machine room in any one realizable mode;
a processor to execute the instructions in the memory.
A fourth aspect of the present invention is a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method for detecting an abnormality in an electric power machine room as described in any one of the above-mentioned implementable manners.
According to the technical scheme, the invention has the following advantages:
the method comprises the steps of constructing a first vector matrix and a second vector matrix by using multi-dimensional sensor time sequence data of a target electric power machine room, inputting the first vector matrix and the second vector matrix into a trained deep learning network model to obtain corresponding reconstruction data, and determining abnormal data based on abnormal scores of the reconstruction data; the deep learning network model includes a first encoder, a second encoder, a first decoder, and a second decoder. In the deep learning network model, the Transfomer is reconstructed into a countermeasure network similar to a GAN type, the exceptional capacity of the countermeasure network in input signal reconstruction is utilized, abnormal signals are amplified and are easier to find, an abnormal multi-head attention mechanism is utilized to optimize a multi-head attention layer of the Transfomer, the association difference is obtained by calculating the prior association and the sequence association, the association difference of the signals in a normal state and an abnormal state is amplified through a maximum minimum strategy, the capacity of the model for amplifying the normal and abnormal differences of the signals is further improved, and the accuracy and the stability of the abnormal detection of the electric power machine room are effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flowchart of an abnormality detection method for an electric power machine room according to an alternative embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a deep learning network model according to an alternative embodiment of the present invention;
FIG. 3 is a data processing logic diagram of an extraordinary multi-head attention layer in accordance with an alternative embodiment of the present invention;
fig. 4 is a structural connection block diagram of an abnormality detection apparatus for an electric power room according to an alternative embodiment of the present invention.
Reference numerals are as follows:
1-a data preparation module; 2-an anomaly detection module; and 3, an abnormity judgment module.
Detailed Description
The embodiment of the invention provides a method, a device and equipment for detecting the abnormity of an electric power machine room and a readable storage medium, which are used for solving the technical problem of improving the accuracy and stability of the abnormity detection of the electric power machine room.
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides an abnormity detection method for an electric power machine room.
Referring to fig. 1, fig. 1 shows a flowchart of an abnormality detection method for an electric power machine room according to an embodiment of the present invention.
The method for detecting the abnormality of the electric power machine room provided by the embodiment of the invention comprises the steps of S1-S3.
Step S1, an input vector matrix is constructed according to the multi-dimensional sensor time series data of the target electric power machine room, a previous sequence of the input vector matrix is obtained by using a window with a preset length, a first vector matrix is constructed according to the previous sequence, and the previous sequence and the input vector matrix are fused to obtain a second vector matrix.
Specifically, in an electric power room in which a fault needs to be detected, data such as a main bearing temperature, a fan rotation speed, a CPU temperature, a power supply voltage, and the like are read by a sensor, and a multidimensional sensor time series is formed from the data as an input vector matrix. The input vector matrix may be represented as:
Figure 587526DEST_PATH_IMAGE026
in the formula, X represents an input vector matrix,
Figure 837242DEST_PATH_IMAGE027
in order to be the length of the sequence,
Figure 884832DEST_PATH_IMAGE028
wherein, in the step (A),
Figure 194591DEST_PATH_IMAGE029
is the dimension of the input vector, i.e., the number of data types.
In the above embodiments of the present invention, the input vector matrix is constructed by the multi-dimensional sensor time-series data. The multidimensional variable can effectively capture the running state relation and the correlation between the devices, and the problems of limited model prediction precision and insufficient stability caused by single-dimensional data are solved.
When the input vector matrix is constructed, the time sequence of the multi-dimensional sensor can be subjected to standardization processing so as to improve the robustness of a subsequent detection model. In one implementation, the corresponding multidimensional sensor time series is normalized as follows:
Figure 327632DEST_PATH_IMAGE017
in the formula (I), the compound is shown in the specification,
Figure 381038DEST_PATH_IMAGE018
for multidimensional sensor time series
Figure 283135DEST_PATH_IMAGE019
To middle
Figure 763795DEST_PATH_IMAGE020
The number of the vectors is such that,
Figure 118553DEST_PATH_IMAGE021
is a pair of
Figure 37968DEST_PATH_IMAGE018
The result obtained after the normalization treatment is carried out,
Figure 732254DEST_PATH_IMAGE022
for multidimensional sensor time series
Figure 446132DEST_PATH_IMAGE019
The vector with the smallest median mode is used,
Figure 491449DEST_PATH_IMAGE023
for multidimensional sensor time series
Figure 948975DEST_PATH_IMAGE019
The vector of the largest of the median modes,
Figure 497768DEST_PATH_IMAGE024
is a very small vector that prevents zero division.
When constructing the first vector matrix, in particular, a length of
Figure 648126DEST_PATH_IMAGE030
The window is utilized to obtain the previous sequence of the input vector matrix, and then a window vector is constructed together with the data of the current time point so as to be used for modeling the correlation of the data point at the current time and the previous time point. The window vector is represented as follows:
Figure 915160DEST_PATH_IMAGE031
in the formula (I), the compound is shown in the specification,
Figure 176377DEST_PATH_IMAGE032
is as follows
Figure 579676DEST_PATH_IMAGE033
Vectors of time points.
And fusing the vector with the input vector X in a copy filling mode to obtain a second vector matrix:
Figure 900936DEST_PATH_IMAGE034
wherein, T<When K, a vector with length of K-t is used
Figure 655266DEST_PATH_IMAGE035
Filling a window sub-vector of current length K
Figure 454594DEST_PATH_IMAGE036
. All window sub-vectors are combined into a second vector matrix
Figure 977980DEST_PATH_IMAGE006
. Modeling with a window vector enables the sequence to carry information of the previous time. And recorded as a time series slice to the current time t and as a vector
Figure 470141DEST_PATH_IMAGE037
. All sub-vectors to the current time are merged into a first vector matrix to
Figure 508504DEST_PATH_IMAGE038
And (4) showing.
Step S2, inputting the first vector matrix and the second vector matrix into a trained deep learning network model to obtain corresponding reconstruction data; the deep learning network model comprises a first encoder, a second encoder, a first decoder and a second decoder, wherein the first encoder comprises a multi-head attention layer and a feedforward layer, the second encoder comprises a mask multi-head attention layer and an abnormal multi-head attention layer, the abnormal multi-head attention layer is used for calculating a priori association and sequence association, calculating association difference according to the priori association and the sequence association, and amplifying the association difference of normal data and abnormal data by using a maximum minimum strategy.
In the embodiment of the invention, the deep learning network model is based on a Transfomer structure. The Transfomer has better effect compared with LSTM or RNN, so that the model can be trained in a parallelization way, and can have global information.
The structural diagram of the deep learning network model is shown in fig. 2. Wherein the first decoder and the second decoder each comprise a feedforward layer and an activation function.
In one implementation, inputting the first vector matrix and the second vector matrix to a trained deep learning network model to obtain corresponding reconstructed data includes:
performing two-stage data reconstruction according to the first vector matrix and the second vector matrix; when data reconstruction of the first stage is carried out, taking an all-zero matrix as a focus score; when data reconstruction of a second stage is carried out, calculating the deviation norm of the first stage according to the reconstructed output of the first decoder in the first stage and the second vector matrix, combining the deviation norm and the first vector matrix, adding the combined deviation norm and the first vector matrix with position codes, and taking the obtained result as a focus score;
wherein the data reconstruction at each stage comprises:
combining the first vector matrix and the focus fraction, and adding a result obtained by combining and a position code as the input of the first encoder to obtain a first data characteristic output by the first encoder;
adding the second vector matrix and the position code into a mask multi-head attention layer of the second encoder, adding the obtained result and the corresponding original input and normalizing to obtain a second data characteristic;
inputting the first data characteristic and the second data characteristic into an abnormal multi-head attention layer of the second encoder, adding the obtained result and the second data characteristic, and normalizing to obtain a third data characteristic;
and taking the third data characteristic as the input of the first decoder and the second decoder to obtain the reconstructed output of the first decoder and the second decoder.
The embodiment of the invention utilizes the thought of GAN to construct the antagonistic Transformer structure, so that the method has two stages.
Specifically, referring to fig. 2, in the first stage, an all-zero matrix is used as the focus score, merged with the first vector matrix C obtained in step S1, and added with the position code (PE), and sent to the native transducer multi-head attention mechanism for operation (i.e. operation using the multi-head attention layer of the first encoder). The operation process is as follows:
the sequence proceeds to encoder one (i.e., the first encoder) in fig. 2. The method enters into a Transfomer for operation, and firstly passes through a multi-head attention mechanism. The merged sequence is split into h parts and respectively calculates a query (Q) matrix, a Key (K) matrix and a value (V) matrix, namely three necessary parameters for operation in the transform module.
Record the merged input as
Figure 49207DEST_PATH_IMAGE039
The calculation method is as follows:
Figure 754995DEST_PATH_IMAGE040
Figure 90161DEST_PATH_IMAGE041
Figure 881399DEST_PATH_IMAGE042
in the formula
Figure 960214DEST_PATH_IMAGE043
Figure 520508DEST_PATH_IMAGE044
Figure 26576DEST_PATH_IMAGE045
Respectively represent
Figure 305111DEST_PATH_IMAGE046
The Query, Key and Value of the attention head,
Figure 187616DEST_PATH_IMAGE047
Figure 602417DEST_PATH_IMAGE048
and
Figure 607282DEST_PATH_IMAGE049
is a corresponding weight matrix and is also a parameter matrix needing to be learned.
And recording the number of the multi-head attention mechanism heads as h, and then calculating the following mode:
Figure 45216DEST_PATH_IMAGE050
where Concat (. lamda.) acts as a merge matrix.
The method of Attention is as follows, firstly, the Attention parameter matrix is calculated:
Figure 528150DEST_PATH_IMAGE051
reusing an activation function
Figure 720DEST_PATH_IMAGE016
Perform a normalization operation and divide by
Figure 910907DEST_PATH_IMAGE052
To reduce weight variation, promote stability of model training:
Figure 836138DEST_PATH_IMAGE053
in the formula (I), the compound is shown in the specification,
Figure 122763DEST_PATH_IMAGE029
is the number of channels;
finally, multiplying by a value (V) matrix to obtain an attention score:
Figure 449839DEST_PATH_IMAGE054
as shown in the first encoder configuration of fig. 2, the result of the operation is added to the original input and normalized. As a possible implementation, when the results after the operation are added and normalized, layer normalization is adopted.
Specifically, the calculation method for outputting the result to the feedforward layer and performing the addition normalization again is as follows:
Figure 796507DEST_PATH_IMAGE055
wherein LayerNorm (. lamer.) is the layer normalization operation and Feedforward (. lamer.) is the feed forward operation. The output of the final encoder one is
Figure 209033DEST_PATH_IMAGE056
Similarly, the second vector matrix W is input to encoder two (i.e., the second encoder) in FIG. 2 for operation, and is input as
Figure 33770DEST_PATH_IMAGE057
The calculation process is as follows:
Figure 277669DEST_PATH_IMAGE058
in the formula, the calculation method of MultiHeadAttention (s.) is mentioned above. And the abnormal multi-head attention layer of the second encoder adopts an improved multi-head attention mechanism, namely the abnormal multi-head attention mechanism.
The data processing logic of the extraordinary multi-head attention layer is shown in FIG. 3. The invention changes the multi-head attention mechanism in the Transfomer from a self-attention mechanism to a common attention mechanism with two branches, so that the difference between a normal state and an abnormal state can be amplified. The improved abnormal multi-head attention mechanism can respectively calculate prior association and sequence association, and amplify the association difference between normal data and abnormal data of the electric power machine room by utilizing a maximum and minimum strategy, so that the difference between a common state and an abnormal state is more prominent.
As shown in FIG. 3, the abnormal multi-head attention mechanism still calculates multi-head attention, i.e. sequence correlation, when the sequence inputted into the abnormal multi-head attention layer is
Figure 732921DEST_PATH_IMAGE059
I.e., the output of encoder one combined with encoder two previously subjected to multi-head attention calculations. The sequence correlation calculation method at this time is as follows:
Figure 695061DEST_PATH_IMAGE060
in the formula (I), the compound is shown in the specification,
Figure 261172DEST_PATH_IMAGE061
representing sequence associations;
in addition, due to the rarity of the abnormality of the electric power machine room equipment and the dominance of the normal mode, the abnormality is difficult to establish strong correlation with the whole sequence. Anomaly associations should be focused on adjacent time points, which are more likely to contain similar patterns of anomalies due to continuity. This adjacent correlation bias is referred to as a priori correlation. The invention calculates and records the result
Figure 359578DEST_PATH_IMAGE062
Using learnable Gaussian kernels
Figure 985731DEST_PATH_IMAGE063
To calculate it in the following way:
Figure 435167DEST_PATH_IMAGE064
in the formula (I), the compound is shown in the specification,
Figure 539389DEST_PATH_IMAGE065
n is the length of the time series involved in the calculation,
Figure 757881DEST_PATH_IMAGE046
Figure 617253DEST_PATH_IMAGE066
corresponding to different points in time, i.e. first
Figure 226089DEST_PATH_IMAGE046
From a time point to
Figure 461898DEST_PATH_IMAGE066
The associated weight of each time point is formed by a Gaussian kernel
Figure 472579DEST_PATH_IMAGE067
And (4) calculating.
Figure 502852DEST_PATH_IMAGE068
The representation is divided by a row and operated on to transform the associated weights into a discrete distribution.
After the prior association and the sequence association are calculated, the embodiment of the invention adopts a maximum minimum strategy to amplify the association difference. And constraining and amplifying sequence correlation in abnormal conditions by using a mode of stopping gradient direction propagation, and finally multiplying the sequence correlation subjected to abnormal amplification by a value (V) matrix to obtain module output. Namely:
Figure 661301DEST_PATH_IMAGE069
attention from abnormal multiple headsAfter layer output, the output is sent to decoder I and decoder II through a layer addition and normalization layer to calculate output
Figure 107326DEST_PATH_IMAGE070
Namely:
Figure 300410DEST_PATH_IMAGE071
because the network structure has two stages, two outputs are generated respectively in the first stage and the second stage
Figure 439267DEST_PATH_IMAGE072
The first stage is used mainly to generate an approximate reconstruction of the input window and uses the deviation norm of the first stage
Figure 85012DEST_PATH_IMAGE073
As focus score for the second stage; the second stage is mainly used to maximize the anomalies in the reconstructed sequence. The method of the embodiment of the invention does not take into account the second stage
Figure 334728DEST_PATH_IMAGE074
And (6) outputting.
For the improved abnormal multi-head attention mechanism, the embodiment of the invention also calculates the correlation difference:
Figure 382318DEST_PATH_IMAGE075
in the formula (I), the compound is shown in the specification,
Figure 754394DEST_PATH_IMAGE009
a difference in the correlation is indicated,
Figure 825118DEST_PATH_IMAGE076
representing the KL divergence of the calculated prior correlation P and the sequence correlation S;
Figure 940841DEST_PATH_IMAGE077
Nis the sequence length.
Finally calculated
Figure 780621DEST_PATH_IMAGE078
Through test observation of the data of the electric power machine room, when the data are abnormal, the correlation difference is smaller than the normal time point, so that the item can be added into the loss function to amplify the difference. The loss function for the improved anomaly attention mechanism is as follows:
in the first stage of data reconstruction, the following loss function is used:
Figure 323598DEST_PATH_IMAGE001
in the formula (I), the compound is shown in the specification,
Figure 616039DEST_PATH_IMAGE002
indicating the corresponding loss of the first stage,
Figure 535454DEST_PATH_IMAGE003
in order to train the parameters of the device,
Figure 292057DEST_PATH_IMAGE004
in order to train the number of the rounds,
Figure 943618DEST_PATH_IMAGE005
for the first decoder output after reconstruction in the first stage,
Figure 51252DEST_PATH_IMAGE006
for the said second vector matrix to be said,
Figure 446461DEST_PATH_IMAGE007
for the second decoder output after reconstruction in the second stage,
Figure 57571DEST_PATH_IMAGE008
in order to lose the parameters of the process,
Figure 145613DEST_PATH_IMAGE009
is the correlation difference;
in the second stage of data reconstruction, the following loss function is used:
Figure 474963DEST_PATH_IMAGE010
in the formula (I), the compound is shown in the specification,
Figure 408284DEST_PATH_IMAGE011
indicating the corresponding loss in the second stage of the process,
Figure 162917DEST_PATH_IMAGE012
and outputting the second decoder after the reconstruction of the first stage.
In the loss function, the first two terms of the first stage and the second stage are not changed, and the correlation difference multiplied by the loss parameter is subtracted from the first two terms
Figure 421860DEST_PATH_IMAGE008
To amplify the difference.
Figure 972927DEST_PATH_IMAGE079
Representing the loss of encoder one and encoder two, i.e. to keep the reconstruction error to a minimum.
Figure 37835DEST_PATH_IMAGE080
And
Figure 561220DEST_PATH_IMAGE081
and the first decoder is used for ensuring that the output reconstruction error is minimum, the reconstruction error of the first decoder and the second decoder is used as a focus fraction, and the output reconstruction error is maximum so as to amplify the amplitude of the time sequence in abnormal conditions.
In the stage of applying the maximum minimum strategy, the loss function is as follows:
Figure 787802DEST_PATH_IMAGE082
in particular, in the minimization phase, a priori correlation is used to approximate
Figure 29428DEST_PATH_IMAGE083
If in the loss function
Figure 632447DEST_PATH_IMAGE084
The associated gradient counter-propagation is stopped. In the maximization phase, the network may pay more attention to non-adjacent regions of the sequence. With the above operation, the difference between the normal state and the abnormal state of the electric power room equipment data can be amplified.
According to the embodiment of the invention, the input time sequence collected from the monitoring of the target electric power machine room is reconstructed by using the reconstructed Transfomer structure as an impedance type, so that the purpose of amplifying the abnormal state is achieved. And the difference between normal and abnormal is amplified by transforming a multi-head attention mechanism layer in the Transfomer, so that the amplification effect is further improved.
And step S3, scoring the reconstruction data to obtain an abnormal score, and if the abnormal score exceeds a score threshold value, judging that the corresponding machine room equipment is abnormal.
In one implementation, the scoring the reconstruction data to obtain an anomaly score includes:
scoring the reconstructed data according to the following scoring formula:
Figure 10339DEST_PATH_IMAGE085
in the formula (I), the compound is shown in the specification,
Figure 673401DEST_PATH_IMAGE015
the number of the abnormal points is represented,
Figure 136744DEST_PATH_IMAGE005
for the first decoder output after reconstruction in the first stage,
Figure 543454DEST_PATH_IMAGE006
for the said second vector matrix to be said,
Figure 41432DEST_PATH_IMAGE007
for the second decoder output after reconstruction in the second stage,
Figure 609816DEST_PATH_IMAGE009
in order to correlate the differences, the correlation data is,
Figure 888351DEST_PATH_IMAGE016
is a normalized exponential function.
In an implementation manner, if the abnormality score exceeds a score threshold, determining that the corresponding equipment room device is abnormal includes:
determining the score threshold by a POT model based on the anomaly score.
In the embodiment of the invention, the POT algorithm is used for dynamically setting the threshold, which is a statistical method for fitting data distribution and generalized pareto distribution by using an extreme value theory, and the threshold can be automatically and dynamically selected. The method for judging the abnormality of the power equipment comprises the following steps:
Figure 770856DEST_PATH_IMAGE086
in the formula (I), the compound is shown in the specification,
Figure 185657DEST_PATH_IMAGE087
indicating that the time points in the scored sequence that exceed the threshold are marked,
Figure 862626DEST_PATH_IMAGE088
or, the system alarms to inform the electric power machine room manager to check the equipment once the output sequence has an abnormality.
The invention also provides an abnormality detection device for the electric power machine room.
Referring to fig. 4, fig. 4 is a block diagram illustrating a structural connection of an abnormality detection apparatus for an electric power room according to an embodiment of the present invention.
The embodiment of the invention provides an abnormality detection device for an electric power machine room, which comprises:
the data preparation module 1 is used for constructing an input vector matrix according to multi-dimensional sensor time series data of a target electric power machine room, acquiring a previous sequence of the input vector matrix by using a window with a preset length, constructing a first vector matrix according to the previous sequence, and fusing the previous sequence and the input vector matrix to obtain a second vector matrix;
the anomaly detection module 2 is used for inputting the first vector matrix and the second vector matrix into a trained deep learning network model to obtain corresponding reconstruction data; the deep learning network model comprises a first encoder, a second encoder, a first decoder and a second decoder, wherein the first encoder comprises a multi-head attention layer and a feedforward layer, the second encoder comprises a mask multi-head attention layer and an abnormal multi-head attention layer, the abnormal multi-head attention layer is used for calculating a priori association and sequence association, calculating association difference according to the priori association and the sequence association, and amplifying the association difference between normal data and abnormal data by using a maximum minimum strategy;
and the abnormity determining module 3 is used for scoring the reconstruction data to obtain an abnormity score, and if the abnormity score exceeds a score threshold value, determining that the corresponding machine room equipment is abnormal.
In one implementation, the first decoder and the second decoder each include a feedforward layer and an activation function.
In an implementable manner, the anomaly detection module 2 comprises:
the data reconstruction unit is used for performing two-stage data reconstruction according to the first vector matrix and the second vector matrix; when data reconstruction of the first stage is carried out, taking an all-zero matrix as a focus score; when data reconstruction of a second stage is carried out, calculating the deviation norm of the first stage according to the reconstructed output of the first decoder in the first stage and the second vector matrix, combining the deviation norm and the first vector matrix, adding the combined deviation norm and the first vector matrix with position codes, and taking the obtained result as a focus score;
when the data reconstruction unit performs data reconstruction at each stage, the data reconstruction unit is specifically configured to:
combining the first vector matrix and the focus fraction, and adding a result obtained by combining and a position code as the input of the first encoder to obtain a first data characteristic output by the first encoder;
adding the second vector matrix and the position code into a mask multi-head attention layer of the second encoder, adding the obtained result and the corresponding original input and normalizing to obtain a second data characteristic;
inputting the first data characteristic and the second data characteristic into an abnormal multi-head attention layer of the second encoder, adding the obtained result and the second data characteristic, and normalizing to obtain a third data characteristic;
and taking the third data characteristic as the input of the first decoder and the second decoder to obtain the reconstructed output of the first decoder and the second decoder.
In an implementation manner, when the data reconstruction unit performs two-stage data reconstruction according to the first vector matrix and the second vector matrix, the data reconstruction unit is specifically configured to:
in the first stage of data reconstruction, the following loss function is used:
Figure 362878DEST_PATH_IMAGE001
in the formula (I), the compound is shown in the specification,
Figure 49074DEST_PATH_IMAGE002
indicating the corresponding loss of the first stage,
Figure 318381DEST_PATH_IMAGE003
in order to train the parameters of the device,
Figure 494148DEST_PATH_IMAGE004
in order to train the number of rounds,
Figure 419378DEST_PATH_IMAGE005
for the first decoder output after reconstruction in the first stage,
Figure 706003DEST_PATH_IMAGE006
for the said second vector matrix to be said,
Figure 33079DEST_PATH_IMAGE007
for the second decoder output after reconstruction in the second stage,
Figure 379747DEST_PATH_IMAGE008
in order to have the parameters of the loss,
Figure 526695DEST_PATH_IMAGE009
is the correlation difference;
in the second stage of data reconstruction, the following loss function is used:
Figure 617010DEST_PATH_IMAGE010
in the formula (I), the compound is shown in the specification,
Figure 860910DEST_PATH_IMAGE011
the corresponding loss in the second stage is indicated,
Figure 316162DEST_PATH_IMAGE012
and outputting the reconstructed data of the second decoder in the first stage.
In one possible implementation, the abnormality determination module 3 includes:
an anomaly scoring unit, configured to score the reconstruction data according to the following scoring formula:
Figure 278302DEST_PATH_IMAGE089
in the formula (I), the compound is shown in the specification,
Figure 844412DEST_PATH_IMAGE015
the number of the abnormal points is represented,
Figure 942818DEST_PATH_IMAGE005
for the first decoder output after reconstruction in the first stage,
Figure 568972DEST_PATH_IMAGE006
for the said second vector matrix to be said,
Figure 752828DEST_PATH_IMAGE007
for the second decoder output after reconstruction in the second stage,
Figure 184947DEST_PATH_IMAGE009
in order to correlate the differences, the correlation data is,
Figure 341122DEST_PATH_IMAGE016
is a normalized exponential function.
In one implementation, the abnormality determination module 3 further includes:
and the threshold setting unit is used for determining the score threshold value through a POT model based on the abnormal score.
In an implementable manner, the data preparation module 1 comprises:
the data normalization unit is used for performing normalization processing on the corresponding multidimensional sensor time sequence according to the following formula when an input vector matrix is constructed:
Figure 200493DEST_PATH_IMAGE017
in the formula (I), the compound is shown in the specification,
Figure 809329DEST_PATH_IMAGE018
for multidimensional sensor time series
Figure 779559DEST_PATH_IMAGE019
To middle
Figure 790240DEST_PATH_IMAGE020
The number of the vectors is such that,
Figure 820513DEST_PATH_IMAGE021
is a pair of
Figure 978962DEST_PATH_IMAGE018
The result obtained after the normalization treatment is carried out,
Figure 690566DEST_PATH_IMAGE022
for multidimensional sensor time series
Figure 883650DEST_PATH_IMAGE019
The vector with the smallest median mode is used,
Figure 22508DEST_PATH_IMAGE023
for multidimensional sensor time series
Figure 402673DEST_PATH_IMAGE019
The vector of the largest of the median modes,
Figure 980285DEST_PATH_IMAGE024
is a very small vector that prevents zero division.
The invention also provides an electric power machine room abnormity detection device, which comprises:
a memory to store instructions; the instruction is used for realizing the method for detecting the abnormity of the electric power machine room in any one of the embodiments;
a processor to execute the instructions in the memory.
The invention further provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for detecting the abnormality of the electric power machine room is implemented according to any one of the above embodiments.
According to the embodiment of the invention, the deep learning is applied to the intelligent monitoring of the equipment fault of the electric power machine room, and the unsupervised deep learning method is applied, so that the labor cost is greatly saved. For the problem that the fault signals of the equipment in the electric power machine room are difficult to distinguish, the invention improves a deep learning framework and a network computing mode, and improves the abnormity judging capability of the invention by amplifying abnormal points.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and modules may refer to the corresponding processes in the foregoing method embodiments, and the specific beneficial effects of the above-described apparatuses, devices and modules may refer to the corresponding beneficial effects in the foregoing method embodiments, which are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical division, and in actual implementation, there may be other divisions, for example, multiple modules or components may be combined or integrated into another device, or some features may be omitted, or not executed.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical modules, may be located in one place, or may be distributed on a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may be stored in a computer-readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An abnormality detection method for an electric power machine room, comprising:
constructing an input vector matrix according to multi-dimensional sensor time sequence data of a target electric power machine room, acquiring a previous sequence of the input vector matrix by using a window with a preset length, constructing a first vector matrix according to the previous sequence, and fusing the previous sequence and the input vector matrix to obtain a second vector matrix;
inputting the first vector matrix and the second vector matrix into a trained deep learning network model to obtain corresponding reconstruction data; the deep learning network model comprises a first encoder, a second encoder, a first decoder and a second decoder, wherein the first encoder comprises a multi-head attention layer and a feedforward layer, the second encoder comprises a mask multi-head attention layer and an abnormal multi-head attention layer, the abnormal multi-head attention layer is used for calculating a priori association and sequence association, calculating association difference according to the priori association and the sequence association, and amplifying the association difference between normal data and abnormal data by using a maximum minimum strategy;
and scoring the reconstruction data to obtain an abnormal score, and if the abnormal score exceeds a score threshold value, judging that the corresponding machine room equipment is abnormal.
2. The method according to claim 1, wherein the first decoder and the second decoder each comprise a feedforward layer and an activation function.
3. The method for detecting the abnormality of the electric power machine room according to claim 1, wherein the inputting the first vector matrix and the second vector matrix into a trained deep learning network model to obtain corresponding reconstructed data comprises:
performing two-stage data reconstruction according to the first vector matrix and the second vector matrix; when data reconstruction of the first stage is carried out, taking an all-zero matrix as a focus score; when data reconstruction of a second stage is carried out, calculating the deviation norm of the first stage according to the reconstructed output of the first decoder in the first stage and the second vector matrix, combining the deviation norm and the first vector matrix, adding the combined deviation norm and the first vector matrix with position codes, and taking the obtained result as a focus score;
wherein the data reconstruction at each stage comprises:
combining the first vector matrix and the focus fraction, and adding a result obtained by combining and a position code as the input of the first encoder to obtain a first data characteristic output by the first encoder;
adding the second vector matrix and the position code into a mask multi-head attention layer of the second encoder, adding the obtained result and the corresponding original input and normalizing to obtain a second data characteristic;
inputting the first data characteristic and the second data characteristic into an abnormal multi-head attention layer of the second encoder, adding the obtained result and the second data characteristic, and normalizing to obtain a third data characteristic;
and taking the third data characteristic as the input of the first decoder and the second decoder to obtain the reconstructed output of the first decoder and the second decoder.
4. The method for detecting the abnormality in the electric power machine room according to claim 3, wherein the two-stage data reconstruction according to the first vector matrix and the second vector matrix comprises:
in the first stage of data reconstruction, the following loss function is used:
Figure 583082DEST_PATH_IMAGE001
in the formula (I), the compound is shown in the specification,
Figure 869707DEST_PATH_IMAGE002
indicating the corresponding loss of the first stage,
Figure 993521DEST_PATH_IMAGE003
in order to train the parameters of the device,
Figure 340189DEST_PATH_IMAGE004
in order to train the number of the rounds,
Figure 815032DEST_PATH_IMAGE005
for the first decoder output after reconstruction in the first stage,
Figure 905348DEST_PATH_IMAGE006
for the said second vector matrix to be said,
Figure 149248DEST_PATH_IMAGE007
for the second decoder output after reconstruction in the second stage,
Figure 338920DEST_PATH_IMAGE008
in order to lose the parameters of the process,
Figure 324498DEST_PATH_IMAGE009
is the correlation difference;
in the second stage of data reconstruction, the following loss function is used:
Figure 952925DEST_PATH_IMAGE010
in the formula (I), the compound is shown in the specification,
Figure 316910DEST_PATH_IMAGE011
the corresponding loss in the second stage is indicated,
Figure 677485DEST_PATH_IMAGE012
and outputting the second decoder after the reconstruction of the first stage.
5. The method for detecting the abnormality of the electric power machine room according to claim 3, wherein the scoring the reconstruction data to obtain an abnormality score includes:
scoring the reconstructed data according to the following scoring formula:
Figure 126921DEST_PATH_IMAGE014
in the formula (I), the compound is shown in the specification,
Figure 559039DEST_PATH_IMAGE015
the number of the abnormal points is represented,
Figure 449634DEST_PATH_IMAGE005
for the first decoder output after reconstruction in the first stage,
Figure 309006DEST_PATH_IMAGE006
for the said second vector matrix to be said,
Figure 980159DEST_PATH_IMAGE007
for the second decoder output after reconstruction in the second stage,
Figure 153651DEST_PATH_IMAGE009
in order to correlate the differences, the correlation data is,
Figure 226649DEST_PATH_IMAGE016
is a normalized exponential function.
6. The method for detecting the abnormality of the electric power machine room according to claim 5, wherein the step of determining that the corresponding machine room equipment is abnormal if the abnormality score exceeds a score threshold value includes:
determining the score threshold by a POT model based on the anomaly score.
7. The method for detecting the abnormality in the electric power machine room according to claim 1, wherein the constructing an input vector matrix from the multidimensional sensor time-series data of the target electric power machine room comprises:
when an input vector matrix is constructed, the corresponding multidimensional sensor time sequence is subjected to normalization processing according to the following formula:
Figure 256922DEST_PATH_IMAGE017
in the formula (I), the compound is shown in the specification,
Figure 415371DEST_PATH_IMAGE018
for multidimensional sensor time series
Figure 126975DEST_PATH_IMAGE019
To middle
Figure 54480DEST_PATH_IMAGE020
The number of the vectors is such that,
Figure 255654DEST_PATH_IMAGE021
is a pair of
Figure 839082DEST_PATH_IMAGE018
The result obtained after the normalization treatment is carried out,
Figure 151115DEST_PATH_IMAGE022
for multidimensional sensor time series
Figure 198705DEST_PATH_IMAGE019
The vector with the smallest median modulus is used,
Figure 570781DEST_PATH_IMAGE023
for multidimensional sensor time series
Figure 641505DEST_PATH_IMAGE019
The vector of the largest of the median modes,
Figure 757229DEST_PATH_IMAGE024
is a very small vector that prevents zero division.
8. An abnormality detection device for an electric power machine room, comprising:
the data preparation module is used for constructing an input vector matrix according to the multi-dimensional sensor time sequence data of the target electric power machine room, acquiring a previous sequence of the input vector matrix by using a window with a preset length, constructing a first vector matrix according to the previous sequence, and fusing the previous sequence and the input vector matrix to obtain a second vector matrix;
the anomaly detection module is used for inputting the first vector matrix and the second vector matrix into a trained deep learning network model to obtain corresponding reconstruction data; the deep learning network model comprises a first encoder, a second encoder, a first decoder and a second decoder, wherein the first encoder comprises a multi-head attention layer and a feedforward layer, the second encoder comprises a mask multi-head attention layer and an abnormal multi-head attention layer, the abnormal multi-head attention layer is used for calculating a priori association and sequence association, calculating association difference according to the priori association and the sequence association, and amplifying the association difference between normal data and abnormal data by using a maximum minimum strategy;
and the abnormity judgment module is used for scoring the reconstruction data to obtain an abnormity score, and if the abnormity score exceeds a score threshold value, judging that the corresponding machine room equipment is abnormal.
9. The utility model provides an electric power computer lab anomaly detection equipment which characterized in that includes:
a memory to store instructions; the instruction is used for realizing the abnormity detection method of the electric power machine room according to any one of claims 1-7;
a processor to execute the instructions in the memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the electrical power room abnormality detection method according to any one of claims 1 to 7.
CN202211002791.2A 2022-08-22 2022-08-22 Method, device and equipment for detecting abnormity of electric power machine room and readable storage medium Active CN115078894B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211002791.2A CN115078894B (en) 2022-08-22 2022-08-22 Method, device and equipment for detecting abnormity of electric power machine room and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211002791.2A CN115078894B (en) 2022-08-22 2022-08-22 Method, device and equipment for detecting abnormity of electric power machine room and readable storage medium

Publications (2)

Publication Number Publication Date
CN115078894A true CN115078894A (en) 2022-09-20
CN115078894B CN115078894B (en) 2023-01-06

Family

ID=83244428

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211002791.2A Active CN115078894B (en) 2022-08-22 2022-08-22 Method, device and equipment for detecting abnormity of electric power machine room and readable storage medium

Country Status (1)

Country Link
CN (1) CN115078894B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116662811A (en) * 2023-06-13 2023-08-29 无锡物联网创新中心有限公司 Time sequence state data reconstruction method and related device of industrial equipment
CN117407697A (en) * 2023-12-14 2024-01-16 南昌科晨电力试验研究有限公司 Graph anomaly detection method and system based on automatic encoder and attention mechanism
CN118094454A (en) * 2024-04-29 2024-05-28 国网山东省电力公司嘉祥县供电公司 Power distribution network load data anomaly detection method and system

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112418149A (en) * 2020-12-04 2021-02-26 清华大学深圳国际研究生院 Abnormal behavior detection method based on deep convolutional neural network
CN112488235A (en) * 2020-12-11 2021-03-12 江苏省特种设备安全监督检验研究院 Elevator time sequence data abnormity diagnosis method based on deep learning
CN113516228A (en) * 2021-07-08 2021-10-19 哈尔滨理工大学 Network anomaly detection method based on deep neural network
CN113901845A (en) * 2021-09-15 2022-01-07 昆明理工大学 Low-resource neural machine translation method based on bidirectional dependency self-attention mechanism
WO2022064350A1 (en) * 2020-09-22 2022-03-31 Victoria Link Limited Electricity distribution network fault detection system and method
CN114386521A (en) * 2022-01-14 2022-04-22 湖南师范大学 Method, system, device and storage medium for detecting abnormality of time-series data
US20220187819A1 (en) * 2020-12-10 2022-06-16 Hitachi, Ltd. Method for event-based failure prediction and remaining useful life estimation
CN114881331A (en) * 2022-05-09 2022-08-09 西安交通大学 Learner abnormal learning state prediction method facing online education
CN114913396A (en) * 2022-07-15 2022-08-16 西北工业大学 Motor bearing fault diagnosis method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022064350A1 (en) * 2020-09-22 2022-03-31 Victoria Link Limited Electricity distribution network fault detection system and method
CN112418149A (en) * 2020-12-04 2021-02-26 清华大学深圳国际研究生院 Abnormal behavior detection method based on deep convolutional neural network
US20220187819A1 (en) * 2020-12-10 2022-06-16 Hitachi, Ltd. Method for event-based failure prediction and remaining useful life estimation
CN112488235A (en) * 2020-12-11 2021-03-12 江苏省特种设备安全监督检验研究院 Elevator time sequence data abnormity diagnosis method based on deep learning
CN113516228A (en) * 2021-07-08 2021-10-19 哈尔滨理工大学 Network anomaly detection method based on deep neural network
CN113901845A (en) * 2021-09-15 2022-01-07 昆明理工大学 Low-resource neural machine translation method based on bidirectional dependency self-attention mechanism
CN114386521A (en) * 2022-01-14 2022-04-22 湖南师范大学 Method, system, device and storage medium for detecting abnormality of time-series data
CN114881331A (en) * 2022-05-09 2022-08-09 西安交通大学 Learner abnormal learning state prediction method facing online education
CN114913396A (en) * 2022-07-15 2022-08-16 西北工业大学 Motor bearing fault diagnosis method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
汪涛等: "基于 Transformer 的多轨音乐生成对抗网络", 《计算机应用》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116662811A (en) * 2023-06-13 2023-08-29 无锡物联网创新中心有限公司 Time sequence state data reconstruction method and related device of industrial equipment
CN116662811B (en) * 2023-06-13 2024-02-06 无锡物联网创新中心有限公司 Time sequence state data reconstruction method and related device of industrial equipment
CN117407697A (en) * 2023-12-14 2024-01-16 南昌科晨电力试验研究有限公司 Graph anomaly detection method and system based on automatic encoder and attention mechanism
CN117407697B (en) * 2023-12-14 2024-04-02 南昌科晨电力试验研究有限公司 Graph anomaly detection method and system based on automatic encoder and attention mechanism
CN118094454A (en) * 2024-04-29 2024-05-28 国网山东省电力公司嘉祥县供电公司 Power distribution network load data anomaly detection method and system
CN118094454B (en) * 2024-04-29 2024-07-05 国网山东省电力公司嘉祥县供电公司 Power distribution network load data anomaly detection method and system

Also Published As

Publication number Publication date
CN115078894B (en) 2023-01-06

Similar Documents

Publication Publication Date Title
CN115078894B (en) Method, device and equipment for detecting abnormity of electric power machine room and readable storage medium
Zhang et al. LSTM-based analysis of industrial IoT equipment
Cai et al. Data-driven early fault diagnostic methodology of permanent magnet synchronous motor
Zhang et al. Fruit classification by biogeography‐based optimization and feedforward neural network
Feng et al. Similarity-based meta-learning network with adversarial domain adaptation for cross-domain fault identification
Deng et al. Modified kernel principal component analysis using double-weighted local outlier factor and its application to nonlinear process monitoring
Dorj et al. A bayesian hidden markov model-based approach for anomaly detection in electronic systems
Zhang et al. A novel data-driven method based on sample reliability assessment and improved CNN for machinery fault diagnosis with non-ideal data
EP3422517A1 (en) A method for recognizing contingencies in a power supply network
Bilski Application of support vector machines to the induction motor parameters identification
Wang et al. Decision tree based control chart pattern recognition
Sedigh Ziyabari et al. Robust fault estimation of a blade pitch and drivetrain system in wind turbine model
Li et al. Fault diagnosis using pattern classification based on one-dimensional adaptive rank-order morphological filter
Ding et al. A zero-shot soft sensor modeling approach using adversarial learning for robustness against sensor fault
Man et al. Bearing remaining useful life prediction based on AdCNN and CWGAN under few samples
Duan et al. High-speed bearing health monitoring method based on attention mechanism optimized siamese deep residual network
Ayodeji et al. An empirical evaluation of attention-based multi-head models for improved turbofan engine remaining useful life prediction
Baek An intelligent condition‐based maintenance scheduling model
Dwiputranto et al. Machinery equipment early fault detection using Artificial Neural Network based Autoencoder
Zhang et al. Generalized maximum correntropy-based echo state network for robust nonlinear system identification
CN114004258B (en) Semi-supervised electrocardiographic abnormality detection method
CN110941542A (en) Sequence integration high-dimensional data anomaly detection system and method based on elastic network
Itoh et al. Bifurcation diagrams in estimated parameter space using a pruned extreme learning machine
Ghate et al. Induction machine fault detection using support vector machine based classifier
Gonzalez-Abreu et al. Deep learning based condition monitoring approach applied to power quality

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