Abnormal behavior detection method, device and equipment
An automated abnormal behavior detection method in financial systems uses data type-specific algorithms to analyze historical patterns and probabilities, addressing manual threshold issues and improving detection accuracy and response times.
Patent Information
- Application Number
- CN202110345568.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-31
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2041-03-31
AI Technical Summary
Existing systems face challenges in accurately and efficiently detecting abnormal behavior in financial systems due to manual threshold configuration, leading to frequent false alarms and delayed fault identification, which fails to meet industry standards for rapid response and recovery.
An automated abnormal behavior detection method that analyzes detection index data types (stable, fluctuating, spurt) using deviation, Gaussian, and box plot anomaly detection, determining abnormality based on historical data patterns and weighted probabilities, enabling rapid and accurate identification of system anomalies.
The method improves the efficiency and accuracy of abnormal behavior detection by automating the process, reducing reliance on manual operations, and ensuring timely emergency responses, thus enhancing system stability and compliance with industry standards.
Smart Images

Figure CN112860524B_ABST
Abstract
Description
Technical Field
[0001] This specification belongs to the field of artificial intelligence technology, and in particular, relates to an abnormal behavior detection method, device and equipment. Background Art
[0002] With the penetration of Internet technology in the financial field, the financial service model has also changed accordingly. It not only needs to meet the personalized and differentiated needs of consumers, but also needs to ensure the external availability of the system. The large demand has accelerated the frequency of system upgrades, and the types and number of transactions have also increased day by day, which has posed a great challenge to front-line operations and maintenance.
[0003] Generally, the abnormal behavior alarm of the application system is reported based on the indicator threshold maintained by the operation and maintenance personnel. The operation and maintenance personnel need to manually configure tens of thousands of monitoring thresholds. It is impossible to accurately judge the performance capacity trend based on personal experience alone. Moreover, relying on manual maintenance, it is impossible to cover all monitoring points in batches. It is difficult to accurately configure the threshold, which is prone to frequent false alarms due to business changes, and it is impossible to achieve refined and dynamic configuration. When the system is abnormal and needs emergency response, the monitoring thresholds maintained by the operation and maintenance personnel may not be reported or falsely reported, and the specific abnormal transaction cannot be quickly located. The operation and maintenance personnel are often required to locate the abnormal transaction from a large amount of transaction data for emergency response, and spend a lot of time on fault identification and fault diagnosis, which is far from meeting the industry-leading 1-5-10 standard proposed by Internet companies for fault handling, that is, 1 minute discovery, 5 minutes location, and 10 minutes recovery. Therefore, in the data-centric operation and maintenance fields such as performance capacity management and application monitoring, the analysis and utilization of data are still relatively dependent on manual statistics, and the accuracy and efficiency of abnormal behavior detection will be affected.
[0004] To address the above problems, no effective solution has been proposed yet. Summary of the invention
[0005] The purpose of the embodiments of this specification is to provide a method, device and equipment for abnormal behavior detection, which improves the efficiency and accuracy of abnormal behavior detection.
[0006] On the one hand, an embodiment of this specification provides a method for detecting abnormal behavior, the method comprising:
[0007] Receiving abnormal behavior detection trigger information, wherein the abnormal behavior detection trigger information includes the abnormal behavior time;
[0008] Based on the abnormal behavior moment, determining an abnormality detection time period, and splitting the abnormality detection time period into multiple abnormality detection moments;
[0009] Obtaining detection indicator data within a specified historical time period corresponding to the abnormal behavior moment;
[0010] According to the detection index data in the specified historical time period, the data type of the detection index data at each abnormal detection moment is determined, and the data type includes: stable data, fluctuating data, and spurt data;
[0011] According to the data type of the detection index data at each anomaly detection moment, corresponding anomaly detection is performed on the detection index data at each anomaly detection moment, wherein deviation detection is used for stable data, Gaussian distribution anomaly detection is used for fluctuating data, and box plot anomaly detection is used for spur data;
[0012] According to the abnormal detection results of the detection indicator data corresponding to each abnormal detection moment, it is determined whether there is abnormal behavior within the abnormal detection time period.
[0013] Furthermore, the data type of the detection indicator data at each abnormality detection moment is determined based on the detection indicator data within the historical specified time period, including:
[0014] According to the detection index data in the specified historical time period, the average value and standard deviation of each detection index data corresponding to each abnormal detection moment in the specified historical time period are calculated;
[0015] Compare each detection index data corresponding to each abnormal detection moment with the corresponding mean value and standard deviation, and determine the data type of the detection index data at each abnormal detection moment according to the following formula:
[0016]
[0017] Among them, X ij represents the jth detection index data corresponding to the i-th abnormality detection moment, μ ij represents the average value of the jth detection index data corresponding to the i-th anomaly detection moment, σ ij Represents the standard deviation of the j-th detection index data corresponding to the i-th anomaly detection moment.
[0018] Further, the performing corresponding anomaly detection on the detection indicator data at each anomaly detection moment according to the data type of the detection indicator data at each anomaly detection moment includes:
[0019] If the data type of the detection index data at the target abnormality detection moment is stable data, then the reference value of each detection index data at the target abnormality detection moment within the historical specified time period is calculated;
[0020] Calculate the deviation of each detection index data at the target abnormality detection moment within the historical specified time period according to the reference value;
[0021] The calculated deviation is compared with a preset deviation threshold to determine the abnormality detection result of each detection index data corresponding to the target abnormality detection moment.
[0022] Furthermore, the calculation of the deviation of each detection index data at the target abnormality detection moment within the historical specified time period according to the benchmark value includes calculating the deviation using the following formula:
[0023]
[0024] Where K represents the number of days in the specified historical time period, y i Represents the detection index data of the i-th target anomaly detection moment within the historical specified time period.
[0025] Further, the performing corresponding anomaly detection on the detection indicator data at each anomaly detection moment according to the data type of the detection indicator data at each anomaly detection moment includes:
[0026] If the data type of the detection index data at the target anomaly detection time is fluctuating data, the Gaussian detection probability is calculated according to the following formula, and the calculated Gaussian detection probability is compared with the preset probability threshold to determine the anomaly detection result at the target anomaly detection time:
[0027]
[0028] Among them, f(x) represents the Gaussian detection probability, σ represents the standard deviation of the detection index data corresponding to each target anomaly detection moment in the historical specified time period, μ represents the mean of the detection index data corresponding to each target anomaly detection moment in the historical specified time period, and x represents the detection index data at the target anomaly detection moment.
[0029] Furthermore, the method for calculating the Gaussian detection probability also includes:
[0030] If there are multiple detection indicator data, the product of the Gaussian detection probabilities of the detection indicator data at the target abnormality detection moment is used as the Gaussian detection probability of the detection indicator data corresponding to the target abnormality detection moment.
[0031] Further, determining whether there is abnormal behavior within the abnormal detection time period according to the abnormal detection results of the detection indicator data corresponding to each abnormal detection moment includes:
[0032] The abnormality probability within the abnormality detection time period is determined based on the cumulative value of the product of the weight value of each detection index data and the abnormality detection result at the corresponding abnormality detection moment. If the abnormality probability is greater than the preset alarm rate, it is determined that abnormal behavior exists within the abnormality detection time period.
[0033] Further, the abnormal probability within the abnormal detection time period is determined according to the accumulated value of the product of the weight value of each detection index data and the abnormal detection result at the corresponding abnormal detection moment, including calculating the abnormal probability within the abnormal detection time period according to the following formula:
[0034]
[0035] Wherein, T represents the total number of abnormal detection moments within the abnormal detection time period, l represents the total number of detection index data, and P ij represents the abnormal detection result value of the jth detection index data corresponding to the i-th abnormal detection time. If the abnormal detection result of the j-th detection index data corresponding to the i-th abnormal detection time is abnormal, then P ij is 1, otherwise P ij is 0, λ j Represents the weight value corresponding to the j-th detection index data.
[0036] Further, the receiving abnormal behavior detection trigger information includes:
[0037] Receive passive abnormal behavior detection trigger information sent by the abnormal behavior monitoring system after detecting an abnormality, and receive active abnormal behavior detection trigger information sent by the operation and maintenance user, wherein the abnormal detection time period of the active abnormal behavior detection trigger information is based on the user-defined configuration.
[0038] Furthermore, the method further comprises:
[0039] If it is determined that abnormal behavior exists within the abnormal detection time period, a corresponding emergency processing method is adopted for the abnormal behavior, and the emergency processing method includes: any one of current limiting, fuse breaking, and service degradation.
[0040] On the other hand, this specification provides an abnormal behavior detection device, the device comprising:
[0041] An abnormality detection trigger module, used to receive abnormal behavior detection trigger information, wherein the abnormal behavior detection trigger information includes the abnormal behavior time;
[0042] A detection time range determination module, used to determine an abnormality detection time period based on the abnormal behavior moment, and split the abnormality detection time period into multiple abnormality detection moments;
[0043] A historical data acquisition module is used to acquire the detection index data within a specified historical time period corresponding to the abnormal behavior moment;
[0044] A data type determination module, used to determine the data type of the detection index data at each abnormal detection moment according to the detection index data in the historical specified time period, the data type including: stable data, fluctuating data, and spurt data;
[0045] An anomaly detection module, used to perform corresponding anomaly detection on the detection index data at each anomaly detection moment according to the data type of the detection index data at each anomaly detection moment, wherein deviation detection is used for stable data, Gaussian distribution anomaly detection is used for fluctuating data, and box plot anomaly detection is used for spur data;
[0046] The abnormal detection result determination module is used to determine whether there is abnormal behavior within the abnormal detection time period according to the abnormal detection results of the detection indicator data corresponding to each abnormal detection moment.
[0047] On the other hand, an embodiment of the present specification provides an abnormal behavior detection device, which is applied to a server. The device includes at least one processor and a memory for storing processor executable instructions. When the instructions are executed by the processor, the above-mentioned abnormal behavior detection method is implemented.
[0048] The abnormal behavior detection method, device and equipment provided in this specification automatically obtain the detection index data within the historical specified time period corresponding to the abnormal triggering moment after the abnormal detection is triggered, determine the data type of the detection index data at each abnormal detection moment based on the data within the historical specified time period, and use different abnormal detection algorithms for different data types, and combine the abnormal detection results at each abnormal detection moment to determine whether there is abnormal behavior. Automatic detection of abnormal behavior is achieved, which does not rely on the indicator maintenance of operation and maintenance personnel, and replaces repetitive data operations and human judgment under the normal situation of triple growth in application scale, complexity and iteration speed. The linkage monitoring system and the one-click emergency system automatically match the detection algorithm based on the data characteristics of the detection index data, making the location of abnormal transactions more accurate and rapid, improving the efficiency of abnormal detection, and ensuring the stability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0050] Figure 1 It is a flowchart of an abnormal behavior detection method embodiment provided in an embodiment of this specification;
[0051] Figure 2 It is a schematic diagram of the principle of an abnormal behavior detection method in a scenario example of this specification;
[0052] Figure 3 This is a flowchart of abnormal behavior diagnosis in a scenario example of this manual;
[0053] Figure 4 is a schematic diagram of the structure of an abnormal behavior detection device in one embodiment of this specification;
[0054] Figure 5 It is a hardware structure block diagram of an abnormal behavior detection server in one embodiment of this specification. DETAILED DESCRIPTION
[0055] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0056] In a scenario example provided in the embodiments of this specification, the abnormal behavior detection method can be applied to a device that performs abnormal behavior detection, and the device may include a server or a server cluster consisting of multiple servers. Or it can be applied to a transaction business system, such as a bank or financial system or some online shopping platforms. Abnormal transaction behavior within the system can be detected. The abnormal behavior detection in the embodiments of this specification is mainly aimed at system anomalies, such as anomalies during login, anomalies during signature verification, etc., and is not specifically aimed at anomalies in risky transactions.
[0057] Figure 1It is a flow chart of an abnormal behavior detection method embodiment provided in the embodiment of this specification. Although this specification provides the method operation steps or device structure shown in the following embodiments or drawings, more or fewer operation steps or module units after partial merger may be included in the method or device based on routine or no creative labor. In the steps or structures where there is no necessary causal relationship logically, the execution order of these steps or the module structure of the device is not limited to the execution order or module structure shown in the embodiments or drawings of this specification. When the method or module structure is applied in an actual device, server or terminal product, it can be executed sequentially or in parallel according to the method or module structure shown in the embodiment or drawings (for example, a parallel processor or multi-threaded processing environment, or even a distributed processing, server cluster implementation environment).
[0058] A specific implementation example is Figure 1 As shown, in one embodiment of the abnormal behavior detection method provided in this specification, the method can be applied to devices such as servers, computers, smart phones, tablet computers, etc., and the method may include the following steps:
[0059] Step 102: Receive abnormal behavior detection trigger information, where the abnormal behavior detection trigger information includes the abnormal behavior time.
[0060] During the specific implementation process, the business system or transaction system can be monitored for abnormalities. When abnormal transaction behavior is detected, abnormal behavior detection trigger information is initiated. The trigger information may include the abnormal behavior moment, that is, the time when the abnormal behavior occurred. Generally, the abnormal behavior moment is accurate to the minute, such as: 9:10 am on January 30, 2021. Of course, if a more precise time is needed, it can also be accurate to the second.
[0061] In some embodiments of this specification, the receiving abnormal behavior detection trigger information includes:
[0062] Receive passive abnormal behavior detection trigger information sent by the abnormal behavior monitoring system after detecting an abnormality, and receive active abnormal behavior detection trigger information sent by the operation and maintenance user, wherein the abnormal detection time period of the active abnormal behavior detection trigger information is based on the user-defined configuration.
[0063] In the specific implementation process, the abnormal behavior detection trigger information in the embodiments of this specification can be either actively triggered or passively triggered, that is, the abnormal behavior monitoring system can initiate passive abnormal behavior detection trigger information after using alarms on system resource thresholds such as the system CPU (central processing unit), memory, threads, and JDBC (Java Data Base Connectivity) connections. The operation and maintenance user can also actively initiate active abnormal behavior detection trigger information according to actual usage needs. For active abnormal behavior detection trigger information, large-scale promotional activities can be carried out. In order to ensure that the system can be used normally, the operation and maintenance user can actively initiate abnormal behavior detection trigger information, perform abnormal diagnosis on the business system, meet the user's usage needs, and ensure stable system performance.
[0064] Step 104: determine an abnormality detection time period based on the abnormal behavior moment, and split the abnormality detection time period into multiple abnormality detection moments.
[0065] In the specific implementation process, after receiving the abnormal behavior detection trigger information, the corresponding abnormal detection time period can be determined based on the abnormal behavior moment. Generally, for passive abnormal behavior detection, the abnormal detection time period is set to a default value, such as 10 minutes. For active abnormal behavior detection, the abnormal detection time period is generally set according to user needs. Generally, the set time period is relatively long to ensure that the system can be used normally. The abnormal detection time period can be understood as the time range for abnormal behavior detection, which is generally a specified time range before the abnormal behavior moment, such as 10 minutes before the abnormal behavior moment. If the abnormal behavior moment is 9:10 am on January 30, 2021, then the abnormal detection time period can be 9:00-9:10 am on January 30, 2021. After determining the abnormal detection time period, the abnormal detection time period can be split into multiple abnormal detection moments. Generally, each minute can be used as an abnormal detection moment. Of course, according to the actual abnormal detection time period set, other division methods can also be used, and this specification embodiment does not specifically limit it. For example, if the anomaly detection time period is 9:00-9:10 am on January 30, 2021, and each minute is an anomaly detection moment, 9:00-9:10 can be split into 10 anomaly detection moments.
[0066] Step 106: Obtain detection index data within a specified historical time period corresponding to the abnormal behavior moment.
[0067] In the specific implementation process, the historical specified time period corresponding to the abnormal behavior moment can be understood as the specified time period from the abnormal behavior moment forward, such as: assuming that the specified time period is 30 days, if the abnormal behavior moment is 9:10 am on January 31, 2021, then the historical specified time period corresponding to the abnormal behavior moment can be 9:10 am on January 1, 2021-9:10 am on January 30, 2021, and the detection indicator data from January 1 to January 30 can be obtained. Among them, the detection indicator data can be understood as feature data that can detect abnormal behavior of the system, such as data volume, response time, etc. The detection indicator data can be one indicator or multiple indicators, depending on actual needs.
[0068] Step 108: Determine the data type of the detection index data at each abnormality detection moment according to the detection index data within the historical specified time period, and the data type includes: stable data, fluctuating data, and spurt data.
[0069] In the specific implementation process, the data type of the detection index data at each abnormal detection moment can be determined based on the detection index data within the historical specified time period. For example, the detection index data at each abnormal detection moment within the historical specified time period can be plotted as a change curve. If the value of the detection index data corresponding to a certain abnormal detection moment within the historical specified time period is relatively uniform, then the data type of the detection index data corresponding to the abnormal detection moment can be determined to be stable data. For example, if the value of the detection index data A at 9:00 a.m. every day from January 1, 2021 to January 30, 2021 is near the value a, then the data type of the detection index A corresponding to the abnormal detection moment at 9:00 can be determined to be stable data. Similarly, if the value variation of the detection index data corresponding to the abnormal detection moment is relatively large, then the data type of the detection index data corresponding to the abnormal detection moment can be determined to be fluctuating data. If the value variation of the detection index data corresponding to the abnormal detection moment is large, then the data type of the detection index data corresponding to the abnormal detection moment can be determined to be spur data. For example, if the value of the detection indicator data B at 9:01 a.m. every day from January 1, 2021 to January 30, 2021 varies greatly, it can be determined that the data type of the detection indicator B corresponding to the abnormal detection time 9:01 is fluctuating data. If the value of the detection indicator data B at 9:02 a.m. every day from January 1, 2021 to January 30, 2021 varies greatly, it can be determined that the data type of the detection indicator B corresponding to the abnormal detection time 9:02 is spurt data.
[0070] In some embodiments of this specification, the data type of the detection indicator data at each abnormality detection moment is determined based on the detection indicator data within the historical specified time period, including:
[0071] According to the detection index data in the specified historical time period, the average value and standard deviation of each detection index data corresponding to each abnormal detection moment in the specified historical time period are calculated;
[0072] Compare each detection index data corresponding to each abnormal detection moment with the corresponding average value and standard deviation, and determine the data type of the detection index data at each abnormal detection moment according to the following formula (1):
[0073]
[0074] Among them, X ij represents the jth detection index data corresponding to the i-th abnormality detection moment, μ ij represents the average value of the jth detection index data corresponding to the i-th anomaly detection moment, σ ij Represents the standard deviation of the j-th detection index data corresponding to the i-th anomaly detection moment.
[0075] In the specific implementation process, the average value and standard deviation of each abnormal detection moment in the historical specified time period can be calculated according to the value of each detection indicator data corresponding to each abnormal detection moment in the historical specified time period. For example: if the current time is 9:10 am on January 31, 2021, the historical specified time period is 30 days, that is, January 1, 2021-January 30, 2021, the abnormal detection time period is 10 minutes, and each minute is an abnormal detection moment, then there are 10 abnormal detection moments from 9:00 to 9:10, and the detection indicator data has data volume and response time. When judging the data type, you can first calculate the average value and standard deviation of the transaction volume of the detection indicator data at 9:00 am every day from January 1, 2021 to January 30, 2021, as well as the average value and standard deviation of the response time, that is, the average value, standard deviation and average value and standard deviation of the transaction volume corresponding to the abnormal detection time of 9:00. Similarly, the average value and standard deviation of the transaction volume of the detection indicator data and the average value and standard deviation of the response time at 9:01 am every day from January 1, 2021 to January 30, 2021 can be calculated as the average value, standard deviation of the transaction volume and the average value and standard deviation of the response time corresponding to the anomaly detection time of 9:01, and so on, until the average value and standard deviation of each detection indicator data corresponding to 9:10 are calculated.
[0076] The value of the detection index data corresponding to each abnormal detection moment within the abnormal detection time period can be obtained, and then the real-time detection index data corresponding to each abnormal detection moment is compared with the average value and standard deviation calculated at the corresponding time. Referring to the above formula (1), in the embodiment of this specification, if a detection index data at a certain abnormal detection moment is within the average value and one standard deviation range calculated based on the detection index data value in the historical data at the abnormal detection moment, then the detection index data corresponding to the abnormal detection moment is stable data. If a detection index data at a certain abnormal detection moment is within the average value and three standard deviation ranges calculated based on the detection index data value in the historical data at the abnormal detection moment, it is fluctuating data, and the others are spur data. For example: If the transaction volume at 9:00 am on January 31, 2021 is S, based on the value of the transaction volume at 9:00 am every day from January 1, 2021 to January 30, 2021, the calculated average value of the transaction volume at 9:00 am at the abnormal detection moment is μ, and the standard deviation is σ. After comparison, it is found that S∈(μ-σ, μ+σ), then it can be considered that the detection indicator trading volume corresponding to the anomaly detection time 9:00 is stable data.
[0077] Generally, the data types of multiple detection data indicators at the same anomaly detection time are likely to be the same. For example, the data types of the transaction volume and response time corresponding to the anomaly detection time 9:00 are generally the same.
[0078] By comparing the total mean and total standard deviation of the detection index data within a specified historical time period with the average value of the detection index data at the anomaly detection moment within a specified historical time period, the historical data is used to determine the data type of each anomaly detection moment in the current detection time period. Without too much current moment data, the data characteristics of the anomaly detection moment can be determined, laying a data foundation for subsequent anomaly detection.
[0079] Step 110: Perform corresponding anomaly detection on the detection index data at each anomaly detection moment according to the data type of the detection index data at each anomaly detection moment, wherein deviation detection is used for stable data, Gaussian distribution anomaly detection is used for fluctuating data, and box plot anomaly detection is used for spiking data.
[0080] In the specific implementation process, the embodiments of this specification adopt different anomaly detection algorithms for different types of data, using deviation detection for stable data, Gaussian distribution anomaly detection for fluctuating data, and box plot anomaly detection for spur data. Targeted anomaly detection makes the anomaly detection result more accurate. Among them, deviation detection can be understood as determining whether the detection data indicator will be abnormal at the abnormal detection time by calculating the deviation of the detection data indicator at each abnormal detection time. Gaussian distribution anomaly detection can be understood as using the Gaussian distribution algorithm to calculate the probability distribution of each detection indicator data at the abnormal detection time, and then analyzing whether there is an abnormality. Box plot anomaly detection can also be called box plot anomaly detection, which can be understood as a method of describing data using five statistics in the data: minimum value, first quartile, median, third quartile and maximum value. It can also roughly see whether the data is symmetrical, the degree of dispersion of the distribution and other information. Based on the five statistics, the range of abnormal values can be determined, and the detection indicator data at each abnormal detection time can be compared with the determined abnormal value range to determine whether the detection indicator data at each abnormal detection time is abnormal and whether an alarm needs to be triggered.
[0081] Step 112: Determine whether there is abnormal behavior within the abnormal detection time period according to the abnormal detection results of the detection indicator data corresponding to each abnormal detection moment.
[0082] In the specific implementation process, the abnormal detection results of each detection index data corresponding to each abnormal detection moment can be combined to determine whether there is abnormal behavior within the abnormal detection time period. For example, the abnormal detection results of each detection index data corresponding to each abnormal detection moment can be weighted averaged to determine a total abnormal probability, and then determine whether there is an abnormality, or other detection methods can be used, which are not specifically limited in the embodiments of this specification.
[0083] In some embodiments of this specification, determining whether there is abnormal behavior within the abnormal detection time period according to the abnormal detection results of the detection indicator data corresponding to each abnormal detection moment includes:
[0084] The abnormality probability within the abnormality detection time period is determined based on the cumulative value of the product of the weight value of each detection index data and the abnormality detection result at the corresponding abnormality detection moment. If the abnormality probability is greater than the preset alarm rate, it is determined that abnormal behavior exists within the abnormality detection time period.
[0085] In the specific implementation process, there are generally multiple detection index data. The weight value of each detection index data can be set according to the sensitivity of each detection index data to a detection, and then the weight value of each detection index data is multiplied by the abnormal detection result of the corresponding abnormal detection time, and then the product is accumulated to determine the abnormal probability within the abnormal detection time period. For example: Assuming that the detection index data has two transaction volumes and response times, and the abnormal detection time has two moments 1 and 2, the abnormal detection result of the transaction volume at moment 1 can be multiplied by the weight value of the transaction volume, and then the abnormal detection result of the response time at moment 1 can be multiplied by the weight value of the response time, and the abnormal detection result of the transaction volume at moment 2 can be multiplied by the weight value of the transaction volume, and the abnormal detection result of the response time at moment 2 can be multiplied by the weight value of the response time, and the abnormal detection result of the response time at moment 2 can be multiplied by the weight value of the response time, and then the four products can be added together to obtain the abnormal probability of the abnormal detection time period. Among them, the abnormal detection result of the detection index data at each abnormal detection time can be a probability value or an abnormal level, or other identification that can characterize whether it is abnormal. The calculated abnormal probability is compared with the preset alarm rate. If the calculated abnormal probability is greater than the preset alarm rate, it is determined that abnormal behavior exists within the abnormal detection time period. Otherwise, it is considered that no abnormality exists.
[0086] It should be noted that, if a certain anomaly detection algorithm (such as Gaussian distribution anomaly detection) in the above embodiments comprehensively detects multiple detection index data and there is only one anomaly detection result at each anomaly detection time, then the weight value of the detection index data at the anomaly detection time can be selected with the largest weight value. For example: if based on the analysis of the detection index data in the historical specified time period, it is determined that the transaction volume and response time of the detection index data at the anomaly detection time of 9:00 are both fluctuating data, when Gaussian distribution detection is used to detect abnormal behavior of the detection index data at the anomaly detection time of 9:00, the transaction volume and response time are combined to perform anomaly detection, and an anomaly detection result is obtained as abnormal. That is to say, the anomaly detection result at the anomaly detection time of 9:00 is abnormal, without distinguishing the detection index data. If the weight value of the transaction volume of the detection index data is 40%, and the weight value of the response time is 60%, then when the weight value of the detection index data at the anomaly detection time of 9:00 is multiplied by the corresponding anomaly detection result, the weight value can be 60%.
[0087] By setting weight values for different detection index data, the anomaly detection results of the detection index data corresponding to different anomaly detection times are superimposed with the corresponding weight values to determine whether there is abnormal behavior within the anomaly detection time period, so that the detection results of important detection indicators can be highlighted, thereby improving the accuracy of the anomaly detection results.
[0088] In some embodiments of the present specification, the abnormal probability within the abnormal detection time period is determined based on the accumulated value of the product of the weight value of each detection index data and the abnormal detection result at the corresponding abnormal detection time, including calculating the abnormal probability within the abnormal detection time period according to the following formula (2):
[0089]
[0090] Wherein, T represents the total number of abnormal detection moments within the abnormal detection time period, l represents the total number of detection index data, and P ij represents the abnormal detection result value of the jth detection index data corresponding to the i-th abnormal detection time. If the abnormal detection result of the j-th detection index data corresponding to the i-th abnormal detection time is abnormal, then P ij is 1, otherwise P ij is 0, λ j Represents the weight value corresponding to the j-th detection index data.
[0091] In the specific implementation process, in the embodiments of this specification, the abnormal detection results at each abnormal detection time are represented by 0 and 1, which simplifies the calculation method of abnormal probability and improves the efficiency of abnormal detection. For example, if the abnormal detection result corresponding to the abnormal detection index data response time at the abnormal detection time of 9:00 is no abnormality, then P in the above formula can be determined. ij is 0, and then the above formula (2) is used to calculate the abnormal probability in the entire abnormal detection time period.
[0092] In addition, in some embodiments of this specification, the method further includes:
[0093] If it is determined that abnormal behavior exists within the abnormal detection time period, a corresponding emergency processing method is adopted for the abnormal behavior, and the emergency processing method includes: any one of current limiting, fuse breaking, and service degradation.
[0094] In the specific implementation process, if abnormal behavior detection determines that abnormal behavior does exist during the abnormal detection time period, corresponding emergency response methods such as current limiting, fuse breaking, and service degradation can be used to resolve the abnormal behavior. Current limiting can be understood as limiting the number of people or times of business processing, fuse breaking can be understood as suspending business processing, and service degradation can be understood as lowering the priority of business processing. When it is determined that abnormal behavior exists, the corresponding abnormal behavior code can be output, and the cause of the abnormality can be analyzed based on the abnormal behavior code, and then the corresponding emergency response method can be adopted.
[0095] In addition, in the embodiments of this specification, if there are multiple business operation behaviors such as login, payment, signature verification, etc. within the abnormal detection time period, abnormal behavior detection can be performed based on the data corresponding to different business operation behaviors, such as obtaining the detection index data related to login, payment, and signature verification respectively, and performing abnormal behavior detection on login, payment, and signature verification respectively. If it is determined that there is an abnormality in the login, corresponding emergency treatment can be taken for the login abnormality, such as: current limiting, that is, limiting the number of people currently logged in. If an abnormality in payment is detected, the current payment transaction can be fused, that is, the transaction is suspended. Through automatic abnormal behavior detection, and when an abnormality is detected, the corresponding emergency treatment measures are taken in time to ensure the stability of the system. By formulating abnormal rule configurations and based on the located abnormal transactions, the one-click emergency system is automatically triggered or the operation and maintenance personnel perform corresponding emergency operations, including: current limiting, fuse breaking, service degradation, etc., which not only reduces the operation and maintenance manpower costs, but also improves the emergency timeliness and the external service capabilities of the system.
[0096] The abnormal behavior detection method provided in the embodiments of this specification automatically obtains the detection index data within the historical specified time period corresponding to the abnormal triggering moment after the abnormal detection is triggered, determines the data type of the detection index data at each abnormal detection moment based on the data within the historical specified time period, and adopts different abnormal detection algorithms for different data types, and comprehensively determines whether there is abnormal behavior based on the abnormal detection results at each abnormal detection moment. Automatic detection of abnormal behavior is achieved, which does not rely on the indicator maintenance of operation and maintenance personnel, and replaces repetitive data operations and human judgment under the normal state of triple growth in application scale, complexity and iteration speed. The linkage monitoring system and the one-click emergency system automatically match the detection algorithm based on the data characteristics of the detection index data, making the positioning of abnormal transactions more accurate and rapid, improving the efficiency of abnormal detection, and ensuring the stability of the system.
[0097] On the basis of the above embodiments, in some embodiments of this specification, performing corresponding abnormality detection on the detection indicator data at each abnormality detection moment according to the data type of the detection indicator data at each abnormality detection moment includes:
[0098] If the data type of the detection index data at the target abnormality detection moment is stable data, then the reference value of each detection index data at the target abnormality detection moment within the historical specified time period is calculated;
[0099] Calculate the deviation of each detection index data at the target abnormality detection moment within the historical specified time period according to the reference value;
[0100] The calculated deviation is compared with a preset deviation threshold to determine the abnormality detection result of each detection index data corresponding to the target abnormality detection moment.
[0101] In the specific implementation process, if the data type of the detection index data at the target abnormality detection moment is stable data, then the deviation detection can be used. First, the benchmark value, that is, the average value, of each detection index data at each abnormality detection moment in the historical specified time period is calculated, and then the deviation of the detection index data at the target abnormality detection moment in the historical specified time period is calculated based on the calculated benchmark value. The deviation can be understood as the degree of deviation from the benchmark value, such as: the detection index data at each target abnormality detection moment in the historical specified time period can be averaged after the difference is taken from the benchmark value of the detection index at the corresponding abnormality detection moment calculated, and the corresponding deviation is calculated. Then the calculated deviation is compared with the preset deviation threshold. If the calculated deviation is greater than the preset deviation threshold, it is determined that the detection index data at the target abnormality detection moment is abnormal and reaches the alarm value.
[0102] For stable data, by calculating the baseline value and deviation, it is possible to quickly detect whether the data is abnormal, thereby improving the efficiency of detecting abnormal behavior.
[0103] In addition, in some embodiments of this specification, a specific method for calculating the deviation is provided, and the deviation is calculated using the following formula (3):
[0104]
[0105] Where K represents the number of days in the specified historical time period, y i The detection index data of the i-th target anomaly detection time in the specified historical time period. The reference value is the calculated anomaly detection time and the reference value corresponding to the detection index data.
[0106] In the specific implementation process, assuming that the historical specified time period is 30 days before the abnormal behavior moment, K can be 30, the historical specified time period is March 1, 2021-March 30, 2021, the abnormal detection time period is 10 minutes, and each minute is divided into an abnormal detection moment. Assuming that the abnormal detection time period is 9:00-9:10, the detection indicator data is response time and transaction volume. Then we can first calculate the deviation of the response time corresponding to each abnormal detection moment, then y in formula (3) iIt can represent the response time of the i-th target anomaly detection moment. The average value of the response time corresponding to each minute from 9:00 to 9:10 on March 1, 2021 to March 30, 2021, i.e., the benchmark value corresponding to the response time, can be calculated first, and then the deviation of the response time corresponding to the 10 anomaly detection moments from 9:00 to 9:10 can be calculated using the above formula (3), such as: the deviation of the anomaly detection moment 9:00 is the difference between the response time at 9:00 a.m. every day from March 1, 2021 to March 30, 2021 and the calculated benchmark value of the response time at 9:00 a.m., divided by the sum of the response time values of the day and divided by 30. After calculating the deviation of the response time corresponding to each anomaly detection moment, the deviation of the transaction volume corresponding to each anomaly detection moment is calculated.
[0107] The embodiments of this specification provide a clear method for calculating the deviation. Based on the above calculation method, it is possible to accurately calculate whether each detection indicator data at each abnormality detection moment has an abnormality.
[0108] In some embodiments of this specification, a method for Gaussian anomaly detection is also provided:
[0109] If the data type of the detection index data at the target anomaly detection time is fluctuating data, the Gaussian detection probability is calculated according to the following formula (4), and the calculated Gaussian detection probability is compared with the preset probability threshold to determine the anomaly detection result at the target anomaly detection time:
[0110]
[0111] Among them, f(x) represents the Gaussian detection probability, σ represents the standard deviation of the detection index data corresponding to each target anomaly detection moment in the historical specified time period, μ represents the mean of the detection index data corresponding to each target anomaly detection moment in the historical specified time period, and x represents the detection index data at the target anomaly detection moment.
[0112] In the specific implementation process, the above formula (4) can be used to calculate the Gaussian detection probability of the detection index data corresponding to each abnormal detection moment, and then the calculated Gaussian detection probability is compared with the preset probability threshold. If the Gaussian detection probability is less than the preset probability threshold, it can be considered that the detection index data corresponding to the abnormal detection moment belongs to an outlier, triggering an abnormal alarm. If there are multiple detection data indicators, the Gaussian detection probability of each detection index data corresponding to each abnormal detection moment can be calculated in turn to determine whether each detection data indicator at each abnormal detection moment has an abnormality.
[0113] For fluctuating data, Gaussian distribution anomaly detection can be used to accurately and quickly detect whether the data has anomalies, thereby improving the accuracy and efficiency of anomaly detection.
[0114] In addition, if there are multiple detection index data, the product of the Gaussian detection probabilities of the respective detection index data at the target abnormality detection moment is used as the Gaussian detection probability of the detection index data corresponding to the target abnormality detection moment.
[0115] In the specific implementation process, if there are multiple detection indicator data, such as two detection indicator data, namely transaction volume and response time, then the Gaussian detection probability of the two detection indicator data can be calculated at each abnormal detection moment. The embodiment of this specification can multiply the Gaussian detection probabilities of multiple detection indicator data at each abnormal detection moment as the Gaussian detection probability of the detection indicator at the corresponding abnormal detection moment. In other words, for the case of multiple detection indicator data, if Gaussian anomaly detection is used, then only one Gaussian detection probability needs to be calculated at each abnormal detection moment. For example: If there are two abnormal detection moments, and the detection indicator data include transaction volume and response time, then the Gaussian detection probability of the detection indicator data at the first abnormal detection moment can be expressed as: f 1 (Transaction volume)×f 1 (response time), the Gaussian detection probability of the detection index data at the second anomaly detection time can be expressed as: f 2 (Transaction volume)×f 2 (Response time).
[0116] For anomaly detection of multiple detection index data, if it is determined that Gaussian distribution anomaly detection is needed, then the Gaussian detection probability can be calculated by combining multiple detection index data, which simplifies the Gaussian calculation process and improves the efficiency of anomaly detection.
[0117] Figure 2 This is a schematic diagram of the principle of an abnormal behavior detection method in a scenario example of this manual. Figure 3 This is a flowchart of abnormal behavior diagnosis in a scenario example of this manual. Figure 2-Figure 3 The process of abnormal behavior detection in the embodiment of this specification is specifically described as follows:
[0118] like Figure 2 As shown, the abnormal behavior detection in the embodiment of this specification can mainly include the diagnosis configuration preparation stage, the abnormal diagnosis stage and the emergency recovery stage. The diagnosis configuration preparation stage mainly initiates linkage with the monitoring platform. When receiving the alarm about the system resource threshold usage of the system CPU, memory, thread and JDBC connection number from the monitoring platform, it initiates passive transaction diagnosis, or provides active transaction diagnosis mode for system performance capacity report writing and daily application inspection. Figure 2-Figure 3 As shown in the figure, the abnormal diagnosis stage can mainly include the following processes:
[0119] 1. Upon receiving the trigger information of the active / passive mode, the transaction volume and response time (i.e., the detection index data recorded in the above embodiment) of the transaction code (abnormal behavior) are diagnosed online. The active mode time period can be input by the operation and maintenance personnel, while the passive mode is linked with the alarm to automatically match the abnormal time, such as diagnosing the abnormal transaction behavior within ten minutes before the alarm time.
[0120] 2. Extract data features from the mean and standard deviation of transaction volume and response time data within a specified period of time in the history of the transaction code (e.g., historical data for one month can be selected). The basic transaction data structure may include: timestamp, statistical period, application abbreviation, transaction code, transaction volume, transaction response time, etc. Feature extraction can be defined as follows:
[0121] If the average value of the trading volume (or response time) at a certain anomaly detection moment within a specified historical time period is within the average value of the trading volume (or response time) within the specified historical time period and one standard deviation, that is, (u-σ,u+σ), then the trading volume (or response time) at the anomaly detection moment is defined as stable data; if the average value of the trading volume (or response time) at a certain anomaly detection moment within a specified historical time period is between the average value of the trading volume (or response time) within the specified historical time period and three standard deviations, that is, [(u-3σ,u-σ),(u+σ,u+3σ)], then the trading volume (or response time) at the anomaly detection moment is defined as volatile data with frequent fluctuations; other data are defined as spike data.
[0122] 3. Different calculation algorithms are used according to different data characteristics. Deviation detection is used for stable data, Gaussian distribution detection is used for fluctuating data, and box plot detection is used for spiky data.
[0123] Deviation detection: Calculate the average transaction volume and response time of the transaction code at the same abnormal detection time in the previous month as the benchmark value of transaction volume or response time. The deviation of the transaction code at a certain minute, i.e., a certain abnormal detection time, can be calculated through the benchmark value. The calculation formulas for the benchmark value and deviation can be referred to as follows:
[0124]
[0125]
[0126] Among them, x can represent the real-time transaction volume or response time of the trading code in the past month, K represents the number of days in the historical specified time period, such as 30, and y iIndicates the transaction volume or response time of the transaction code in the i-th minute during the abnormal detection time period. For example, if the F-ABC application contains two transaction codes, namely approve_predistributeop (distribution) and approve_queryproductop (countersignature), which are respectively recorded as op1 and op2. If the abnormal transaction within 2 minutes is to be located, if the transaction volume and response time data corresponding to these two minutes in the past month are in a steady time series order, then the benchmark value corresponding to the same time in the past 30 days can be calculated. Assuming that the benchmark value of op1 in the first minute of detection is [100 transactions / minute, 1000ms], and the benchmark value of the second minute is [120 transactions / minute, 1300ms], the benchmark values of op2 in the first and second minutes can be calculated by the same logic as [1000 transactions / minute, 50ms] and [980 transactions / minute, 48ms] respectively. If the data of op1 and op2 within 2 minutes of abnormal detection are shown in Table 1 below, then the deviation degree of the transaction volume and response time corresponding to op1 and op2 can be calculated respectively according to the deviation degree formula in the above embodiment. Based on the calculated deviation, it is determined whether the transaction volume and response time of op1 and op2 are abnormal, and whether an alarm is triggered.
[0127] Table 1. Real-time data of transaction volume and response time
[0128] Timestamp Statistical period Application Short Name Transaction code (in op units) Trading Volume Response time First Minute 1 minute F-ABC approve_predistributeop (distribute) 98 1014.600000 Second minute 1 minute F-ABC approve_predistributeop (distribute) 110 1191.000000 First Minute 1 minute F-ABC approve_queryproductop(countersign) 1003 76.333333 Second minute 1 minute F-ABC approve_queryproductop(countersign) 993 57.000000
[0129] Gaussian distribution anomaly detection: Based on the historical data of the past month, the average and variance of the transaction volume and response time corresponding to the transaction code at a certain moment are calculated, and the Gaussian distribution is fitted. The probability of the transaction volume and response time corresponding to the transaction code in the detection time period is calculated according to the following formula. According to the idea of mathematical statistics, the probability less than the preset probability threshold can be regarded as an outlier. The Gaussian distribution formula is as follows:
[0130]
[0131] Taking Table 1 above as an example, to detect anomalies in the transaction volume and response time of F-AMC's op1 in the last two minutes, we can calculate u and σ for the historical transaction volume and response time of op1 at the same time last month, and then perform probability calculation on the transaction volume and response time in the last two minutes:
[0132] Minute 1:
[0133]
[0134] Minute 2:
[0135]
[0136] Among them, u 1 、u2 , σ 1 , σ 2 are the average and standard deviation of op1 transaction volume and response time in the first minute, respectively. 3 、u 4 , σ 3 , σ 4 They are the mean and standard deviation of op1 transaction volume and response time in the second minute respectively.
[0137] Box plot detection: It consists of five numerical points: minimum value (min), lower quartile (Q1), median (medine), upper quartile (Q3), maximum value (max). IQR is the third quartile minus the first quartile, that is, (Q3-Q1). It is defined that numbers greater than Q3+1.5×IQR and values less than Q1-1.5×IQR are considered outliers. The transaction volume and response time at each anomaly detection moment can be compared with the determined anomaly range to determine whether there are anomalies in the transaction volume and response time at each anomaly detection moment and whether an alarm needs to be triggered.
[0138] 4. According to the sensitivity of transaction volume and response time, different weights are assigned, and the anomaly detection results of the anomaly detection time period are comprehensively calculated. For example, for the F-ABC application, the three detection algorithms in step 3 are used. If an abnormal alarm is triggered, the anomaly detection result is determined to be 1, otherwise it is 0, and the weights of transaction volume and response time are set to 40% and 60% respectively. Since the anomaly detection based on Gaussian alarm distribution calculates the transaction volume and response time as the overall probability, only one weight of 60% is set. The preset alarm rate is set to 60%. The calculation formula of the abnormal probability is as follows:
[0139] Abnormal probability = ∑ abnormal alarm triggered (0 / 1) × indicator weight
[0140] Taking the data in Table 2 as an example, the transaction code is op1, and the deviation detection, Gaussian distribution detection and box plot detection algorithms are recorded as M1, M2 and M3 respectively. The anomaly detection time range is 5 minutes, of which 1 minute of data uses the M1 algorithm, 3 minutes uses the M2 algorithm, and 1 minute uses the M3 algorithm. The alarm rate can be obtained:
[0141] Table 2. Anomaly detection results at anomaly detection time
[0142]
[0143] Abnormal probability = 1×40%+0×60%+1×60%+0×0+1×60%+1×40%+0×60%=200%
[0144] It can be seen that the calculated abnormal probability of 200% is greater than the preset alarm rate of 60%, which means that abnormal behavior exists within the detection period and emergency recovery processing is required. Emergency recovery processing can automatically associate the one-click emergency system or operation and maintenance personnel to perform corresponding emergency operations, including: current limiting, fuse, service degradation, etc.
[0145] The abnormal behavior detection method provided in the embodiment of this specification can trigger the transaction anomaly rapid positioning detection algorithm when the server CPU, memory, thread pool, and jdbc connection number are used at a high level. It can extract features from the data of historical transaction code transaction volume and response time in application monitoring, match different detection algorithms for online transaction detection, and configure abnormal rules and alarm rates. If the alarm rate is met, the abnormal transaction code is output. This method starts from the underlying transaction code data and does not rely on the indicators configured by the operation and maintenance personnel. This detection method will be automatically triggered when an abnormality occurs, so as to achieve rapid positioning of abnormal transactions, improve emergency timeliness, and reduce the work pressure of front-line operation and maintenance personnel.
[0146] In this specification, each embodiment of the above method is described in a progressive manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments. For relevant parts, refer to the partial description of the method embodiment.
[0147] Based on the above-mentioned abnormal behavior detection method, one or more embodiments of this specification also provide a device for abnormal behavior detection. The device may include a system (including a distributed system), software (application), module, component, server, client, etc. that uses the method of the embodiment of this specification and is combined with the necessary implementation hardware. Based on the same innovative concept, the device in one or more embodiments provided in the embodiment of this specification is as follows. Since the implementation scheme and method of the device to solve the problem are similar, the implementation of the specific device of the embodiment of this specification can refer to the implementation of the aforementioned method, and the repetitions will not be repeated. As used below, the term "unit" or "module" can implement a combination of software and / or hardware for predetermined functions. Although the systems and devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0148] Figure 4 is a schematic diagram of the structure of an abnormal behavior detection device in one embodiment of this specification, such as Figure 4 As shown, the abnormal behavior detection device provided in some embodiments of this specification may specifically include:
[0149] An abnormality detection trigger module 41 is used to receive abnormal behavior detection trigger information, wherein the abnormal behavior detection trigger information includes the abnormal behavior time;
[0150] A detection time range determination module 42, configured to determine an abnormality detection time period based on the abnormal behavior moment, and split the abnormality detection time period into multiple abnormality detection moments;
[0151] A historical data acquisition module 43, used to acquire the detection index data within the historical specified time period corresponding to the abnormal behavior moment;
[0152] The data type determination module 44 is used to determine the data type of the detection index data at each abnormality detection moment according to the detection index data in the historical specified time period, and the data type includes: stable data, fluctuating data, and spurt data;
[0153] The anomaly detection module 45 is used to perform corresponding anomaly detection on the detection index data at each anomaly detection moment according to the data type of the detection index data at each anomaly detection moment, wherein deviation detection is used for stable data, Gaussian distribution anomaly detection is used for fluctuating data, and box plot anomaly detection is used for spur data;
[0154] The abnormal detection result determination module 46 is used to determine whether there is abnormal behavior within the abnormal detection time period according to the abnormal detection results of the detection indicator data corresponding to each abnormal detection moment.
[0155] The abnormal behavior detection device provided in the embodiment of this specification can trigger the transaction anomaly rapid positioning detection algorithm when the server CPU, memory, thread pool, and jdbc connection number are used at a high level. It can extract features from the data of historical transaction code transaction volume and response time in application monitoring, match different detection algorithms for online transaction detection, and configure abnormal rules and alarm rates. If the alarm rate is met, the abnormal transaction code is output. This method starts from the underlying transaction code data and does not rely on the indicators configured by the operation and maintenance personnel. This detection method will be automatically triggered when an abnormality occurs, so as to achieve rapid positioning of abnormal transactions, improve emergency timeliness, and reduce the work pressure of front-line operation and maintenance personnel.
[0156] It should be noted that the above-mentioned device may also include other implementation modes according to the description of the corresponding method embodiment. The specific implementation modes may refer to the description of the corresponding method embodiment, and will not be described one by one here.
[0157] The embodiments of this specification also provide an abnormal behavior detection device, which is applied to a server. The device includes at least one processor and a memory for storing instructions executable by the processor. When the instructions are executed by the processor, the abnormal behavior detection method in the above embodiments is implemented, such as:
[0158] Receiving abnormal behavior detection trigger information, wherein the abnormal behavior detection trigger information includes the abnormal behavior time;
[0159] Based on the abnormal behavior moment, determining an abnormality detection time period, and splitting the abnormality detection time period into multiple abnormality detection moments;
[0160] Obtaining detection indicator data within a specified historical time period corresponding to the abnormal behavior moment;
[0161] According to the detection index data in the specified historical time period, the data type of the detection index data at each abnormal detection moment is determined, and the data type includes: stable data, fluctuating data, and spurt data;
[0162] According to the data type of the detection index data at each anomaly detection moment, corresponding anomaly detection is performed on the detection index data at each anomaly detection moment, wherein deviation detection is used for stable data, Gaussian distribution anomaly detection is used for fluctuating data, and box plot anomaly detection is used for spur data;
[0163] According to the abnormal detection results of the detection indicator data corresponding to each abnormal detection moment, it is determined whether there is abnormal behavior within the abnormal detection time period.
[0164] It should be noted that the above-mentioned device may also include other implementation modes according to the description of the method embodiment. The specific implementation modes may refer to the description of the relevant method embodiment, and will not be described one by one here.
[0165] The methods or devices of the above embodiments provided in this specification can implement business logic through computer programs and record them on storage media, and the storage media can be read and executed by computers to achieve the effects of the solutions described in the embodiments of this specification.
[0166] The method embodiments provided in the embodiments of this specification can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Taking running on a server as an example, Figure 5 1 is a hardware structure block diagram of an abnormal behavior detection server in one embodiment of this specification. The computer terminal may be the abnormal behavior detection server or abnormal behavior detection processing device in the above embodiment. Figure 5 The server 10 shown may include one or more (only one is shown in the figure) processors 100 (the processor 100 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a non-volatile memory 200 for storing data, and a transmission module 300 for communication functions. Those skilled in the art will understand that Figure 5 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 5More or fewer components shown in the figure may also include other processing hardware, such as a database or multi-level cache, GPU, or other hardware with Figure 5 Different configurations are shown.
[0167] The non-volatile memory 200 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the taxi data processing method in the embodiment of this specification. The processor 100 executes various functional applications and resource data updates by running the software programs and modules stored in the non-volatile memory 200. The non-volatile memory 200 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the non-volatile memory 200 may further include a memory remotely arranged relative to the processor 100, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a bureau and a network, a mobile communication network, and combinations thereof.
[0168] The transmission module 300 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission module 300 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 300 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0169] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0170] The above-mentioned abnormal behavior detection method or device provided in the embodiments of this specification can be implemented by a processor in a computer executing corresponding program instructions, such as using the C++ language of the Windows operating system to implement it on a PC, on a Linux system, or other systems such as Android and iOS system programming languages to implement it on a smart terminal, as well as based on the processing logic of a quantum computer.
[0171] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the hardware + program embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0172] Although one or more embodiments of the present specification provide method operation steps such as embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiment is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed resource data update environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. The first, second, etc. words are used to represent the name, and do not represent any specific order.
[0173] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing one or more of the present specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, 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 through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0174] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. In the description of this specification, the description of the reference term "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.
[0175] The above are only examples of one or more embodiments of this specification and are not intended to limit one or more embodiments of this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included in the scope of the claims.
Claims
1. A method for detecting abnormal behavior, characterized in that: The method comprises: Receiving abnormal behavior detection trigger information, wherein the abnormal behavior detection trigger information includes the abnormal behavior time; Based on the abnormal behavior moment, determining an abnormality detection time period, and splitting the abnormality detection time period into multiple abnormality detection moments; Obtaining detection indicator data within a specified historical time period corresponding to the abnormal behavior moment; According to the detection index data in the specified historical time period, the data type of the detection index data at each abnormal detection moment is determined, and the data type includes: stable data, fluctuating data, and spurt data; According to the data type of the detection index data at each anomaly detection moment, corresponding anomaly detection is performed on the detection index data at each anomaly detection moment, wherein deviation detection is used for stable data, Gaussian distribution anomaly detection is used for fluctuating data, and box plot anomaly detection is used for spur data; Determine whether there is abnormal behavior within the abnormal detection time period according to the abnormal detection results of the detection indicator data corresponding to each abnormal detection time; Determining the data type of the detection indicator data at each abnormality detection moment according to the detection indicator data within the historical specified time period includes: According to the detection index data in the specified historical time period, the average value and standard deviation of each detection index data corresponding to each abnormal detection moment in the specified historical time period are calculated; Compare each detection index data corresponding to each abnormal detection moment with the corresponding mean value and standard deviation, and determine the data type of the detection index data at each abnormal detection moment according to the following formula: Among them, X ij represents the jth detection index data corresponding to the i-th abnormality detection moment, μ ij represents the average value of the jth detection index data corresponding to the i-th anomaly detection moment, σ ij Represents the standard deviation of the j-th detection index data corresponding to the i-th anomaly detection moment.
2. The method according to claim 1, characterized in that The method of performing corresponding abnormality detection on the detection indicator data at each abnormality detection moment according to the data type of the detection indicator data at each abnormality detection moment includes: If the data type of the detection index data at the target abnormality detection moment is stable data, then the reference value of each detection index data at the target abnormality detection moment within the historical specified time period is calculated; Calculate the deviation of each detection index data at the target abnormality detection moment within the historical specified time period according to the reference value; The calculated deviation is compared with a preset deviation threshold to determine the abnormality detection result of each detection index data corresponding to the target abnormality detection moment.
3. The method according to claim 2, characterized in that The calculating the deviation of each detection index data at the target abnormality detection moment within the historical specified time period according to the reference value includes calculating the deviation using the following formula: Where K represents the number of days in the specified historical time period, y i Represents the detection index data of the i-th target anomaly detection moment within the historical specified time period.
4. The method according to claim 1, characterized in that The method of performing corresponding abnormality detection on the detection indicator data at each abnormality detection moment according to the data type of the detection indicator data at each abnormality detection moment includes: If the data type of the detection index data at the target anomaly detection time is fluctuating data, the Gaussian detection probability is calculated according to the following formula, and the calculated Gaussian detection probability is compared with the preset probability threshold to determine the anomaly detection result at the target anomaly detection time: Among them, f(x) represents the Gaussian detection probability, σ represents the standard deviation of the detection index data corresponding to each target anomaly detection moment in the historical specified time period, μ represents the mean of the detection index data corresponding to each target anomaly detection moment in the historical specified time period, and x represents the detection index data at the target anomaly detection moment.
5. The method according to claim 4, characterized in that The method for calculating the Gaussian detection probability also includes: If there are multiple detection indicator data, the product of the Gaussian detection probabilities of the detection indicator data at the target abnormality detection moment is used as the Gaussian detection probability of the detection indicator data corresponding to the target abnormality detection moment.
6. The method according to claim 1, characterized in that Determining whether there is abnormal behavior within the abnormal detection time period according to the abnormal detection results of the detection indicator data corresponding to each abnormal detection moment includes: The abnormality probability within the abnormality detection time period is determined based on the cumulative value of the product of the weight value of each detection index data and the abnormality detection result at the corresponding abnormality detection moment. If the abnormality probability is greater than the preset alarm rate, it is determined that abnormal behavior exists within the abnormality detection time period.
7. The method according to claim 6, characterized in that The abnormality probability within the abnormality detection time period is determined based on the accumulated value of the product of the weight value of each detection index data and the abnormality detection result at the corresponding abnormality detection time, including calculating the abnormality probability within the abnormality detection time period according to the following formula: Wherein, T represents the total number of abnormal detection moments within the abnormal detection time period, l represents the total number of detection index data, and P ij represents the abnormal detection result value of the jth detection index data corresponding to the i-th abnormal detection time. If the abnormal detection result of the j-th detection index data corresponding to the i-th abnormal detection time is abnormal, then P ij is 1, otherwise P ij is 0, λ j Represents the weight value corresponding to the j-th detection index data.
8. The method according to claim 1, characterized in that The receiving abnormal behavior detection trigger information includes: Receive passive abnormal behavior detection trigger information sent by the abnormal behavior monitoring system after detecting an abnormality, and receive active abnormal behavior detection trigger information sent by the operation and maintenance user, wherein the abnormal detection time period of the active abnormal behavior detection trigger information is based on the user-defined configuration.
9. The method according to any one of claims 1 to 8, characterized in that The method further comprises: If it is determined that abnormal behavior exists within the abnormal detection time period, a corresponding emergency processing method is adopted for the abnormal behavior, and the emergency processing method includes: any one of current limiting, fuse breaking, and service degradation.
10. An abnormal behavior detection device, characterized in that: The device comprises: An abnormality detection trigger module, used to receive abnormal behavior detection trigger information, wherein the abnormal behavior detection trigger information includes the abnormal behavior time; A detection time range determination module, used to determine an abnormality detection time period based on the abnormal behavior moment, and split the abnormality detection time period into multiple abnormality detection moments; A historical data acquisition module is used to acquire the detection index data within a specified historical time period corresponding to the abnormal behavior moment; A data type determination module, used to determine the data type of the detection index data at each abnormal detection moment according to the detection index data in the historical specified time period, the data type including: stable data, fluctuating data, and spurt data; An anomaly detection module, used to perform corresponding anomaly detection on the detection index data at each anomaly detection moment according to the data type of the detection index data at each anomaly detection moment, wherein deviation detection is used for stable data, Gaussian distribution anomaly detection is used for fluctuating data, and box plot anomaly detection is used for spur data; An abnormal detection result determination module is used to determine whether there is abnormal behavior within the abnormal detection time period according to the abnormal detection results of the detection indicator data corresponding to each abnormal detection moment; Determining the data type of the detection indicator data at each abnormality detection moment according to the detection indicator data within the historical specified time period includes: According to the detection index data in the specified historical time period, the average value and standard deviation of each detection index data corresponding to each abnormal detection moment in the specified historical time period are calculated; Compare each detection index data corresponding to each abnormal detection moment with the corresponding mean value and standard deviation, and determine the data type of the detection index data at each abnormal detection moment according to the following formula: Among them, X ij represents the jth detection index data corresponding to the i-th abnormality detection moment, μ ij represents the average value of the jth detection index data corresponding to the i-th anomaly detection moment, σ ij Represents the standard deviation of the j-th detection index data corresponding to the i-th anomaly detection moment.
11. An abnormal behavior detection device, characterized in that: Applied to a server, the device includes at least one processor and a memory for storing processor executable instructions, and when the instructions are executed by the processor, the steps of any one of the methods of claims 1 to 9 are implemented.
Citation Information
Patent Citations
A performance index abnormity detection method and device
CN109558295A
Anomaly detection method, device and equipment and storage medium
CN112084056A
