Anomaly detection method, device, equipment and medium based on time series prediction

Through the anomaly detection method based on time series prediction, the anomaly threshold is dynamically adjusted, which solves the problem of high false alarm rate in the traditional anomaly detection model and improves the accuracy of business anomaly alarms and operation and maintenance efficiency.

CN117454196BActive Publication Date: 2024-10-29IMUSIC CULTURE & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311508481.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-13
Publication Date
2024-10-29
Estimated Expiration
2043-11-13

AI Technical Summary

Technical Problem

In the traditional anomaly detection model, the monitoring threshold of each business indicator is a static threshold, resulting in a high false positive rate and frequent false positives, which increases the workload and labor costs of business developers, and false positives are prone to occur when data fluctuates. .

Method used

Adopt an anomaly detection method based on time series prediction, by obtaining the original sequence data set and historical time threshold, perform data prediction processing, normalized similarity processing, shape transformation processing and benchmarking processing, dynamically adjust the abnormal threshold, reduce false alarms and improve alarms Accuracy.

Benefits of technology

It effectively reduces the phenomenon of abnormal business false alarms, improves the accuracy of business abnormal alarms, reduces personnel workload, and improves the accuracy and stability of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117454196B_ABST
    Figure CN117454196B_ABST
Patent Text Reader

Abstract

The present application discloses an anomaly detection method based on time series prediction, which includes obtaining an original sequence data set to be detected for anomaly, an original sequence data set and a historical time threshold; performing data prediction processing on the original sequence data set according to the historical time threshold to obtain a baseline data set; performing normalization similarity processing on the original sequence data set according to the baseline data set to obtain a similar sequence data set; performing shape transformation processing on the original sequence data set and the baseline data set according to the similar sequence data set to obtain a shape transformation data set; performing benchmark processing on the shape transformation data set to obtain a benchmark change set; performing detection processing on the shape transformation data set according to all benchmark changes to obtain anomaly detection results. The anomaly detection method can reduce the abnormal false alarm phenomenon of the business and the workload of personnel, and effectively improve the accuracy of business abnormality alarms. The present application can be widely used in the field of operation and maintenance data processing technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of operation and maintenance data processing technology, and in particular to an anomaly detection method, device, equipment and medium based on time series prediction. Background Art

[0002] In recent years, with the vigorous development of Internet technology, users are increasingly accessing the Internet through terminals to handle various businesses. The business scale continues to grow rapidly, the business iteration is fast, the logic is complex, and there are many related services. When an abnormal situation occurs in a business, it is very easy for the business system to fail or crash. Therefore, business indicator anomaly detection technology has received more and more attention from relevant personnel.

[0003] At present, in traditional anomaly detection models, the monitoring threshold of each business indicator is a static threshold, and false alarms often occur when the business is running normally, causing business developers to lose sensitivity to abnormal alarms in daily operation and maintenance, resulting in a high false alarm rate. In addition, since the monitoring threshold of each business indicator is a static threshold, the workload of business developers to set a static threshold for each indicator is large and the labor cost is high. In addition, traditional anomaly detection models are prone to false alarms when there is data fluctuation in the business data volume.

[0004] Therefore, the problems existing in the prior art still need to be solved and optimized. Summary of the invention

[0005] In order to solve at least one of the above-mentioned technical problems, the present application provides an anomaly detection method, device, equipment and medium based on time series prediction, wherein the anomaly detection method can effectively reduce the phenomenon of false alarms of business anomalies, effectively improve the accuracy of business anomaly alarms, and effectively reduce the workload of personnel.

[0006] According to a first aspect of the present application, a method for anomaly detection based on time series prediction is provided, comprising:

[0007] Acquire an original sequence data set to be detected for anomaly and a preset historical time threshold, wherein the original sequence data set includes a plurality of original sequence data;

[0008] According to the historical time threshold, the original sequence data set is subjected to data prediction processing to obtain a baseline data set, wherein the baseline data set includes a plurality of baseline data, each baseline data corresponding to a different time series;

[0009] According to the baseline data set, the original sequence data set is normalized and similarly processed to obtain a similar sequence data set, wherein the similar sequence data set includes a plurality of sequence similarities, and the sequence similarities are used to record the similarity between the baseline data and the corresponding original sequence data;

[0010] According to the similar sequence data set, shape transformation processing is performed on the original sequence data set and the baseline data set to obtain a shape transformation data set, wherein the shape transformation data set is used to record the shape transformation amount between all the baseline data and the corresponding original sequence data;

[0011] Benchmarking the shape transformation data set to obtain a benchmark variation set, wherein the benchmark variation set includes a plurality of benchmark variation amounts;

[0012] According to all the reference changes, the shape transformation data set is detected and processed to obtain an anomaly detection result corresponding to the original sequence data set.

[0013] Furthermore, in the embodiment of the present application, the data prediction processing is performed on the original sequence data set according to the historical time threshold to obtain the baseline data set, including:

[0014] Get the preset confidence interval;

[0015] According to the historical time threshold, the original sequence data set is screened to obtain a first basic data set;

[0016] According to the confidence interval, performing data preprocessing on the first basic data set to obtain a second basic data set;

[0017] The second basic data set is subjected to time series forecasting processing to obtain the baseline data set.

[0018] Further, in the embodiment of the present application, the normalization similarity processing is performed on the original sequence data set according to the baseline data set to obtain a similar sequence data set, including:

[0019] Performing a first normalization process on the baseline data set to obtain a first intermediate data set;

[0020] Performing a second normalization process on the original sequence data set to obtain a second intermediate data set;

[0021] Perform cosine similarity processing on the first intermediate data set and the second intermediate data set to obtain the similar sequence data set.

[0022] Further, in the embodiment of the present application, the shape transformation processing is performed on the original sequence dataset and the baseline dataset according to the similar sequence dataset to obtain the shape transformation dataset, including:

[0023] Determine, according to the current baseline data in the baseline data set, the current sequence similarity corresponding to the current baseline data and the current original sequence data;

[0024] Performing deviation processing on the current baseline data and the current original sequence data to obtain a first difference;

[0025] According to the current sequence similarity, the first difference is multiplied to obtain the shape transformation amount;

[0026] Returning to the step of determining the current sequence similarity corresponding to the current baseline data and the current original sequence data according to the current baseline data in the baseline data, until all the baseline data in the baseline data set have been processed;

[0027] All the shape transformation quantities are integrated to obtain the shape transformation data set.

[0028] Furthermore, in the embodiment of the present application, the benchmarking of the shape transformation data set to obtain a benchmark variation set includes:

[0029] Performing change point detection processing on the shape transformation data set to obtain a change point detection result;

[0030] According to the change point detection result, cluster analysis is performed on the shape transformation data set to obtain the benchmark change set.

[0031] Further, in the embodiment of the present application, clustering analysis is performed on the shape transformation data set according to the change point detection result to obtain the benchmark change set, including:

[0032] If the change point detection result is negative, performing a first clustering process on the shape transformation data set to obtain a plurality of first clusters;

[0033] A second mean processing is performed on each first cluster to obtain the benchmark variation set.

[0034] Further, in the embodiment of the present application, clustering analysis is performed on the shape transformation data set according to the change point detection result to obtain the benchmark change set, including:

[0035] If the change point detection result is yes, obtaining a preset sequence threshold;

[0036] According to the sequence threshold, performing a secondary transformation process on the shape transformation data set to obtain a second transformation data set;

[0037] Performing a second clustering process on the second transformed data set to obtain a plurality of second clustering clusters;

[0038] A second mean processing is performed on each second cluster to obtain the benchmark variation set.

[0039] According to a second aspect of the present application, there is provided an anomaly detection system based on time series prediction, comprising:

[0040] An acquisition module is used to acquire an original sequence data set to be detected for anomaly and a preset historical time threshold, wherein the original sequence data set includes a plurality of original sequence data;

[0041] A prediction module, configured to perform data prediction processing on the original sequence data set according to the historical time threshold to obtain a baseline data set, wherein the baseline data set includes a plurality of baseline data, each baseline data corresponding to a different time series;

[0042] A similarity module is used to perform normalization similarity processing on the original sequence data set according to the baseline data set to obtain a similar sequence data set, wherein the similar sequence data set includes a plurality of sequence similarities, and the sequence similarity is used to record the similarity between the baseline data and the corresponding original sequence data;

[0043] A transformation module, used for performing shape transformation processing on the original sequence data set and the baseline data set according to the similar sequence data set to obtain a shape transformation data set, wherein the shape transformation data set is used to record the shape transformation amount between all the baseline data and the corresponding original sequence data;

[0044] A benchmark module, used for benchmarking the shape transformation data set to obtain a benchmark variation set, wherein the benchmark variation set includes a plurality of benchmark variation quantities;

[0045] The detection module is used to perform detection processing on the shape transformation data set according to all the reference changes to obtain an anomaly detection result corresponding to the original sequence data set.

[0046] According to a third aspect of the present application, a computer device is provided, comprising:

[0047] at least one processor;

[0048] at least one memory for storing at least one program;

[0049] When the at least one program is executed by the at least one processor, the at least one processor implements the method as described above.

[0050] According to a fourth aspect of the present application, a computer-readable storage medium is provided, in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the method described in the above aspects.

[0051] The beneficial effects of the technical solution provided by the embodiment of the present application are:

[0052] The present application provides an anomaly detection method based on time series prediction, comprising: obtaining an original sequence data set to be detected for anomaly and a preset historical time threshold, wherein the original sequence data set includes multiple original sequence data; performing data prediction processing on the original sequence data set according to the historical time threshold to obtain a baseline data set, wherein the baseline data set includes multiple baseline data, and each baseline data corresponds to a different time series; performing normalization similarity processing on the original sequence data set according to the baseline data set to obtain a similar sequence data set, wherein the similar sequence data set includes multiple sequence similarities, and the sequence similarity is used to record the similarity between the baseline data and the corresponding original sequence data; performing shape transformation processing on the original sequence data set and the baseline data set according to the similar sequence data set to obtain a shape transformation data set, wherein the shape transformation data set is used to record all the baseline data and the shape transformation amount between the corresponding original sequence data, and benchmarking the shape transformation data set to obtain a benchmark change set, wherein the benchmark change set includes multiple benchmark change amounts; performing detection processing on the shape transformation data set according to all the benchmark change amounts to obtain an anomaly detection result corresponding to the original sequence data set. The anomaly detection method can effectively reduce the phenomenon of business anomaly false alarms, effectively improve the accuracy of business anomaly alarms, and effectively reduce the workload of personnel. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A flowchart of an anomaly detection method based on time series prediction provided in an embodiment of the present application;

[0054] Figure 2 A logical schematic diagram of an anomaly detection method based on time series prediction provided in an embodiment of the present application;

[0055] Figure 3 A detailed flow chart of step S102 provided in an embodiment of the present application;

[0056] Figure 4 A detailed flow chart of step S103 provided in an embodiment of the present application;

[0057] Figure 5 A detailed flow chart of step S104 provided in an embodiment of the present application;

[0058] Figure 6 A detailed flow chart of step S105 provided in an embodiment of the present application;

[0059] Figure 7 A detailed flow chart of the first step S1052 provided in the embodiment of the present application;

[0060] Figure 8A detailed flow chart of the second step S1052 provided in the embodiment of the present application;

[0061] Fig. 9 A structural block diagram of an anomaly detection system based on time series prediction provided in an embodiment of the present application;

[0062] Fig.10 A structural block diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0063] The present application is further described below in conjunction with the accompanying drawings and specific embodiments. The described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.

[0064] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0066] At present, in traditional anomaly detection models, the monitoring threshold of each business indicator is a static threshold, and false alarms often occur when the business is running normally, causing business developers to lose sensitivity to abnormal alarms in daily operation and maintenance, resulting in a high false alarm rate. In addition, since the monitoring threshold of each business indicator is a static threshold, the workload of business developers to set a static threshold for each indicator is large and the labor cost is high. In addition, traditional anomaly detection models are prone to false alarms when there is data fluctuation in the business data volume.

[0067] In view of this, the embodiments of the present application provide an anomaly detection method, apparatus, device and medium based on time series prediction, wherein the anomaly detection method can effectively reduce the phenomenon of false alarms of business anomalies, effectively improve the accuracy of business anomaly alarms, and effectively reduce the workload of personnel.

[0068] An anomaly detection method, system, device and medium based on time series prediction provided in an embodiment of the present application can be specifically illustrated by the following embodiments. First, an anomaly detection method based on time series prediction in an embodiment of the present application is described.

[0069] The anomaly detection method based on time series prediction provided in the embodiment of the present application can be applied to the operation and maintenance data processing (cloud service) application scenario. In the operation and maintenance data processing application scenario, the operation and maintenance personnel can use the anomaly detection method provided in the embodiment of the present application to perform anomaly detection on the business, which can effectively reduce the abnormal false alarm phenomenon of the business, effectively improve the accuracy of the business abnormality alarm, and effectively reduce the workload of the personnel.

[0070] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0071] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0072] Reference Figure 1 and Figure 2 , Figure 1 It is an optional flowchart of an anomaly detection method based on time series prediction provided in an embodiment of the present application, which may include but is not limited to steps S101 to S106.

[0073] Step S101, obtaining an original sequence data set to be detected for anomaly and a preset historical time threshold, wherein the original sequence data set includes a plurality of original sequence data;

[0074] In an embodiment of the present application, the original sequence data set can be derived from multi-dimensional log files such as business indicator logs, system indicator logs, and application indicator logs in each business system. After collecting the multi-dimensional log files, the time series information is attached according to the log type described in the log file, and the attached log file is sent to the kafka message queue, and the time series information is used as the time horizontal axis to parse the original sequence data in JSON format, and then the multiple original sequence data are integrated as the original sequence data set. The specific value of the historical time threshold can be set according to actual needs, and can be any one of 3 days, 5 days, 7 days, 10 days, etc. This application example is only for illustration, and does not impose any restrictions on this application. It is worth noting that in an embodiment of the present application, the historical time threshold is introduced as 7 days.

[0075] Step S102: performing data prediction processing on the original sequence data set according to the historical time threshold to obtain a baseline data set, wherein the baseline data set includes a plurality of baseline data, each baseline data corresponding to a different time series;

[0076] Reference Figure 3 The step S102, performing data prediction processing on the original sequence data set according to the historical time threshold to obtain a baseline data set, includes:

[0077] Step S1021, obtaining a preset confidence interval;

[0078] Step S1022: screening the original sequence data set according to the historical time threshold to obtain a first basic data set;

[0079] Step S1023: performing data preprocessing on the first basic data set according to the confidence interval to obtain a second basic data set;

[0080] Step S1024: Perform time series prediction processing on the second basic data set to obtain the baseline data set.

[0081] It can be understood that the confidence interval can be a pre-set interval or an estimated interval calculated based on the original sequence data set or the first basic data set; in an embodiment of the present application, the original sequence data set of the past 7 days can be queried through the search engine in the business system according to the historical time threshold, and the queried sequence data set is used as the first basic data set; then, according to the confidence interval, the first basic data outside the confidence interval in the first basic data set is eliminated, and the missing values ​​are filled to obtain the second basic data set; then, time series prediction is performed based on the second basic data set. For example, data series prediction for the second basic data set can be achieved by a time series data prediction (Prophet) algorithm, which will not be elaborated in this application.

[0082] Step S103: performing normalization similarity processing on the original sequence data set according to the baseline data set to obtain a similar sequence data set, wherein the similar sequence data set includes a plurality of sequence similarities, and the sequence similarity is used to record the similarity between the baseline data and the corresponding original sequence data;

[0083] Reference Figure 4 The step S103, performing normalization similarity processing on the original sequence data set according to the baseline data set to obtain a similar sequence data set, includes:

[0084] Step S1031, performing a first normalization process on the baseline data set to obtain a first intermediate data set;

[0085] Step S1032, performing a second normalization process on the original sequence data set to obtain a second intermediate data set;

[0086] Step S1033: perform cosine similarity processing on the first intermediate data set and the second intermediate data set to obtain the similar sequence data set.

[0087] In an embodiment of the present application, it can be first determined that the baseline data set and the original sequence data set both contain data points of the same length (that is, each baseline data corresponds to one original sequence data), and then the baseline data set and the original sequence data set are normalized by any normalization method such as min-max normalization and mean normalization to obtain a first intermediate data set and a second intermediate data set; then, by calculating the cosine similarity between the first intermediate data set and the second intermediate data set, a plurality of sequence similarities are obtained, and the sequence similarity is used to record the similarity between each baseline data and the corresponding original sequence data, and then the plurality of sequence similarities are combined into a similar sequence data set according to the time sequence.

[0088] Exemplarily, an equivalent formula for the similarity between the first intermediate data set and the second intermediate data set can be expressed as:

[0089]

[0090] Where similarity is a set of sequence similarities (i.e., similar sequence data sets), A is the first intermediate data set, B is the second intermediate data set, dot_product(A,B) is the dot product of the first intermediate data set and the second intermediate data set, norm(A) is the norm of the first intermediate data set, and norm(B) is the norm of the second intermediate data set.

[0091] Step S104: performing shape transformation processing on the original sequence data set and the baseline data set according to the similar sequence data set to obtain a shape transformation data set, wherein the shape transformation data set is used to record the shape transformation amount between all the baseline data and the corresponding original sequence data;

[0092] Reference Figure 5 The step S104, performing shape transformation processing on the original sequence dataset and the baseline dataset according to the similar sequence dataset to obtain a shape transformation dataset, includes:

[0093] Step S1041, determining the current sequence similarity corresponding to the current baseline data and the current original sequence data according to the current baseline data set;

[0094] Step S1042: performing deviation processing on the current baseline data and the current original sequence data to obtain a first difference;

[0095] Step S1043: performing product processing on the first difference according to the current sequence similarity to obtain the shape transformation amount;

[0096] Step S1044, returning to the step of determining the current sequence similarity corresponding to the current baseline data and the current original sequence data according to the current baseline data in the baseline data, until all the baseline data in the baseline data set have been processed;

[0097] Step S1045: Integrate all the shape transformation amounts to obtain the shape transformation data set.

[0098] In an embodiment of the present application, a similar sequence data set can be used as a weight to provide a data magnitude based on a time series for the original sequence data set and / or the baseline data set, thereby eliminating the impact of the data magnitude on the business indicator. Specifically, the baseline data, the original sequence data, and the corresponding sequence similarity at the current time point can be determined first; then, the absolute difference between the baseline data and the original sequence data is calculated, and the calculated absolute difference is used as the first difference; then, the first difference is multiplied according to the complement of the current sequence similarity to obtain the shape transformation amount at the current time point. After obtaining the shape transformation amount at the current time point, steps S1041 to S1044 can be looped until the shape transformation amounts at all time points have been obtained and then the loop is exited, and all the obtained shape transformation amounts are combined to obtain a shape transformation data set.

[0099] It is worth mentioning that, since each baseline data will generate a corresponding shape transformation amount after being processed, the loop exit condition in step S1044 is essentially equivalent to that all baseline data in the baseline data set have been processed, and this application will not repeat it here. It should be noted that the equivalent formula of the shape transformation amount can be expressed as:

[0100] sv i =(1-similarity i )×|X i -Y i |

[0101] Among them, sv i is the i-th shape transformation, similarity i is the similarity of the i-th sequence, X i is the i-th baseline data in the baseline data set, Y i is the i-th original sequence data in the original sequence data set.

[0102] Step S105, performing benchmark processing on the shape transformation data set to obtain a benchmark variation set, wherein the benchmark variation set includes a plurality of benchmark variation amounts;

[0103] Reference Figure 6 The step S105, performing benchmark processing on the shape transformation data set to obtain a benchmark variation set, includes:

[0104] Step S1051, performing change point detection processing on the shape transformation data set to obtain a change point detection result;

[0105] In the embodiment of the present application, a change point is an abnormal point in the shape transformation data set where the shape transformation amount approaches 0 or is equal to 0, and the change point detection result is used to record whether each shape transformation amount in the shape transformation data set is a change point. Specifically, a shape threshold or a difference threshold can be preset, and the shape threshold or the difference threshold is used to realize the change point detection of each shape transformation amount in the shape transformation data set.

[0106] It can be understood that the change point detection process described in the embodiment of the present application can be implemented in the following two ways: the first way is to determine whether the shape transformation amount is close to or equal to 0 by a shape threshold, when the shape transformation amount is less than or equal to the shape threshold, the change point detection result is yes, when the shape transformation amount is greater than the shape threshold, the change point detection result is no. The second way is to determine whether the shape transformation amount is close to or equal to 0 by a difference threshold, when the first difference is less than or equal to the difference threshold, the change point detection result is yes, when the first difference is greater than the difference threshold, the change point detection result is no.

[0107] It is worth noting that since the shape transformation amount in the embodiment of the present application is the product of the first difference and the sequence similarity, when the first difference approaches 0 or is equal to 0, the shape transformation amount also approaches 0 or is equal to 0; in addition, the specific values ​​of the difference threshold and the shape threshold can be set according to actual conditions, and the present application will not elaborate on them here.

[0108] Step S1052: Perform cluster analysis on the shape transformation data set according to the change point detection result to obtain the benchmark change set.

[0109] Reference Figure 7 The step S1052, performing cluster analysis on the shape transformation data set according to the change point detection result to obtain the benchmark change set, includes:

[0110] Step S10521: if the change point detection result is negative, performing a first clustering process on the shape transformation data set to obtain a plurality of first clusters;

[0111] Step S10522: Perform a second mean processing on each first cluster to obtain the benchmark variation set.

[0112] In an embodiment of the present application, when the change point detection result is no, it means that all shape transformation amounts in the shape transformation data set do not belong to a change point. At this time, each shape transformation amount can be corresponded to a sample data, and the distance values ​​between the sample data are subjected to histogram statistics. Then, any one of the clustering algorithms such as K-means clustering, density (Dbscan) clustering, and mean shift (Mean Shift) clustering is used to obtain several clustering clusters, and then the mean of each first clustering cluster is calculated to obtain several benchmark changes, and all the benchmark changes are combined into a benchmark change set.

[0113] Reference Figure 8 The step S1052, performing cluster analysis on the shape transformation data set according to the change point detection result to obtain the benchmark change set, includes:

[0114] Step S10525: If the change point detection result is yes, obtain a preset sequence threshold;

[0115] Step S10526: performing a secondary transformation process on the shape transformation data set according to the sequence threshold value to obtain a second transformation data set;

[0116] Step S10527: performing a second clustering process on the second transformed data set to obtain a plurality of second cluster clusters;

[0117] Step S10528: Perform second mean processing on each second cluster to obtain the benchmark variation set.

[0118] In the embodiment of the present application, when the change point detection result is yes, it means that part of the shape transformation amount in the shape transformation data set belongs to the change point. At this time, the shape transformation amount belonging to the change point can be determined first, and then the adjacent data corresponding to the shape transformation amount belonging to the change point can be determined according to the sequence threshold, and the shape transformation amount belonging to the change point is compensated according to the adjacent data to obtain the compensated shape transformation amount. After all the shape transformation amounts belonging to the change point are compensated, the normal shape transformation amount in the shape transformation data set and the compensated shape transformation amount are combined to obtain the second transformation data set.

[0119] Exemplarily, when the sequence threshold is 1, that is, when the previous shape transformation amount of the shape transformation amount belonging to the change point is selected as the adjacent data, the equivalent formula for compensating the shape transformation amount belonging to the change point according to the adjacent data can be expressed as:

[0120]

[0121] in, is the shape transformation after compensation, similarity iis the similarity of the ith sequence, sv i-1 is the i-1th shape transformation, sv i is the i-th shape transformation amount.

[0122] It is understandable that the specific value of the sequence threshold can be set according to the actual situation. In addition, the sequence threshold can also be used to represent the time unit. For example, if the sequence threshold is 1, it can be said that the shape change amount of the shape change amount belonging to the change point in the previous minute is selected as the adjacent data. The example of this application is only for illustration and meets the actual needs. It is worth noting that step S10527 and step S10528 are similar to the aforementioned steps S10521 and S10522, and can be obtained by analogy. This application will not be redundantly described here.

[0123] Step S106: Perform detection processing on the shape transformation data set according to all the reference changes to obtain an anomaly detection result corresponding to the original sequence data set.

[0124] In the embodiment of the present application, since the benchmark change amount is the clustering result corresponding to the shape transformation data set or the second transformation data set, each benchmark change amount can be used as a multi-level abnormal threshold corresponding to the original sequence data set. Specifically, taking the density clustering algorithm adopted in the clustering process as an example, by setting the minimum number of samples MinPts to 3, three cluster clusters can be obtained, and then three benchmark changes are determined based on the three cluster clusters obtained, which can be used as abnormal thresholds for notification level, danger level and disaster level.

[0125] It is worth mentioning that in the embodiment of the present application, the shape transformation data set can have multiple states, which can be a shape transformation data set directly obtained after the shape transformation processing, or a second transformation data set obtained after the secondary transformation processing (set). Therefore, the detection processing of the shape transformation data set can be to detect the shape transformation data set directly obtained after the shape transformation processing, or to detect the second transformation data set obtained after the secondary transformation processing. When a situation greater than the reference change occurs in the two methods, an alarm can be issued according to the specific level.

[0126] In summary, the anomaly detection method based on time series prediction provided by the present application can dynamically adjust the anomaly threshold according to the input data, and is highly convenient; the data jitter factor and the dimensional difference between different data features are eliminated through the transformation amount, which can effectively improve the accuracy and stability of anomaly detection, and effectively reduce the false alarm phenomenon caused by sensitivity to the dimension during the detection process; and, through change point detection, compensation for data anomalies is achieved, which can further improve the accuracy and real-time performance of anomaly detection.

[0127] Fig. 9A schematic diagram of a framework of an anomaly detection system based on time series prediction provided in an embodiment of the present application includes:

[0128] An acquisition module 310 is used to acquire an original sequence data set to be detected for anomaly and an original sequence data set, as well as a preset historical time threshold, wherein the original sequence data set includes a plurality of original sequence data;

[0129] A prediction module 320, configured to perform data prediction processing on the original sequence data set according to the historical time threshold to obtain a baseline data set, wherein the baseline data set includes a plurality of baseline data, each baseline data corresponding to a different time series;

[0130] A similarity module 330 is used to perform normalization similarity processing on the original sequence data set according to the baseline data set to obtain a similar sequence data set, wherein the similar sequence data set includes a plurality of sequence similarities, and the sequence similarity is used to record the similarity between the baseline data and the corresponding original sequence data;

[0131] A transformation module 340 is used to perform shape transformation processing on the original sequence data set and the baseline data set according to the similar sequence data set to obtain a shape transformation data set, wherein the shape transformation data set is used to record the shape transformation amount between all the baseline data and the corresponding original sequence data;

[0132] A benchmark module 350, configured to benchmark the shape transformation data set to obtain a benchmark variation set, wherein the benchmark variation set includes a plurality of benchmark variation quantities;

[0133] The detection module 360 ​​is used to perform detection processing on the shape transformation data set according to all the reference changes to obtain an abnormality detection result corresponding to the original sequence data set. It can be understood that the contents of the above method embodiments are applicable to the present system embodiment, the functions specifically implemented by the present system embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0134] Fig.10 A schematic diagram of the structure of a computer device provided in an embodiment of the present application includes:

[0135] at least one processor 980;

[0136] At least one memory 920, used to store at least one program;

[0137] When the at least one program is executed by the at least one processor 980, the at least one processor 980 implements the methods described in the foregoing embodiments.

[0138] An embodiment of the present application also provides a computer-readable storage medium, which stores a program executable by a processor. When the program executable by the processor is executed by the processor 980, it is used to implement the methods described in the above embodiments.

[0139] Fig.10 Specifically, the computer device may be a user terminal or a server.

[0140] The present application embodiment takes the computer device as a user terminal as an example, and the details are as follows:

[0141] like Fig.10 As shown, the computer device 900 may include an RF (Radio Frequency) circuit 910, a memory 920 including one or more computer-readable storage media, an input unit 930, a display unit 940, a sensor 950, an audio circuit 960, a WiFi module 970, a processor 980 including one or more processing cores, and a power supply 990. Those skilled in the art will appreciate that Fig.10 The device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0142] The RF circuit 910 can be used for receiving and sending signals during information transmission or calls. In particular, after receiving the downlink information of the base station, it is handed over to one or more processors 980 for processing; in addition, the data related to the uplink is sent to the base station. Generally, the RF circuit 910 includes but is not limited to an antenna, at least one amplifier, a tuner, one or more oscillators, a user identity module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, etc. In addition, the RF circuit 910 can also communicate with the network and other devices through wireless communication. Wireless communication can use any communication standard or protocol, including but not limited to GSM (Global System of Mobile communication), GPRS (General Packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (Long Term Evolution), email, SMS (Short Messaging Service), etc.

[0143] The memory 920 can be used to store software programs and modules. The processor 980 executes various functional applications and data processing by running the software programs and modules stored in the memory 920. The memory 920 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 (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the device 900 (such as audio data, a phone book, etc.), etc. In addition, the memory 920 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 920 may also include a memory controller to provide the processor 980 and the input unit 930 with access to the memory 920. Although Fig.10 The RF circuit 910 is shown, but it is understandable that it is not an essential component of the device 900 and can be omitted as required without changing the essence of the invention.

[0144] The input unit 930 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 930 may include a touch-sensitive surface 932 and other input devices 931. The touch-sensitive surface 932, also known as a touch display screen or a touch pad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 932), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 932 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 980, and can receive and execute commands sent by the processor 980. In addition, the touch-sensitive surface 932 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 932, the input unit 930 may further include other input devices 931. Specifically, the other input devices 931 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

[0145] The display unit 940 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the control 900, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 940 may include a display panel 941. Optionally, the display panel 941 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 932 may be covered on the display panel 941. When the touch-sensitive surface 932 detects a touch operation on or near it, it is transmitted to the processor 980 to determine the type of touch event. Subsequently, the processor 980 provides a corresponding visual output on the display panel 941 according to the type of touch event. Although in Fig.10 In the embodiment, the touch-sensitive surface 932 and the display panel 941 are implemented as two independent components to implement input and output functions, but in some embodiments, the touch-sensitive surface 932 and the display panel 941 can be integrated to implement input and output functions.

[0146] The computer device 900 may also include at least one sensor 950, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 941 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 941 and / or the backlight when the device 900 is moved to the ear. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the device 900, they will not be repeated here.

[0147] The audio circuit 960, the speaker 961, and the microphone 962 can provide an audio interface between the user and the device 900. The audio circuit 960 can transmit the electrical signal converted from the received audio data to the speaker 961, which is converted into a sound signal for output; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, which is received by the audio circuit 960 and converted into audio data, and then the audio data is processed by the output processor 980 and sent to another control device through the RF circuit 910, or the audio data is output to the memory 920 for further processing. The audio circuit 960 may also include an earplug jack to provide communication between an external headset and the device 900.

[0148] The device 900 can transmit information with the wireless transmission module set on the fighting device through the WiFi module 970.

[0149] The processor 980 is the control center of the device 900. It uses various interfaces and lines to connect various parts of the entire control device. It executes various functions of the device 900 and processes data by running or executing software programs and / or modules stored in the memory 920, and calling data stored in the memory 920, so as to monitor the control device as a whole. Optionally, the processor 980 may include one or more processing cores; optionally, the processor 980 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 950.

[0150] The device 900 also includes a power supply 990 (such as a battery) for supplying power to each component. Preferably, the power supply can be logically connected to the processor 980 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 990 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0151] Although not shown, the device 900 may also include a camera, a Bluetooth module, etc., which will not be described in detail here.

[0152] An embodiment of the present application further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the processor executes the method described in the above embodiments.

[0153] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein, for example. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0154] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0155] In the several embodiments provided in the present application, 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 schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0156] The units described as separate components may or may not be physically separated, and the components shown as units 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 units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0157] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or 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 software functional units.

[0158] If the integrated unit 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 technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0159] The step numbers in the above method embodiment are only provided for the convenience of explanation and description, and no limitation is imposed on the order of the steps. The execution order of each step in the embodiment can be adaptively adjusted according to the understanding of those skilled in the art.

[0160] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the described embodiments. Technical personnel familiar with the field may make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.

Claims

1. An anomaly detection method based on time series prediction, It is characterized in that include: Acquire an original sequence data set to be detected for anomaly and a preset historical time threshold, wherein the original sequence data set includes a plurality of original sequence data; The original sequence data set is obtained based on the log file parsed horizontally and vertically by time; According to the historical time threshold, the original sequence data set is subjected to data prediction processing to obtain a baseline data set, wherein the baseline data set includes a plurality of baseline data, each baseline data corresponding to a different time series; According to the baseline data set, the original sequence data set is normalized and similarized to obtain a similar sequence data set, wherein the similar sequence data set includes a plurality of sequence similarities, and the sequence similarities are used to record the similarity between the baseline data and the corresponding original sequence data; According to the similar sequence data set, the original sequence data set and the baseline data set are subjected to shape transformation processing to obtain a shape transformation data set, wherein the shape transformation data set is used to record the shape transformation amount between all the baseline data and the corresponding original sequence data; Benchmarking the shape transformation data set to obtain a benchmark variation set, wherein the benchmark variation set includes a plurality of benchmark variation amounts; According to all the reference changes, the shape transformation data set is subjected to detection processing to obtain an anomaly detection result corresponding to the original sequence data set; The step of performing shape transformation processing on the original sequence dataset and the baseline dataset according to the similar sequence dataset to obtain a shape transformation dataset comprises: Determine, according to the current baseline data in the baseline data set, the current sequence similarity corresponding to the current baseline data and the current original sequence data; Performing deviation processing on the current baseline data and the current original sequence data to obtain a first difference; According to the current sequence similarity, the first difference is multiplied to obtain the shape transformation amount; Returning to the step of determining the current sequence similarity corresponding to the current baseline data and the current original sequence data according to the current baseline data in the baseline data, until all the baseline data in the baseline data set have been processed; Integrating all the shape transformation quantities to obtain the shape transformation data set; The step of performing benchmarking on the shape transformation data set to obtain a benchmark variation set includes: Performing change point detection processing on the shape transformation data set to obtain a change point detection result; According to the change point detection result, cluster analysis is performed on the shape transformation data set to obtain the benchmark change set.

2. According to the anomaly detection method based on time series prediction according to claim 1, It is characterized in that The step of performing data prediction processing on the original sequence data set according to the historical time threshold to obtain a baseline data set includes: Get the preset confidence interval; According to the historical time threshold, the original sequence data set is screened to obtain a first basic data set; According to the confidence interval, performing data preprocessing on the first basic data set to obtain a second basic data set; The second basic data set is subjected to time series forecasting processing to obtain the baseline data set.

3. According to the anomaly detection method based on time series prediction according to claim 1, It is characterized in that The step of performing normalization and similarity processing on the original sequence data set according to the baseline data set to obtain a similar sequence data set includes: Performing a first normalization process on the baseline data set to obtain a first intermediate data set; Performing a second normalization process on the original sequence data set to obtain a second intermediate data set; Perform cosine similarity processing on the first intermediate data set and the second intermediate data set to obtain the similar sequence data set.

4. The anomaly detection method based on time series prediction according to claim 1, It is characterized in that The step of performing cluster analysis on the shape transformation data set according to the change point detection result to obtain the benchmark change set includes: If the change point detection result is negative, performing a first clustering process on the shape transformation data set to obtain a plurality of first clusters; A second mean processing is performed on each first cluster to obtain the benchmark variation set.

5. According to the anomaly detection method based on time series prediction according to claim 1, It is characterized in that The step of performing cluster analysis on the shape transformation data set according to the change point detection result to obtain the benchmark change set includes: If the change point detection result is yes, obtaining a preset sequence threshold; According to the sequence threshold, performing a secondary transformation process on the shape transformation data set to obtain a second transformation data set; Performing a second clustering process on the second transformed data set to obtain a plurality of second clustering clusters; A second mean processing is performed on each second cluster to obtain the benchmark variation set.

6. An anomaly detection system based on time series prediction, It is characterized in that include: An acquisition module is used to acquire an original sequence data set to be detected for anomaly and a preset historical time threshold, wherein the original sequence data set includes a plurality of original sequence data; The original sequence data set is obtained based on the log file parsed horizontally and vertically by time; A prediction module, configured to perform data prediction processing on the original sequence data set according to the historical time threshold to obtain a baseline data set, wherein the baseline data set includes a plurality of baseline data, each baseline data corresponding to a different time series; A similarity module is used to perform normalization similarity processing on the original sequence data set according to the baseline data set to obtain a similar sequence data set, wherein the similar sequence data set includes a plurality of sequence similarities, and the sequence similarity is used to record the similarity between the baseline data and the corresponding original sequence data; A transformation module, used for performing shape transformation processing on the original sequence data set and the baseline data set according to the similar sequence data set to obtain a shape transformation data set, wherein the shape transformation data set is used to record the shape transformation amount between all the baseline data and the corresponding original sequence data; A benchmark module, used for benchmarking the shape transformation data set to obtain a benchmark variation set, wherein the benchmark variation set includes a plurality of benchmark variation quantities; A detection module, configured to perform detection processing on the shape transformation data set according to all the reference variation amounts, and obtain an anomaly detection result corresponding to the original sequence data set; The step of performing shape transformation processing on the original sequence dataset and the baseline dataset according to the similar sequence dataset to obtain a shape transformation dataset comprises: Determine, according to the current baseline data in the baseline data set, the current sequence similarity corresponding to the current baseline data and the current original sequence data; Performing deviation processing on the current baseline data and the current original sequence data to obtain a first difference; According to the current sequence similarity, the first difference is multiplied to obtain the shape transformation amount; Returning to the step of determining the current sequence similarity corresponding to the current baseline data and the current original sequence data according to the current baseline data in the baseline data, until all the baseline data in the baseline data set have been processed; Integrating all the shape transformation quantities to obtain the shape transformation data set; The step of performing benchmarking on the shape transformation data set to obtain a benchmark variation set includes: Performing change point detection processing on the shape transformation data set to obtain a change point detection result; According to the change point detection result, cluster analysis is performed on the shape transformation data set to obtain the benchmark change set.

7. A computer device, It is characterized in that include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the anomaly detection method based on time series prediction as described in any one of claims 1 to 5.

8. A computer-readable storage medium having a processor-executable program stored therein, It is characterized in that The program executable by the processor is used to implement the anomaly detection method based on time series prediction as described in any one of claims 1 to 5 when executed by the processor.

Citation Information

Patent Citations

  • Method and device for detecting position and category of change point

    CN114818969A

  • Interface abnormal behavior monitoring method, system and device and storage medium

    CN114969738A