Business anomaly detection method and device, equipment and storage medium
The business indicator data is analyzed through pre-set aggregation time window and risk detection window, and a variety of detection algorithms are used to quickly identify abnormalities, solving the problem of abnormal detection lag in the existing technology, and achieving rapid response and real-time detection.
Patent Information
- Application Number
- CN202310670880.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-06
- Publication Date
- 2024-12-06
AI Technical Summary
The existing anomaly detection scheme has a large lag and cannot quickly discover business anomalies in a short period of time. Feature detection requires a large amount of data statistics, and intelligent model detection requires a large amount of data training and put into use.
The business indicator data is aggregated through the pre-set aggregation time window, combined with the risk detection window and the abnormality determination window, and used the change amplitude, jitter distribution and curve similarity matching algorithm to evaluate the abnormal risk and quickly identify business abnormalities.
It realizes rapid and timely detection of business abnormalities in a short period of time, enhances the real-time nature of abnormal detection, and reduces the calculation and analysis needs of large amounts of data.
Smart Images

Figure CN119094379A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of anomaly detection technology, and in particular to a business anomaly detection method, device, equipment and storage medium. Background Art
[0002] With the rapid development of Internet technology, various business services are constantly being developed. Business applications can generate a large amount of business data in the process of providing business services. If an abnormal situation occurs during this period, the relevant business indicator data will change abnormally.
[0003] In order to discover and resolve abnormal situations, existing technologies usually perform abnormality detection on business indicator data based on feature detection or intelligent model detection. Feature detection uses statistical methods to identify abnormal data, while intelligent model detection uses AI (Artificial Intelligence) algorithms to identify abnormal data.
[0004] However, the anomaly detection solutions provided by the existing technologies all have a large lag. The feature detection solution needs to collect a large amount of business indicator data, and then perform statistical analysis on the collected large amount of business indicator data, which cannot quickly detect anomalies in a short time. The intelligent model detection solution needs to train the intelligent model based on a large amount of business indicator data, which cannot be quickly put into use and detect anomalies in a short time. Summary of the invention
[0005] The present application provides a business anomaly detection method, device, equipment and storage medium, which can solve the problem that the existing anomaly detection solution cannot quickly detect anomalies in a short time. The technical solution is as follows:
[0006] In a first aspect, a service anomaly detection method is provided, the service anomaly detection method comprising:
[0007] Periodically aggregating the business indicator data based on an aggregation time window to obtain various aggregated data; wherein the size of the aggregation time window is set based on the time series characteristics of the business indicator data;
[0008] Combining the multiple aggregated data in the current risk detection window to evaluate whether the current aggregated data has abnormal risk;
[0009] If there are multiple pieces of the aggregated data with abnormal risks within the abnormal determination window, it is determined that an abnormality has occurred in the current business.
[0010] In a second aspect, a service anomaly detection device is provided, the service anomaly detection device comprising:
[0011] A data aggregation module, used to periodically aggregate the business indicator data based on an aggregation time window to obtain various aggregated data; wherein the size of the aggregation time window is set based on the time series characteristics of the business indicator data;
[0012] A risk detection module, used to evaluate whether the current aggregated data has abnormal risk by combining the multiple aggregated data in the current risk detection window;
[0013] The abnormality determination module is used to determine that an abnormality occurs in the current business if there are multiple pieces of the aggregated data with abnormal risks within the abnormality determination window.
[0014] According to a third aspect, a service anomaly detection device is provided, the service anomaly detection device comprising a processor and a memory, wherein a plurality of instructions are stored in the memory, and the plurality of instructions are loaded and executed by the processor to implement the method described in the first aspect.
[0015] In a fourth aspect, a computer-readable storage medium is provided, wherein a plurality of instructions are stored in the storage medium, and the instructions are used to be loaded and executed by a processor to implement the method described in the first aspect.
[0016] The embodiment of the present application aggregates the business indicator data through a pre-set aggregation time window, and analyzes the aggregated data through a pre-set risk detection window and anomaly determination window. For any business service, only the business indicator data of a single risk detection window needs to be preheated to realize subsequent business anomaly detection, and it can be quickly put into use in a short time. In addition, there is no need to calculate and analyze a large amount of business indicator data during each anomaly detection, and anomalies can be discovered in a timely manner within a short time corresponding to the anomaly determination window, which enhances the real-time nature of anomaly detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 A flowchart of a method for detecting anomalies in a business provided by one embodiment of the present application;
[0019] Figure 2 A schematic diagram of the variation amplitude of a time series curve provided in one embodiment of the present application;
[0020] Figure 3 A schematic diagram of jitter distribution of a time series curve provided in one embodiment of the present application;
[0021] Figure 4 A schematic diagram of periodic changes of a time series curve provided in one embodiment of the present application;
[0022] Figure 5 A schematic diagram of the structure of a service anomaly detection device provided in an embodiment of the present application;
[0023] Figure 6 A schematic diagram of the structure of a business anomaly detection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] Before performing anomaly detection on a business service, the business data can be counted at a certain time granularity to obtain business indicator data. In other words, the business indicator data can be arranged in the order of occurrence to form time series data of the business indicator. The changes in the time series can reflect to a certain extent whether the business service has an abnormality. Among them, the type of business indicator data can be set according to business needs. For example, the business indicator data can be the traffic size of the business server, the size of the order transaction amount, etc., and this application does not limit this.
[0025] Existing time series anomaly detection solutions usually need to collect indicator data within a single long period (for example, one day, one week or one month), and then analyze and process the collected indicator data. A large amount of calculation will consume a lot of time, resulting in a large lag in anomaly detection, and it is impossible to discover and respond to anomalies in the first time.
[0026] Based on this, the present application provides a business anomaly detection method, device, equipment and storage medium, which aggregates business indicator data through a pre-set aggregation time window, makes an abnormal risk determination on the business indicator data through a pre-set risk detection window, and makes a final abnormal determination on the business indicator data through an abnormal determination window. In this way, it can be quickly put into use in various businesses and detect business anomalies in a timely manner.
[0027] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0028] In one embodiment, see Figure 1 The service anomaly detection method provided in the present application can be applied to an anomaly detection device, comprising the following steps:
[0029] S102, periodically aggregate the business indicator data based on the aggregation time window to obtain various aggregated data.
[0030] The size of the aggregation time window can be set based on the time series characteristics of the business indicator data. In other words, the size of the aggregation time window can be set based on the change pattern of the business indicator data to avoid sudden changes in the aggregated data under normal circumstances. For example, when the business indicator data changes periodically, the size of the aggregation time window can be set to an integer multiple of the change period.
[0031] In one embodiment, taking the service indicator data of a certain service as server traffic as an example, when the service is normal, there may be a certain amount of request traffic accessing the server every minute. At this time, the size of the aggregation time window can be set to 1 minute.
[0032] In another embodiment, there may be a batch of request traffic accessing the server every 2 minutes. If the size of the aggregation time window is set to 1 minute, the business indicator data needs to be aggregated every 1 minute, and the server traffic will surge every 2 minutes. A sudden surge in business indicator data may be judged as a business abnormality, causing the normal changes in business indicator data to be misjudged as business abnormalities. In order to avoid normal periodic data changes from being misjudged, the size of the aggregation time window can be set to an integer multiple of the change period, such as 2 minutes. In other words, the business indicator data can be aggregated every 2 minutes, and the overall change of the server traffic curve corresponding to the time series formed by the aggregated data will be stable, without sudden changes.
[0033] In one embodiment, a data collection step may be included before step S102. Specifically, the data source (or data collection end) may collect business indicator data in real time, and report the business indicator data and its corresponding time data to the abnormality detection device after combining them.
[0034] Taking the business indicator data as server traffic as an example, the data source can be the gateway nginx, the full-link APM monitoring system or the business program, which collects traffic data through logs, indicator monitoring tools prometheus exporter, etc. For example, server traffic can be represented by the number of requests per second (qps). If the server traffic collected by the data source at 18:01:01 is 100qps, it can be reported to the anomaly detection device: the total traffic generated at 18:01:01 is 100.
[0035] It is worth mentioning that the time granularity of data collection can be set and adjusted according to actual needs, and this application does not impose any restrictions on this.
[0036] In one embodiment, step S102 may specifically include: periodically accumulating the business indicator data within the aggregation time window, and using each accumulation result as each aggregated data.
[0037] Taking the aggregation time window as 1 minute as an example, the server traffic collected within 60 seconds can be accumulated to obtain aggregate data. For example, after accumulating the 60 server traffic corresponding to 18:01:01 to 18:02:00, the number of requests per minute (qpm) is 6200, that is, the aggregate data at 18:02 is 6200qpm; after accumulating the 60 server traffic corresponding to 18:02:01 to 18:03:00, the aggregate data at 18:03 is 5900qpm.
[0038] In one embodiment, the time series data reported by the data source can be temporarily stored in a data queue and gradually input into the anomaly detection device for processing, so as to avoid data loss or data accumulation in abnormal scenarios.
[0039] S104, combining multiple aggregated data in the current risk detection window to evaluate whether the current aggregated data has abnormal risks.
[0040] In implementation, a risk detection window with a size of n times the aggregation time window can be set, that is, the risk detection window contains n aggregation data, and each aggregation data output from the upstream aggregation time window is a data point in the time series. Set the aggregation data set in the risk detection window as A n ={a1,a2,...,a n}, where the larger the n, the closer the corresponding time point is to the current time. The data change trend of n data points in the risk detection window can be combined to determine the aggregate data a corresponding to the latest time node. n Are there any abnormal risks?
[0041] In one embodiment, step S104 may specifically include: using multiple preset detection algorithms to perform abnormal risk assessment on the current aggregated data respectively; if the assessment results of the multiple preset detection algorithms are all that there is an abnormal risk, then determining that the current aggregated data has an abnormal risk.
[0042] Among them, multiple preset detection algorithms refer to no less than two detection algorithms, which may include at least two of the detection algorithms such as the amplitude of change algorithm, the jitter distribution detection algorithm, and the curve similarity matching algorithm. For example, the amplitude of change algorithm, the jitter distribution detection algorithm, and the curve similarity matching algorithm are used to simultaneously perform abnormal risk assessment on each aggregated data. If the assessment results of these three algorithms are all abnormal risks, the comprehensive assessment result of the corresponding aggregated data can be determined to be abnormal risk. In this way, the risk prediction of sudden changes in time series is carried out by combining multiple detection algorithms, which reduces the false alarm rate.
[0043] Of course, other preset detection algorithms can also be combined to perform abnormal risk assessment on each aggregated data, and this application does not limit this.
[0044] In one embodiment, using a variation amplitude algorithm to perform abnormal risk assessment on current aggregated data may include: calculating the mean of multiple aggregated data within the current risk detection window; if the variation amplitude of the current aggregated data compared to the mean exceeds a preset variation amplitude threshold, determining that the current aggregated data has an abnormal risk.
[0045] In implementation, if the current aggregated data changes suddenly, there is a high probability that business anomalies will occur. n Compared with whether the change amplitude of the data mean in the risk detection window exceeds the preset change amplitude threshold T, it can accurately detect whether the current aggregated data has changed suddenly, and then determine a n Are there any abnormal risks?
[0046] Specifically, the change in the current aggregate data compared to the mean of the aggregate data in the risk detection window can be calculated using the following formula:
[0047] T n =a n -m
[0048] Where m is the mean of the aggregated data in the risk detection window, which can be calculated using the following formula:
[0049] m=(a1+a2+...+a n ) / n
[0050] If the change amplitude abs(a n -m)>T0, that is, the latest data point a n The change range T n When the absolute value of is greater than the change amplitude threshold T0, the latest data point a is considered n There are unusual risks.
[0051] It can be understood that the current aggregate data a nWhen the difference compared to the mean m is a negative value, it indicates that the change trend of the current aggregated data is decreasing; when the difference is a positive value, it indicates that the change trend of the current aggregated data is increasing.
[0052] In one embodiment, the change amplitude threshold T0 is set to 300% of the mean m, the aggregation time window is set to 1 minute, and the risk detection window is set to 10 minutes. Figure 2 , the horizontal axis is time, and the vertical axis is the number of requests per minute, which shows the time series curve formed by the aggregated data from 05:20 to 06:50. When the variation range algorithm is used to detect abnormal risk for the aggregated data at 05:42, the variation range of the mean of the aggregated data set (i.e., the 10 aggregated data corresponding to 05:33 to 05:42) in the risk detection window exceeds 300% of the mean m, and the assessment result of the aggregated data corresponding to 05:42 based on the variation range algorithm is that there is an abnormal risk.
[0053] It is worth mentioning that the size of the change amplitude threshold T0 determines the sensitivity of the change amplitude algorithm to abnormal risk judgment. The value of T0 can be set and adjusted according to actual needs, and this application does not impose any restrictions on this.
[0054] In one embodiment, using a jitter distribution detection algorithm to perform abnormal risk assessment on current aggregate data may include: calculating the mean and standard deviation of multiple aggregate data within the current risk detection window; if the current aggregate data varies from the mean by more than a preset multiple of the standard deviation, determining that the current aggregate data has an abnormal risk.
[0055] In implementation, the jitter distribution detection algorithm can determine the current aggregate data a n Whether the change range is normal within the current risk detection window. It can filter out some data jitters under normal circumstances and reduce the false alarm rate of change threshold judgment.
[0056] For example, the jitter distribution detection algorithm may specifically adopt the nSigma algorithm. Specifically, the value of nSigma may be calculated using the following formula:
[0057] nSigma=abs(a n -m) / s
[0058] Among them, a n -m is the change in the current aggregate data compared to the mean of the aggregate data in the risk detection window.
[0059] m is the mean of the aggregated data within the risk detection window, which can be calculated using the following formula:
[0060] m=(a1+a2+...+a n ) / n
[0061] s is the standard deviation of the aggregated data within the risk detection window, which can be calculated using the following formula:
[0062]
[0063] If the nSigma value is greater than the preset multiple N, the current aggregate data a is determined n There are unusual risks.
[0064] It is understandable that in many fields, data measurements obey or approximately obey normal distribution. When the amplitude of data fluctuation exceeds N times the standard deviation, it can be considered that an anomaly has occurred. For example, for data that completely obeys normal distribution, the probability of exceeding 1 times the standard deviation is about 31.73%, the probability of exceeding 2 times the standard deviation is about 4.55%, and the probability of exceeding 3 times the standard deviation is 0.27%. In the actual anomaly detection process, N can usually be set to 3.
[0065] In some embodiments, the aggregated data often does not completely obey the normal distribution, but approximately obeys the normal distribution. Therefore, the size of N can be set according to the actual data distribution characteristics and the required detection sensitivity, and this application does not limit this.
[0066] In one embodiment, the preset multiple N is set to 3, the aggregation time window is set to 1 minute, and the risk detection window is set to 10 minutes. Figure 3 , the horizontal axis is time, and the vertical axis is the number of requests per minute, which shows the time series curve formed by the aggregated data from 19:56 to 20:28. It can be found that the data mainly fluctuates between the upper control line and the lower control line, and the closer to the center line, the more data there is. When using the jitter distribution detection algorithm for abnormal risk detection, if the nSigma value corresponding to a certain aggregated data is greater than 3, it is considered that the jitter change amplitude of the aggregated data has an abnormal risk. For example, the change amplitude of the aggregated data at 20:28 compared to the mean exceeds 3 times the standard deviation of the aggregated data set of the risk detection window (that is, the 10 aggregated data corresponding to 20:19 to 20:28), then the assessment result of the aggregated data corresponding to 20:28 based on the jitter distribution detection algorithm is that there is an abnormal risk.
[0067] In one embodiment, using a curve similarity matching algorithm to perform abnormal risk assessment on current aggregated data may include: calculating the similarity between a time series curve composed of multiple aggregated data within the current risk detection window and a time series curve corresponding to the previous period; if the calculated similarity does not reach a preset similarity, determining that the current aggregated data has an abnormal risk.
[0068] In practice, the time series may have periodic changes, which can be achieved by converting the current aggregate data set A n ={a1,a2,...,a n} is compared with the time series curve corresponding to the previous period to find abnormal data points of the curve, so as to avoid the normal periodic changes of the time series being misjudged as abnormal risks. For example, if the similarity between the current time series curve and the time series curve of the previous period reaches the preset similarity, it means that the trends of the two curves are similar or the same, and the current aggregate data a can also be determined. n There is no abnormal risk; if the similarity between the current time series curve and the time series curve of the previous period does not reach the preset similarity, it means that the trends of the two curves are quite different, then it can be determined that the current aggregate data a n There is an abnormal risk. Among them, the preset similarity value can be set according to actual needs, and this application does not limit this.
[0069] It is worth mentioning that the curve similarity matching algorithm can use the cosine similarity algorithm, or other algorithms such as Euclidean distance and Minkowski distance.
[0070] In one embodiment, taking the cosine similarity algorithm as an example, the aggregate data set corresponding to the risk detection window of the current aggregate data can be set as A n ={a1,a2,...,a n}, the corresponding aggregate data set in the previous cycle is B n ={b1,b2,....,b n Aggregate data set A n and B n The similarity of the corresponding two time series curves can be calculated using the following formula:
[0071]
[0072] In implementation, if the cosine similarity of the two curves is closer to 1, it means that the angle between the two time series curves is closer to 0 degrees, that is, the trends of the two curves are more similar, and the probability that the current time series curve has an abnormal risk is smaller. If the cosine similarity of the two curves is closer to -1, it means that the angle between the two time series curves is closer to 180 degrees, that is, the trends of the two curves are more dissimilar, and the probability that the current time series curve has an abnormal risk is greater. For example, the preset similarity can be set to 0.5, then as long as the angle between the two curves exceeds 60 degrees, the similarity of the two curves is less than 0.5, that is, the similarity of the two curves does not reach the preset similarity, and it can be determined that the current aggregate data a nThe evaluation result based on the cosine similarity algorithm is that there is an abnormal risk. On the contrary, if the similarity of the two curves is not less than 0.5, that is, the similarity of the two curves reaches the preset similarity, then it can be determined that the current aggregate data a n The evaluation result based on the cosine similarity algorithm is that there is no abnormal risk. In this way, it can avoid the normal periodic changes in the time series from being misjudged as abnormal risk points. At the same time, this solution uses the cosine similarity algorithm to avoid the change in the size of the time series data points when comparing the month-on-month, and can reduce the false alarm rate by detecting whether the direction of the change of the time series curve is similar.
[0073] In another embodiment, the weight adjustment of moving weighted average can be added to the traditional cosine similarity algorithm, and the weights of data points corresponding to different times are W n ={w1,w2,....,w n Data points corresponding to different times can have different weights. For example, the weight of the data at a time point closer to the current time can be greater. Accordingly, the cosine similarity of two curves can be calculated using the following formula:
[0074]
[0075] In one embodiment, the aggregation time window is set to 1 minute and the risk detection window is set to 10 minutes. Figure 4 , the horizontal axis is time, and the vertical axis is the number of requests per minute. Business traffic changes periodically on a weekly basis, that is, the change trend of the current aggregated data may be similar to the change trend of the aggregated data at the same time seven days ago. When performing an abnormal risk assessment on a certain data point, such as the aggregated data at 19:30 this Monday, the current time series curve used for similarity matching consists of 10 aggregated data corresponding to 19:21 to 19:30, and the previous cycle time series curve used for similarity matching consists of 10 aggregated data corresponding to 19:21 to 19:30 last Monday.
[0076] It can be found that in Figure 4 In the example, due to the specific business activities at 19:30, the aggregated data at 19:30 in the current cycle and the corresponding aggregated data at 19:30 in the previous cycle both surged. It can be considered that the aggregated data at 19:30 in the current cycle may be a periodic surge, which is a normal change and does not have abnormal risks. On the contrary, the corresponding aggregated data at 19:44 and 19:45 in the current cycle dropped sharply and the trend was quite different from the corresponding data points in the previous cycle. Therefore, the two data points of 19:44 and 19:45 may have abnormal risks.
[0077] S106: If there are multiple aggregated data with abnormal risks in the abnormality determination window, it is determined that the current business has an abnormality.
[0078] In implementation, the size of the abnormality determination window can be set and adjusted according to actual needs, and this application does not impose any restrictions on this.
[0079] In one embodiment, step S106 may specifically include: if all aggregated data within the abnormality determination window have abnormality risks, determining that an abnormality occurs in the current business.
[0080] For example, the aggregation time window can be set to 1 minute, the abnormality determination window can be set to 3 minutes, and the abnormality determination window contains 3 aggregated data. When the risk assessment results of these 3 aggregated data are all abnormal risks, it is determined that the current business is abnormal. In other words, when there is an abnormal risk in 3 consecutive aggregated data, it can be determined that the current business is abnormal.
[0081] For another example, the aggregation time window can be set to 2 minutes, the abnormality determination window can be set to 8 minutes, and there are 4 aggregated data in the abnormality determination window. When there is an abnormal risk in 4 consecutive aggregated data, it can be determined that the current business has an abnormality.
[0082] In another embodiment, in order to improve the sensitivity of anomaly detection, step S106 may specifically include: if the aggregated data with abnormal risk in the anomaly determination window reaches a preset ratio, it is determined that an abnormality occurs in the current business.
[0083] In implementation, the value of the preset ratio can be set and adjusted according to actual needs, and this application does not impose any restrictions on this. Taking the aggregation time window as 2 minutes, the abnormal determination window as 8 minutes, and the preset ratio as 75% as an example, there are 4 business indicator data in the abnormal determination window. If any 3 of the business indicator data have abnormal risks, it can be determined that the current business has an abnormality. In other words, within the abnormal risk window, once the number of business indicator data with abnormal risks reaches 3, it can be determined that the current business has an abnormality.
[0084] It is understandable that data may occasionally jitter, and the business service may not be abnormal at this time. Therefore, when the risk of abnormality is determined to exist multiple times within a period of time, it is determined that an abnormality has occurred. In this way, accidental jitter can be prevented from being misjudged as abnormality, and the accuracy of abnormality detection can be improved.
[0085] In each of the above embodiments, the business indicator data is aggregated through a pre-set aggregation time window, and the aggregated data is analyzed through a pre-set risk detection window and anomaly determination window. For any business service, only the business indicator data of a single risk detection window needs to be preheated to realize subsequent business anomaly detection, and it can be quickly put into use in a short time. In addition, there is no need to calculate and analyze a large amount of business indicator data during each anomaly detection, and anomalies can be discovered in a timely manner within a short time corresponding to the anomaly determination window, which enhances the real-time nature of anomaly detection.
[0086] Based on the same technical concept, the embodiment of the present application also provides a service anomaly detection device. Figure 5 , the service anomaly detection device may include:
[0087] A data aggregation module is used to periodically aggregate the business indicator data based on an aggregation time window to obtain various aggregated data; wherein the size of the aggregation time window is set based on the time series characteristics of the business indicator data;
[0088] A risk detection module is used to combine multiple aggregated data in the current risk detection window to evaluate whether the current aggregated data has abnormal risks;
[0089] The anomaly determination module is used to determine that an anomaly has occurred in the current business if there are multiple aggregated data with anomaly risks within the anomaly determination window.
[0090] In one embodiment, the data aggregation module may be specifically used to: periodically accumulate business indicator data within an aggregation time window, and use each accumulation result as each aggregated data.
[0091] In one embodiment, the risk detection module can be specifically used to: utilize multiple preset detection algorithms to perform abnormal risk assessment on the current aggregated data respectively; wherein the multiple preset detection algorithms include at least two of a variation amplitude algorithm, a jitter distribution detection algorithm, and a curve similarity matching algorithm; if the assessment results of multiple preset detection algorithms are all that there is an abnormal risk, then it is determined that the current aggregated data has an abnormal risk.
[0092] In one embodiment, when the current aggregate data is evaluated for abnormal risk using a variation amplitude algorithm, the risk detection module can be specifically used to: calculate the mean of multiple aggregate data within the current risk detection window; if the variation amplitude of the current aggregate data compared to the mean exceeds a preset variation amplitude threshold, it is determined that the current aggregate data has an abnormal risk.
[0093] In one embodiment, when using the jitter distribution detection algorithm to perform abnormal risk assessment on the current aggregated data, the risk detection module can be specifically used to: calculate the mean and standard deviation of multiple aggregated data within the current risk detection window; if the change in the current aggregated data compared to the mean exceeds a preset multiple of the standard deviation, it is determined that the current aggregated data has an abnormal risk.
[0094] In one embodiment, when using a curve similarity matching algorithm to perform abnormal risk assessment on the current aggregated data, the risk detection module can be specifically used to: calculate the similarity between a time series curve composed of multiple aggregated data in the current risk detection window and a time series curve corresponding to the previous period; if the similarity does not reach a preset similarity, it is determined that the current aggregated data has an abnormal risk.
[0095] In one embodiment, the anomaly determination module can be specifically used to: if all aggregated data within the anomaly determination window have an abnormal risk, determine that an abnormality has occurred in the current business; or, if the aggregated data with an abnormal risk within the anomaly determination window reaches a preset proportion, determine that an abnormality has occurred in the current business.
[0096] It should be noted that: the business anomaly detection device provided in the above embodiment only uses the division of the above functional modules as an example when performing business anomaly detection. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the business anomaly detection device provided in the above embodiment and the embodiment of the business anomaly detection method belong to the same concept. The specific implementation process is detailed in the method embodiment, and this application will not repeat it here.
[0097] Based on the same technical concept, the embodiment of the present application also provides a service anomaly detection device. Figure 6 The business anomaly detection device may include a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the business anomaly detection method provided in any of the above embodiments.
[0098] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the software product for business anomaly detection can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including storing a number of instructions to enable a computer device to load and execute the methods described in each embodiment or some parts of the embodiment through a processor.
[0099] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A method for detecting business anomalies, characterized in that: The service anomaly detection method comprises: Periodically aggregating the business indicator data based on an aggregation time window to obtain various aggregated data; wherein the size of the aggregation time window is set based on the time series characteristics of the business indicator data; Combining the multiple aggregated data in the current risk detection window to evaluate whether the current aggregated data has abnormal risk; If there are multiple pieces of the aggregated data with abnormal risks within the abnormal determination window, it is determined that an abnormality has occurred in the current business.
2. The service anomaly detection method according to claim 1, characterized in that: The business indicator data is periodically aggregated based on the aggregation time window to obtain various aggregated data including: The business indicator data within the aggregation time window is periodically accumulated, and each accumulation result is used as each aggregation data.
3. The service anomaly detection method according to claim 1, characterized in that: The step of evaluating whether the current aggregated data has an abnormal risk by combining the multiple aggregated data in the current risk detection window includes: Using a plurality of preset detection algorithms to respectively perform abnormal risk assessment on the current aggregated data; wherein the plurality of preset detection algorithms include at least two of a variation amplitude algorithm, a jitter distribution detection algorithm, and a curve similarity matching algorithm; If the evaluation results of the plurality of preset detection algorithms are all that there is an abnormal risk, it is determined that there is an abnormal risk in the current aggregated data.
4. The service anomaly detection method according to claim 3, characterized in that: Using the variation amplitude algorithm to perform abnormal risk assessment on the current aggregated data includes: Calculating the average of a plurality of the aggregated data within the current risk detection window; If the variation of the current aggregate data compared to the mean exceeds a preset variation threshold, it is determined that the current aggregate data has an abnormal risk.
5. The service anomaly detection method according to claim 3, characterized in that: Using the jitter distribution detection algorithm to perform abnormal risk assessment on the current aggregated data includes: Calculating the mean and standard deviation of a plurality of the aggregated data within the current risk detection window; If the variation of the current aggregate data compared to the mean exceeds a preset multiple of the standard deviation, it is determined that there is an abnormal risk in the current aggregate data.
6. The service anomaly detection method according to claim 3, characterized in that: Using the curve similarity matching algorithm to perform abnormal risk assessment on the current aggregated data includes: Calculating the similarity between a time series curve formed by a plurality of the aggregated data in the current risk detection window and a time series curve corresponding to a previous period; If the similarity does not reach the preset similarity, it is determined that there is an abnormal risk in the current aggregated data.
7. The service anomaly detection method according to claim 1, characterized in that: If there are multiple aggregated data with abnormal risks in the abnormal determination window, determining that the current business is abnormal includes: If all the aggregated data within the abnormality determination window have abnormality risks, it is determined that the current business has an abnormality; or, If the aggregated data with abnormal risk within the abnormal determination window reaches a preset ratio, it is determined that an abnormality has occurred in the current business.
8. A service anomaly detection device, characterized in that: The service anomaly detection device comprises: A data aggregation module, used to periodically aggregate the business indicator data based on an aggregation time window to obtain various aggregated data; wherein the size of the aggregation time window is set based on the time series characteristics of the business indicator data; A risk detection module, used to evaluate whether the current aggregated data has abnormal risks by combining the multiple aggregated data in the current risk detection window; The abnormality determination module is used to determine that an abnormality occurs in the current business if there are multiple pieces of the aggregated data with abnormal risks within the abnormality determination window.
9. A service anomaly detection device, characterized in that: The service anomaly detection device includes a processor and a memory, wherein a plurality of instructions are stored in the memory, and the plurality of instructions are loaded and executed by the processor to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores a plurality of instructions, and the instructions are used to be loaded and executed by a processor to implement the method according to any one of claims 1 to 7.
