CN112329865A - Data anomaly identification method and device based on self-encoder and computer equipment - Google Patents

Data anomaly identification method and device based on self-encoder and computer equipment Download PDF

Info

Publication number
CN112329865A
CN112329865A CN202011242143.5A CN202011242143A CN112329865A CN 112329865 A CN112329865 A CN 112329865A CN 202011242143 A CN202011242143 A CN 202011242143A CN 112329865 A CN112329865 A CN 112329865A
Authority
CN
China
Prior art keywords
self
encoder
vector
encoders
time sequence
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
CN202011242143.5A
Other languages
Chinese (zh)
Other versions
CN112329865B (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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Priority to CN202011242143.5A priority Critical patent/CN112329865B/en
Publication of CN112329865A publication Critical patent/CN112329865A/en
Priority to PCT/CN2021/097550 priority patent/WO2022095434A1/en
Application granted granted Critical
Publication of CN112329865B publication Critical patent/CN112329865B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • 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

Landscapes

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

Abstract

The application relates to the technical field of artificial intelligence, and provides a data anomaly identification method and device based on an autoencoder, computer equipment and a storage medium, wherein the method comprises the following steps: receiving an input time sequence to be detected; based on the time sequence, carrying out integrated training processing on a preset number of sparsely connected self-encoders according to a preset rule to generate a corresponding self-encoder integrated frame; calculating an abnormal score value corresponding to each vector contained in the time sequence through a self-encoder integrated framework; and identifying whether an abnormal data value exists in the time sequence or not according to the abnormal score value. By the method and the device, whether the abnormal data value exists in the time sequence can be accurately identified, and the identification accuracy of the abnormal data value in the time sequence is effectively improved. The present application also relates to the field of blockchains, where the self-encoder integrated framework may be stored in a blockchain.

Description

Data anomaly identification method and device based on self-encoder and computer equipment
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a data anomaly identification method and device based on an autoencoder and computer equipment.
Background
With the advent of the big data era, various emerging topics such as cloud computing and the internet of things are brought forward, wherein the mining of potential data finally needed by people from mass data becomes more and more important. Conventional data mining is primarily concerned with data models that contain large amounts of data, while detection of anomalous data is of less interest. In fact, although it is inherently important to analyze and mine useful data, an abnormal value in which a deviation of important data occurs also contains a large amount of useful information, and may affect the data, make the data deformed, and fail to obtain a correct result, and thus detection of abnormal data is also not negligible.
In the prior art, most of the current anomaly detection methods are based on statistics and mainly comprise a deviation-based method, a method based on assigned recommended score value distribution, a distance-based method, a density-based method and the like, but these types of methods need to know the distribution of data in advance, and in addition, most of the anomaly detection algorithms based on statistics are only suitable for mining numerical data of single variables, are not suitable for time series data, have less ideal effect if directly applied to the time series data, and have low identification accuracy for the anomaly data.
Disclosure of Invention
The application mainly aims to provide a data anomaly identification method, a data anomaly identification device, a computer device and a storage medium based on a self-encoder, and aims to solve the technical problems that the existing anomaly detection method is not suitable for time series data, the effect is not ideal if the existing anomaly detection method is directly applied to the time series data, and the identification accuracy of the anomaly data is low.
The application provides a data anomaly identification method based on an autoencoder, which comprises the following steps:
receiving an input time sequence to be detected;
based on the time sequence, performing integrated training processing on a preset number of self-encoders which are generated in advance and connected sparsely according to a preset rule to generate a corresponding self-encoder integrated framework, wherein the self-encoders which are generated in advance are respectively generated after unit connection deletion processing is performed on the preset number of self-encoders based on the recurrent neural network;
calculating an abnormal score value corresponding to each vector contained in the time sequence through the self-encoder integration framework;
and identifying whether an abnormal data value exists in the time sequence or not according to the abnormal score value.
Optionally, the step of performing, based on the time series, an integrated training process on a preset number of sparsely connected self-encoders generated in advance according to a preset rule to generate a corresponding self-encoder integrated frame includes:
acquiring all first vectors contained in the time sequence; and the number of the first and second groups,
acquiring a first reconstruction vector which is generated by each self-encoder of the sparse connection based on each first vector and corresponds to one;
generating a corresponding first objective function based on the first vector and the first reconstruction vector;
training each self-encoder in sparse connection based on the first objective function to obtain a trained first self-encoder, wherein the number of the first self-encoders is the same as that of the self-encoders in sparse connection;
performing integrated processing on all the first self-encoders to generate corresponding independent frames, wherein the independent frames contain a specified number of the first self-encoders, and interaction is not generated between the first self-encoders;
determining the independent framework as the self-encoder integrated framework.
Optionally, the step of performing, based on the time series, an integrated training process on a preset number of sparsely connected self-encoders generated in advance according to a preset rule to generate a corresponding self-encoder integrated frame includes:
acquiring a preset sharing layer, wherein the sharing layer comprises a sharing hidden state;
carrying out weight sharing processing on all the sparsely connected self-coders through the sharing layer;
performing L1 regularization processing on the shared hidden state to obtain a processed shared hidden state;
acquiring all second vectors contained in the time sequence; and the number of the first and second groups,
acquiring a one-to-one corresponding second reconstruction vector generated by each sparsely connected self-encoder based on each second vector;
generating a corresponding second objective function according to the processed shared hidden state, the second vector and the second reconstruction vector;
performing joint training on all the self-encoders in sparse connection based on the second objective function to obtain a trained second self-encoder, wherein the number of the second self-encoders is the same as that of the self-encoders in sparse connection;
performing integrated processing on all the second self-encoders to generate a corresponding shared frame, wherein the shared frame contains a specified number of the second self-encoders, and interaction exists between the second self-encoders;
determining the shared frame as the self-encoder integrated frame.
Optionally, the step of calculating, by the self-encoder integration framework, an anomaly score value corresponding to each vector included in the time series includes:
calculating and generating a reconstruction error corresponding to a specified vector by each self-encoder contained in the self-encoder integrated framework, wherein the specified vector is any one of all vectors contained in the time sequence;
calculating the median of all the reconstruction errors;
determining the median as a specified anomaly score value corresponding to the specified vector in the time series.
Optionally, the step of generating a reconstruction error corresponding to the specified vector by each self-encoder calculation included in the self-encoder integration framework includes:
reconstructing the time sequence through a specific self-encoder to obtain a specific reconstructed time sequence corresponding to the time sequence, wherein the specific self-encoder is any one of all self-encoders included in the self-encoder integrated frame;
extracting a specific reconstruction vector corresponding to the specified vector from the specific reconstruction time series;
and calculating a specific reconstruction error corresponding to the specified vector according to the specified vector and the specific reconstruction vector.
Optionally, the step of identifying whether there is an abnormal data value in the time series according to the abnormal score value includes:
acquiring a preset abnormal threshold;
judging whether a designated score value with a numerical value larger than the abnormality threshold value exists in all the abnormality score values;
if so, screening the designated score value from all the abnormal score values;
finding a third vector corresponding to the specified score value from the time series;
determining the third vector as the anomalous data value.
Optionally, after the step of determining the third vector as the abnormal data value, the method further comprises:
screening out a fourth vector except the third vector from the time sequence;
marking the second vector as a normal data value;
obtaining a first number corresponding to the third vector; and the number of the first and second groups,
acquiring a second quantity corresponding to the fourth vector;
generating an abnormal analysis report corresponding to the time sequence according to the abnormal data value, the first quantity, the normal data and the second quantity;
and displaying the abnormal analysis report.
The present application further provides a data anomaly identification device based on an autoencoder, including:
the receiving module is used for receiving an input time sequence to be detected;
the training module is used for carrying out integrated training processing on a preset number of self-encoders which are generated in advance and connected sparsely according to a preset rule based on the time sequence to generate a corresponding self-encoder integrated frame, wherein the self-encoders which are generated in advance by respectively carrying out unit connection deletion processing on the preset number of self-encoders based on the recurrent neural network;
the computing module is used for computing an abnormal score value corresponding to each vector contained in the time sequence through the self-encoder integrated framework;
and the identification module is used for identifying whether an abnormal data value exists in the time sequence or not according to the abnormal score value.
The present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
The present application also provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method.
The data anomaly identification method and device based on the self-encoder, the computer equipment and the storage medium have the following beneficial effects:
the data abnormity identification method, the device, the computer equipment and the storage medium based on the self-encoder provided in the application are different from the existing abnormity detection method, the self-encoder integrated frame is adopted to carry out data abnormity identification processing on a time sequence, when the input time sequence to be detected is received, the self-encoder which is improved on the original self-encoder based on the recurrent neural network to generate sparse connection is firstly obtained, then the self-encoder which is generated in advance and connected sparsely is subjected to integrated training processing on the basis of the time sequence to generate the self-encoder integrated frame which can be used for time sequence data abnormity value identification, so that the self-encoder integrated frame can be used for calculating the abnormity score value corresponding to each vector contained in the time sequence, and further, whether the abnormal data value exists in the time sequence can be quickly and accurately identified according to the abnormity score value, the method and the device effectively improve the identification accuracy of the abnormal data values in the time sequence, and have higher identification processing efficiency of the abnormal data values in the time sequence.
Drawings
FIG. 1 is a flow chart of a data anomaly identification method based on a self-encoder according to an embodiment of the present application;
FIG. 2 is a schematic structural diagram of an apparatus for recognizing data anomalies based on a self-encoder according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a computer device according to an embodiment of the present application.
The implementation, functional features and advantages of the objectives of the present application will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
For the purpose of explanation of the embodiments of the present application, some concepts will be briefly described below:
the Recurrent Neural Network (RNN), its essence is: the RNN output is dependent on the current input and memory, since it has the ability to remember like a human. RNN networks introduce directed loops that can handle the problem of contextual associations between those inputs. The full connection between the structural layers of the traditional neural network is broken, the state transition of no connection between nodes of each layer is not in an input-hidden-output mode. Purpose of RNN: processing the contents of the sequence data RNN: the current output of a sequence is also related to the previous input. The specific implementation of RNN: the network memorizes the previous information and applies the previous information to the calculation of the current output, namely, the nodes between the hidden layers are not connected any more, and the input of the hidden layers not only comprises the output of the input layer, but also comprises the output of the hidden layer at the last moment. Functional characteristics of RNN: 1. hidden layer nodes can be interconnected or self-connected; 2. in the RNN network, the output of each step is not necessary, nor is the input of each step necessary. RNN use: language model and text generation research, machine translation, speech recognition, image description generation.
An auto-encoder: the method is a neural network, after training, input can be tried to be copied to output, a hidden layer h is arranged in a self-encoder, and encoding representation input can be generated, and the network can be regarded as comprising two parts: an encoder represented by the function h ═ f (x) and a decoder r ═ g (h) that generates the reconstruction. The conventional self-encoder processes the time sequence as follows: for time series T ═<s1,s2,…,sC>Each vector s in the time seriestAn RNN unit in an encoder of the self-encoder fed to perform the following calculations:
Figure BDA0002768771850000071
wherein s istIs a vector at time step t in the time series, hidden state
Figure BDA0002768771850000072
Is the output of the previous RNN unit at time step t-1 in the encoder, and f (-) is a non-linear function. By the above formula
Figure BDA0002768771850000073
The hidden state of the current RNN unit of the encoder can be obtained at the time step t
Figure BDA0002768771850000074
And then hidden into the next RNN cell at time step t-1. In addition, in the decoder from the encoder, the time sequence is reconstructed in the reverse order, i.e.
Figure BDA0002768771850000075
First, the last hidden state of the encoder is used as the first hidden state of the decoder. Decoder-based
Figure BDA0002768771850000076
Previous hidden state and previously reconstructed vector
Figure BDA0002768771850000077
Reconstructing a current vector
Figure BDA0002768771850000078
And calculates the current hidden state
Figure BDA0002768771850000079
Where g (-) is a non-linear function.
Referring to fig. 1, a data anomaly identification method based on a self-encoder according to an embodiment of the present application includes:
s1: receiving an input time sequence to be detected;
s2: based on the time sequence, performing integrated training processing on a preset number of self-encoders which are generated in advance and connected sparsely according to a preset rule to generate a corresponding self-encoder integrated framework, wherein the self-encoders which are generated in advance are respectively generated after unit connection deletion processing is performed on the preset number of self-encoders based on the recurrent neural network;
s3: calculating an abnormal score value corresponding to each vector contained in the time sequence through the self-encoder integration framework;
s4: and identifying whether an abnormal data value exists in the time sequence or not according to the abnormal score value.
As described in the above steps S1-S4, the main implementation of the present method embodiment is a data anomaly recognition apparatus based on a self-encoder. In practical applications, the data anomaly identification device based on the self-encoder may be implemented by a virtual device, such as a software code, or may be implemented by a physical device written with or integrated with a relevant execution code, and may perform human-computer interaction with a user through a keyboard, a mouse, a remote controller, a touch panel, or a voice control device. The data anomaly identification device based on the self-encoder in the embodiment can quickly and accurately identify the anomalous data values in the time sequence to be detected. Specifically, an input time series to be detected is first received. Wherein the time sequence to be detected is a time sequence to be detected whether an abnormal data value exists, for exampleThe time series may be a Key Performance Indicator (KPI) time series in the server, and the data included in the time series is in a vector form. And then performing integrated training processing on a preset number of self-encoders which are generated in advance and connected sparsely according to a preset rule based on the time sequence to generate a corresponding self-encoder integrated framework, wherein the self-encoders which are generated in advance by performing unit connection deletion processing on the preset number of self-encoders based on the recurrent neural network. Specifically, the generating process of the sparse-connected self-encoder may include: a specified number of recurrent neural network-based autocoders are obtained first. The cyclic neural network-based self-encoder may specifically be a cyclic neural network self-encoder (RSCN) using an additional auxiliary connection, the cyclic neural network self-encoder using the additional auxiliary connection adds an auxiliary connection between each RNN unit, the specified number is not specifically limited, and the number may be set according to actual requirements, and the specified number may be taken as N in this embodiment. And then respectively carrying out unit connection deletion processing on each self-encoder based on the recurrent neural network to generate self-encoders with corresponding number of sparse connections. Because the auxiliary connection is added between each RNN unit by the self-encoder of the recurrent neural network adopting the additional auxiliary connection, a certain difference exists between network layers by cutting off the auxiliary connection between partial RNN units. Specifically, the process of performing the unit connection deletion process on each self-encoder based on the recurrent neural network may include: for an auto-encoder based on a recurrent neural network with additional auxiliary connections, it is possible to control which auxiliary connections should be deleted at each time step t by introducing a sparse weight vector.
Figure BDA0002768771850000081
wtRepresents a sparse weight vector and represents a weight vector,
Figure BDA0002768771850000082
and
Figure BDA0002768771850000083
representing the elements contained in the sparse weight vector. Sparse weight vector wtAt least one element not equal to 0, i.e. wtThe three cases are (0,1), (1,0) and (1, 1). Thus based on the sparse weight vector wtA sparsely connected self-encoder can be generated and the resulting hidden state of each RNN unit within the sparsely connected self-encoder is calculated as follows:
Figure BDA0002768771850000084
wherein s istFor the input of the vector at time step t in the time series data, ht-1Hidden state at time step t-1 in an encoder of an autoencoder for sparse cycles, ht-LHidden state at time step t-L in an encoder of an autoencoder for sparse cycles, wtIs a sparse weight vector, | wt0Represents the vector wtNumber of non-zero elements. Furthermore, unit connection deletion processing can be performed by using a random deletion connection mode according to actual requirements, and for each self-encoder based on the recurrent neural network, the self-encoder in sparse connection is obtained by randomly deleting the connections of some RNN units, so that reconstruction errors obtained after the self-encoder in sparse connection reconstructs a time sequence are different, the application range of the self-encoder is effectively expanded, and the reliability, the accuracy and the generalization of the self-encoder are enhanced. In addition, assuming that the specified number is N, N self-encoders of the sparse cycles are obtained, and the self-encoder of each sparse cycle is encoded by the encoder EiAnd decoder DiAnd i is more than or equal to 1 and less than or equal to N, and each automatic encoder of the sparse cycle has different sparse weight vectors. In addition, the self-encoder integrated framework may include an independent framework and a shared framework. Specifically, the corresponding first objective function may be generated based on all vectors included in the time series and a reconstructed vector corresponding to each vector included in the time series and generated by a sparsely connected self-encoder, and each sparsely connected self-encoder may be trained based on the first objective function to obtain the self-encodingThe device is integrated with the frame. And generating a corresponding second objective function based on all vectors contained in the time sequence, a reconstruction vector generated by the self-encoder in sparse connection and corresponding to each vector contained in the time sequence, and a preset shared hidden state, and performing joint training on all self-encoders in sparse connection based on the second objective function to obtain the self-encoder integrated framework. After the self-encoder integration framework is obtained, the abnormal score value corresponding to each vector contained in the time series is calculated through the self-encoder integration framework. The reconstruction errors corresponding to each vector in the time series can be calculated and generated through each self-encoder included in the self-encoder integrated frame, then for any one appointed vector in the time series, the median of all the reconstruction errors corresponding to the appointed vector is calculated, and further the abnormal score value corresponding to the appointed vector can be obtained. And finally, identifying whether an abnormal data value exists in the time sequence or not according to the abnormal score value. Whether abnormal data values exist in the time sequence can be identified according to a preset abnormal threshold value, and if the abnormal score value corresponding to any one appointed vector in the time sequence is larger than the abnormal threshold value, the appointed vector is determined as the abnormal data value. And if the abnormal score value corresponding to the designated vector is not larger than the abnormal threshold value, the designated vector is determined as a normal data value, namely the designated vector does not belong to an abnormal data value. Different from the existing anomaly detection method, the embodiment adopts the self-encoder integrated framework to perform data anomaly identification processing on the time sequence, when the input time sequence to be detected is received, the original self-encoder based on the cyclic neural network is firstly acquired to be improved to generate the self-encoder in sparse connection, then the pre-generated self-encoder in sparse connection is subjected to integrated training processing on the time sequence to generate the self-encoder integrated framework capable of being used for identifying the time sequence data anomaly value, so that the self-encoder integrated framework can be used for calculating the anomaly score value corresponding to each vector contained in the time sequence, and further the anomaly score value corresponding to each vector contained in the time sequence can be calculated, and further the self-encoder integrated framework can be used for calculating the anomaly score value of eachWhether the abnormal data values exist in the time sequence can be quickly and accurately identified according to the abnormal score value, the identification accuracy of the abnormal data values in the time sequence is effectively improved, and the identification processing efficiency of the abnormal data values in the time sequence is high.
Further, in an embodiment of the present application, the step S2 includes:
s200: acquiring all first vectors contained in the time sequence; and the number of the first and second groups,
s201: acquiring a first reconstruction vector which is generated by each self-encoder of the sparse connection based on each first vector and corresponds to one;
s202: generating a corresponding first objective function based on the first vector and the first reconstruction vector;
s203: training each self-encoder in sparse connection based on the first objective function to obtain a trained first self-encoder, wherein the number of the first self-encoders is the same as that of the self-encoders in sparse connection;
s204: performing integrated processing on all the first self-encoders to generate corresponding independent frames, wherein the independent frames contain a specified number of the first self-encoders, and interaction is not generated between the first self-encoders;
s205: determining the independent framework as the self-encoder integrated framework.
As described in steps S200 to S205, the self-encoder integrated framework may be an independent framework generated based on all the self-encoders in sparse connection, and the training process of the independent framework is performed by training each different self-encoder in sparse connection separately, so that each self-encoder in sparse connection does not generate interaction in the training phase, and no interaction occurs between each self-encoder included in the generated independent framework. Specifically, the step of generating the corresponding self-encoder integration frame by performing the integration training process on the pre-generated self-encoders with the specified number of sparse connections according to the preset rule based on the time sequence may include: first, all the first vectors included in the time series are obtained. Wherein, the input time sequence to be detected may be: t ═<s1,s2,…,sC>Vector s contained in time series T1,s2,…,sCThe first vector is then considered as the above-mentioned first vector. And simultaneously acquiring first reconstruction vectors which are generated by the self-encoder of each sparse connection based on each first vector and correspond to one another, wherein any self-encoder of the sparse connection generates a reconstruction time sequence corresponding to the time sequence after reconstructing the time sequence
Figure BDA0002768771850000111
And reconstruct the time series
Figure BDA0002768771850000112
Vector contained in
Figure BDA0002768771850000113
The first vectors are regarded as first reconstruction vectors corresponding to the first vectors respectively. And then generating a corresponding first objective function based on the first vector and the first reconstruction vector. Wherein, the difference between the input vector in the time series and the corresponding reconstructed vector generated by the self-encoder with sparse connection and corresponding to the input vector can be minimized as the first objective function JiAnd using the first objective function JiTo train each sparsely connected self-encoder independently. Specifically, the first objective function may be:
Figure BDA0002768771850000114
wherein, JiIs a first objective function, stIs a vector at time step t in the time series,
Figure BDA0002768771850000115
representing the decoder D contained in the self-encoder from the sparse connection at time step tiGenerating a vector stThe reconstructed vector of (a) is obtained,
Figure BDA0002768771850000116
is the L2-norm of the vector. And after the first objective function is obtained, training each sparsely connected self-encoder based on the first objective function to obtain a trained first self-encoder, wherein the number of the first self-encoders is the same as that of the sparsely connected self-encoders. And after the first self-encoders are obtained, performing integrated processing on all the first self-encoders to generate corresponding independent frameworks. The independent frame contains a designated number of the first self-encoders, and interaction between the first self-encoders does not occur. Specifically, all the first self-encoders may be integrated into a preset integration frame to generate the independent frame. In addition, each decoder D in the independent frameworkiWill independent hidden state
Figure BDA0002768771850000117
As initial hidden state and corresponding weight matrix
Figure BDA0002768771850000118
Linear combinations of (3). And finally, when the independent frame is obtained, determining the independent frame as the self-encoder integrated frame. In the embodiment, the independent frame composed of the self-encoders in the specified number and with different network structures and sparse connections is generated through training, and the reconstruction errors from the self-encoders are considered when the independent frame is used for anomaly detection, so that the variance of the total reconstruction errors is reduced, and the anomaly score value corresponding to each vector contained in the time sequence can be accurately calculated according to the independent frame in the following process, and then whether the abnormal data value exists in the time sequence is quickly and accurately identified according to the anomaly score value, so that the identification efficiency and the identification accuracy of the abnormal data value in the time sequence are effectively improved.
Further, in an embodiment of the present application, the step S2 includes:
s210: acquiring a preset sharing layer, wherein the sharing layer comprises a sharing hidden state;
s211: carrying out weight sharing processing on all the sparsely connected self-coders through the sharing layer;
s212: performing L1 regularization processing on the shared hidden state to obtain a processed shared hidden state;
s213: acquiring all second vectors contained in the time sequence; and the number of the first and second groups,
s214: acquiring a one-to-one corresponding second reconstruction vector generated by each sparsely connected self-encoder based on each second vector;
s215: generating a corresponding second objective function according to the processed shared hidden state, the second vector and the second reconstruction vector;
s216: performing joint training on all the self-encoders in sparse connection based on the second objective function to obtain a trained second self-encoder, wherein the number of the second self-encoders is the same as that of the self-encoders in sparse connection;
s217: performing integrated processing on all the second self-encoders to generate a corresponding shared frame, wherein the shared frame contains a specified number of the second self-encoders, and interaction exists between the second self-encoders;
s218: determining the shared frame as the self-encoder integrated frame.
As described in steps S210 to S218, the self-encoder integrated framework may be a shared framework including different self-encoders generated based on all the sparsely connected self-encoders and a predetermined shared layer, and since the shared framework includes interactions between different self-encoders, the accuracy of identifying abnormal data values in the time series may be further improved compared to the independent framework. Specifically, the self-encoder with a specified number of pre-generated sparsely connected self-encoders is subjected to integrated training processing according to a preset rule based on the time sequence to generate a corresponding self-encodingThe encoder integration framework may include: firstly, a preset sharing layer is obtained, and weight sharing processing is carried out on all the sparsely connected self-coders through the sharing layer, wherein the sharing layer comprises a sharing hidden state. In addition, the shared layer is the last hidden state of the encoder connecting all the sparse connections
Figure BDA0002768771850000131
And corresponding weight matrix
Figure BDA0002768771850000132
In particular, sharing layers, i.e. sharing hidden states
Figure BDA0002768771850000133
Figure BDA0002768771850000134
And then performing L1 regularization processing on the shared hidden state to obtain a processed shared hidden state. Wherein, the shared hidden state can be enabled by performing L1 regularization processing on the shared hidden state
Figure BDA0002768771850000135
And (4) sparse. And further, some encoders are prevented from over-fitting the time sequence, so that the decoder has a wider application range and is not easily influenced by abnormal data values. And acquiring all second vectors contained in the time series after the processed shared hidden state is obtained. Wherein, the input time sequence to be detected may be: t ═<s1,s2,…,sC>Vector s contained in time series T1,s2,…,sCI.e. as the second vector mentioned above. And simultaneously acquiring one-to-one corresponding second reconstruction vectors generated by the self-encoder of each sparse connection based on each second vector. Wherein each of the sparsely connected self-encoders generates a reconstructed time series corresponding to the time series by reconstructing the time series
Figure BDA0002768771850000136
And reconstruct the time series
Figure BDA0002768771850000137
Vector contained in
Figure BDA0002768771850000138
I.e. as the second reconstruction vectors corresponding to the above-mentioned second vectors, respectively. And then generating a corresponding second objective function according to the processed shared hidden state, the second vector and the second reconstruction vector. Specifically, the second objective function may specifically be:
Figure BDA0002768771850000139
Figure BDA00027687718500001310
where λ is the weight parameter that controls the importance of the L1 regularization term, stIs a vector at time step t in the time series,
Figure BDA00027687718500001311
indicating that at time step t, from decoder DiThe reconstructed vector of (a) is then reconstructed,
Figure BDA00027687718500001312
is the shared hidden state after the regularization process of L1,
Figure BDA00027687718500001313
is the L2-norm, J, of the vectoriIs the first objective function. And after the second objective function is obtained, performing joint training on all the sparsely connected self-encoders based on the second objective function to obtain trained second self-encoders, wherein the number of the second self-encoders is the same as that of the sparsely connected self-encoders. And then, performing integrated processing on all the second self-encoders to generate corresponding sharing frameworks. Wherein the sharing frame contains a designated number of the second self-encodingAnd the second self-coders are interacted with each other. In addition, all the second self-encoders may be integrated into a preset integration frame to generate the sharing frame. And finally, determining the shared frame as the self-encoder integrated frame. In the embodiment, a sharing frame composed of a specified number of sparsely connected self-encoders with different network structures is generated through training, and since reconstruction errors from a plurality of self-encoders are considered when the sharing frame is used for anomaly detection, and interaction can be generated among the sparsely connected self-encoders, the variance of the total reconstruction errors is further favorably reduced, so that an anomaly score value corresponding to each vector contained in the time sequence is accurately calculated according to the sharing frame, and whether an abnormal data value exists in the time sequence is rapidly and accurately identified according to the anomaly score value, so that the identification efficiency and the identification accuracy of the abnormal data value in the time sequence are effectively improved.
Further, in an embodiment of the present application, the step S3 includes:
s300: calculating and generating a reconstruction error corresponding to a specified vector by each self-encoder contained in the self-encoder integrated framework, wherein the specified vector is any one of all vectors contained in the time sequence;
s301: calculating the median of all the reconstruction errors;
s302: determining the median as a specified anomaly score value corresponding to the specified vector in the time series.
As described in the above steps S300 to S302, the step of calculating the abnormal score value corresponding to each vector included in the time series by the self-encoder framework may specifically include: first, a reconstruction error corresponding to a specific vector is calculated and generated by each self-encoder included in the self-encoder integrated framework, wherein the specific vector is any one of all vectors included in the time series. Specifically, assuming that the above specified number is N, T is equal to the original time series<s1,s2,…,sC>Of any one vector skThe vector s can be generated by N self-encoders included in the self-encoder integration frameworkkCorresponding N reconstruction errors { a1,a2,…,aN}. In addition, the generation process of the reconstruction error may include: generating reconstruction time sequences corresponding to the time sequences by N self-coders contained in a self-coder integrated frame, and extracting vectors s from the reconstruction time sequenceskCorresponding reconstructed vector, thereby invoking vector skAnd a calculation formula associated with the corresponding reconstructed vector to calculate the quantity skCorresponding reconstruction error. The median of all the above reconstruction errors is then calculated. Wherein, the formula OS(s) can be passedk)=median{a1,a2,…,aNAnd (4) calculating the median. And finally, determining the median as a specified abnormal score value corresponding to the specified vector in the time series. Here, in order to reduce the influence of the reconstruction error from the self-encoder, the median of N reconstruction errors is used as the vector skThe final anomaly score value of (a). The independent framework and the shared framework calculate the abnormal point value corresponding to each vector included in the time series by using the same calculation formula. In the embodiment, the reconstruction errors corresponding to the designated vectors are calculated and generated by using each self-encoder included in the self-encoder integrated frame, and then the median of all the reconstruction errors is the designated abnormal score value corresponding to the designated vectors in the time series, so that the abnormal score value corresponding to each vector included in the time series is accurately calculated and calculated, and then whether the abnormal data value exists in the time series or not is rapidly and accurately identified according to the abnormal score value, so that the identification efficiency and the identification accuracy of the abnormal data value in the time series are effectively improved.
Further, in an embodiment of the present application, the step S300 includes:
s3000: reconstructing the time sequence through a specific self-encoder to obtain a specific reconstructed time sequence corresponding to the time sequence, wherein the specific self-encoder is any one of all self-encoders included in the self-encoder integrated frame;
s3001: extracting a specific reconstruction vector corresponding to the specified vector from the specific reconstruction time series;
s3002: and calculating a specific reconstruction error corresponding to the specified vector according to the specified vector and the specific reconstruction vector.
As described in steps S3000 to S3002, the step of calculating and generating the reconstruction error corresponding to the designated vector by each self-encoder included in the self-encoder framework may specifically include: firstly, a specific self-encoder reconstructs the time sequence to obtain a specific reconstructed time sequence corresponding to the time sequence, wherein the specific self-encoder is any one of all self-encoders included in the self-encoder integrated frame. Wherein, the input time sequence to be detected may be: t ═<s1,s2,…,sC>The specific autoencoder can generate a reconstructed time series corresponding to the time series by reconstructing the time series
Figure BDA0002768771850000151
I is more than or equal to 1 and less than or equal to N. Then, a specific reconstruction vector corresponding to the specified vector is extracted from the specific reconstruction time series. Wherein, for the specified vector s in the time serieskReconstruction time series that can be generated from a specific self-encoder
Figure BDA0002768771850000161
Extracts the vector s associated with the designated vectorkCorresponding specific reconstruction vector
Figure BDA0002768771850000162
Finally, according to the appointed vector and the specific reconstruction vector, calculating the specific reconstruction error corresponding to the appointed vector. Wherein, can pass through the formula
Figure BDA0002768771850000163
To calculate a specific reconstruction error corresponding to the specified vector.
Further, can be represented by a formula
Figure BDA0002768771850000164
Figure BDA0002768771850000165
To calculate a specified anomaly score value corresponding to the specified vector in the time series. Therefore, the reconstruction error corresponding to the appointed vector can be calculated and generated according to each self-encoder contained in the self-encoder integrated frame in the following process, the abnormal score value corresponding to each vector contained in the time sequence can be calculated rapidly, whether the abnormal data value exists in the time sequence or not can be identified rapidly and accurately according to the abnormal score value in the following process, and the identification efficiency and the identification accuracy of the abnormal data value in the time sequence can be improved effectively.
Further, in an embodiment of the present application, the step S4 includes:
s400: acquiring a preset abnormal threshold;
s401: judging whether a designated score value with a numerical value larger than the abnormality threshold value exists in all the abnormality score values;
s402: if so, screening the designated score value from all the abnormal score values;
s403: finding a third vector corresponding to the specified score value from the time series;
s404: determining the third vector as the anomalous data value.
As described in the foregoing steps S400 to S404, the step of identifying whether there is an abnormal data value in the time series according to the abnormal score value may specifically include first obtaining a preset abnormal threshold value. The value of the abnormal threshold is not specifically limited, and may be generated based on corresponding statistical calculation of the historical time-series data, or may be set according to actual requirements. Then, it is determined whether there is a specified point value having a value greater than the abnormality threshold value among all the abnormality point values. And if a designated score value with a value larger than the abnormality threshold value exists in all the abnormality score values, screening the designated score value from all the abnormality score values. And then finding out a third vector corresponding to the specified fraction value from the time sequence. And finally, when the third vector is obtained, determining the third vector as the abnormal data value. In the present embodiment, the self-encoder integration framework is used to calculate the anomaly score value corresponding to each vector included in the time series. By comparing the abnormal score value with a preset abnormal threshold value, the appointed score value which is larger than the abnormal threshold value in all the abnormal score values is searched from the time sequence, and the corresponding third vector corresponding to the appointed score value in the time sequence is determined as the abnormal data value, so that the accurate identification of the abnormal data value contained in the time sequence is realized, and the identification efficiency of the abnormal data in the time sequence is effectively improved.
Further, in an embodiment of the application, after the step S404, the method includes:
s405: screening out a fourth vector except the third vector from the time sequence;
s406: marking the second vector as a normal data value;
s407: obtaining a first number corresponding to the third vector; and the number of the first and second groups,
s408: acquiring a second quantity corresponding to the fourth vector;
s409: generating an abnormal analysis report corresponding to the time sequence according to the abnormal data value, the first quantity, the normal data and the second quantity;
s410: and displaying the abnormal analysis report.
As described in steps S405 to S410, after the abnormal data values in the time series are obtained, a corresponding abnormal analysis report may be further generated according to the abnormal data values and the related data, and specifically, after the step of determining the third vector as the abnormal data values, the method may further include: first, a fourth vector except the third vector is screened out from the time sequence, and the second vector is marked as a normal data value. Then, a first number corresponding to the third vector is obtained. And simultaneously acquiring a second quantity corresponding to the fourth vector. And generating an abnormal analysis report corresponding to the time series according to the abnormal data value, the first quantity, the normal data and the second quantity. Wherein each of the abnormal analysis reports at least includes the abnormal data value, the first quantity, the normal data, and the second quantity. And finally, after the abnormal analysis report is obtained, displaying the abnormal analysis report so that a user can clearly know the specific distribution condition and the specific scale of the abnormal data values and the specific distribution condition and the specific scale of the normal data values contained in the time sequence to be detected according to the abnormal analysis report. The display mode of the above-mentioned abnormal analysis report is not specifically limited, and may be set according to the implementation requirement.
The data anomaly identification method based on the self-encoder in the embodiment of the application can also be applied to the field of block chains, for example, the data such as the self-encoder integrated framework is stored on the block chains. By storing and managing the self-encoder integrated framework by using the block chain, the security and the non-tamper property of the self-encoder integrated framework can be effectively ensured.
The block chain is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism and an encryption algorithm. A block chain (Blockchain), which is essentially a decentralized database, is a series of data blocks associated by using a cryptographic method, and each data block contains information of a batch of network transactions, so as to verify the validity (anti-counterfeiting) of the information and generate a next block. The blockchain may include a blockchain underlying platform, a platform product service layer, an application service layer, and the like.
The block chain underlying platform can comprise processing modules such as user management, basic service, intelligent contract and operation monitoring. The user management module is responsible for identity information management of all blockchain participants, and comprises public and private key generation maintenance (account management), key management, user real identity and blockchain address corresponding relation maintenance (authority management) and the like, and under the authorization condition, the user management module supervises and audits the transaction condition of certain real identities and provides rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node equipment and used for verifying the validity of the service request, recording the service request to storage after consensus on the valid request is completed, for a new service request, the basic service firstly performs interface adaptation analysis and authentication processing (interface adaptation), then encrypts service information (consensus management) through a consensus algorithm, transmits the service information to a shared account (network communication) completely and consistently after encryption, and performs recording and storage; the intelligent contract module is responsible for registering and issuing contracts, triggering the contracts and executing the contracts, developers can define contract logics through a certain programming language, issue the contract logics to a block chain (contract registration), call keys or other event triggering and executing according to the logics of contract clauses, complete the contract logics and simultaneously provide the function of upgrading and canceling the contracts; the operation monitoring module is mainly responsible for deployment, configuration modification, contract setting, cloud adaptation in the product release process and visual output of real-time states in product operation, such as: alarm, monitoring network conditions, monitoring node equipment health status, and the like.
Referring to fig. 2, an embodiment of the present application further provides an apparatus for identifying data anomalies based on an autoencoder, including:
the receiving module 1 is used for receiving an input time sequence to be detected;
the training module 2 is configured to perform integrated training processing on a preset specified number of sparsely connected self-encoders according to a preset rule based on the time sequence to generate a corresponding self-encoder integrated frame, where the sparsely connected self-encoders are generated by performing unit connection deletion processing on the specified number of self-encoders based on the recurrent neural network, respectively;
the calculating module 3 is used for calculating an abnormal score value corresponding to each vector contained in the time sequence through the self-encoder integrated framework;
and the identification module 4 is used for identifying whether an abnormal data value exists in the time sequence according to the abnormal score value.
In this embodiment, the implementation processes of the functions and actions of the receiving module, the training module, the calculating module and the identifying module in the data anomaly identification apparatus based on the self-encoder are specifically described in the implementation processes corresponding to steps S1 to S4 in the data anomaly identification method based on the self-encoder, and are not described herein again.
Further, in an embodiment of the present application, the training module includes:
a first obtaining unit, configured to obtain all first vectors included in the time series; and the number of the first and second groups,
a second obtaining unit, configured to obtain a one-to-one corresponding first reconstruction vector generated by each self-encoder of the sparse connection based on each first vector;
a first generating unit, configured to generate a corresponding first objective function based on the first vector and the first reconstruction vector;
a first training unit, configured to train each of the sparsely connected self-encoders based on the first objective function, respectively, to obtain trained first self-encoders, where the number of the first self-encoders is the same as the number of the sparsely connected self-encoders;
the first processing unit is used for performing integrated processing on all the first self-encoders to generate corresponding independent frames, wherein the independent frames contain a specified number of the first self-encoders, and interaction does not occur between the first self-encoders;
a first determining unit for determining the independent frame as the self-encoder integrated frame.
In this embodiment, the implementation process of the functions and actions of the first obtaining unit, the second obtaining unit, the first generating unit, the first training unit, the first processing unit and the first determining unit in the data anomaly identification device based on the self-encoder is specifically described in the implementation process corresponding to steps S200 to S205 in the data anomaly identification method based on the self-encoder, and is not described herein again.
Further, in an embodiment of the present application, the training module includes:
a third obtaining unit, configured to obtain a preset shared layer, where the shared layer includes a shared hidden state;
the second processing unit is used for carrying out weight sharing processing on all the sparsely connected self-coders through the sharing layer;
the third processing unit is configured to perform L1 regularization processing on the shared hidden state to obtain a processed shared hidden state;
a fourth obtaining unit, configured to obtain all second vectors included in the time series; and the number of the first and second groups,
a fifth obtaining unit, configured to obtain a one-to-one second reconstruction vector generated by each of the sparsely connected self-encoders based on each of the second vectors;
a second generating unit, configured to generate a corresponding second objective function according to the processed shared hidden state, the second vector, and the second reconstruction vector;
a second training unit, configured to perform joint training on all the sparsely connected self-encoders based on the second objective function to obtain second trained self-encoders, where the number of the second self-encoders is the same as the number of the sparsely connected self-encoders;
the fourth processing unit is configured to perform integrated processing on all the second self-encoders to generate a corresponding shared frame, where the shared frame includes a specified number of the second self-encoders, and there is interaction between the second self-encoders;
a second determining unit, configured to determine the shared frame as the self-encoder integrated frame.
In this embodiment, the implementation processes of the functions and actions of the third obtaining unit, the second processing unit, the third processing unit, the fourth obtaining unit, the fifth obtaining unit, the second generating unit, the second training unit, the fourth processing unit and the second determining unit in the data anomaly identification apparatus based on the self-encoder are specifically described in the implementation processes corresponding to steps S210 to S218 in the data anomaly identification method based on the self-encoder, and are not described herein again.
Further, in an embodiment of the present application, the calculating module includes:
a first calculation unit, configured to calculate and generate, by each self-encoder included in the self-encoder integrated framework, a reconstruction error corresponding to a specified vector, where the specified vector is any one of all vectors included in the time series;
a second calculation unit for calculating the median of all the reconstruction errors;
a third determination unit configured to determine the median as a specified abnormality score value corresponding to the specified vector in the time series.
In this embodiment, the implementation processes of the functions and functions of the first calculating unit, the second calculating unit and the third determining unit in the data abnormality identification device based on the self-encoder are specifically described in the implementation processes corresponding to steps S300 to S302 in the data abnormality identification method based on the self-encoder, and are not described herein again.
Further, in an embodiment of the application, the first calculating unit includes:
a processing subunit, configured to perform reconstruction processing on the time sequence through a specific self-encoder to obtain a specific reconstructed time sequence corresponding to the time sequence, where the specific self-encoder is any one of all self-encoders included in the self-encoder integrated frame;
an extraction subunit, configured to extract a specific reconstruction vector corresponding to the specified vector from the specific reconstruction time series;
and the calculating subunit is used for calculating a specific reconstruction error corresponding to the specified vector according to the specified vector and the specific reconstruction vector.
In this embodiment, the implementation processes of the functions and functions of the processing subunit, the extracting subunit, and the calculating subunit in the data abnormality identification device based on the self-encoder are specifically described in the implementation processes corresponding to steps S3000 to S3002 in the data abnormality identification method based on the self-encoder, and are not described herein again.
Further, in an embodiment of the present application, the identification module includes:
a sixth obtaining unit, configured to obtain a preset abnormal threshold;
a judging unit configured to judge whether there is a specified score value having a value larger than the abnormality threshold value among all the abnormality score values;
the first screening unit is used for screening the specified score value from all the abnormal score values if the abnormal score value is positive;
a search unit configured to search for a third vector corresponding to the designated score value from the time series;
a fourth determination unit configured to determine the third vector as the abnormal data value.
In this embodiment, the implementation processes of the functions and functions of the sixth obtaining unit, the judging unit, the first screening unit, the searching unit and the fourth determining unit in the data abnormality identification device based on the self-encoder are specifically described in the implementation processes corresponding to steps S400 to S404 in the data abnormality identification method based on the self-encoder, and are not described herein again.
Further, in an embodiment of the present application, the identification module includes:
a second screening unit, configured to screen out a fourth vector except the third vector from the time series;
a marking unit for marking the second vector as a normal data value;
a seventh obtaining unit configured to obtain a first number corresponding to the third vector; and the number of the first and second groups,
an eighth acquiring unit configured to acquire a second number corresponding to the fourth vector;
a third generating unit, configured to generate an abnormal analysis report corresponding to the time series according to the second screening unit, the first amount, the normal data, and the second amount;
and the display unit is used for displaying the abnormity analysis report.
In this embodiment, the implementation processes of the functions and functions of the second screening unit, the marking unit, the seventh obtaining unit, the eighth obtaining unit, the third generating unit and the displaying unit in the data abnormality identification device based on the self-encoder are specifically described in the implementation processes corresponding to steps S405 to S410 in the data abnormality identification method based on the self-encoder, and are not described herein again.
Referring to fig. 3, a computer device, which may be a server and whose internal structure may be as shown in fig. 3, is also provided in the embodiment of the present application. The computer device comprises a processor, a memory, a network interface, a display screen, an input device and a database which are connected through a system bus. Wherein the processor of the computer device is designed to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing data such as time sequences to be detected, sparsely connected self-encoders, self-encoder integrated frames, abnormal score values and abnormal data values. The network interface of the computer device is used for communicating with an external terminal through a network connection. The display screen of the computer equipment is an indispensable image-text output equipment in the computer, and is used for converting digital signals into optical signals so that characters and figures are displayed on the screen of the display screen. The input device of the computer equipment is the main device for information exchange between the computer and the user or other equipment, and is used for transmitting data, instructions, some mark information and the like to the computer. The computer program is executed by a processor to implement a method for autoencoder-based data anomaly identification.
The processor executes the data abnormity identification method based on the self-encoder, and comprises the following steps:
receiving an input time sequence to be detected;
based on the time sequence, performing integrated training processing on a preset number of self-encoders which are generated in advance and connected sparsely according to a preset rule to generate a corresponding self-encoder integrated framework, wherein the self-encoders which are generated in advance are respectively generated after unit connection deletion processing is performed on the preset number of self-encoders based on the recurrent neural network;
calculating an abnormal score value corresponding to each vector contained in the time sequence through the self-encoder integration framework;
and identifying whether an abnormal data value exists in the time sequence or not according to the abnormal score value.
Those skilled in the art will appreciate that the structure shown in fig. 3 is only a block diagram of a part of the structure related to the present application, and does not constitute a limitation to the apparatus and the computer device to which the present application is applied.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements a data anomaly identification method based on a self-encoder, and specifically includes:
receiving an input time sequence to be detected;
based on the time sequence, performing integrated training processing on a preset number of self-encoders which are generated in advance and connected sparsely according to a preset rule to generate a corresponding self-encoder integrated framework, wherein the self-encoders which are generated in advance are respectively generated after unit connection deletion processing is performed on the preset number of self-encoders based on the recurrent neural network;
calculating an abnormal score value corresponding to each vector contained in the time sequence through the self-encoder integration framework;
and identifying whether an abnormal data value exists in the time sequence or not according to the abnormal score value.
In summary, the data anomaly identification method, apparatus, computer device and storage medium based on the self-encoder provided in the embodiments of the present application are different from the existing anomaly detection method, and the present application adopts a self-encoder integration frame to perform data anomaly identification processing on a time sequence, and when receiving an input time sequence to be detected, the self-encoder that improves an original self-encoder based on a recurrent neural network to generate sparse connection is obtained first, and then the self-encoder integration frame that can be used for identifying time series data values is generated by performing integrated training processing on the pre-generated sparse connection self-encoder based on the time sequence, so that the self-encoder integration frame can be used to calculate an anomaly score value corresponding to each vector included in the time sequence, and further, whether an anomalous data value exists in the time sequence can be quickly and accurately identified according to the anomaly score value, the method and the device effectively improve the identification accuracy of the abnormal data values in the time sequence, and have higher identification processing efficiency of the abnormal data values in the time sequence.
It will be understood by those skilled in the art that all or part of the processes of the methods of the above embodiments may be implemented by hardware associated with instructions of a computer program, which may be stored on a non-volatile computer-readable storage medium, and when executed, may include processes of the above embodiments of the methods. Any reference to memory, storage, database, or other medium provided herein and used in the examples may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), Enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, apparatus, article, or method. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, apparatus, article, or method that includes the element.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1. A data anomaly identification method based on an auto-encoder is characterized by comprising the following steps:
receiving an input time sequence to be detected;
based on the time sequence, performing integrated training processing on a preset number of self-encoders which are generated in advance and connected sparsely according to a preset rule to generate a corresponding self-encoder integrated framework, wherein the self-encoders which are generated in advance are respectively generated after unit connection deletion processing is performed on the preset number of self-encoders based on the recurrent neural network;
calculating an abnormal score value corresponding to each vector contained in the time sequence through the self-encoder integration framework;
and identifying whether an abnormal data value exists in the time sequence or not according to the abnormal score value.
2. The self-encoder-based data anomaly identification method according to claim 1, wherein the step of performing integrated training processing on a preset number of sparsely connected self-encoders according to a preset rule based on the time series to generate a corresponding self-encoder integrated frame comprises:
acquiring all first vectors contained in the time sequence; and the number of the first and second groups,
acquiring a first reconstruction vector which is generated by each self-encoder of the sparse connection based on each first vector and corresponds to one;
generating a corresponding first objective function based on the first vector and the first reconstruction vector;
training each self-encoder in sparse connection based on the first objective function to obtain a trained first self-encoder, wherein the number of the first self-encoders is the same as that of the self-encoders in sparse connection;
performing integrated processing on all the first self-encoders to generate corresponding independent frames, wherein the independent frames contain a specified number of the first self-encoders, and interaction is not generated between the first self-encoders;
determining the independent framework as the self-encoder integrated framework.
3. The self-encoder-based data anomaly identification method according to claim 1, wherein the step of performing integrated training processing on a preset number of sparsely connected self-encoders according to a preset rule based on the time series to generate a corresponding self-encoder integrated frame comprises:
acquiring a preset sharing layer, wherein the sharing layer comprises a sharing hidden state;
carrying out weight sharing processing on all the sparsely connected self-coders through the sharing layer;
performing L1 regularization processing on the shared hidden state to obtain a processed shared hidden state;
acquiring all second vectors contained in the time sequence; and the number of the first and second groups,
acquiring a one-to-one corresponding second reconstruction vector generated by each sparsely connected self-encoder based on each second vector;
generating a corresponding second objective function according to the processed shared hidden state, the second vector and the second reconstruction vector;
performing joint training on all the self-encoders in sparse connection based on the second objective function to obtain a trained second self-encoder, wherein the number of the second self-encoders is the same as that of the self-encoders in sparse connection;
performing integrated processing on all the second self-encoders to generate a corresponding shared frame, wherein the shared frame contains a specified number of the second self-encoders, and interaction exists between the second self-encoders;
determining the shared frame as the self-encoder integrated frame.
4. The self-encoder based data anomaly identification method according to claim 1, wherein the step of calculating, by the self-encoder integration framework, the anomaly score value corresponding to each vector included in the time series comprises:
calculating and generating a reconstruction error corresponding to a specified vector by each self-encoder contained in the self-encoder integrated framework, wherein the specified vector is any one of all vectors contained in the time sequence;
calculating the median of all the reconstruction errors;
determining the median as a specified anomaly score value corresponding to the specified vector in the time series.
5. The self-encoder based data anomaly identification method according to claim 4, wherein said step of generating a reconstruction error corresponding to a given vector by each self-encoder calculation included in said self-encoder integration framework comprises:
reconstructing the time sequence through a specific self-encoder to obtain a specific reconstructed time sequence corresponding to the time sequence, wherein the specific self-encoder is any one of all self-encoders included in the self-encoder integrated frame;
extracting a specific reconstruction vector corresponding to the specified vector from the specific reconstruction time series;
and calculating a specific reconstruction error corresponding to the specified vector according to the specified vector and the specific reconstruction vector.
6. The self-encoder based data anomaly identification method according to claim 1, wherein said step of identifying whether an anomalous data value exists in said time series according to said anomaly score value comprises:
acquiring a preset abnormal threshold;
judging whether a designated score value with a numerical value larger than the abnormality threshold value exists in all the abnormality score values;
if so, screening the designated score value from all the abnormal score values;
finding a third vector corresponding to the specified score value from the time series;
determining the third vector as the anomalous data value.
7. The self-encoder based data anomaly identification method according to claim 6, wherein said step of determining said third vector as said anomalous data value is followed by:
screening out a fourth vector except the third vector from the time sequence;
marking the second vector as a normal data value;
obtaining a first number corresponding to the third vector; and the number of the first and second groups,
acquiring a second quantity corresponding to the fourth vector;
generating an abnormal analysis report corresponding to the time sequence according to the abnormal data value, the first quantity, the normal data and the second quantity;
and displaying the abnormal analysis report.
8. An apparatus for recognizing data abnormality based on an auto-encoder, comprising:
the receiving module is used for receiving an input time sequence to be detected;
the training module is used for carrying out integrated training processing on a preset number of self-encoders which are generated in advance and connected sparsely according to a preset rule based on the time sequence to generate a corresponding self-encoder integrated frame, wherein the self-encoders which are generated in advance by respectively carrying out unit connection deletion processing on the preset number of self-encoders based on the recurrent neural network;
the computing module is used for computing an abnormal score value corresponding to each vector contained in the time sequence through the self-encoder integrated framework;
and the identification module is used for identifying whether an abnormal data value exists in the time sequence or not according to the abnormal score value.
9. A computer device comprising a memory and a processor, the memory having stored therein a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011242143.5A 2020-11-09 2020-11-09 Data anomaly identification method and device based on self-encoder and computer equipment Active CN112329865B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011242143.5A CN112329865B (en) 2020-11-09 2020-11-09 Data anomaly identification method and device based on self-encoder and computer equipment
PCT/CN2021/097550 WO2022095434A1 (en) 2020-11-09 2021-05-31 Auto-encoder-based data anomaly identification method and apparatus and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011242143.5A CN112329865B (en) 2020-11-09 2020-11-09 Data anomaly identification method and device based on self-encoder and computer equipment

Publications (2)

Publication Number Publication Date
CN112329865A true CN112329865A (en) 2021-02-05
CN112329865B CN112329865B (en) 2023-09-08

Family

ID=74316541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011242143.5A Active CN112329865B (en) 2020-11-09 2020-11-09 Data anomaly identification method and device based on self-encoder and computer equipment

Country Status (2)

Country Link
CN (1) CN112329865B (en)
WO (1) WO2022095434A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112839059A (en) * 2021-02-22 2021-05-25 北京六方云信息技术有限公司 WEB intrusion detection processing method and device and electronic equipment
CN113114529A (en) * 2021-03-25 2021-07-13 清华大学 KPI (Key Performance indicator) abnormity detection method and device based on condition variation automatic encoder
CN113671917A (en) * 2021-08-19 2021-11-19 中国科学院自动化研究所 Detection method, system and equipment for abnormal state of multi-modal industrial process
CN114066435A (en) * 2021-11-10 2022-02-18 广东工业大学 Block chain illegal address detection method and system
WO2022095434A1 (en) * 2020-11-09 2022-05-12 平安科技(深圳)有限公司 Auto-encoder-based data anomaly identification method and apparatus and computer device

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116165353B (en) * 2023-04-26 2023-07-25 江西拓荒者科技有限公司 Industrial pollutant monitoring data processing method and system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130204553A1 (en) * 2011-08-03 2013-08-08 President And Fellows Of Harvard College System and method for detecting integrated circuit anomalies
CN107480777A (en) * 2017-08-28 2017-12-15 北京师范大学 Sparse self-encoding encoder Fast Training method based on pseudo- reversal learning
CN109902564A (en) * 2019-01-17 2019-06-18 杭州电子科技大学 A kind of accident detection method based on the sparse autoencoder network of structural similarity
CN110119447A (en) * 2019-04-26 2019-08-13 平安科技(深圳)有限公司 From coding Processing with Neural Network method, apparatus, computer equipment and storage medium
CN111178523A (en) * 2019-08-02 2020-05-19 腾讯科技(深圳)有限公司 Behavior detection method and device, electronic equipment and storage medium
CN111724074A (en) * 2020-06-23 2020-09-29 华中科技大学 Pavement lesion detection early warning method and system based on deep learning

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11509671B2 (en) * 2017-06-09 2022-11-22 British Telecommunications Public Limited Company Anomaly detection in computer networks
CN107798340B (en) * 2017-09-29 2018-10-26 中国地质大学(武汉) Multiple Geochemical abnormality recognition method based on the more self-encoding encoders of space constraint
CN112329865B (en) * 2020-11-09 2023-09-08 平安科技(深圳)有限公司 Data anomaly identification method and device based on self-encoder and computer equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130204553A1 (en) * 2011-08-03 2013-08-08 President And Fellows Of Harvard College System and method for detecting integrated circuit anomalies
CN107480777A (en) * 2017-08-28 2017-12-15 北京师范大学 Sparse self-encoding encoder Fast Training method based on pseudo- reversal learning
CN109902564A (en) * 2019-01-17 2019-06-18 杭州电子科技大学 A kind of accident detection method based on the sparse autoencoder network of structural similarity
CN110119447A (en) * 2019-04-26 2019-08-13 平安科技(深圳)有限公司 From coding Processing with Neural Network method, apparatus, computer equipment and storage medium
CN111178523A (en) * 2019-08-02 2020-05-19 腾讯科技(深圳)有限公司 Behavior detection method and device, electronic equipment and storage medium
CN111724074A (en) * 2020-06-23 2020-09-29 华中科技大学 Pavement lesion detection early warning method and system based on deep learning

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
袁静;章毓晋;: "融合梯度差信息的稀疏去噪自编码网络在异常行为检测中的应用", 自动化学报, vol. 43, no. 04, pages 114 - 120 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022095434A1 (en) * 2020-11-09 2022-05-12 平安科技(深圳)有限公司 Auto-encoder-based data anomaly identification method and apparatus and computer device
CN112839059A (en) * 2021-02-22 2021-05-25 北京六方云信息技术有限公司 WEB intrusion detection processing method and device and electronic equipment
CN112839059B (en) * 2021-02-22 2022-08-30 北京六方云信息技术有限公司 WEB intrusion detection self-adaptive alarm filtering processing method and device and electronic equipment
CN113114529A (en) * 2021-03-25 2021-07-13 清华大学 KPI (Key Performance indicator) abnormity detection method and device based on condition variation automatic encoder
CN113114529B (en) * 2021-03-25 2022-05-24 清华大学 KPI (Key Performance indicator) anomaly detection method and device based on condition variation automatic encoder and computer storage medium
CN113671917A (en) * 2021-08-19 2021-11-19 中国科学院自动化研究所 Detection method, system and equipment for abnormal state of multi-modal industrial process
CN113671917B (en) * 2021-08-19 2022-08-02 中国科学院自动化研究所 Detection method, system and equipment for abnormal state of multi-modal industrial process
CN114066435A (en) * 2021-11-10 2022-02-18 广东工业大学 Block chain illegal address detection method and system

Also Published As

Publication number Publication date
WO2022095434A1 (en) 2022-05-12
CN112329865B (en) 2023-09-08

Similar Documents

Publication Publication Date Title
CN112329865B (en) Data anomaly identification method and device based on self-encoder and computer equipment
CN113516297B (en) Prediction method and device based on decision tree model and computer equipment
CN111176990A (en) Test data generation method and device based on data decision and computer equipment
CN112016279A (en) Electronic medical record structuring method and device, computer equipment and storage medium
CN112464117A (en) Request processing method and device, computer equipment and storage medium
CN112036172B (en) Entity identification method and device based on abbreviated data of model and computer equipment
CN112131888A (en) Method, device and equipment for analyzing semantic emotion and storage medium
CN112163131A (en) Configuration method and device of business data query platform, computer equipment and medium
CN111506710B (en) Information sending method and device based on rumor prediction model and computer equipment
CN113918526A (en) Log processing method and device, computer equipment and storage medium
CN113642039A (en) Configuration method and device of document template, computer equipment and storage medium
CN110011990A (en) Intranet security threatens intelligent analysis method
CN113807728A (en) Performance assessment method, device, equipment and storage medium based on neural network
CN112036749A (en) Method and device for identifying risk user based on medical data and computer equipment
CN113656588B (en) Knowledge graph-based data code matching method, device, equipment and storage medium
CN114978968A (en) Micro-service anomaly detection method and device, computer equipment and storage medium
CN114817055A (en) Regression testing method and device based on interface, computer equipment and storage medium
CN111488585A (en) Attack vector generation method based on deep learning
CN113986581A (en) Data aggregation processing method and device, computer equipment and storage medium
CN113672654A (en) Data query method and device, computer equipment and storage medium
CN111679953B (en) Fault node identification method, device, equipment and medium based on artificial intelligence
CN113327037A (en) Model-based risk identification method and device, computer equipment and storage medium
CN113051372A (en) Material data processing method and device, computer equipment and storage medium
CN113449718A (en) Method and device for training key point positioning model and computer equipment
CN113077185B (en) Workload evaluation method, workload evaluation device, computer equipment and storage medium

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40040481

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant