CN114494242A - Time series data detection method, device, equipment and computer storage medium - Google Patents

Time series data detection method, device, equipment and computer storage medium Download PDF

Info

Publication number
CN114494242A
CN114494242A CN202210158956.9A CN202210158956A CN114494242A CN 114494242 A CN114494242 A CN 114494242A CN 202210158956 A CN202210158956 A CN 202210158956A CN 114494242 A CN114494242 A CN 114494242A
Authority
CN
China
Prior art keywords
image
dimensional
loss value
series data
training
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.)
Pending
Application number
CN202210158956.9A
Other languages
Chinese (zh)
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 CN202210158956.9A priority Critical patent/CN114494242A/en
Priority to PCT/CN2022/089438 priority patent/WO2023155296A1/en
Publication of CN114494242A publication Critical patent/CN114494242A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding
    • G06T9/001Model-based coding, e.g. wire frame
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)

Abstract

The application is suitable for the technical field of artificial intelligence and provides a time series data detection method, a device, equipment and a computer storage medium, wherein the time series data detection method comprises the following steps: converting the one-dimensional time sequence data to be detected to obtain a two-dimensional image; carrying out image reconstruction based on the two-dimensional image to obtain a training image sample set containing a reconstructed image; training an introVAE model of a self-provincial variational self-encoder by utilizing a training image sample set to obtain a trained introVAE model; calculating a loss value between the two-dimensional image and the reconstructed image by using the trained IntroVAE model to obtain a target loss value; wherein the target loss value is used for representing whether the one-dimensional time sequence data has an abnormality. By applying the technical scheme provided by the embodiment of the application, the application range of time series data detection is improved when the abnormality detection is carried out on large-scale time series data under the condition of ensuring the efficiency of the abnormality detection of the time series data.

Description

Time series data detection method, device, equipment and computer storage medium
Technical Field
The present application relates to the field of artificial intelligence, and in particular, to a method, an apparatus, a device, and a computer storage medium for time series data detection.
Background
With the development of artificial intelligence technology, the demand for anomaly detection of time series data in the fields of network monitoring, equipment maintenance, information security, finance, aerospace and the like is increasing day by day. The anomaly detection of the current time-series data is usually an unsupervised anomaly detection mode. For example, by dividing time series data and then searching for an abnormal point through clustering of neighbor samples or densities, such methods are often very sensitive to parameters, and are complex for detecting the abnormality of the time series data, which means that the conventional method for detecting the abnormality of the time series data cannot be applied to large-scale time series data, and the application range is small.
Disclosure of Invention
The invention aims to provide a time series data detection method, a device, equipment and a computer storage medium, which aim to solve the technical problems that the conventional time series data abnormity detection method cannot be applied to large-scale time series data and has a small application range.
A first aspect of an embodiment of the present application provides a time-series data detection method, including:
converting the one-dimensional time sequence data to be detected to obtain a two-dimensional image;
performing image reconstruction based on the two-dimensional image to obtain a reconstructed image associated with the one-dimensional time series data and a training image sample set containing the reconstructed image;
training an introVAE model of a self-provincial variational self-encoder by using the training image sample set to obtain a trained introVAE model;
calculating a loss value between the two-dimensional image and the reconstructed image by using the trained IntroVAE model to obtain a target loss value; wherein the target loss value is used to characterize whether an anomaly exists in the one-dimensional time series data.
A second aspect of embodiments of the present application provides a time-series data detection apparatus, including:
the conversion module is used for converting the one-dimensional time sequence data to be detected to obtain a two-dimensional image;
the reconstruction module is used for carrying out image reconstruction based on the two-dimensional image to obtain a reconstructed image related to the one-dimensional time sequence data and a training image sample set containing the reconstructed image;
the training module is used for training an introVAE model of a self-provincial variational self-encoder by utilizing the training image sample set to obtain the trained introVAE model;
the detection module is used for calculating a loss value between the two-dimensional image and the reconstructed image by using the trained IntroVAE model to obtain a target loss value; wherein the target loss value is used to characterize whether an anomaly exists in the one-dimensional time series data.
A third aspect of the embodiments of the present application provides an apparatus, which includes a memory, a processor, and a computer program stored in the memory and executable on the apparatus, wherein the processor implements the steps of the time series data detection method provided by the first aspect when executing the computer program.
A fourth aspect of embodiments of the present application provides a computer storage medium storing a computer program that, when executed by a processor, implements the steps of one time-series data detection provided by the first aspect.
The implementation of the time series data detection method, the time series data detection device, the time series data detection equipment and the computer storage medium provided by the embodiment of the application has the following beneficial effects:
the embodiment of the application provides a time series data detection method, a time series data detection device, a time series data detection equipment and a computer storage medium. And image reconstruction is carried out on the two-dimensional image through an introVAE model of the intro-province variational self-encoder, so that the reconstructed image is as close to the input two-dimensional image as possible. And training the IntroVAE model by using an image sample set formed by the reconstructed images, so that whether the one-dimensional time sequence data is abnormal or not can be detected by calculating the reconstruction loss between the reconstructed images and the input two-dimensional images by using the trained IntroVAE model. When abnormality detection is performed on large-scale time-series data, the application range of time-series data detection is increased while the efficiency of abnormality detection of time-series data is ensured.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating an implementation of a time series data detection method according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of an IntroVAE model provided in an embodiment of the present application;
fig. 3 is a block diagram of a time-series data detection apparatus according to an embodiment of the present application;
fig. 4 is a block diagram of a device according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects to be solved by the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, Artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
The artificial intelligence infrastructure generally includes technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a robot technology, a biological recognition technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and the like.
The embodiment of the application provides a time series data detection method which is applied to computer equipment. In implementation, a time-series data detection method is configured on a computer device in the form of an object script, and the computer device executes the object script to further execute the steps of the time-series data detection method provided by the embodiment.
Referring to fig. 1, fig. 1 illustrates a time series data detection method provided in an embodiment of the present application, including:
s11: and performing conversion operation on the one-dimensional time sequence data to be detected to obtain a two-dimensional image.
In step S11, the anomaly detection of the one-dimensional time series to be detected is to determine whether a significant statistical anomaly exists at a certain time series point according to a certain statistical or machine learning strategy with respect to the time series data. The time-series data is a data sequence recorded in time series, and each data in the same data sequence must have the same aperture, and is required to be comparable. In the big data era, the scale and complexity of time sequence data are greatly increased, the requirement of time sequence abnormity detection with intelligent and automatic characteristics is increased rapidly, and the time sequence abnormity detection device plays a role in many fields, so that the robustness, quality and benefit of output or service in the fields are improved, and the time sequence abnormity detection device is applied to the fields of network monitoring, equipment maintenance, information safety, finance, aerospace and the like. Because of the large amount of time-series data that records potential anomalies, an automated monitoring system must be set up to discover these anomalies. Once a high-performance monitoring model is successfully established, efficient searching and anomaly detection are carried out in mass data, and operation and maintenance personnel can be greatly helped to find and repair problems. The key of the time sequence abnormity detection is to mine and learn the rule of the existing time sequence data. Due to noisy data from the real world and complex anomalous patterns that need to be captured.
Before inputting the time-series data into the model for training, the one-dimensional time-series data is converted into two-dimensional image data by encoding. The abnormal points of the detected one-dimensional time sequence data are converted into abnormal points appearing in the two-dimensional image, and the detection of the two-dimensional image is more visual and simpler than the direct detection of the one-dimensional time sequence data. Methods which can be adopted for converting the one-dimensional time sequence data into the two-dimensional image are the Gerami angular field GAFs which comprises GASF (corresponding to making an angular sum) and GADF (corresponding to making an angular difference), the Markov transition field MTF, the recursion graph Recurrence Plot and the short-time Fourier transform STFT.
In the present embodiment, a two-dimensional image can be constructed as an input of the IntroVAE model of the IntroVAE-variational self-encoder by passing one-dimensional time-series data through the GAF algorithm and generating a recursive graph, respectively. Based on the GAF algorithm and the recursive graph algorithm, the time sequence data are converted into two-dimensional images, and the generated images can be restored to the original time sequence of rectangular coordinates through the main diagonal, namely, each graph corresponds to a segment of sequence and information is not lost. And the recursive graph reveals the internal structure of the time sequence, and provides more effective information for anomaly detection.
As an embodiment of the present application, step S11 may include:
converting the one-dimensional time sequence data based on a GAF algorithm to obtain a GAF image;
coding the one-dimensional time sequence data based on a recursion graph to obtain an REC image;
generating the two-dimensional image based on the GAF image and the REC image.
In this embodiment, the GAF algorithm converts the scaled time series data from a rectangular coordinate system to a polar coordinate system and then identifies the time dependencies of the different points in time by considering the sum of angles between the different points. I.e. one-dimensional time series data XkGenerating a GAF image as
Figure BDA0003513570080000051
k is an integer greater than 0. Then, the one-dimensional time series data is encoded based on the recursion map to obtain an REC image. The recursive graph is an image representing the distance between the tracks extracted from the original time series, is particularly suitable for short-time sequence data, and can check the stationarity and the inherent similarity of the time series. Specifically, we can extract the respective trajectories from the original image, and the REC image is an image showing the distances between the trajectories extracted from the original time series. First, the trajectory is extracted and obtained according to the following formula
Figure BDA0003513570080000052
Figure BDA0003513570080000053
Where m is the dimension of the trace and τ represents the time lag, both parameters can be set to 1 by
Figure BDA0003513570080000054
The formula encodes the lag data into another format and can generate a REC image from this data.
Finally, after the GAF and REC images are generated, the two images are stitched in the dimension of the channel, i.e., the image is generated as an input. The subsequent judgment of the abnormal point of the time series can be converted into the study of the image. Namely by
Figure BDA0003513570080000055
The formula generates a two-dimensional image.
As an implementation method in an embodiment of the present application, the converting the one-dimensional time series data based on the GAF algorithm to obtain the GAF image includes:
zooming the one-dimensional time sequence data to obtain zoomed one-dimensional time sequence data;
and expressing the scaled one-dimensional time series data by polar coordinates to obtain the GAF image.
In particular, the amount of the solvent to be used,scaling the one-dimensional time-series data to [ -1,1 ] the one-dimensional time-series data]The above. And the scaled one-dimensional time series is encoded into a polar form by a coordinate transformation formula. Specifically, a value of a certain time point in one-dimensional time sequence data to be detected is firstly extracted into a subsequence X of time steps of forward and backward w according to a specified width wK={sk-w+1,…,sk,…,sk+w}. The GAF algorithm first normalizes the values in the sequence to between-1 and 1 according to equation 1
Figure BDA0003513570080000061
I.e. the sequence is scaled to [ -1,1 [ -1]The above. Equation 1 is:
Figure BDA0003513570080000062
wherein k and N are integers more than 0. Then will be
Figure BDA0003513570080000063
Encoded in polar coordinate form by the following coordinate transformation formula. The coordinate transformation formula is as follows:
Figure BDA0003513570080000064
finally, calculating the cosine of the judgment sum between two time steps to obtain
Figure BDA0003513570080000065
And generates a GAF image from the data. The final formula of the GAF algorithm is:
Figure BDA0003513570080000066
the GAF image is generated from this formula.
S12: and carrying out image reconstruction based on the two-dimensional image to obtain a reconstructed image associated with the one-dimensional time sequence data and a training image sample set containing the reconstructed image.
In step S12, training samples are required for training the IntroVAE model, and the two-dimensional image is reconstructed by inputting the two-dimensional image into the IntroVAE model, that is, the reconstructed image is obtained by improving the reconstruction of the time-series data by using the depth multi-level variational self-coding structure. The training image sample set includes a reconstructed image and a sampled image. And image reconstruction is carried out based on the two-dimensional image, the two-dimensional image is input into an encoder of the IntroVAE model, the encoder converts the two-dimensional image into a latent variable, and a decoder of the IntroVAE model reconstructs the latent variable into an image, so that a reconstructed image is obtained. The reconstructed image and the two-dimensional image are as identical as possible here. The potential variables follow a distribution that is expected to be followed by a distribution such as the standard normal distribution, and the encoder is adjusted to expect the variables obtained by the encoder encoding the image to follow. The latent variable is the two-dimensional image encoded by the encoder, and the sampling variable is directly sampled from the standard normal distribution without any image information. The sampled image obtained by inputting the sampling variables to the decoder is not the same as the two-dimensional image, reconstructed image.
As an embodiment of the present application, step S12 may include:
performing multi-level extraction on the two-dimensional image to obtain latent variables corresponding to the two-dimensional image;
encoding the latent variable to obtain a reconstructed image;
obtaining a sampling image based on a sampling variable obtained by sampling the prior distribution of the latent variable;
and constructing a sample set based on the reconstructed image and the sampling image to obtain a training image sample set.
In this embodiment, fig. 2 is a schematic structural diagram of an IntroVAE model provided in this embodiment of the present application. As shown in fig. 2, the IntroVAE model is a model of a multi-level multi-scale coder-decoder structure that performs on a prior distribution of latent variables and a posterior distribution of latent variables. In the figure, 1, 2, 3, 4 and 5 are all feature combinations, and features extracted by Input are combined through the feature combination 1, the feature combination 2, the feature combination 3, the feature combination 4 and the feature combination 5. In the encoder portion, first, two-dimensional images Input from an Input are extracted based on a bottom-up networkCoding layer by layer, and sampling to obtain the latent variable Z of the top layer1Then, from top to bottom, a plurality of underlying latent variables Z ═ Z are obtained by calculation step by step1,Z2,...,Zg,...ZGIs due to { 2., G-1 }. Then, the decoder outputs the reconstructed image through multiple sampling and through multiple residual blocks by gradually utilizing the latent variables obtained by the encoder in a top-down manner. Then the encoder samples according to the prior distribution of the latent variable to obtain a sampling variable, and the sampling variable directly sampled from the standard normal distribution is input into a decoder to obtain a sampling image. The Residual Block is a Residual Block and comprises several layers of networks connected by a shortcut, and the networks in the Residual Block can be full connection layers or convolution layers. The residual block is between the input and the output and is used to optimize the traceable parameter. The residual block improves the receptive field of the network through multi-layer convolution.
S13: and training an introVAE model of the introspection variational self-encoder by using the training image sample set to obtain the trained introVAE model.
In step S13, the IntroVAE model is a deep generative model formed by combining the variational auto-encoder VAE and the antagonistic generation network GAN. The variational auto-encoder is a generated version of an auto-encoder, and realizes approximate mapping of data to prior distribution by optimizing a variational lower bound. Training of VAEs is stable, allowing hidden variable inference and log-likelihood estimation, but the generated samples are fuzzy. The countermeasure generation network learns the distribution of the real data by the countermeasure between the generator and the discriminator. GAN can generate vivid and clear images, but has the problem of training instability, which is particularly severe on synthesizing high-resolution images. Therefore, the IntroVAE model not only overcomes the problem that the inherent synthesized image of the variational self-encoder tends to be fuzzy without introducing an additional countermeasure discriminator, generates a high-definition stable image, but also realizes the stable training of high-resolution image synthesis without using a common multi-stage multi-discriminator strategy. The IntroVAE model is able to self-evaluate the quality of the samples it generates and improve itself accordingly. The antagonistic learning is introduced into the interior of the VAE, so that the introspection learning is realized, namely, the model can judge the quality of a generated sample and make corresponding changes to improve the performance. The training mode of the IntroVAE model is to train an encoder to enable hidden variables of a real image to be close to prior distribution, and the hidden variables of a synthetic image deviate from the prior distribution; in contrast, the training generator brings the hidden variables of the composite image close to the prior distribution. Meanwhile, unlike GAN, the encoder and the generator cooperate to ensure that the reconstruction error of the input image is as small as possible, in addition to competing. For real data, the training target of the method is completely consistent with that of the traditional VAE, so that model training is greatly stabilized; for synthetic data, the introduction of the challenge improves the quality of the sample.
In this embodiment, in the training process of the IntroVAE model, an encoder and a decoder in the IntroVAE model correspond to the arbiter and the generator, respectively. Antagonistic training is embodied in: in one aspect, the function of the discriminator is to determine whether the latent variable is generated by the encoder with real data or from constructed data. On the other hand, the generator functions to make the latent variables encoded by the generated data and the latent variables encoded by the real data as identical as possible. And iteratively updating parameters of the model by utilizing a training image sample set, reconstruction loss and KL divergence based on an Adamax optimization algorithm to achieve the aim of training the IntroVAE model.
As an embodiment of the present application, step S13 may include:
calculating a loss value between the two-dimensional image and the reconstructed image based on the reconstruction loss and the KL divergence to obtain a reconstruction loss value;
calculating a loss value between the reconstructed image and the sampling image based on a pre-configured loss function to obtain a sampling loss value;
and training the IntroVAE model based on the reconstruction loss value and the sampling loss value to obtain the trained IntroVAE model.
In this embodiment, both the reconstruction loss and the KL divergence are loss functions,to calculate the loss after reconstruction. The KL divergence is the relative entropy and is a measure of the asymmetry of the difference between the two probability distributions. Relative entropy measures the distance between two random distributions, where the relative entropy is zero when the two random distributions are the same, and increases when the difference between the two random distributions increases. The relative entropy can be used to compare the similarity of the text. In the present embodiment, the KL divergence and the reconstruction loss are used to calculate the loss value between the two-dimensional image and the reconstructed image. And calculating a loss value between the two-dimensional image and the reconstructed image based on the KL divergence and the unsupervised training of the reconstruction loss. Wherein the reconstruction loss is defined as
Figure BDA0003513570080000091
Wherein X is a two-dimensional image, X' is a reconstructed image, B is the number of batches of training data, N is the length of each subsequence in the time sequence data, C is the number of image channels, B and C are variables of B and C, B and C are integers greater than 0, i and j are pixel values of the two-dimensional image and the reconstructed image, and i and j are integers greater than 0. The latent variable Z is partitioned into disjoint groups Z ═ Z1,z2,…,zGWhere G is the number of groups, zgIs one set of latent variables. For each group, the following relationships exist
Figure BDA0003513570080000092
Where the distribution of Z, p (Z), is assumed to be a factorial of a series of normal distributions. For zgThe ith variable in (c) has the following relationship:
Figure BDA0003513570080000093
then using the prior distribution parameter Δ μiAnd Δ σiTo determine the posterior distribution:
Figure BDA0003513570080000094
the K-L divergence calculation formula for the ith variable of the g-th group is as follows:
Figure BDA0003513570080000095
the KL divergence is here used as a regularization term to make the posterior distribution of the latent variables as close as possible to the prior distribution. The overall KL divergence is calculated as:
Figure BDA0003513570080000096
wherein, Z is a latent variable,
Figure BDA0003513570080000101
i variable being Zg, G number of groups of latent variables, IgIs the length of Zg.
The VAE training process based on reconstruction loss and KL divergence as a loss function may fit time series data, but may also fit outlier data. In order to improve the performance of the IntroVAE model, antagonism training is introduced to fit the data distribution, so that the distribution of the reconstructed data is as close to the input data as possible.
Specifically, for the encoder and the decoder in the IntroVAE model, the parameters of the encoder and the decoder are initialized randomly. And inputting a two-dimensional image into an encoder, acquiring a latent variable Z by the encoder, and acquiring a reconstructed image by taking the latent variable Z as the input of a decoder. Parameters of the encoder and decoder are updated based on the Adamax algorithm according to the reconstruction loss and the KL divergence. Then, sampling variables according to the prior distribution of the latent variables, and inputting the sampling variables into a decoder to obtain a sampling image. The Adamax algorithm is applied to update the parameters of the encoder based on the preconfigured loss function. The preconfigured loss functions are a reconstruction loss function and a KL divergence. The preconfigured loss function is
Figure BDA0003513570080000102
Wherein, Zr is the variable obtained by inputting the reconstructed image into the encoder again, Zpp is the variable obtained by inputting the sampled image into the encoder again, alpha and beta are taken as parameters, and the optimal numerical value needs to be found through repeated training. Reconstruction loss value and sampling loss value obtained through training sample set, reconstruction loss and KL divergence based on Adamax optimization algorithmAnd training the IntroVAE model to obtain the trained IntroVAE model.
S14: calculating a loss value between the two-dimensional image and the reconstructed image by using the trained IntroVAE model to obtain a target loss value; wherein the target loss value is used to characterize whether an anomaly exists in the one-dimensional time series data.
In step S14, the trained IntroVAE model itself can determine the quality of its generated sample and make corresponding changes to improve performance. The target loss value is a difference value between a two-dimensional image obtained by converting one-dimensional time series data and a reconstructed image obtained by reconstructing the two-dimensional image by using a trained IntroVAE model. Since the two-dimensional image is real data, it is converted from the one-dimensional time series to be detected. The reconstructed image is ideal data obtained by reconstruction of an IntroVAE model, so that the difference between the ideal data and the IntroVAE model can detect the abnormity of one-dimensional time sequence data.
The time data to be detected is input into an IntroVAE model, the reconstruction loss of the reconstructed image and the input two-dimensional image is calculated after the two-dimensional image is coded, and the point is judged as an abnormal point when the loss exceeds a certain threshold value. The problem of abnormal point detection of the time sequence is converted into the problem of abnormal point detection of the image, and the detection result is more visual and simpler.
As an implementation manner of this embodiment, the method further includes:
and when the target loss value exceeds a preset threshold value, giving an alarm.
The alarm is data that detects the presence of an abnormality in the time-series data to be detected. And calculating the reconstruction loss between the two-dimensional image obtained by converting the time sequence data to be detected and the reconstructed image obtained by reconstructing the two-dimensional image to obtain the target loss value. Whether the time series data is abnormal or not is represented by the target loss value, and a certain threshold value is preset to detect the time series data.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a time series data detection apparatus, as shown in fig. 3, the apparatus 30 may include the following modules:
the conversion module 31 is configured to perform conversion operation on the one-dimensional time series data to be detected to obtain a two-dimensional image;
a reconstruction module 32, configured to perform image reconstruction based on the two-dimensional image, to obtain a reconstructed image associated with the one-dimensional time series data, and a training image sample set including the reconstructed image;
the training module 33 is configured to train an IntroVAE model of a intro-province variational self-encoder by using the training image sample set to obtain a trained IntroVAE model;
the detection module 34 is configured to calculate a loss value between the two-dimensional image and the reconstructed image by using the trained IntroVAE model to obtain a target loss value; wherein the target loss value is used for characterizing whether the one-dimensional time series data has an abnormality.
It should be understood that, in the structural block diagram of the time series data detection apparatus shown in fig. 3, each module is used to execute each step in the embodiment corresponding to fig. 1, and each step in the embodiment corresponding to fig. 1 has been explained in detail in the foregoing embodiment, and please refer to fig. 1 and the related description in the embodiment corresponding to fig. 1 specifically, which is not repeated herein.
Fig. 4 is a block diagram of an apparatus according to an embodiment of the present application. As shown in fig. 4, the apparatus 40 of this embodiment includes: a processor 41, a memory 42 and a computer program 43, such as a program of a time series data detection method, stored in said memory 42 and executable on said processor 41. The processor 41 implements the steps in the embodiments of the time-series data detection methods described above, such as S11 to S14 shown in fig. 1, when executing the computer program 43. Alternatively, when the processor 41 executes the computer program 43, the functions of the modules in the embodiment corresponding to fig. 3, for example, the functions of the modules 31 to 34 shown in fig. 3, are implemented, for which reference is specifically made to the relevant description in the embodiment corresponding to fig. 3, and details are not repeated here.
Illustratively, the computer program 43 may be partitioned into one or more modules that are stored in the memory 42 and executed by the processor 41 to accomplish the present application. The one or more modules may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 43 in the apparatus 40. For example, the computer program 43 may be divided into a transformation module, a reconstruction module, a training module, and a detection module, each of which functions specifically as described above.
The turntable device may include, but is not limited to, a processor 41, a memory 42. Those skilled in the art will appreciate that fig. 4 is merely an example of a device 40 and does not constitute a limitation of device 40 and may include more or fewer components than shown, or some components in combination, or different components, e.g., the turntable device may also include input output devices, network access devices, buses, etc.
The Processor 41 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 42 may be an internal storage unit of the device 40, such as a hard disk or a memory of the device 40. The memory 42 may also be an external storage device of the device 40, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), etc. provided on the device 40. Further, the memory 42 may also include both internal storage units of the device 40 and external storage devices. The memory 2 is used for storing the computer program and other programs and data required by the turntable device. The memory 42 may also be used to temporarily store data that has been output or is to be output.
In one embodiment, a computer storage medium is provided, on which a computer program is stored, which when executed by a processor implements the time-series data detection method in the above embodiments.
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 a computer program, which can be stored in a computer storage medium and can include the processes of the above embodiments of the methods when the computer program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. 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 Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. A time-series data detection method, comprising:
converting the one-dimensional time sequence data to be detected to obtain a two-dimensional image;
performing image reconstruction based on the two-dimensional image to obtain a reconstructed image associated with the one-dimensional time series data and a training image sample set containing the reconstructed image;
training an introVAE model of a self-provincial variational self-encoder by using the training image sample set to obtain a trained introVAE model;
calculating a loss value between the two-dimensional image and the reconstructed image by using the trained IntroVAE model to obtain a target loss value; wherein the target loss value is used to characterize whether an anomaly exists in the one-dimensional time series data.
2. The method according to claim 1, wherein the converting operation on the one-dimensional time series data to be detected to obtain a two-dimensional image comprises:
converting the one-dimensional time sequence data based on a GAF algorithm to obtain a GAF image;
coding the one-dimensional time sequence data based on a recursion graph to obtain an REC image;
generating the two-dimensional image based on the GAF image and the REC image.
3. The method according to claim 2, wherein the transforming the one-dimensional time series data based on the GAF algorithm to obtain the GAF image comprises:
zooming the one-dimensional time sequence data to obtain zoomed one-dimensional time sequence data;
and expressing the scaled one-dimensional time series data by polar coordinates to obtain the GAF image.
4. The method of claim 1, wherein the performing image reconstruction based on the two-dimensional image to obtain a reconstructed image associated with the one-dimensional time-series data and a training image sample set containing the reconstructed image comprises:
performing multi-level extraction on the two-dimensional image to obtain potential variables corresponding to the two-dimensional image;
encoding the latent variable to obtain a reconstructed image;
obtaining a sampling image based on a sampling variable obtained by sampling the prior distribution of the latent variable;
and constructing a sample set based on the reconstructed image and the sampling image to obtain a training image sample set.
5. The method according to claim 1, wherein the training of the IntroVAE model of the intro-variational self-coder by using the training image sample set to obtain the trained IntroVAE model comprises:
calculating a loss value between the two-dimensional image and the reconstructed image based on the reconstruction loss and the KL divergence to obtain a reconstruction loss value;
calculating a loss value between the reconstructed image and a sampling image in the training image sample set based on a preconfigured loss function to obtain a sampling loss value;
and training the IntroVAE model based on the reconstruction loss value and the sampling loss value to obtain the trained IntroVAE model.
6. The method according to claim 5, wherein calculating a loss value between the two-dimensional image and the reconstructed image based on the reconstruction loss and the KL divergence, resulting in a reconstruction loss value, comprises:
calculating a loss value between the two-dimensional image and the reconstructed image by the following formula:
Figure FDA0003513570070000021
wherein L (X, X ') is the reconstruction loss function, X is the two-dimensional image, and X' is the reconstructed imageB is the number of the two-dimensional images, N is the length of each sub-sequence in the one-dimensional time-series data, C is the number of image channels, B and C are variables of B and C, and B and C are integers greater than 0, i and j are pixel values of the two-dimensional images and the reconstructed image, and i and j are integers greater than 0,
Figure FDA0003513570070000022
summing the squares of the differences between the two-dimensional image and the reconstructed image;
calculating a loss value between the two-dimensional image and the latent variable of the two-dimensional image by the following formula to obtain a reconstruction loss value:
Figure FDA0003513570070000023
wherein L isKL(X, Z) is a KL divergence function of the two-dimensional image and a latent variable of the two-dimensional image, X is the two-dimensional image, Z is the latent variable, Z isgIs the g-th group of the latent variables, and g is an integer greater than 0,
Figure FDA0003513570070000031
is the ith variable of Zg, and i is an integer greater than 0, Z<gExpressed as the latent variable Z1To the latent variable Zg-1G is the number of groups of said latent variables, Ig is the length of Zg,
Figure FDA0003513570070000032
in order to be a priori distributed,
Figure FDA0003513570070000033
in order to achieve the posterior distribution,
Figure FDA0003513570070000034
the posterior distribution representing the latent variable approximates the prior distribution.
7. The method of claim 1, further comprising:
and when the target loss value exceeds a preset threshold value, giving an alarm.
8. A time-series data detection apparatus, comprising:
the conversion module is used for converting the one-dimensional time sequence data to be detected to obtain a two-dimensional image;
the reconstruction module is used for carrying out image reconstruction based on the two-dimensional image to obtain a reconstructed image related to the one-dimensional time sequence data and a training image sample set containing the reconstructed image;
the training module is used for training an introVAE model of a self-provincial variational self-encoder by utilizing the training image sample set to obtain the trained introVAE model;
the detection module is used for calculating a loss value between the two-dimensional image and the reconstructed image by using the trained IntroVAE model to obtain a target loss value; wherein the target loss value is used to characterize whether an anomaly exists in the one-dimensional time series data.
9. An apparatus comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1 to 7 when executing the computer program.
10. A computer storage medium storing a computer program, wherein the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 7.
CN202210158956.9A 2022-02-21 2022-02-21 Time series data detection method, device, equipment and computer storage medium Pending CN114494242A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210158956.9A CN114494242A (en) 2022-02-21 2022-02-21 Time series data detection method, device, equipment and computer storage medium
PCT/CN2022/089438 WO2023155296A1 (en) 2022-02-21 2022-04-27 Time series data detection method and apparatus, device, and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210158956.9A CN114494242A (en) 2022-02-21 2022-02-21 Time series data detection method, device, equipment and computer storage medium

Publications (1)

Publication Number Publication Date
CN114494242A true CN114494242A (en) 2022-05-13

Family

ID=81482517

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210158956.9A Pending CN114494242A (en) 2022-02-21 2022-02-21 Time series data detection method, device, equipment and computer storage medium

Country Status (2)

Country Link
CN (1) CN114494242A (en)
WO (1) WO2023155296A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115617882A (en) * 2022-12-20 2023-01-17 粤港澳大湾区数字经济研究院(福田) Time sequence diagram data generation method and system with structural constraint based on GAN
CN117668719A (en) * 2023-11-14 2024-03-08 深圳大学 Tunnel monitoring data anomaly detection method with self-adaptive threshold

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117392316B (en) * 2023-10-13 2024-06-18 清华大学 Three-dimensional reconstruction method and device based on series of under-focus images

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020143321A1 (en) * 2019-01-09 2020-07-16 平安科技(深圳)有限公司 Training sample data augmentation method based on variational autoencoder, storage medium and computer device
CN111967507A (en) * 2020-07-31 2020-11-20 复旦大学 Discrete cosine transform and U-Net based time sequence anomaly detection method
CN112131272A (en) * 2020-09-22 2020-12-25 平安科技(深圳)有限公司 Detection method, device, equipment and storage medium for multi-element KPI time sequence
CN112732785A (en) * 2020-12-31 2021-04-30 平安科技(深圳)有限公司 Time series data abnormity detection method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10373055B1 (en) * 2016-05-20 2019-08-06 Deepmind Technologies Limited Training variational autoencoders to generate disentangled latent factors
CN112200244B (en) * 2020-10-09 2022-12-09 西安交通大学 Intelligent detection method for anomaly of aerospace engine based on hierarchical countermeasure training

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020143321A1 (en) * 2019-01-09 2020-07-16 平安科技(深圳)有限公司 Training sample data augmentation method based on variational autoencoder, storage medium and computer device
CN111967507A (en) * 2020-07-31 2020-11-20 复旦大学 Discrete cosine transform and U-Net based time sequence anomaly detection method
CN112131272A (en) * 2020-09-22 2020-12-25 平安科技(深圳)有限公司 Detection method, device, equipment and storage medium for multi-element KPI time sequence
CN112732785A (en) * 2020-12-31 2021-04-30 平安科技(深圳)有限公司 Time series data abnormity detection method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
KOBAYASHI,KAZUMA ET.AL: "Relearning Global and Local Features of Normal Brain Anatomy for Unsupervised Abnormality Detection", ARXIV, 8 May 2021 (2021-05-08), pages 1 - 20 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115617882A (en) * 2022-12-20 2023-01-17 粤港澳大湾区数字经济研究院(福田) Time sequence diagram data generation method and system with structural constraint based on GAN
CN115617882B (en) * 2022-12-20 2023-05-23 粤港澳大湾区数字经济研究院(福田) GAN-based time sequence diagram data generation method and system with structural constraint
CN117668719A (en) * 2023-11-14 2024-03-08 深圳大学 Tunnel monitoring data anomaly detection method with self-adaptive threshold

Also Published As

Publication number Publication date
WO2023155296A1 (en) 2023-08-24

Similar Documents

Publication Publication Date Title
CN110163258B (en) Zero sample learning method and system based on semantic attribute attention redistribution mechanism
CN114494242A (en) Time series data detection method, device, equipment and computer storage medium
CN106408610B (en) Method and system for anatomical object detection using a marginal space deep neural network
CN109446889B (en) Object tracking method and device based on twin matching network
Wu et al. Metric learning based structural appearance model for robust visual tracking
CN110930378B (en) Emphysema image processing method and system based on low data demand
CN116152611B (en) Multistage multi-scale point cloud completion method, system, equipment and storage medium
CN109492610B (en) Pedestrian re-identification method and device and readable storage medium
Ali et al. Learning features for action recognition and identity with deep belief networks
JP2024513596A (en) Image processing method and apparatus and computer readable storage medium
CN116486408B (en) Cross-domain semantic segmentation method and device for remote sensing image
Zhu et al. Semantic image segmentation with shared decomposition convolution and boundary reinforcement structure
Collier et al. Transfer and marginalize: Explaining away label noise with privileged information
CN114550014A (en) Road segmentation method and computer device
Rajalaxmi et al. Deepfake Detection using Inception-ResNet-V2 Network
CN114972871A (en) Image registration-based few-sample image anomaly detection method and system
CN114724183A (en) Human body key point detection method and system, electronic equipment and readable storage medium
Quazi et al. Image Classification and Semantic Segmentation with Deep Learning
KR102340387B1 (en) Method of learning brain connectivity and system threrfor
CN112818846A (en) Video frame feature extraction method and device and electronic equipment
CN117315651B (en) Affine-consistency-transporter-based multi-class cell detection classification method and affine-consistency-transporter-based multi-class cell detection classification device
CN117974693B (en) Image segmentation method, device, computer equipment and storage medium
CN115578753B (en) Human body key point detection method and device, electronic equipment and storage medium
Zhang et al. Equilibrium and integrity correction class activation map in weakly supervised semantic segmentation
KR102659347B1 (en) Method and apparatus for comparing images using intermediate images converted through artificial neural network

Legal Events

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