A detection method and a detection device

By collecting and comprehensively judging the volatility, periodicity, trend attribute values ​​and weight parameters of the data to be detected, the problem of insufficient detection accuracy in the existing technology is solved, and higher abnormal data detection accuracy and lower detection accuracy are achieved. False positive rate.

CN111695083BActive Publication Date: 2024-09-20BEIJING JINGDONG SHANGKE INFORMATION TECH CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN201910199392.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-03-15
Publication Date
2024-09-20
Estimated Expiration
2039-03-15

AI Technical Summary

Technical Problem

When detecting abnormal data, the existing technology relies on statistical values ​​such as average value, standard deviation, and variance. The method is too one-sided, resulting in insufficient detection accuracy and inability to effectively identify anomalies in complex data.

Method used

By collecting the volatility, periodicity and trend attribute values ​​and weight parameters of the data to be detected, we can comprehensively determine whether the data is abnormal, and conduct detection based on multiple attribute angles to improve detection accuracy.

Benefits of technology

It significantly improves the detection accuracy of abnormal data, reduces the misjudgment rate, and can more comprehensively identify anomalies in the data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111695083B
    Figure CN111695083B
Patent Text Reader

Abstract

This application discloses a detection method and a detection device. The method includes: collecting data to be detected within a current detection period; obtaining at least two first attribute values ​​of the data to be detected within the current detection period, wherein the at least two first attribute values ​​are used to characterize the volatility, periodicity, and / or trend of the data to be detected within the current detection period relative to the data to be detected in at least one previous detection period; obtaining at least two weight parameters of the data to be detected within the current detection period, wherein the at least two weight parameters correspond to the at least two first attribute values; and determining whether the data to be detected is abnormal based on the at least two first attribute values ​​and the at least two weight parameters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to detection technology, and in particular to a detection method and detection equipment. Background Art

[0002] In the era of big data, how to analyze abnormal data from a large amount of data has become a research topic for scholars. At present, the most commonly used method is to calculate the statistical values ​​such as the mean, standard deviation and / or variance of the data to be detected from a statistical point of view, and determine whether the data to be detected is abnormal data based on the relationship between the statistical value and the reasonable value. Although this method has certain use significance, considering that the meaning of each data to be detected may be different, such as the data to be detected can be academic performance, and the data to be detected can be transaction amount, if only starting from statistical values ​​such as the mean, standard deviation and / or variance, on the one hand, it is too one-sided, and on the other hand, there may be problems with insufficient detection accuracy. Summary of the invention

[0003] In order to solve the existing technical problems, the embodiments of the present invention provide a detection method and a detection device, which can at least improve the detection accuracy of abnormal data.

[0004] The technical solution of the embodiment of the present invention is achieved as follows:

[0005] An embodiment of the present invention provides a detection method, the method comprising:

[0006] Collect the data to be tested in the current testing cycle;

[0007] Acquire at least two first attribute values ​​of the data to be detected in the current detection cycle, wherein the at least two first attribute values ​​are used to characterize the volatility, periodicity and / or trend of the data to be detected in the current detection cycle relative to the data to be detected in at least one previous detection cycle;

[0008] Acquire at least two weight parameters of the data to be detected in a current detection cycle, wherein the at least two weight parameters correspond to the at least two first attribute values;

[0009] Based on the at least two first attribute values ​​and the at least two weight parameters, it is determined whether the data to be detected is abnormal.

[0010] In the above scheme, the method comprises:

[0011] Based on the at least two first attribute values ​​and the at least two weight parameters, determining a first parameter, wherein the first parameter is used to characterize the possibility that the data to be detected is abnormal data;

[0012] Comparing the first parameter with a first threshold value to obtain a comparison result;

[0013] Whether the data to be detected is abnormal is determined according to the comparison result.

[0014] In the above solution, the step of obtaining at least two weight parameters of the data to be detected in the current detection cycle includes:

[0015] Collecting the data to be detected of at least one previous detection cycle;

[0016] Calculating the at least two first attribute values ​​of the data to be detected within a first period, the first period being a set of the at least one previous detection cycle;

[0017] Get the predefined function;

[0018] At least two weight parameters of the data to be detected in a current detection cycle are determined according to the predetermined function and the at least two first attribute values ​​in the first period.

[0019] In the above scheme, the method further includes:

[0020] Acquire at least one second attribute value of the data to be detected, where the at least one second attribute value is used to characterize a date type value and / or a data type value of the data to be detected;

[0021] Obtaining a weight parameter corresponding to the at least one second attribute value;

[0022] Whether the data to be detected is abnormal is determined based on at least two weight parameters corresponding to the at least two first attribute values ​​and a weight parameter corresponding to the at least one second attribute value.

[0023] In the above scheme, the method comprises:

[0024] When the first parameter is greater than or equal to the first threshold, determining that the data to be detected is abnormal data;

[0025] When the first parameter is less than the first threshold, it is determined that the data to be detected is non-abnormal data.

[0026] An embodiment of the present invention provides a detection device, the detection device comprising:

[0027] A collection device, used for collecting data to be detected in the current detection cycle;

[0028] A processing device, used for obtaining at least two first attribute values ​​of the data to be detected in the current detection cycle, wherein the at least two first attribute values ​​are used for characterizing the volatility, periodicity and / or trend of the data to be detected in the current detection cycle relative to the data to be detected in at least one previous detection cycle;

[0029] Acquire at least two weight parameters of the data to be detected in a current detection cycle, wherein the at least two weight parameters correspond to the at least two first attribute values;

[0030] Based on the at least two first attribute values ​​and the at least two weight parameters, it is determined whether the data to be detected is abnormal.

[0031] In the above solution, the processing device is also used for:

[0032] Based on the at least two first attribute values ​​and the at least two weight parameters, determining a first parameter, wherein the first parameter is used to characterize the possibility that the data to be detected is abnormal data;

[0033] Comparing the first parameter with a first threshold value to obtain a comparison result;

[0034] Whether the data to be detected is abnormal is determined according to the comparison result.

[0035] In the above solution, the processing device is also used for:

[0036] Collecting the data to be detected of at least one previous detection cycle;

[0037] Calculating the at least two first attribute values ​​of the data to be detected within a first period, the first period being a set of the at least one previous detection cycle;

[0038] Get the predefined function;

[0039] At least two weight parameters of the data to be detected in a current detection cycle are determined according to the predetermined function and the at least two first attribute values ​​in the first period.

[0040] In the above solution, the processing device is also used for:

[0041] Acquire at least one second attribute value of the data to be detected, where the at least one second attribute value is used to characterize a date type value and / or a data type value of the data to be detected;

[0042] Obtaining a weight parameter corresponding to the at least one second attribute value;

[0043] Whether the data to be detected is abnormal is determined based on at least two weight parameters corresponding to the at least two first attribute values ​​and a weight parameter corresponding to the at least one second attribute value.

[0044] In the above solution, the processing device is also used for:

[0045] When the first parameter is greater than or equal to the first threshold, determining that the data to be detected is abnormal data;

[0046] When the first parameter is less than the first threshold, it is determined that the data to be detected is non-abnormal data.

[0047] The detection method and detection equipment of the embodiments of the present application, the method includes: collecting data to be detected in a current detection cycle; obtaining at least two first attribute values ​​of the data to be detected in the current detection cycle, the at least two first attribute values ​​are used to characterize the volatility, periodicity and / or trend of the data to be detected in the current detection cycle relative to the data to be detected in at least one previous detection cycle; obtaining at least two weight parameters of the data to be detected in the current detection cycle, the at least two weight parameters corresponding to the at least two first attribute values; based on the at least two first attribute values ​​and the at least two weight parameters, determining whether the data to be detected is abnormal.

[0048] In the present application, whether it is abnormal is judged based on at least two attributes. This method of combining multiple (first) attributes and making comprehensive judgments from multiple attribute perspectives can significantly improve the detection accuracy of abnormal data and reduce the misjudgment rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the embodiments of the present invention 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 embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0050] Figure 1 Schematic diagram of the process of the detection method embodiment provided in this application Figure 1 ;

[0051] Figure 2 Schematic diagram of the process of the detection method embodiment provided in this application Figure 2 ;

[0052] Figure 3 A schematic diagram of the detection principle provided for this application;

[0053] Figure 4 ROC curve diagram provided for this application;

[0054] Figure 5 This is a structural diagram of the components of an embodiment of the detection equipment provided in this application. DETAILED DESCRIPTION

[0055] In order to make the purpose, technical scheme and advantages of the present application clearer, the technical scheme in the embodiment of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiment of the present invention. Obviously, the described embodiment is only a part of the embodiment of the present invention, rather than all the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. In the absence of conflict, the embodiments in the present application and the features in the embodiments can be combined with each other arbitrarily. The steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions. In addition, although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0056] Those skilled in the art can understand that abnormal data in the context of big data refers to values ​​that deviate from what the sample group should have. That is to say, the abnormal data in this solution can be unreasonable data (values ​​that should not appear), or data with reasonable values ​​but a low probability of occurrence. Whether an abnormal data is unreasonable data or reasonable data depends on the specific application scenario. The process of analyzing whether the abnormal data is unreasonable data or reasonable data is not the focus of this solution. The embodiment of this application is to describe the process of how to detect abnormal data from a large amount of data.

[0057] The present application embodiment provides a detection method, specifically a method for detecting abnormal data, such as Figure 1 As shown, the method includes:

[0058] Step 101: Collecting data to be detected in the current detection cycle;

[0059] Those skilled in the art should understand that the data to be detected in the embodiments of the present application can be any type of data in the big data that can be used in practical applications, such as transaction amount, academic performance, number of applicants, etc. The value of the data to be detected collected in the detection period in this step, such as the transaction amount is 5000, the academic performance is 90 points, etc., depends on the specific application scenario. Among them, the detection period can be in units of days, months, years, and can also be in units of hours, minutes, and seconds, without specific limitation.

[0060] Step 102: obtaining at least two first attribute values ​​of the data to be detected in the current detection cycle, wherein the at least two first attribute values ​​are used to characterize the volatility, periodicity and / or trend of the data to be detected in the current detection cycle relative to the data to be detected in at least one previous detection cycle;

[0061] In this step, at least two of the following (first) attributes of the data to be detected in the current detection cycle are calculated: volatility (characterized by a fluctuation parameter), whether it has periodicity relative to at least one previous detection cycle (characterized by a period parameter), and whether it has an upward trend (characterized by a trend parameter).

[0062] Among them, the fluctuation parameter is related to the M (M is a positive integer greater than or equal to 1) standard deviations of the data to be detected in at least one previous detection cycle. For example, if it is related to 3 standard deviations, it can be understood that M standard deviations are M times the standard deviation, such as the 3 standard deviations involved in the Laida criterion (3σ criterion). For the calculation method of 3 standard deviations, please refer to the existing relevant instructions, and this article will not give a specific explanation. In specific implementation, if the data to be detected in the previous detection cycle is greater than the 3 standard deviations of the previous N (N is a positive integer greater than or equal to 1) detection cycles (N previous detection cycles), the fluctuation is large, then the fluctuation parameter is taken as 1, if it is less than, then the fluctuation parameter is taken as -1 (small fluctuation), if it is equal (can be regarded as no fluctuation), then the fluctuation parameter is taken as 0.

[0063] Among them, whether there is periodicity and trend is calculated by the time series model based on whether it is an upward trend or a downward trend. The specific calculation process is not described. If the data to be detected in the current detection period is periodic relative to the previous N detection periods, the period parameter is 1, otherwise it is 0. If the data to be detected in the current detection period is an upward trend relative to the previous N detection periods, the trend parameter is 1, otherwise it is 0.

[0064] Step 103: obtaining at least two weight parameters of the to-be-detected data in the current detection cycle, wherein the at least two weight parameters correspond to the at least two first attribute values;

[0065] In this step, the weight parameters corresponding to the above-mentioned (first) attributes are calculated.

[0066] Step 104: Determine whether the data to be detected is abnormal based on the at least two first attribute values ​​and the at least two weight parameters.

[0067] Based on at least one first attribute value and its weight parameter obtained in a current detection cycle, it is determined whether the data to be detected is abnormal.

[0068] In summary, in this embodiment, whether the data to be detected in the current detection period is abnormal is determined based on at least two attributes of volatility, periodicity and trend of the data to be detected in the current detection period relative to at least one previous detection period. Compared with the method of determining data abnormality only from a statistical perspective in the related art, the present application determines whether it is abnormal based on at least two attributes, which is more comprehensive and comprehensively determines whether the data to be detected is abnormal from multiple attribute perspectives. This method of combining multiple (first) attributes and comprehensively judging from multiple attribute perspectives can significantly improve the detection accuracy of abnormal data and reduce the false positive rate.

[0069] In an optional embodiment, if Figure 2 As shown, the aforementioned step 104 may further be:

[0070] Step 1040: Determine a first parameter based on the at least two first attribute values ​​and the at least two weight parameters, wherein the first parameter represents the possibility that the data to be detected is abnormal data;

[0071] Step 1041: Compare the first parameter with a first threshold to obtain a comparison result;

[0072] Step 1042: Determine whether the data to be detected is abnormal based on the comparison result.

[0073] In steps 1041 and 1042, if the first parameter is greater than or equal to the first threshold, the data to be detected is determined to be abnormal data; if the first parameter is less than the first threshold, the data to be detected is determined to be non-abnormal data, that is, normal value data. The first threshold is obtained based on experience and can be set to any value between 0 and 1. The specific value is flexibly set depending on the application.

[0074] In steps 1040 to 1042, the method of judging whether the data to be detected is abnormal based on the difference between the first parameter and the first threshold value can at least ensure the judgment accuracy.

[0075] In an optional embodiment, the aforementioned step 103 may be further as follows: collecting the data to be detected in at least one previous detection cycle; calculating the at least two first attribute values ​​of the data to be detected in a first period, the first period being a collection of the at least one previous detection cycle; obtaining a predetermined function; determining at least two weight parameters of the data to be detected in the current detection cycle based on the predetermined function and the at least two first attribute values ​​in the first period. Here, the at least two weight parameters of the data to be detected in the current detection cycle are based on at least one (first) attribute value of the data to be detected in at least one previous detection cycle, that is, the weight parameter used in the current detection cycle is calculated from at least two parameters of the fluctuation parameter, cycle parameter and / or trend parameter of the data to be detected in at least one previous detection cycle. From the time axis, the weight parameters corresponding to each (first) attribute value in the present application are updated over time, and are not immutable. The timely update of the weight parameters makes the weight parameters more accurate, so that the accuracy of the judgment of whether the data to be detected in the current detection cycle is abnormal can be greatly guaranteed.

[0076] In an optional embodiment, the method further includes: obtaining at least one second attribute value of the data to be detected, wherein the at least one second attribute value is used to characterize the date type value and / or data type value of the data to be detected; obtaining a weight parameter corresponding to the at least one second attribute value; and determining whether the data to be detected is abnormal based on at least two weight parameters corresponding to the at least two first attribute values ​​and the weight parameter corresponding to the at least one second attribute value.

[0077] In the above scheme, not only the volatility, periodicity and / or trend are considered, but also the (second) attributes such as the date type and / or data type of the data to be detected are taken into consideration. Multiple first attributes and second attributes are combined to determine whether the data to be detected is abnormal, so that the considerations are more comprehensive and closer to the actual application of the data to be detected, which can further improve the judgment accuracy and reduce the judgment error rate. Among them, the date type is represented by the date type parameter, and the data type is represented by the data type parameter. Please refer to the subsequent related description for details.

[0078] Combine the following Figure 3 The schematic diagram shown further illustrates how the detection device of the embodiment of the present application detects abnormal data.

[0079] In an application scenario, it is assumed that the data to be detected is the transaction amount, specifically the transaction amount of e-commerce A every day within a period of time, such as February 1-February 28. It can be understood by those skilled in the art that the daily transaction amount within a period of time usually fluctuates within a certain value. Of course, there are also situations where the daily transaction amount on a certain day is too low or too high, exceeding expectations. In the embodiment of the present application, such data exceeding expectations are regarded as abnormal data. As mentioned above, such data exceeding expectations (abnormality) may be reasonable data, for example, due to the large promotion efforts on a certain day, the transaction amount on that day is far beyond expectations; it can also be unreasonable data, such as the transaction amount on a certain day is far below the expected value. The embodiment of the present application detects abnormal data based on the following scheme. In practical applications, detecting the abnormality of data can help e-commerce companies formulate guiding opinions. For example, due to the promotion efforts given by the Spring Festival, the daily transaction amount during the Spring Festival is far beyond expectations. Then the next statutory holiday of the Spring Festival, such as Labor Day, can also adopt similar promotion methods to sell products. For example, the transaction amount on a certain day is far below the expected value because the network is paralyzed, so it can be started from both software and hardware, such as upgrading network equipment and systems, and trying to avoid the occurrence of similar situations.

[0080] like Figure 3 As shown, the transaction amounts from February 1 to 28 are 10,000, 12,000, 12,000, 13,000, 11,000, and so on. In the application scenario of this embodiment, whether the transaction amount (30,000) on February 28 exceeds expectations and is abnormal data is determined in the following manner. That is, in this application scenario, the transaction amount, which is the data to be detected, is judged to be abnormal with a detection cycle of 1 day as a unit.

[0081] It can be understood that the data to be tested in this application scenario - transaction amount has two second attributes, namely date type and data type. Among them, the date type refers to whether the transaction day with a transaction amount of A is a weekday, weekday, weekend or holiday. The data type refers to the type of product sold, such as 3C (electronic) products, fast-moving consumer goods (daily necessities) products, and clothing products. It can be understood that in this application scenario, the e-commerce platform conducts corresponding statistics on the daily sales of different product types and the date type of the statistical day. The detection equipment collects statistical results from the e-commerce platform and obtains Table 1:

[0082] Table 1

[0083] date Transaction Amount Date type parameters Data type parameters February 1 10,000 0(holiday) 1(3C products) February 2 12,000 -1(weekend) 1(3C products) …… …… …… …… …… …… …… …… February 28 30,000 1(working day) 1(3C products)

[0084] It can be understood that in Table 1, the detection equipment collects sales data of the same type of product - 3C products on the e-commerce platform from February 1 to 28. Table 1 only takes the collected data of 3C products as an example. Based on this, it can be considered that this application scenario is to detect whether there is an abnormality in the transaction amount of 3C products on February 28. If the date type is a working day, the date type parameter is 1, if the date type is a weekend, the date type parameter is -1, and if the date type parameter is a holiday, the date type parameter is 0. If it is the transaction amount of 3C products, the data type parameter is 1, if it is the transaction amount of fast-moving consumer goods products, the data type parameter is -1, and if it is the transaction amount of clothing products, the data parameter type is 0.

[0085] The detection equipment calculates whether there is periodicity and an upward trend in the 3 standard deviations on February 28 and the transaction volume value on February 28 relative to the half month from February 14 to 27 (14 previous detection cycles). Among them, the concept of 3 standard deviations comes from the Laida criterion. In this application scenario, 3 standard deviations are used to examine the fluctuation of recent transaction volume. In specific implementation, it can be judged whether the transaction volume on February 28 is greater than the 3 standard deviations of the previous 7 days. If it is greater, the fluctuation parameter value is 1, if it is less, the fluctuation parameter value is -1, and if it is equal, the fluctuation parameter value is 0. Whether there is periodicity and an upward trend is calculated according to the time series model. For this calculation method, please refer to the existing relevant instructions. If it is calculated that the transaction volume value on February 28 is periodic relative to the half month from February 14 to 27, the period parameter is taken as 1, otherwise it is taken as 0. Similarly, if the transaction amount on February 28 is calculated to be on an upward trend compared to the half month from February 14 to 27, the trend parameter is 1, otherwise it is on a downward trend and the trend parameter is 0. The three first attributes calculated above are used as additional content to Table 1 to obtain Table 2:

[0086] Table 2

[0087]

[0088] It can be understood that Table 2 records the values ​​of all attributes (including transaction amount, three first attributes and two second attributes). Among them, Table 1 and Table 2 can be used as a scoring card model, and the values ​​of each attribute in the scoring card model are used to obtain the judgment result of whether the data to be detected is abnormal. According to the records of each attribute value in Table 2, it can be calculated according to the record of formula (1) whether the transaction amount on February 28 is abnormal.

[0089]

[0090] Among them, e -zIt is an exponential function with the natural constant e as its base, and the value of e is 2.718. w i is the weight parameter, x i Represents the value of the attribute that can be used in all attributes (including transaction amount, date type parameter, data type parameter, fluctuation parameter, cycle parameter and trend parameter). In this application scenario, since all attributes are used, L=6.

[0091] Formula (1) is the predetermined function in this application scenario. Before using the predetermined function and the values ​​of each attribute in Table 2 to determine whether the data to be detected is abnormal data, it is also necessary to calculate w i (i=1, 2…6). The previous scheme has been described: the weight parameter used to determine whether the transaction amount on February 28 is abnormal data can be determined by taking at least one attribute value of the data to be detected in multiple previous detection cycles before February 28. In this application scenario, it is assumed that the weight parameter is determined by the transaction amount and its corresponding attribute value during the period from January 1 to February 27. In specific implementation, the detection equipment reads the daily transaction amount data, date type, data type and other data of 3C products from the e-commerce platform during the period from January 1 to February 27, and generates a table as shown in Table 1. And use the Laida criterion and time series model to calculate the cycle parameters, fluctuation parameters and trend parameters of each day, so as to generate a table such as Table 2, and obtain the daily transaction amount data, date type parameters, data type parameters, cycle parameters, fluctuation parameters and trend parameters from January 1 to February 27. And substitute these values ​​as input into the logistic regression model (logistic regression model) function-glm in R language, and run the following program:

[0092] fit<-glm(formula=abnormal~.+0,data,family=binomial('logit'))

[0093] The glm function has three inputs: formula, data, and family. In this application scenario, data is the daily transaction data from January 1 to February 27, date type parameters, cycle parameters, data type parameters, trend parameters, and volatility parameters. family = binomial ('logit'), indicating that the program response is based on the logistic regression model. formula = abnormal ~. + 0 is the default format.

[0094] By running the above program in R language, we can get:

[0095]

[0096] Thus, the expression of z in formula (1) is obtained. After the expression in formula (1) is determined, x1, x2...x6 are respectively taken as the transaction amount, date type parameter, cycle parameter, data type parameter, trend parameter and fluctuation parameter value on February 28, and substituted into formula (1) to obtain the value of the first parameter y, which represents the possibility that the transaction amount on February 28 is abnormal data.

[0097] Compare the size relationship between the first parameter y and the first threshold value such as 0.5. If y≥0.5, the transaction amount on February 28 (30,000) is confirmed as abnormal data; otherwise it is regarded as normal data. In this application scenario, assuming that the calculated y=0.62, which is greater than or equal to 0.5, the transaction amount on February 28 (30,000) is confirmed as abnormal data, and the output device of the detection equipment outputs an abnormal reminder signal. The e-commerce company analyzes the reasons for the abnormal transaction amount on that day and formulates guiding opinions: for example, the reason for the high transaction amount on February 28 is that the promotion on that day was strong, and the same promotion method can still be used to sell products in subsequent promotion plans.

[0098] In the above scheme, a plurality of first attributes and second attributes are combined to determine whether the data to be detected is abnormal, so that the factors considered are more comprehensive and closer to the actual application of the data to be detected, which can further improve the accuracy of the judgment and reduce the error rate of the judgment.

[0099] In this application scenario, Figure 4 The receiver operating characteristic curve (ROC curve) shown in Figure 1 is used to illustrate the reliability of the expression of y calculated by the above scheme. Figure 4 In the figure, the horizontal axis represents the false positive rate, and the vertical axis represents the true positive rate. Those skilled in the art should know that the closer the ROC curve is to the upper left corner, the higher the accuracy of the y expression. The point of the ROC curve closest to the upper left corner is the best point that minimizes the false positive rate, and its misjudgment rate is the lowest. The larger the area (AUC) of the closed space formed by the ROC curve, the x-axis, and the y-axis, the lower the misjudgment rate. The ROC curve in this application scenario is shown in Figure 1. Figure 4 The trend shown has AUC = 0.81, which is a large value, indicating that the expression of y calculated in this application scenario is relatively accurate. By judging between the y expression and the first threshold, the misjudgment rate can be reduced, thereby improving the judgment accuracy.

[0100] The above scheme is explained by taking the first attribute of periodicity, volatility and trend as an example, and the second attribute is explained by taking the date data type and data type as an example. Considering that the year-on-year increase parameter of the data to be detected will also affect the judgment result, it is also possible to judge whether it is abnormal based on the attribute values ​​recorded in Table 3.

[0101] Table 3

[0102]

[0103] Among them, the first growth parameter is the percentage of the year-on-year growth of the previous week, and the second growth parameter is the percentage of the year-on-year growth of the previous month. On the basis of adding 2 attribute values, the number of corresponding weight parameters w should also increase, such as taking L = 8. The method of calculating w1~w8 on the basis of adding these two attributes refers to the method of w1~w6 mentioned above, and will not be repeated.

[0104] In the above scheme, the weight parameter used to determine whether the transaction amount on February 28 is abnormal is calculated from the transaction amount and its corresponding attribute value during the period from January 1 to February 27. Correspondingly, the weight parameter used to determine whether the transaction amount on March 1 is abnormal can be calculated from the transaction amount and its corresponding attribute value during the period from January 1 to February 28. Similarly, the weight parameter used to determine whether the transaction amount on a certain day is abnormal can be calculated from the transaction amount and attribute value of the days before that day. This is equivalent to the weight parameter w in formula (1) of this scheme i It is updated regularly, such as once a day, and is not static. The weight parameters are updated in a timely manner based on the latest collected data to be detected. This timely update makes the weight parameters more accurate, which can greatly ensure the accuracy of the judgment on whether the data to be detected within the detection period is abnormal.

[0105] The present application also provides a detection device, such as Figure 5 As shown, the detection device comprises:

[0106] The collecting device 501 is used to collect the data to be detected in the current detection cycle;

[0107] The processing device 502 is used to obtain at least two first attribute values ​​of the data to be detected in the current detection cycle, and the at least two first attribute values ​​are used to characterize the volatility, periodicity and / or trend of the data to be detected in the current detection cycle relative to the data to be detected in at least one previous detection cycle;

[0108] Acquire at least two weight parameters of the data to be detected in a current detection cycle, wherein the at least two weight parameters correspond to the at least two first attribute values;

[0109] Based on the at least two first attribute values ​​and the at least two weight parameters, it is determined whether the data to be detected is abnormal.

[0110] In an optional embodiment, the processing device 502 is further configured to:

[0111] Based on the at least two first attribute values ​​and the at least two weight parameters, determining a first parameter, wherein the first parameter is used to characterize the possibility that the data to be detected is abnormal data;

[0112] Comparing the first parameter with a first threshold value to obtain a comparison result;

[0113] Whether the data to be detected is abnormal is determined according to the comparison result.

[0114] In an optional embodiment, the processing device 502 is further configured to:

[0115] Collecting the data to be detected of at least one previous detection cycle;

[0116] Calculating the at least two first attribute values ​​of the data to be detected within a first period, the first period being a set of the at least one previous detection cycle;

[0117] Get the predefined function;

[0118] At least two weight parameters of the data to be detected in a current detection cycle are determined according to the predetermined function and the at least two first attribute values ​​in the first period.

[0119] In an optional embodiment, the processing device 502 is further configured to:

[0120] Acquire at least one second attribute value of the data to be detected, where the at least one second attribute value is used to characterize a date type value and / or a data type value of the data to be detected;

[0121] Obtaining a weight parameter corresponding to the at least one second attribute value;

[0122] Whether the data to be detected is abnormal is determined based on at least two weight parameters corresponding to the at least two first attribute values ​​and a weight parameter corresponding to the at least one second attribute value.

[0123] In an optional embodiment, the processing device 502 is further configured to:

[0124] When the first parameter is greater than or equal to the first threshold, determining that the data to be detected is abnormal data;

[0125] When the first parameter is less than the first threshold, it is determined that the data to be detected is non-abnormal data.

[0126] It should be noted that the detection equipment provided in the embodiment of the present application solves the problem based on a principle similar to that of the aforementioned detection method. Therefore, the implementation process and implementation principle of the detection equipment can refer to the description of the implementation process and implementation principle of the aforementioned detection method, and the repeated parts will not be repeated.

[0127] The present application also provides a storage medium for storing a computer program, which performs the following steps when executed:

[0128] Step 101: Collecting data to be detected in the current detection cycle;

[0129] Step 102: obtaining at least two first attribute values ​​of the data to be detected in the current detection cycle, wherein the at least two first attribute values ​​are used to characterize the standard deviation, periodicity and / or trend of the data to be detected in the current detection cycle;

[0130] Step 103: obtaining at least two weight parameters of the to-be-detected data in the current detection cycle, wherein the at least two weight parameters correspond to the at least two first attribute values;

[0131] Step 104: Determine whether the data to be detected is abnormal based on the at least two first attribute values ​​and the at least two weight parameters.

[0132] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0133] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.

[0134] In addition, all functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately used as a unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0135] A person skilled in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, etc. Various media that can store program codes.

[0136] Alternatively, if the above-mentioned integrated unit of the present invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0137] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A detection method, characterized in that: The method comprises: Collect the data to be tested in the current testing cycle; Acquire at least two first attribute values ​​of the data to be detected in the current detection cycle, wherein the at least two first attribute values ​​are used to characterize the volatility, periodicity and / or trend of the data to be detected in the current detection cycle relative to the data to be detected in at least one previous detection cycle; Acquire at least two weight parameters of the data to be detected in a current detection cycle, wherein the at least two weight parameters correspond to the at least two first attribute values; Determining whether the data to be detected is abnormal based on the at least two first attribute values ​​and the at least two weight parameters; The obtaining of at least two weight parameters of the to-be-detected data in the current detection cycle includes: Collecting the data to be detected of at least one previous detection cycle; Calculating the at least two first attribute values ​​of the data to be detected within a first period, the first period being a set of the at least one previous detection cycle; Get the predefined function; Determining at least two weight parameters of the data to be detected in a current detection cycle according to the predetermined function and the at least two first attribute values ​​in the first period; The method further comprises: Acquire at least one second attribute value of the data to be detected, where the at least one second attribute value is used to characterize the date type and data type of the data to be detected; Obtaining a weight parameter corresponding to the at least one second attribute value; Whether the data to be detected is abnormal is determined based on at least two weight parameters corresponding to the at least two first attribute values ​​and a weight parameter corresponding to the at least one second attribute value.

2. The method according to claim 1, characterized in that: The method comprises: Based on the at least two first attribute values ​​and the at least two weight parameters, determining a first parameter, wherein the first parameter is used to characterize the possibility that the data to be detected is abnormal data; Comparing the first parameter with a first threshold value to obtain a comparison result; Whether the data to be detected is abnormal is determined according to the comparison result.

3. The method according to claim 2, characterized in that The method comprises: When the first parameter is greater than or equal to the first threshold, determining that the data to be detected is abnormal data; When the first parameter is less than the first threshold, it is determined that the data to be detected is non-abnormal data.

4. A detection device, characterized in that: The device comprises: A collection device, used for collecting data to be detected in the current detection cycle; A processing device, used for obtaining at least two first attribute values ​​of the data to be detected in the current detection cycle, wherein the at least two first attribute values ​​are used for characterizing the volatility, periodicity and / or trend of the data to be detected in the current detection cycle relative to the data to be detected in at least one previous detection cycle; Acquire at least two weight parameters of the data to be detected in a current detection cycle, wherein the at least two weight parameters correspond to the at least two first attribute values; Determining whether the data to be detected is abnormal based on the at least two first attribute values ​​and the at least two weight parameters; The processing device is also used for: Collecting the data to be detected of at least one previous detection cycle; Calculating the at least two first attribute values ​​of the data to be detected within a first period, the first period being a set of the at least one previous detection cycle; Get the predefined function; Determining at least two weight parameters of the data to be detected in a current detection cycle according to the predetermined function and the at least two first attribute values ​​in the first period; The processing device is also used for: Acquire at least one second attribute value of the data to be detected, where the at least one second attribute value is used to characterize the date type and data type of the data to be detected; Obtaining a weight parameter corresponding to the at least one second attribute value; Whether the data to be detected is abnormal is determined based on at least two weight parameters corresponding to the at least two first attribute values ​​and a weight parameter corresponding to the at least one second attribute value.

5. The device according to claim 4, characterized in that The processing device is also used for: Based on the at least two first attribute values ​​and the at least two weight parameters, determining a first parameter, wherein the first parameter is used to characterize the possibility that the data to be detected is abnormal data; Comparing the first parameter with a first threshold value to obtain a comparison result; Whether the data to be detected is abnormal is determined according to the comparison result.

6. The device according to claim 5, characterized in that The processing device is also used for: When the first parameter is greater than or equal to the first threshold, determining that the data to be detected is abnormal data; When the first parameter is less than the first threshold, it is determined that the data to be detected is non-abnormal data.

Citation Information

Patent Citations

  • Content type detection method and device

    CN104391860A

  • Anomaly detection method and device

    CN105718715A

  • Method and device for detecting data access exception

    CN106815255A

  • Data processing method and apparatus

    CN107016398A

  • Number display anomaly detecting method and server

    CN107968731A