Abnormal user detection method, device, equipment and storage medium
Through clustering and association rule extraction technology, and using algorithms such as TF-IDF, Word2vec, DBSCAN, and Apriori, it solves the problem of low accuracy in traditional abnormal user detection and achieves more efficient abnormal user detection and operation and maintenance efficiency.
Patent Information
- Application Number
- CN202011084616.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-12
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2040-10-12
AI Technical Summary
The accuracy of traditional abnormal user detection solutions is low, it is easy to detect invalid abnormal users, and the generated rules are not targeted.
By obtaining user behavior data, clustering and association rule extraction are performed, and algorithms such as TF-IDF, Word2vec, DBSCAN, and Apriori are used to generate detailed association rules for abnormal user detection.
It improves the accuracy of abnormal user detection and operation and maintenance efficiency, and obtains more detailed and targeted detection results.
Smart Images

Figure CN114416916B
Abstract
Description
Technical Field
[0001] The present application relates to the field of operation and maintenance technology, and in particular to an abnormal user detection method, device, equipment and storage medium. Background Art
[0002] At present, abnormal user detection is an important part of intelligent operation and maintenance. It mainly detects whether the user's behavior data is abnormal to detect whether the user is abnormal in time.
[0003] Traditional abnormal user detection solutions generally perform keyword matching based on user behavior data, or professionals conduct verification based on experience. However, the above solutions are prone to detecting invalid abnormal users and have low accuracy. Summary of the invention
[0004] The embodiments of the present application provide a method, apparatus, device and storage medium for detecting abnormal users, which can improve the accuracy of abnormal user detection and operation and maintenance efficiency.
[0005] In a first aspect, an embodiment of the present application provides a method for detecting abnormal users, the method comprising:
[0006] Obtain behavioral data of multiple users;
[0007] Clustering each user among multiple users according to their behavior data;
[0008] According to the clustered user behavior data in each category, association rules are extracted to obtain association rules for each category;
[0009] Detect abnormal users among multiple users based on the association rules between each user's behavior data and each category.
[0010] In some implementations of the first aspect, clustering each user among a plurality of users according to behavior data of each user includes:
[0011] Determine the feature vector of each user based on the behavior data of each user;
[0012] Each user is clustered according to the feature vector of each user.
[0013] In some implementations of the first aspect, determining a feature vector of each user according to the behavior data of each user includes:
[0014] The feature vector of each user is calculated based on the behavior data of each user and the Term Frequency-Inverse Document Frequency (TF-IDF) algorithm or the Word2vec algorithm.
[0015] In some implementations of the first aspect, clustering each user according to the feature vector of each user includes:
[0016] Each user is clustered based on their feature vector and DBSCAN algorithm or K-means algorithm.
[0017] In some implementations of the first aspect, association rules are extracted based on the clustered behavior data of users in each category to obtain association rules for each category, including:
[0018] According to the behavior data of users in each category and the Apriori algorithm or the FP-Growth algorithm, association rules are extracted to obtain the association rules for each category.
[0019] In some implementations of the first aspect, detecting an abnormal user among a plurality of users according to an association rule between behavior data of each user and each category includes:
[0020] Calculate each user's behavior score based on the association rules between each user's behavior data and each category;
[0021] When the behavior score is less than or equal to the preset score threshold, the user corresponding to the behavior score is determined to be an abnormal user.
[0022] In some implementations of the first aspect, the association rule of each category includes a plurality of association elements;
[0023] According to the association rules between each user's behavior data and each category, the behavior score of each user is calculated, including:
[0024] Determine the weight corresponding to each association element in the association rule of each category;
[0025] The behavior score of each user is calculated according to the behavior data of each user, the association rule of each category, the weight corresponding to each association element in the association rule of each category, the number of multiple users, and the number of users in each category.
[0026] In a second aspect, an embodiment of the present application provides an abnormal user detection device, the device comprising:
[0027] An acquisition module is used to acquire behavior data of multiple users;
[0028] A clustering module, used for clustering each user among multiple users according to the behavior data of each user;
[0029] An extraction module is used to extract association rules based on the behavior data of users in each category after clustering, and obtain association rules for each category;
[0030] The detection module is used to detect abnormal users among multiple users based on the association rules between the behavior data of each user and each category.
[0031] In some implementations of the second aspect, the clustering module includes:
[0032] A first determining unit, configured to determine a feature vector of each user according to the behavior data of each user;
[0033] The clustering unit is used to cluster each user according to the feature vector of each user.
[0034] In some implementations of the second aspect, the first determination unit is specifically used to calculate a feature vector of each user based on the behavior data of each user and a term frequency-inverse document frequency TF-IDF algorithm or a Word2vec algorithm.
[0035] In some implementations of the second aspect, the clustering unit is specifically used to: cluster each user according to a feature vector of each user and a DBSCAN algorithm or a K-means algorithm.
[0036] In some implementations of the second aspect, the extraction module includes:
[0037] The extraction unit is used to extract association rules according to the behavior data of users in each category and the Apriori algorithm or the FP-Growth algorithm to obtain the association rules of each category.
[0038] In some implementations of the second aspect, the detection module includes:
[0039] A calculation unit, used to calculate the behavior score of each user according to the association rule between the behavior data of each user and each category;
[0040] The second determining unit is configured to determine that a user corresponding to the behavior score is an abnormal user when the behavior score is less than or equal to a preset score threshold.
[0041] In some implementations of the second aspect, the association rule of each category includes a plurality of association elements;
[0042] The calculation unit is specifically used to: determine the weight corresponding to each association element in the association rule of each category;
[0043] The behavior score of each user is calculated according to the behavior data of each user, the association rule of each category, the weight corresponding to each association element in the association rule of each category, the number of multiple users, and the number of users in each category.
[0044] In a third aspect, an embodiment of the present application provides an abnormal user detection device, which includes: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, it implements the abnormal user detection method described in the first aspect or any implementable method of the first aspect.
[0045] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the abnormal user detection method described in the first aspect or any implementable manner of the first aspect is implemented.
[0046] The abnormal user detection method, device, equipment and storage medium provided in the embodiments of the present application can cluster each user according to the behavior data of each user, then extract association rules according to the behavior data of users in each category after clustering, obtain the association rules of each category, and then detect abnormal users among multiple users according to the association rules of each user's behavior data and each category. In this way, more detailed and more targeted association rules can be obtained, and abnormal user detection based on the association rules can improve the accuracy of abnormal user detection and operation and maintenance efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0048] Figure 1 This is a schematic diagram of the effect of a DBSCAN algorithm provided in an embodiment of the present application;
[0049] Figure 2 It is a schematic diagram of the architecture of an abnormal user detection system provided in an embodiment of the present application;
[0050] Figure 3 It is a flowchart of an abnormal user detection method provided in an embodiment of the present application;
[0051] Figure 4 This is a schematic diagram of an operation log provided in an embodiment of the present application;
[0052] Figure 5 is a schematic diagram of a TF-IDF calculation result provided in an embodiment of the present application;
[0053] Figure 6 It is a category schematic diagram provided in an embodiment of the present application;
[0054] Figure 7 is a schematic diagram of a frequent itemset provided in an embodiment of the present application;
[0055] Figure 8 is a structural schematic diagram of an abnormal user detection device provided in an embodiment of the present application;
[0056] Fig. 9 It is a structural diagram of an abnormal user detection device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the specific embodiments described herein only explain the present application, rather than limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0058] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0059] At present, in addition to keyword matching based on user behavior data and verification by professionals based on experience, traditional abnormal user detection solutions can also combine all data into a large data set, then use association rule algorithms to obtain corresponding association rules from the data set, and then use association rules to detect user behavior to obtain detection results. However, the rules generated based on this solution are too many and not targeted. Similar to the above two solutions, it is easy to detect invalid abnormal users and has a low accuracy rate.
[0060] In order to solve the problems of the prior art, the embodiments of the present application provide an abnormal user detection method, device, equipment and storage medium, which can be applied to application scenarios of intranet or extranet. It is possible to cluster each user according to the behavior data of each user, and then extract association rules according to the behavior data of users in each category after clustering to obtain the association rules of each category, and then detect abnormal users among multiple users according to the association rules of each user's behavior data and each category. In this way, more detailed and more targeted association rules can be obtained, and abnormal user detection based on the association rules can improve the accuracy of abnormal user detection and operation and maintenance efficiency.
[0061] Before introducing this application, some terms involved in this application are first introduced, as follows:
[0062] TF-IDF algorithm: This algorithm is a weighted algorithm often used in text mining to evaluate the importance of a word to a document collection or one of the documents in a corpus. The importance of a word increases in direct proportion to the number of times it appears in the document, and decreases in inverse proportion to the frequency of its appearance in the corpus. The core idea is: if a word has a high frequency in one article and rarely appears in other articles, it is considered that this word or phrase has good category differentiation ability and is suitable for distinguishing the topics of each article.
[0063] DBSCAN algorithm: This algorithm is a relatively representative density-based clustering algorithm. Different from partitioning and hierarchical clustering methods, it defines a cluster as the largest set of density-connected points. It can divide areas with sufficiently high density into clusters and can find clusters of any shape in noisy spatial databases. Specifically, the DBSCAN algorithm needs to set two hyperparameters, namely Minpts and ε. Among them, Minpts represents the minimum threshold of the number of samples in the neighborhood. If the sample x j The ε-neighborhood of contains at least Minpts samples, that is, |N ε (x j )|≥Minpts, where |N ε (x j )| represents the number of samples in the ε-neighborhood, then x j is a core object. ε represents the neighborhood range. For each sample x in the sample set D j , whose ε-neighborhood includes the samples in the sample set D that are related to x j Samples whose distance is no greater than ε, that is, N ε (x j )={x i ∈D|dist(x i ,x J )≤ε}. Among them, Nε (x j ) represents the sample in the ε-neighborhood, and the dist() function can be a function for calculating the distance between two points.
[0064] The following is an introduction to the main definitions in the DBSCAN algorithm. Density direct access: If x j Located at x i In the ε-neighborhood of i is a core object, then x j By x i Density direct access. For example, in the core object x i Draw a circle with radius ε at x j is exactly inside this circle, so x j Can be x i Directly reach. It should be noted that this direct reach is directional, and it is emitted from the core vertex to another point; the density can reach: for x i With x j , if there exists a sample sequence p 1 , p 2 , ..., p n , where p 1 =x i , pn=x j And p i+1 From the pi density directly, then x j By x i Density is reachable. That is, now there are n vertices, the first vertex is x i , the nth vertex is x j , and x i The density can reach x i+1 This point, x i+1 This point can be directly connected to x i+2 This point, until you reach the nth vertex, which is x j This point; density connected: for x i With x j , if there exists x k So that x i With x j All by x k The density can reach, then x i With x j Density connected.
[0065] For example, Figure 1 Schematic diagram of the effect of a DBSCAN algorithm provided in an embodiment of the present application. Figure 1 As shown, Minpts = 3, the dotted line shows the ε-neighborhood, x i is the core object, x 2 By x 1 Density direct, x3 By x 1 Density can reach x 3 With x 4 Density connected.
[0066] In practical applications, the DBSCAN algorithm first selects a core object in the sample set as the starting point, limits the range of transmission of this starting point according to the defined ε-neighborhood and Minpts, and then searches for the corresponding cluster. After finding a cluster, change another core object and continue searching until all core objects have been visited. As an example, the implementation of the DBSCAN algorithm can be shown in Table 1:
[0067] Table 1
[0068]
[0069]
[0070] The abnormal user detection method, apparatus, device and storage medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0071] Figure 2 is a schematic diagram of the architecture of an abnormal user detection system provided in an embodiment of the present application, such as Figure 2 As shown, the abnormal user detection system may include an electronic device 210 and a server 220, wherein the electronic device 210 may be a mobile electronic device or a non-mobile electronic device. For example, the mobile electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA or an Ultra-Mobile Personal Computer (UMPC), etc., and the non-mobile electronic device may be a server, a Network Attached Storage (NAS) or a Personal Computer (PC), etc. The server 220 is a server corresponding to the target system, representing the monitored target system, which may be a communication, financial, social or entertainment system. The electronic device 210 communicates with the server 220 via a network, wherein the network may be a wired communication network or a wireless communication network.
[0072] As an example, the abnormal user detection system can be applied to scenarios of monitoring communication, finance, social or entertainment systems, etc., without limitation herein.
[0073] See also Figure 2, the electronic device 210 can receive the behavior data of multiple users sent by the server 220. Exemplarily, the behavior data can be the operation log of the user recorded by the server 220. Then, each user is clustered, and the association rules are extracted according to the behavior data of the users in each category after clustering to obtain the association rules of each category. Then, according to the association rules of each user's behavior data and each category, abnormal users among multiple users are detected. In this way, more detailed and more targeted association rules can be obtained, and abnormal user detection is performed based on the association rules, thereby improving the accuracy of abnormal user detection and operation and maintenance efficiency.
[0074] The following is an introduction to the abnormal user detection method provided by the embodiment of the present application. The execution subject of the abnormal user detection method may be Figure 2 The electronic device 210 in the abnormal user detection system shown, or a module in the electronic device 210.
[0075] Figure 3 is a flow chart of an abnormal user detection method provided by an embodiment of the present application, such as Figure 3 As shown, the abnormal user detection method may include the following steps:
[0076] S310, obtaining behavior data of multiple users.
[0077] The behavior data may include multiple behavior elements, and the behavior elements are used to represent the user's operation behavior. Figure 4 As shown, the behavior data may be an operation log within a period of time.
[0078] As an example, the original behavior data of multiple users can be obtained, and the original behavior data of each user can be cleaned. Among them, data cleaning can include: cleaning of damaged data, detection and removal of error values, detection and removal of reread data, consistency adjustment, etc. Then, the original behavior data of each user after cleaning is analyzed, and the invalid part of the original behavior data of each user after cleaning is deleted according to the behavior distribution law to obtain the behavior data of each user.
[0079] S320, clustering each user among the multiple users according to the behavior data of each user.
[0080] In some embodiments, the feature vector of each user can be determined based on the behavior data of each user. Specifically, the feature vector of each user can be calculated based on the behavior data of each user and the TF-IDF algorithm or the Word2vec algorithm, and the user can be represented more specifically through the feature vector. Then, each user is clustered based on the feature vector of each user. Specifically, each user can be clustered based on the feature vector of each user and the DBSCAN algorithm or the K-means algorithm, so that the user is assigned to an appropriate category.
[0081] As an example, the first database can be constructed by taking the union of the behavior data of each user, and the second database including the behavior data of each user can be constructed. The behavior data of the users in the second database can be shown in Table 2 and Table 3:
[0082] Table 2
[0083] Behavioral elements cd vi cat scp ssh ... sudo Frequency 6 10 12 10 3 ... 9
[0084] Table 3
[0085] Behavioral elements cd vi cat scp ssh ... sudo Frequency 7 10 2 3 20 ... 1
[0086] Then, the TF-IDF algorithm is used to calculate the TF-IDF value of each behavior element in each behavior data in the second database. Specifically, it can be shown as the following formula:
[0087] TF-IDF=TF*IDF (1)
[0088]
[0089]
[0090] Among them, n i,j Indicates the number of times the behavior element appears in the behavior data, ∑ k n k,j represents the sum of the number of occurrences of all behavior elements in the behavior data, N represents the total number of behavior data in the second database, and N(x) represents the number of behavior data in the second database in which the behavior element x appears.
[0091] According to actual needs, some smoothing processing can be performed on formula (3) to obtain the following formula.
[0092]
[0093] Figure 5 is a schematic diagram of a TF-IDF calculation result provided in an embodiment of the present application, such as Figure 5As shown, the behavior elements in a behavior data in the second database and the TF-IDF values corresponding to the behavior elements are shown. It can be seen that each behavior element in the behavior data has a different TF-IDF value.
[0094] Then, based on the first database, the TF-IDF value of each behavior element in each behavior data in the second database is vectorized to obtain a feature vector corresponding to each behavior data in the second database, that is, a feature vector of each user.
[0095] Then, the feature vectors of all users are used as a sample set, and the DBSCAN algorithm is used to calculate the sample set, that is, cluster each user to obtain several clusters, that is, categories. For example, the categories can be as follows Figure 6 As shown, item A is a user identifier, which is used to uniquely identify a user, and item B is a user category identifier, which is used to indicate the category to which the user belongs. Among them, the number of categories is preferably 5-8. Optionally, the number of categories obtained can be adjusted by adjusting Minpts and ε.
[0096] S330, extracting association rules based on the clustered behavior data of users in each category to obtain association rules for each category.
[0097] In some embodiments, association rules may be extracted based on the behavior data of users in each category and the Apriori algorithm or the FP-Growth algorithm to obtain association rules for each category.
[0098] It should be noted that the two most important concepts in association rule extraction are support and confidence. Assume that I = {I1, I2, I3, ..., Im} is a set of behavioral elements. Given a behavioral data set BD, each transaction t in BD is a non-empty subset of I, and each transaction t corresponds to a unique identifier TID. The support of an association rule in BD is the percentage of transactions t in BD that contain both X and Y, that is, the probability; the confidence is the percentage of transactions t in BD that contain Y when they already contain X, that is, the conditional probability. If the minimum support threshold and the minimum confidence threshold are met, the association rule is considered meaningful.
[0099] As an example, the implementation of the Apriori algorithm can be shown in Table 4:
[0100] Table 4
[0101]
[0102] For example, frequent itemsets can be Figure 7As shown in the figure, the left side is the frequent item set, and the right side is the corresponding support and confidence. Given the minimum support and minimum confidence, association rules are generated based on the frequent item set. Thus, for a category, the behavior data of all users in a category are used as the behavior data set to extract association rules, and the association rules of a category can be obtained. For each category, the association rules of each category can be obtained.
[0103] For example, the association rules may be as shown in Table 5:
[0104] Table 5
[0105]
[0106]
[0107] Among them, rule 1 indicates that the number of users in category 2 accounts for 24.57% of all users, and 29.93% of users in this category have logged into the account ecip, and the number of operations is between 200 and 300 times, the time is between 9:00 and 10:00, the main action is select, and the operation object is the xxxxx_daily_detail table located in the 10.255.XX device.
[0108] S340, detecting abnormal users among multiple users according to the association rule between the behavior data of each user and each category.
[0109] In order to avoid the detection result having only two states of "matching success" and "matching failure", in some embodiments, the behavior score of each user can be calculated based on the behavior data of each user and the association rules of each category. Exemplarily, the association rules of each category include multiple association elements, and the weight corresponding to each association element in the association rules of each category can be determined. The behavior score of each user is calculated based on the behavior data of each user, the association rules of each category, the weight corresponding to each association element in the association rules of each category, the number of multiple users, and the number of users in each category. After calculating the behavior score, the behavior score can be sorted. The higher the behavior score, the safer it is, and the lower the behavior score, the more dangerous it is. Therefore, when the behavior score is less than or equal to the preset score threshold, the user corresponding to the behavior score is determined to be an abnormal user. The preset score threshold can be flexibly set according to actual needs. In this way, user behavior can be flexibly evaluated to improve the availability and readability of the evaluation results.
[0110] As an example, the weight corresponding to each association element in the association rule of each category can be determined from multiple weights stored with the association element as an index. Exemplarily, the weight corresponding to each association element determined can be shown in Table 6:
[0111] Table 6
[0112] Associated elements Name OP_Times OP_Time OP OP_Object Device_IP Weight 15% 15% 15% 20% 20% 15%
[0113] Then, the behavior score of each user is calculated according to the score calculation formula. Optionally, the score calculation formula can be as follows:
[0114]
[0115] Among them, User Behavior represents the user's behavior data, L represents the number of categories, M is the number of association rules of the category, |C i | represents the number of users in the i-th category, and |S| represents the number of multiple users, that is, the total number of users. The importance of rules mined from the class with more users should be greater, and accordingly Larger, plays a weighting role. RM j It is a rule matching function, which means matching the jth rule. It is used to match the behavior elements in the user's behavior data according to the associated elements in rule j. If the match is successful, the corresponding weight is obtained and the obtained weights are added.
[0116] As an example, the algorithm implementation of the score calculation formula may be shown in Table 7:
[0117] Table 7
[0118]
[0119]
[0120] In the embodiment of the present application, each user can be clustered according to the behavior data of each user, and then the association rules can be extracted according to the behavior data of the users in each category after clustering to obtain the association rules of each category, and then the abnormal users among multiple users can be detected according to the association rules of each user's behavior data and each category. In this way, more detailed and more targeted association rules can be obtained, and abnormal user detection based on the association rules can improve the accuracy of abnormal user detection and operation and maintenance efficiency.
[0121] Based on the abnormal user detection method provided in the embodiment of the present application, the embodiment of the present application also provides an abnormal user detection device, such as Figure 8 As shown, the abnormal user detection device 800 may include: an acquisition module 810 , a clustering module 820 , an extraction module 830 , and a detection module 840 .
[0122] The acquisition module 810 is used to acquire behavior data of multiple users.
[0123] The clustering module 820 is used to cluster each user among multiple users according to the behavior data of each user.
[0124] The extraction module 830 is used to extract association rules based on the clustered user behavior data in each category to obtain association rules for each category.
[0125] The detection module 840 is used to detect abnormal users among multiple users based on the association rules between the behavior data of each user and each category.
[0126] In some embodiments, clustering module 820 includes:
[0127] The first determining unit is used to determine a feature vector of each user according to the behavior data of each user.
[0128] The clustering unit is used to cluster each user according to the feature vector of each user.
[0129] In some embodiments, the first determination unit is specifically used to calculate the feature vector of each user according to the behavior data of each user and the term frequency-inverse document frequency TF-IDF algorithm or the Word2vec algorithm.
[0130] In some embodiments, the clustering unit is specifically used to cluster each user according to the feature vector of each user and the DBSCAN algorithm or the K-means algorithm.
[0131] In some embodiments, the extraction module 830 includes:
[0132] The extraction unit is used to extract association rules according to the behavior data of users in each category and the Apriori algorithm or the FP-Growth algorithm to obtain the association rules of each category.
[0133] In some embodiments, the detection module 840 includes:
[0134] The calculation unit is used to calculate the behavior score of each user according to the association rule between the behavior data of each user and each category.
[0135] The second determining unit is configured to determine that a user corresponding to the behavior score is an abnormal user when the behavior score is less than or equal to a preset score threshold.
[0136] In some embodiments, the association rule for each category includes multiple association elements.
[0137] The calculation unit is specifically used to determine the weight corresponding to each association element in the association rule of each category.
[0138] The behavior score of each user is calculated according to the behavior data of each user, the association rule of each category, the weight corresponding to each association element in the association rule of each category, the number of multiple users, and the number of users in each category.
[0139] Understandably, Figure 8 Each module / unit in the abnormal user detection device 800 shown has the function of implementing each step in the abnormal user detection method provided in the embodiment of the present application and can achieve its corresponding technical effect. For the sake of brevity, it will not be repeated here.
[0140] Fig. 9 Schematic diagram of the structure of an abnormal user detection device provided in an embodiment of the present application. Fig. 9 As shown, the abnormal user detection device 900 in this embodiment includes an input device 901, an input interface 902, a central processing unit 903, a memory 904, an output interface 905, and an output device 906. The input interface 902, the central processing unit 903, the memory 904, and the output interface 905 are interconnected through a bus 910, and the input device 901 and the output device 906 are connected to the bus 910 through the input interface 902 and the output interface 905, respectively, and then connected to other components of the abnormal user detection device 900.
[0141] Specifically, the input device 901 receives input information from the outside and transmits the input information to the central processing unit 903 through the input interface 902; the central processing unit 903 processes the input information based on the computer executable instructions stored in the memory 904 to generate output information, temporarily or permanently stores the output information in the memory 904, and then transmits the output information to the output device 906 through the output interface 905; the output device 906 outputs the output information to the outside of the abnormal user detection device 900 for user use.
[0142] In some embodiments, Fig. 9 The abnormal user detection device 900 shown includes: a memory 904 for storing programs; a processor 903 for running the programs stored in the memory to implement the abnormal user detection method provided in the embodiment of the present application.
[0143] An embodiment of the present application also provides a computer-readable storage medium, on which computer program instructions are stored; when the computer program instructions are executed by a processor, the abnormal user detection method provided in the embodiment of the present application is implemented.
[0144] It should be clear that each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other. For the sake of brevity, no further description is given. The present application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of simplicity, a detailed description of the known methods is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0145] The functional blocks shown in the structural block diagram described above can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, read-only memories (Read-Only Memory, ROM), flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0146] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0147] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0148] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A method for detecting abnormal users, characterized in that: The method comprises: Obtain behavioral data of multiple users; Clustering each user among the multiple users according to the behavior data of each user; Extracting association rules based on the clustered user behavior data in each category to obtain association rules for each category; According to the association rule between the behavior data of each user and each category, abnormal users among the multiple users are detected.
2. The method according to claim 1, characterized in that: The clustering of each user among the multiple users according to the behavior data of each user includes: Determining a feature vector of each user according to the behavior data of each user; Clustering each user according to the feature vector of each user.
3. The method according to claim 2, characterized in that Determining the feature vector of each user according to the behavior data of each user includes: The feature vector of each user is calculated according to the behavior data of each user and the term frequency-inverse document frequency TF-IDF algorithm or the Word2vec algorithm.
4. The method according to claim 1, characterized in that Clustering each user according to the feature vector of each user includes: Each user is clustered according to the feature vector of each user and the DBSCAN algorithm or the K-means algorithm.
5. The method according to claim 1, characterized in that The step of extracting association rules based on the clustered user behavior data in each category to obtain the association rules for each category includes: Association rules are extracted based on the behavior data of users in each category and the Apriori algorithm or the FP-Growth algorithm to obtain association rules for each category.
6. The method according to claim 1, characterized in that The detecting abnormal users among the multiple users according to the association rule between the behavior data of each user and each category includes: Calculating a behavior score for each user according to the association rule between the behavior data of each user and each category; When the behavior score is less than or equal to a preset score threshold, it is determined that the user corresponding to the behavior score is the abnormal user.
7. The method according to claim 6, characterized in that The association rule of each category includes a plurality of association elements; The calculating the behavior score of each user according to the association rule between the behavior data of each user and each category includes: Determine the weight corresponding to each association element in the association rule of each category; The behavior score of each user is calculated according to the behavior data of each user, the association rules of each category, the weight corresponding to each association element in the association rules of each category, the number of the multiple users, and the number of users in each category.
8. An abnormal user detection device, characterized in that: The device comprises: An acquisition module is used to acquire behavior data of multiple users; A clustering module, used for clustering each user among the multiple users according to the behavior data of each user; An extraction module, used to extract association rules based on the clustered user behavior data in each category to obtain the association rules of each category; The detection module is used to detect abnormal users among the multiple users according to the association rules between the behavior data of each user and each category.
9. An abnormal user detection device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the abnormal user detection method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the abnormal user detection method according to any one of claims 1 to 7 is implemented.
