Abnormal detection method based on equipment index data and related equipment
Feature extraction and processing of cloud platform equipment indicator data are carried out through models such as one-dimensional convolutional neural network and long short-term memory network, which solves the problem of inaccurate detection in the existing technology and achieves more efficient anomaly detection results.
Patent Information
- Application Number
- CN202010328626.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-23
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2040-04-23
AI Technical Summary
In the existing technology, when detecting anomalies in cloud platform device indicator data, the extracted features cannot effectively express the changing state, trend or periodic characteristics of the time series data, resulting in inaccurate detection.
The one-dimensional convolutional neural network model is trained through the triple algorithm to extract the curve features of the time series data, and combined with the long short-term memory network and encoder model, the suspicious classification features and dimensionality reduction features are determined and input to the anomaly detection model for synthesis. detection.
It improves the accuracy of abnormal detection of equipment indicator data, can better represent the changing trends and characteristics of time series data, and enhances the comprehensiveness and accuracy of detection.
Smart Images

Figure CN111679949B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data detection technology, and in particular to an anomaly detection method based on device indicator data and related equipment. Background Art
[0002] With the development of computer technology, cloud platforms consisting of a large number of hosts and network switches have been widely used. In order to ensure that the cloud platform can provide services stably, it is necessary to monitor some indicator data of the cloud platform's devices (such as host CPU usage and memory usage) in real time. At present, the monitored indicator data is a continuous time series data that can reflect the change state, trend or degree. By extracting the features of the time series data, these features are detected for anomalies. However, in practice, it is found that these extracted features cannot well express the change state, trend or degree and periodic characteristics of the time series data, resulting in inaccurate anomaly detection.
[0003] Therefore, how to improve the accuracy of anomaly detection for device indicator data is a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of the above, it is necessary to provide an anomaly detection method based on device indicator data and related equipment, which can improve the accuracy of anomaly detection for device indicator data.
[0005] A first aspect of the present invention provides an anomaly detection method based on device indicator data, the method comprising:
[0006] When receiving an instruction to perform anomaly detection on device indicator data, obtaining target time series data corresponding to the device indicator data, wherein the target time series data includes a continuous time point and the device indicator data corresponding to the time point;
[0007] Using a trained one-dimensional convolutional neural network model to perform feature extraction on the target time series data, to obtain curve features of the target time series data, wherein the one-dimensional convolutional neural network model is trained by a triplet algorithm, and the curve features are features of a curve formed by changes in the equipment indicator data over time;
[0008] Determining suspicious classification features of the target time series data according to a pre-trained long short-term memory network model;
[0009] Determining residual features of the target time series data according to the suspicious classification features;
[0010] Using a pre-trained encoder model, obtaining dimensionality reduction features of the target time series data;
[0011] Obtaining basic features of the target time series data;
[0012] The curve feature, the suspicious classification feature, the residual feature, the dimension reduction feature and the basic feature are input into a pre-trained anomaly detection model to obtain an anomaly detection result of the device indicator data.
[0013] In a possible implementation, before extracting features from the target time series data using the trained one-dimensional convolutional neural network model to obtain curve features of the target time series data, the method further includes:
[0014] Obtain multiple sets of historical time series data corresponding to device indicator data;
[0015] Determine a plurality of time series curves according to the plurality of groups of historical time series data, wherein the plurality of time series curves correspond one-to-one to the plurality of groups of historical time series data;
[0016] Determining, by a similarity algorithm, a shape-based distance between any two adjacent time series curves among the plurality of time series curves;
[0017] Mapping a plurality of the shape-based distances to a plurality of similarities between the plurality of time series curves;
[0018] Determining a plurality of training samples according to a plurality of similarities between the plurality of time series curves;
[0019] The triplet algorithm and the plurality of training samples are used for training to obtain a trained one-dimensional convolutional neural network model.
[0020] In a possible implementation, the using the triplet algorithm and the multiple training samples to perform training to obtain a trained one-dimensional convolutional neural network model includes:
[0021] Inputting the first time series curve, the second time series curve and the third time series curve of the plurality of training samples into the initial one-dimensional convolutional neural network model in sequence to obtain a first vector, a second vector and a third vector;
[0022] Using a triplet algorithm to perform loss calculation on the first vector, the second vector, and the third vector to obtain a loss value;
[0023] According to the loss value, the network parameters of the initial one-dimensional convolutional neural network model are updated to obtain a trained one-dimensional convolutional neural network model.
[0024] In a possible implementation, determining the suspicious classification features of the target time series data according to the pre-trained long short-term memory network model includes:
[0025] Inputting the data before the latest time point in the target time series data into the long short-term memory network to obtain the predicted data corresponding to the latest time point;
[0026] Calculate the difference between the predicted data and the data at the latest time point in the target time series data;
[0027] The absolute value corresponding to the difference is determined as a suspicious classification feature.
[0028] In a possible implementation, determining the residual feature of the target time series data according to the suspicious classification feature includes:
[0029] Determining a standard deviation of the target time series data;
[0030] A residual feature is determined according to the suspicious classification feature and the standard deviation.
[0031] In a possible implementation, the basic features include basic statistical features, quantile index statistical features, data distribution features, and entropy features corresponding to the degree of data chaos.
[0032] In a possible implementation, each of the training samples includes a first time series curve, a second time series curve and a third time series curve, wherein the similarity between the first time series curve and the second time series curve is greater than a preset similarity, and the similarity between the first time series curve and the third time series curve belongs to a preset similarity range.
[0033] A second aspect of the present invention provides an abnormality detection device based on equipment indicator data, the device comprising:
[0034] An acquisition module, configured to acquire target time series data corresponding to the device indicator data when receiving an instruction to perform anomaly detection on the device indicator data, wherein the target time series data includes a continuous time point and the device indicator data corresponding to the time point;
[0035] An extraction module, used to use a trained one-dimensional convolutional neural network model to perform feature extraction on the target time series data to obtain curve features of the target time series data, wherein the one-dimensional convolutional neural network model is trained by a triplet algorithm, and the curve features are features of a curve formed by changes in device indicator data over time;
[0036] A determination module, used to determine suspicious classification features of the target time series data based on a pre-trained long short-term memory network model;
[0037] The determination module is further used to determine the residual features of the target time series data according to the suspicious classification features;
[0038] The acquisition module is further used to obtain the dimension reduction features of the target time series data using a pre-trained encoder model;
[0039] The acquisition module is further used to acquire basic features of the target time series data;
[0040] An input module is used to input the curve feature, the suspicious classification feature, the residual feature, the dimension reduction feature and the basic feature into a pre-trained anomaly detection model to obtain an anomaly detection result of the device indicator data.
[0041] A third aspect of the present invention provides an electronic device, comprising a processor and a memory, wherein the processor is configured to implement the anomaly detection method based on device indicator data when executing a computer program stored in the memory.
[0042] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the anomaly detection method based on device indicator data is implemented.
[0043] According to the above technical scheme, in the present invention, an improved one-dimensional convolutional neural network model can be used to extract features of the curve corresponding to the time series data, which can extract more comprehensive curve features and better represent the changing trend of the time series data. At the same time, the features of the time series data are extracted by the trained long short-term memory network model and the encoder model, which increases the features of the time series data and makes the features of the time series data for anomaly detection more comprehensive, thereby improving the accuracy of anomaly detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 It is a flowchart of a preferred embodiment of an abnormality detection method based on equipment indicator data disclosed by the present invention.
[0045] Figure 2 It is a functional module diagram of a preferred embodiment of an abnormality detection device based on equipment indicator data disclosed by the present invention.
[0046] Figure 3 It is a schematic diagram of the structure of an electronic device of a preferred embodiment of the present invention to implement an abnormality detection method based on device indicator data. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0049] This solution belongs to the field of smart security, and can promote the construction of smart cities through this solution. The anomaly detection method based on device indicator data of the embodiment of the present invention is applied to electronic devices, and can also be applied to a hardware environment consisting of an electronic device and a server connected to the electronic device through a network, and is jointly executed by the server and the electronic device. The network includes but is not limited to: a wide area network, a metropolitan area network or a local area network.
[0050] The electronic device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, etc. The electronic device may also include network devices and / or user devices. Among them, the network device includes but is not limited to a single network device, a server group composed of multiple network devices, or a cloud composed of a large number of hosts or network devices based on cloud computing (Cloud Computing), wherein cloud computing is a type of distributed computing, a super virtual computer composed of a group of loosely coupled computer sets. The user device includes but is not limited to any electronic product that can interact with the user through a keyboard, mouse, remote control, touchpad or voice control device, such as a personal computer, tablet computer, smart phone, personal digital assistant PDA, etc.
[0051] See also Figure 1 , Figure 1 The flowchart of a preferred embodiment of an abnormality detection method based on device indicator data disclosed in the present invention is shown in FIG.
[0052] S11. When receiving an instruction to perform anomaly detection on device indicator data, the electronic device obtains target time series data corresponding to the device indicator data, wherein the target time series data includes a continuous time point and the device indicator data corresponding to the time point.
[0053] Among them, the device indicator data includes: host CPU usage, memory usage, storage capacity, number of network switch requests, network export access, etc. The values of these device indicator data at a certain moment are very high or very low, which is generally normal. If you want to monitor whether the device indicator data is abnormal in real time, you need to combine the current time point and all the data in the previous period (i.e., the target time series data) to make an abnormal judgment. For example: If you need to judge whether the device indicator data at the current time is abnormal, you need to obtain all the device indicator data (data series data) recorded within 3 hours before the current time point to make an abnormal judgment, which can obtain a relatively accurate abnormal judgment result.
[0054] The continuous time points may be moments determined at preset time intervals within a period of time, such as 3:00, 3:05, 3:10, etc. Each time point may correspond to a device indicator data.
[0055] S12. The electronic device uses a trained one-dimensional convolutional neural network model to perform feature extraction on the target time series data to obtain curve features of the target time series data, wherein the one-dimensional convolutional neural network model is trained using a triplet algorithm, and the curve features are features of a curve formed when the device indicator data changes over time.
[0056] Among them, Convolutional Neural Networks (CNN) is a type of feedforward neural network that includes convolution calculations and has a deep structure. Convolutional neural networks include one-dimensional convolutional neural networks, two-dimensional convolutional neural networks, and three-dimensional convolutional neural networks. One-dimensional convolutional neural networks are often used for sequence data processing; two-dimensional convolutional neural networks are often used for image text recognition; three-dimensional convolutional neural networks are mainly used for medical image and video data recognition.
[0057] The activation function of the one-dimensional convolutional neural network model may be a hyperbolic tangent function (tanh). The activation function may be a function running on neurons of an artificial neural network, responsible for mapping the input of the neuron to the output.
[0058] Among them, the triplet algorithm (Triplet Loss) is a loss function algorithm in deep learning, which is used to train samples with small differences and can realize sample similarity calculation.
[0059] The purpose of using the triplet algorithm is to make the vectors output by the model for similar curves basically consistent and to make the vectors output by the model for dissimilar curves very different, so that the characteristic vector output by the model can be used to represent the curve.
[0060] As an optional implementation, before step S12, the method further includes:
[0061] Obtain multiple sets of historical time series data corresponding to device indicator data;
[0062] Determine a plurality of time series curves according to the plurality of groups of historical time series data, wherein the plurality of time series curves correspond one-to-one to the plurality of groups of historical time series data;
[0063] Determining, by a similarity algorithm, a shape-based distance between any two adjacent time series curves among the plurality of time series curves;
[0064] Mapping a plurality of the shape-based distances to a plurality of similarities between the plurality of time series curves;
[0065] Determining a plurality of training samples according to a plurality of similarities between the plurality of time series curves;
[0066] The triplet algorithm and the plurality of training samples are used for training to obtain a trained one-dimensional convolutional neural network model.
[0067] The value interval of the shape-based distance (SBD) is [0, 2]. The smaller the value of the shape-based distance is, the more similar the two corresponding time series curves are.
[0068] Assume that the curve is x, the curve is y, the curve length is m, and the phase deviation is s. Then the calculation formula of SBD is:
[0069]
[0070]
[0071]
[0072] Each of the training samples includes a first time series curve, a second time series curve and a third time series curve, wherein the similarity between the first time series curve and the second time series curve is greater than a preset similarity, and the similarity between the first time series curve and the third time series curve belongs to a preset similarity range.
[0073] A similarity degree may be preset, such as 70%, and a similarity range may be preset, such as [40%, 50%].
[0074] Specifically, the training using the triplet algorithm and the multiple training samples to obtain a trained one-dimensional convolutional neural network model includes:
[0075] Inputting the first time series curve, the second time series curve and the third time series curve of the plurality of training samples into the initial one-dimensional convolutional neural network model in sequence to obtain a first vector, a second vector and a third vector;
[0076] Using a triplet algorithm to perform loss calculation on the first vector, the second vector, and the third vector to obtain a loss value;
[0077] According to the loss value, the network parameters of the initial one-dimensional convolutional neural network model are updated to obtain a trained one-dimensional convolutional neural network model.
[0078] Here, assuming that the first vector is f(X 1 ), the second vector is f(X 2 ), the third vector is f(X 3 ), the preset parameter α, the loss function corresponding to the triple algorithm is:
[0079] L(X 1 ,X 2 ,X 3 )=max(||f(X 1 )-f(X 2 )|| 2 -||f(X 1 )-f(X 3 )|| 2 +α,0);
[0080] The goal of training is to stabilize the loss value at a very small value, that is, the target formula of training is:
[0081] ||f(X 1 )-f(X 2 )|| 2 -||f(X 1 )-f(X 3 )|| 2+α≤0;
[0082] The training makes the difference between the first vector and the second vector as small as possible, and the difference between the second vector and the third vector as large as possible, that is, the vectors corresponding to two similar time series curves are basically the same, and the vectors corresponding to two dissimilar time series curves are very different. Therefore, the vector output by the trained model can represent the overall characteristics of the input time series curve (i.e., curve characteristics), which can be used to represent the changing state, trend or degree, and periodic characteristics of time series data.
[0083] S13. The electronic device determines suspicious classification features of the target time series data based on a pre-trained long short-term memory network model.
[0084] The long short-term memory network model, long short-term memory network (LSTM), is a time recurrent neural network suitable for processing and predicting important events with very long intervals and delays in time series.
[0085] Specifically, determining the suspicious classification features of the target time series data according to the pre-trained long short-term memory network model includes:
[0086] Inputting the data before the latest time point in the target time series data into the long short-term memory network to obtain the predicted data corresponding to the latest time point;
[0087] Calculate the difference between the predicted data and the data at the latest time point in the target time series data;
[0088] The absolute value corresponding to the difference is determined as a suspicious classification feature.
[0089] In this optional implementation, the predicted feature value can be obtained by using a pre-trained long short-term memory network model and a data curve.
[0090] Wherein, assuming that the value of the preset data of the long short-term memory network (LSTM) model is Y, and the value of the data at the latest time point in the target time series data is X, the suspicious classification feature is |YX|.
[0091] S14. The electronic device determines the residual features of the target time series data according to the suspicious classification features.
[0092] Specifically, determining the residual features of the target time series data according to the suspicious classification features includes:
[0093] Determining the standard deviation of the target time series data;
[0094] A residual feature is determined according to the suspicious classification feature and the standard deviation.
[0095] Among them, assuming that the standard deviation is σ, if |YX|<=3σ, the value of the residual feature is 1, if |YX|>3σ, the value of the residual feature is 0.
[0096] In this optional implementation, 3 times the standard deviation is a common value used to screen outliers. If the suspicious classification feature is greater than 3 times the standard deviation, it can be considered that there is a high probability of an abnormality, and the residual feature is set to 0 as a reference for abnormality detection; if the suspicious classification feature is less than or equal to 3 times the standard deviation, it can be considered that the probability of an abnormality is relatively small, and the residual feature is set to 1 as a reference for abnormality detection.
[0097] S15. The electronic device uses a pre-trained encoder model to obtain dimensionality reduction features of the target time series data.
[0098] The autoencoder model can be an artificial neural network model that can learn an efficient representation of input data through unsupervised learning. This efficient representation of input data is called coding, and its dimension is generally much smaller than the input data, so that the autoencoder can be used for dimensionality reduction.
[0099] In the embodiment of the present invention, the autoencoder model mainly performs data dimensionality reduction on the vector and extracts the features of the reduced-dimensional data. During the training process, the labels of the input variable X of the encoder layer and the output variable of the decoder layer are also X, so the model tends to learn X. Finally, the trained encoder layer is used as the autoencoder model, which can reduce the dimensionality of a set of input data vectors to obtain a set of feature vectors (reduced-dimensional features), and this set of feature vectors can be restored to the data vectors originally input into the autoencoder model through the decoder layer.
[0100] S16. The electronic device obtains basic features of the target time series data.
[0101] The basic characteristics include basic statistical characteristics, quantile indicator statistical characteristics, data distribution characteristics and entropy characteristics corresponding to the degree of data chaos.
[0102] Among them, the basic statistical characteristics may include current value, maximum value, minimum value, mean value, and standard deviation; the quantile indicator statistical characteristics may include 1 / 100 quantile, 1 / 8 quantile, 1 / 4 quantile, 1 / 2 median, 3 / 4 quantile, 7 / 8 quantile, and 99 / 100 quantile; the data distribution characteristics may include kurtosis and skewness.
[0103] S17. The electronic device inputs the curve feature, the suspicious classification feature, the residual feature, the dimension reduction feature and the basic feature into a pre-trained anomaly detection model to obtain an anomaly detection result of the device indicator data.
[0104] The abnormality detection result may be two preset values, for example, 0 represents normal and 1 represents abnormal.
[0105] In an embodiment of the present invention, different weights can be set for each type of feature. By comprehensively considering the basic features, the dimensionality reduction features, the classification features, the residual features and the curve features, the anomaly detection model can output more accurate anomaly detection results for the device indicator data.
[0106] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned anomaly detection results, the above-mentioned anomaly detection results can also be stored in a node of a blockchain.
[0107] exist Figure 1 In the described method flow, an improved one-dimensional convolutional neural network model can be used to extract features of the curve corresponding to the time series data, which can extract more comprehensive curve features and better represent the changing trend of the time series data. At the same time, the features of the time series data are extracted by training the long short-term memory network model and the encoder model, which increases the features of the time series data and makes the features of the time series data for anomaly detection more comprehensive, thereby improving the accuracy of anomaly detection.
[0108] See also Figure 2 , Figure 2 It is a functional module diagram of a preferred embodiment of an abnormality detection device based on equipment indicator data disclosed by the present invention.
[0109] In some embodiments, the device based on device indicator data anomaly detection device runs in an electronic device. The device based on device indicator data anomaly detection device may include a plurality of functional modules composed of program code segments. The program code of each program segment in the device based on device indicator data anomaly detection device may be stored in a memory and executed by at least one processor to execute Figure 1 Some or all of the steps in the described method for anomaly detection based on device metric data.
[0110] In this embodiment, the device for detecting abnormalities based on device indicator data can be divided into multiple functional modules according to the functions it performs. The functional modules may include: an acquisition module 201, an extraction module 202, a determination module 203, and an input module 204. The module referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory.
[0111] The acquisition module 201 is used to acquire target time series data corresponding to the device indicator data when receiving an instruction to perform anomaly detection on the device indicator data, wherein the target time series data includes a continuous time point and the device indicator data corresponding to the time point.
[0112] Among them, the device indicator data includes: host CPU usage, memory usage, storage capacity, number of network switch requests, network export access, etc. The values of these device indicator data at a certain moment are very high or very low, which is generally normal. If you want to monitor whether the device indicator data is abnormal in real time, you need to combine the current time point and all the data in the previous period (i.e., the target time series data) to make an abnormal judgment. For example: If you need to judge whether the device indicator data at the current time is abnormal, you need to obtain all the device indicator data (data series data) recorded within 3 hours before the current time point to make an abnormal judgment, which can obtain a relatively accurate abnormal judgment result.
[0113] The extraction module 202 is used to use the trained one-dimensional convolutional neural network model to perform feature extraction on the target time series data to obtain the curve features of the target time series data, wherein the one-dimensional convolutional neural network model is trained by a triplet algorithm, and the curve features are the features of the curve formed by the equipment indicator data changing over time.
[0114] Among them, Convolutional Neural Networks (CNN) is a type of feedforward neural network that includes convolution calculations and has a deep structure. Convolutional neural networks include one-dimensional convolutional neural networks, two-dimensional convolutional neural networks, and three-dimensional convolutional neural networks. One-dimensional convolutional neural networks are often used for sequence data processing; two-dimensional convolutional neural networks are often used for image text recognition; three-dimensional convolutional neural networks are mainly used for medical image and video data recognition.
[0115] The activation function of the one-dimensional convolutional neural network model may be a hyperbolic tangent function (tanh). The activation function may be a function running on neurons of an artificial neural network, responsible for mapping the input of the neuron to the output.
[0116] Among them, the triplet algorithm (Triplet Loss) is a loss function algorithm in deep learning, which is used to train samples with small differences and can realize sample similarity calculation.
[0117] The purpose of using the triplet algorithm is to make the vectors output by the model for similar curves basically consistent and to make the vectors output by the model for dissimilar curves very different, so that the characteristic vector output by the model can be used to represent the curve.
[0118] The determination module 203 is used to determine the suspicious classification features of the target time series data according to the pre-trained long short-term memory network model.
[0119] The long short-term memory network model, long short-term memory network (LSTM), is a time recurrent neural network suitable for processing and predicting important events with very long intervals and delays in time series.
[0120] The determination module 203 is further configured to determine the residual features of the target time series data according to the suspicious classification features.
[0121] Specifically, determining the residual features of the target time series data according to the suspicious classification features includes:
[0122] Determining the standard deviation of the target time series data;
[0123] A residual feature is determined according to the suspicious classification feature and the standard deviation.
[0124] Assuming the standard deviation is σ, if |YX|<=3σ, the value of the residual feature is 1, and if |YX|>3σ, the value of the residual feature is 0.
[0125] The acquisition module 201 is further used to use a pre-trained encoder model to acquire the dimension reduction features of the target time series data.
[0126] The encoder model (Autoencoders) can be an artificial neural network model that can learn an efficient representation of input data through unsupervised learning. This efficient representation of input data is called encodings, and its dimension is generally much smaller than the input data, so that the autoencoder can be used for dimensionality reduction.
[0127] In the embodiment of the present invention, the autoencoder model mainly performs data dimensionality reduction on the vector and extracts the features of the reduced-dimensional data. During the training process, the labels of the input variable X of the encoder layer and the output variable of the decoder layer are also X, so the model tends to learn X. Finally, the trained encoder layer is used as the autoencoder model, which can reduce the dimensionality of a set of input data vectors to obtain a set of feature vectors (reduced-dimensional features), and this set of feature vectors can be restored to the data vectors originally input into the autoencoder model through the decoder layer.
[0128] The acquisition module 201 is also used to acquire basic features of the target time series data.
[0129] The basic characteristics include basic statistical characteristics, quantile indicator statistical characteristics, data distribution characteristics and entropy characteristics corresponding to the degree of data chaos.
[0130] Among them, the basic statistical characteristics may include current value, maximum value, minimum value, mean value, and standard deviation; the quantile indicator statistical characteristics may include 1 / 100 quantile, 1 / 8 quantile, 1 / 4 quantile, 1 / 2 median, 3 / 4 quantile, 7 / 8 quantile, and 99 / 100 quantile; the data distribution characteristics may include kurtosis and skewness.
[0131] The input module 203 is used to input the curve feature, the suspicious classification feature, the residual feature, the dimension reduction feature and the basic feature into a pre-trained anomaly detection model to obtain an anomaly detection result of the device indicator data.
[0132] The abnormality detection result may be two preset values, for example, 0 represents normal and 1 represents abnormal.
[0133] In an embodiment of the present invention, different weights can be set for each type of feature. By comprehensively considering the basic features, the dimensionality reduction features, the classification features, the residual features and the curve features, the anomaly detection model can output more accurate anomaly detection results for the device indicator data.
[0134] As an optional implementation, the acquisition module 201 is also used for the extraction module 202 to use the trained one-dimensional convolutional neural network model to perform feature extraction on the target time series data, and obtain multiple groups of historical time series data corresponding to the device indicator data before obtaining the curve features of the target time series data;
[0135] The determination module 203 is further configured to determine a plurality of time series curves according to the plurality of groups of historical time series data, wherein the plurality of time series curves correspond one-to-one to the plurality of groups of historical time series data;
[0136] The determination module 203 is further configured to determine the shape-based distance between any two adjacent time series curves among the multiple time series curves by using a similarity algorithm;
[0137] The device for detecting abnormalities based on equipment indicator data may further include:
[0138] A mapping module, used for mapping the plurality of shape-based distances into a plurality of similarities between the plurality of time series curves;
[0139] The determination module 203 is further configured to determine a plurality of training samples according to a plurality of similarities between the plurality of time series curves;
[0140] The training module is used to perform training using the triplet algorithm and the multiple training samples to obtain a trained one-dimensional convolutional neural network model.
[0141] The value interval of the shape-based distance (SBD) is [0, 2]. The smaller the value of the shape-based distance is, the more similar the two corresponding time series curves are.
[0142] Assume that the curve is x, the curve is y, the curve length is m, and the phase deviation is s. Then the calculation formula of SBD is:
[0143]
[0144]
[0145]
[0146] Each of the training samples includes a first time series curve, a second time series curve and a third time series curve, wherein the similarity between the first time series curve and the second time series curve is greater than a preset similarity, and the similarity between the first time series curve and the third time series curve belongs to a preset similarity range.
[0147] A similarity degree may be preset, such as 70%, and a similarity range may be preset, such as [40%, 50%].
[0148] As an optional implementation, the training module uses the triple algorithm and the multiple training samples for training, and the method of obtaining the trained one-dimensional convolutional neural network model is specifically as follows:
[0149] Inputting the first time series curve, the second time series curve and the third time series curve of the plurality of training samples into the initial one-dimensional convolutional neural network model in sequence to obtain a first vector, a second vector and a third vector;
[0150] Using a triplet algorithm to perform loss calculation on the first vector, the second vector, and the third vector to obtain a loss value;
[0151] According to the loss value, the network parameters of the initial one-dimensional convolutional neural network model are updated to obtain a trained one-dimensional convolutional neural network model.
[0152] Among them, the first vector is f(X 1 ), the second vector is f(X 2 ), the third vector is f(X 3 ), the preset parameter α, the loss function corresponding to the triple algorithm is:
[0153] L(X 1 , X 2 , X 3 )=max(||f(X 1 )-f(X 2 )|| 2 -||f(X 1 )-f(X 3 )|| 2 +α,0);
[0154] The goal of training is to stabilize the loss value at a very small value, that is, the target formula of training is:
[0155] ||f(X 1 )-f(X 2 )|| 2 -||f(X 1 )-f(X 3 )|| 2 +α≤0;
[0156] The training makes the difference between the first vector and the second vector as small as possible, and the difference between the second vector and the third vector as large as possible, that is, the vectors corresponding to two similar time series curves are basically the same, and the vectors corresponding to two dissimilar time series curves are very different. Therefore, the vector output by the trained model can represent the overall characteristics of the input time series curve (i.e., curve characteristics), which can be used to represent the changing state, trend or degree, and periodic characteristics of time series data.
[0157] As an optional implementation, the determination module 203 determines the suspicious classification features of the target time series data according to the pre-trained long short-term memory network model in the following manner:
[0158] Inputting the data before the latest time point in the target time series data into the long short-term memory network to obtain the predicted data corresponding to the latest time point;
[0159] Calculate the difference between the predicted data and the data at the latest time point in the target time series data;
[0160] The absolute value corresponding to the difference is determined as a suspicious classification feature.
[0161] In this optional implementation, the predicted feature value can be obtained by using a pre-trained long short-term memory network model and a data curve.
[0162] Wherein, assuming that the value of the preset data of the long short-term memory network (LSTM) model is Y, and the value of the data at the latest time point in the target time series data is X, the suspicious classification feature is |YX|.
[0163] As an optional implementation, the determination module 203 determines the residual feature of the target time series data according to the suspicious classification feature in the following manner:
[0164] Determining the standard deviation of the target time series data;
[0165] A residual feature is determined according to the suspicious classification feature and the standard deviation.
[0166] Among them, assuming that the standard deviation is σ, if |YX|<=3σ, the value of the residual feature is 1, if |YX|>3σ, the value of the residual feature is 0.
[0167] In this optional implementation, 3 times the standard deviation is a common value used to screen outliers. If the suspicious classification feature is greater than 3 times the standard deviation, it can be considered that there is a high probability of an abnormality, and the residual feature is set to 0 as a reference for abnormality detection; if the suspicious classification feature is less than or equal to 3 times the standard deviation, it can be considered that the probability of an abnormality is relatively small, and the residual feature is set to 1 as a reference for abnormality detection.
[0168] exist Figure 2 In the described anomaly detection device based on equipment indicator data, an improved one-dimensional convolutional neural network model can be used to extract features of the curve corresponding to the time series data, which can extract more comprehensive curve features and better represent the changing trend of the time series data. At the same time, the features of the time series data are extracted by the trained long short-term memory network model and encoder model, which increases the features of the time series data and makes the features of the time series data for anomaly detection more comprehensive, thereby improving the accuracy of anomaly detection.
[0169] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned anomaly detection results, the above-mentioned anomaly detection results can also be stored in a node of a blockchain.
[0170] like Figure 3 As shown, Figure 3 The electronic device 3 includes a memory 31, at least one processor 32, a computer program 33 stored in the memory 31 and executable on the at least one processor 32, and at least one communication bus 34.
[0171] Those skilled in the art will understand that Figure 3 The schematic diagram shown is merely an example of the electronic device 3 and does not constitute a limitation on the electronic device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device 3 may also include input and output devices, network access devices, etc.
[0172] The electronic device 3 also includes but is not limited to any electronic product that can interact with the user through a keyboard, mouse, remote control, touch pad or voice control device, such as a personal computer, tablet computer, smart phone, personal digital assistant (PDA), game console, interactive network television (IPTV), smart wearable device, etc. The network where the electronic device 3 is located includes but is not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), etc.
[0173] The at least one processor 32 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, transistor logic devices, discrete hardware components, etc. The processor 32 may be a microprocessor or any conventional processor, etc. The processor 32 is the control center of the electronic device 3, and uses various interfaces and lines to connect various parts of the entire electronic device 3.
[0174] The memory 31 can be used to store the computer program 33 and / or modules / units. The processor 32 implements various functions of the electronic device 3 by running or executing the computer program and / or modules / units stored in the memory 31 and calling the data stored in the memory 31. The memory 31 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the electronic device 3 (such as audio data, etc.), etc. In addition, the memory 31 can include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, etc.
[0175] Combination Figure 1 , the memory 31 in the electronic device 3 stores a plurality of instructions to implement an abnormality detection method based on device indicator data, and the processor 32 can execute the plurality of instructions to implement:
[0176] When receiving an instruction to perform anomaly detection on device indicator data, obtaining target time series data corresponding to the device indicator data, wherein the target time series data includes a continuous time point and the device indicator data corresponding to the time point;
[0177] Using a trained one-dimensional convolutional neural network model to perform feature extraction on the target time series data, to obtain curve features of the target time series data, wherein the one-dimensional convolutional neural network model is trained by a triplet algorithm, and the curve features are features of a curve formed by changes in the equipment indicator data over time;
[0178] Determining suspicious classification features of the target time series data according to a pre-trained long short-term memory network model;
[0179] Determining residual features of the target time series data according to the suspicious classification features;
[0180] Using a pre-trained encoder model, obtaining dimensionality reduction features of the target time series data;
[0181] Obtaining basic features of the target time series data;
[0182] The curve feature, the suspicious classification feature, the residual feature, the dimension reduction feature and the basic feature are input into a pre-trained anomaly detection model to obtain an anomaly detection result of the device indicator data.
[0183] Specifically, the specific implementation method of the processor 32 for the above instructions can refer to Figure 1 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0184] exist Figure 3 In the described electronic device 3, an improved one-dimensional convolutional neural network model can be used to perform feature extraction on the curve corresponding to the time series data, which can extract more comprehensive curve features and better represent the changing trend of the time series data. At the same time, the features of the time series data are extracted by the trained long short-term memory network model and encoder model, which increases the features of the time series data and makes the features of the time series data for anomaly detection more comprehensive, thereby improving the accuracy of anomaly detection.
[0185] If the module / unit integrated in the electronic device 3 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program code can be in the form of source code, object code, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory).
[0186] Furthermore, the computer-usable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0187] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.
[0188] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.
[0189] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0190] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0191] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the present invention can be implemented in other specific forms without departing from the spirit or essential features of the present invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present invention is defined by the appended claims rather than the above description, and it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any accompanying figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim may also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, and do not indicate any particular order.
[0192] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. An anomaly detection method based on device indicator data, It is characterized in that The method comprises: When receiving an instruction to perform anomaly detection on device indicator data, obtaining target time series data corresponding to the device indicator data, wherein the target time series data includes a continuous time point and the device indicator data corresponding to the time point; Using a trained one-dimensional convolutional neural network model to perform feature extraction on the target time series data, to obtain curve features of the target time series data, wherein the one-dimensional convolutional neural network model is trained by a triplet algorithm, and the curve features are features of a curve formed by changes in the equipment indicator data over time; Determining suspicious classification features of the target time series data according to a pre-trained long short-term memory network model includes: inputting data before the latest time point in the target time series data into the long short-term memory network to obtain predicted data corresponding to the latest time point; calculating the difference between the predicted data and the data at the latest time point in the target time series data; and determining the absolute value corresponding to the difference as the suspicious classification feature; Determining residual features of the target time series data according to the suspicious classification features; Using a pre-trained encoder model, obtaining dimensionality reduction features of the target time series data; Obtaining basic features of the target time series data; Inputting the curve feature, the suspicious classification feature, the residual feature, the dimension reduction feature and the basic feature into a pre-trained anomaly detection model to obtain an anomaly detection result of the device indicator data; Wherein, before extracting features from the target time series data using the trained one-dimensional convolutional neural network model to obtain curve features of the target time series data, the method further includes: Obtain multiple sets of historical time series data corresponding to device indicator data; Determine a plurality of time series curves according to the plurality of groups of historical time series data, wherein the plurality of time series curves correspond one-to-one to the plurality of groups of historical time series data; Determining, by a similarity algorithm, a shape-based distance between any two adjacent time series curves among the plurality of time series curves; Mapping a plurality of the shape-based distances to a plurality of similarities between the plurality of time series curves; Determining a plurality of training samples according to a plurality of similarities between the plurality of time series curves; Using a triplet algorithm and the multiple training samples for training to obtain a trained one-dimensional convolutional neural network model, including: inputting the first time series curve, the second time series curve, and the third time series curve of the multiple training samples into the initial one-dimensional convolutional neural network model in sequence to obtain a first vector, a second vector, and a third vector; using a triplet algorithm to perform loss calculation on the first vector, the second vector, and the third vector to obtain a loss value; according to the loss value, updating the network parameters of the initial one-dimensional convolutional neural network model to obtain a trained one-dimensional convolutional neural network model.
2. The method according to claim 1, It is characterized in that Determining the residual features of the target time series data according to the suspicious classification features includes: Determining a standard deviation of the target time series data; A residual feature is determined according to the suspicious classification feature and the standard deviation.
3. The method according to claim 1, It is characterized in that The basic characteristics include basic statistical characteristics, quantile index statistical characteristics, data distribution characteristics and entropy characteristics corresponding to the degree of data chaos.
4. The method according to claim 1, It is characterized in that Each of the training samples includes a first time series curve, a second time series curve and a third time series curve, wherein the similarity between the first time series curve and the second time series curve is greater than a preset similarity, and the similarity between the first time series curve and the third time series curve belongs to a preset similarity range.
5. An abnormality detection device based on equipment indicator data, It is characterized in that The abnormality detection device based on equipment indicator data includes: An acquisition module, configured to acquire target time series data corresponding to the device indicator data when receiving an instruction to perform anomaly detection on the device indicator data, wherein the target time series data includes a continuous time point and the device indicator data corresponding to the time point; An extraction module, used to use a trained one-dimensional convolutional neural network model to perform feature extraction on the target time series data to obtain curve features of the target time series data, wherein the one-dimensional convolutional neural network model is trained by a triplet algorithm, and the curve features are features of a curve formed by changes in device indicator data over time; A determination module is used to determine the suspicious classification features of the target time series data according to a pre-trained long short-term memory network model, including: inputting data before the latest time point in the target time series data into the long short-term memory network to obtain predicted data corresponding to the latest time point; calculating the difference between the predicted data and the data at the latest time point in the target time series data; and determining the absolute value corresponding to the difference as the suspicious classification feature; The determination module is further used to determine the residual features of the target time series data according to the suspicious classification features; The acquisition module is further used to obtain the dimension reduction features of the target time series data using a pre-trained encoder model; The acquisition module is further used to acquire the basic features of the target time series data; An input module, used for inputting the curve feature, the suspicious classification feature, the residual feature, the dimension reduction feature and the basic feature into a pre-trained anomaly detection model to obtain an anomaly detection result of the device indicator data; Wherein, before extracting features from the target time series data using the trained one-dimensional convolutional neural network model to obtain curve features of the target time series data, the device further includes: The acquisition module is also used to acquire multiple groups of historical time series data corresponding to the device indicator data; The determination module is further used to determine a plurality of time series curves according to the plurality of groups of historical time series data, wherein the plurality of time series curves correspond one-to-one to the plurality of groups of historical time series data; The determining module is further used to determine the shape-based distance between any two adjacent time series curves among the multiple time series curves by using a similarity algorithm; A mapping module, used for mapping the plurality of shape-based distances into a plurality of similarities between the plurality of time series curves; The determination module is further used to determine a plurality of training samples according to a plurality of similarities between the plurality of time series curves; A training module is used to use a triplet algorithm and the multiple training samples for training to obtain a trained one-dimensional convolutional neural network model, including: inputting the first time series curve, the second time series curve and the third time series curve of the multiple training samples into the initial one-dimensional convolutional neural network model in sequence to obtain a first vector, a second vector and a third vector; using the triplet algorithm to perform loss calculation on the first vector, the second vector and the third vector to obtain a loss value; according to the loss value, updating the network parameters of the initial one-dimensional convolutional neural network model to obtain a trained one-dimensional convolutional neural network model.
6. An electronic device, It is characterized in that The electronic device includes a processor and a memory, and the processor is used to execute a computer program stored in the memory to implement the anomaly detection method based on device indicator data as described in any one of claims 1 to 4.
7. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by the processor, the anomaly detection method based on device indicator data as described in any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
Aero-engine time series abnormality detection method based on CNN feature extraction
CN109035488A
Abnormal network data generation and prediction method based on a deep machine learning model
CN109492193A
