Abnormal data detection method, device and storage medium

By constructing a behavioral sequence and entity relationship network and determining joint features, the problem of information loss when detecting abnormal data in the existing technology is solved, and the detection accuracy is improved.

CN112131320BActive Publication Date: 2024-08-27HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910554476.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-06-25
Publication Date
2024-08-27
Estimated Expiration
2039-06-25

AI Technical Summary

Technical Problem

The existing technology only considers the basic characteristics of the data when detecting abnormal data, resulting in information loss and inaccurate detection results.

Method used

By obtaining the behavioral information and static attribute information of multiple entities, we construct a behavioral sequence and entity relationship network, and determine joint features to more comprehensively mine the mutual relationships between data for detection.

Benefits of technology

It improves the accuracy of detection results, solves the problem of loss of basic feature information, and enhances the ability to identify abnormal data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112131320B
    Figure CN112131320B
Patent Text Reader

Abstract

The present application discloses a method, device and storage medium for detecting abnormal data, and belongs to the field of data processing technology. The method comprises: obtaining data to be processed, the data to be processed comprises behavior information and static attribute information of multiple entities, the behavior information of each entity comprises behavior identification and behavior execution time of multiple behaviors, determining at least one behavior sequence of each entity in the multiple entities based on the behavior information of the multiple entities, and constructing at least one entity relationship network, determining the joint features of each entity in the multiple entities based on the static attribute information of the multiple entities and at least one behavior sequence, and at least one entity relationship network, and detecting abnormal data in the data to be processed according to the joint features of each entity in the multiple entities. In this way, the problem that only the basic features of the data may lose part of the information, resulting in inaccurate detection results, is solved in the prior art, thereby improving the accuracy of the detection results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device and storage medium for detecting abnormal data. Background Art

[0002] In the era of big data, it is of certain significance to discover patterns from massive data and thus to mine hidden information. However, due to data errors or some other reasons, there may be some abnormal data in the database. For example, in massive data, due to the misoperation of an entity (such as a user), the relevant data of the entity may be abnormal. In order to avoid affecting data mining, it is usually necessary to detect abnormal data.

[0003] In the related art, when abnormal data detection is performed on the data to be processed, multi-source data of each entity among the multiple entities included in the data to be processed can be obtained, and basic features can be extracted from the multi-source data of each entity respectively. Based on the basic features of the multi-source data of each entity, multiple isolation trees can be constructed, and then an isolation forest model can be constructed. Abnormal data can be detected based on the isolation forest model.

[0004] However, in the above implementation, since only the basic characteristics of the multi-source data of each entity are considered without further mining the relationship between the data, some information may be lost, resulting in inaccurate detection results. Summary of the invention

[0005] The embodiments of the present application provide a method, device and storage medium for detecting abnormal data, which can solve the problem that only considering the basic features of the data in the prior art may result in loss of some information and inaccurate detection results. The technical solution is as follows:

[0006] In one aspect, a method for detecting abnormal data is provided, the method comprising:

[0007] Acquire data to be processed, wherein the data to be processed includes behavior information and static attribute information of multiple entities, and the behavior information of each entity includes behavior identifiers and behavior execution times of multiple behaviors;

[0008] Based on the behavior information of the multiple entities, determining at least one behavior sequence of each entity in the multiple entities, and constructing at least one entity relationship network, each behavior sequence including behavior identifiers of at least two behaviors in the multiple behaviors;

[0009] Determining a joint feature of each of the plurality of entities based on static attribute information and at least one behavior sequence of the plurality of entities, and the at least one entity relationship network;

[0010] Abnormal data in the data to be processed is detected according to the joint features of each entity in the multiple entities.

[0011] In a possible implementation of the present application, determining at least one behavior sequence of each of the multiple entities based on the behavior information of the multiple entities includes:

[0012] For any entity among the multiple entities, sorting the behavior identifiers of the multiple behaviors of the any entity according to the behavior execution time of the multiple behaviors of the any entity and in the order in which the behaviors are executed;

[0013] In order from front to back, each adjacent M behavior identifiers in the sorted behavior identifiers are taken as a behavior sequence to obtain at least one behavior sequence of any entity, and there is a cross behavior identifier between two adjacent behavior sequences in the at least one behavior sequence.

[0014] In a possible implementation of the present application, the behavior information of each entity further includes behavior characteristics of the multiple behaviors, and the behavior characteristics are used to describe the behavior attributes and specific behaviors of the behaviors;

[0015] Based on the behavior information of the multiple entities, at least one entity relationship network is constructed, including:

[0016] According to the behavior characteristics of the multiple entities, the multiple entities are grouped to obtain at least one group of entities, each group of entities includes N entities, and the N entities belonging to the same group have the same behavior attributes, where N is an integer greater than 1;

[0017] For any group of entities in the at least one group of entities, establishing association relationships among entities in the any group of entities that have the same behavior according to the behavior characteristics of the any group of entities;

[0018] An entity relationship network of any group of entities is constructed by taking N entities in any group of entities as nodes and the established association relationships as edges to obtain the at least one entity relationship network.

[0019] In a possible implementation of the present application, when each edge in the entity relationship network of any group of entities has directionality, constructing the entity relationship network of any group of entities with N entities in the any group of entities as nodes and the established association relationships as edges includes:

[0020] For any first entity and second entity having an association relationship among the N entities in any group of entities, when the behavior execution time of the first entity is less than the behavior execution time of the second entity, determining that the direction of the edge between the first entity and the second entity is from the first entity to the second entity;

[0021] When the behavior execution time of the first entity is greater than the behavior execution time of the second entity, determining that the direction of the edge between the first entity and the second entity is from the second entity to the first entity;

[0022] Taking N entities in any group of entities as nodes, an entity relationship network of any group of entities is determined according to directed edges between all entities having association relationships in the determined N entities.

[0023] In a possible implementation of the present application, determining the joint feature of each entity in the multiple entities based on the static attribute information and at least one behavior sequence of the multiple entities, and the at least one entity relationship network includes:

[0024] Based on the at least one entity relationship network, determining a feature vector for each entity in the plurality of entities, the feature vector for each entity comprising a probability that each entity is adjacent to other entities on the at least one entity relationship network;

[0025] Determining basic features of each of the multiple entities based on static attribute information of the multiple entities, at least one behavior sequence, and the at least one entity relationship network;

[0026] The feature vector of each entity in the multiple entities is concatenated with the basic feature to obtain a joint feature of each entity in the multiple entities.

[0027] In a possible implementation of the present application, determining a feature vector of each entity in the plurality of entities based on the at least one entity relationship network includes:

[0028] For any entity relationship network in the at least one entity relationship network, randomly determining a plurality of different traversal paths on the any entity relationship network, wherein each entity in the any entity relationship network is traversed during the determination process;

[0029] Traversing the entities in each traversal path, and arranging the entities in each traversal path into an ordered sequence according to the traversal order, to obtain a plurality of random sequences corresponding to any entity relationship network;

[0030] Based on all random sequences corresponding to the at least one entity relationship network, a feature vector of each entity in the plurality of entities is determined.

[0031] In a possible implementation of the present application, determining a feature vector of each entity in the plurality of entities based on all random sequences corresponding to the at least one entity relationship network includes:

[0032] For any random sequence among all the random sequences, traverse each entity in the random sequence, and form entity pairs with other entities that are adjacent to the front and back and located in a window of a reference size, to obtain multiple entity pairs corresponding to the random sequence;

[0033] Inputting the entity pairs corresponding to all the random sequences into the network model for training;

[0034] When the reference training condition is reached, the training is stopped, and each entity is input into the trained network model, and the feature vector of each entity is output.

[0035] In a possible implementation of the present application, when each edge in the entity relationship network of any group of entities has directionality, determining the basic features of each entity in the multiple entities based on the static attribute information of the multiple entities, at least one behavior sequence, and the at least one entity relationship network includes:

[0036] Extracting at least one of the static attribute information of each entity from the static attribute information of the plurality of entities;

[0037] Based on at least one behavior sequence of each entity in the multiple entities, at least one of the frequency, ratio and support of each entity is counted, wherein the frequency refers to the total number of times a reference behavior of the entity appears in at least one behavior sequence of the entity, the ratio refers to the ratio between the frequency of the reference behavior of the entity and the total number of behaviors included in at least one behavior sequence of the entity, and the support refers to the ratio of the reference behavior sequence in at least one behavior sequence of the entity to the occurrence of at least one behavior sequence of the multiple entities;

[0038] Based on the at least one entity relationship network, extract at least one of the number of neighboring nodes, out-degree and in-degree of each entity in each entity relationship network;

[0039] Based on at least one of the static attribute information of each entity, at least one of the frequency, ratio and support, and at least one of the number of neighbor nodes, out-degree and in-degree, the basic feature of each entity is determined.

[0040] In a possible implementation of the present application, detecting abnormal data in the data to be processed according to the joint feature of each entity in the multiple entities includes:

[0041] For each feature in the joint feature, obtaining a feature value of each feature in the multiple entities; and determining a kurtosis value of each feature according to the obtained feature value;

[0042] Based on the kurtosis value of each feature, the lower quartile was determined;

[0043] For any feature in the joint features, when the kurtosis value of any feature is less than the lower quartile, delete the any feature from the joint features;

[0044] Based on the deleted joint features, abnormal data in the data to be processed is detected.

[0045] In another aspect, a device for detecting abnormal data is provided, the device comprising:

[0046] An acquisition module is used to acquire data to be processed, wherein the data to be processed includes behavior information and static attribute information of multiple entities, and the behavior information of each entity includes behavior identifiers and behavior execution times of multiple behaviors;

[0047] A first determination module, configured to determine at least one behavior sequence of each of the multiple entities based on the behavior information of the multiple entities, and to construct at least one entity relationship network, wherein each behavior sequence includes behavior identifiers of at least two behaviors of the multiple behaviors;

[0048] a second determination module, configured to determine a joint feature of each of the plurality of entities based on static attribute information and at least one behavior sequence of the plurality of entities, and the at least one entity relationship network;

[0049] The detection module is used to detect abnormal data in the data to be processed according to the joint features of each entity in the multiple entities.

[0050] In a possible implementation of the present application, the first determining module is used to:

[0051] For any entity among the multiple entities, sorting the behavior identifiers of the multiple behaviors of the any entity according to the behavior execution time of the multiple behaviors of the any entity and in the order in which the behaviors are executed;

[0052] In order from front to back, each adjacent M behavior identifiers in the sorted behavior identifiers are taken as a behavior sequence to obtain at least one behavior sequence of any entity, and there is a cross behavior identifier between two adjacent behavior sequences in the at least one behavior sequence.

[0053] In a possible implementation of the present application, the behavior information of each entity further includes behavior characteristics of the multiple behaviors, and the behavior characteristics are used to describe the behavior attributes and specific behaviors of the behaviors;

[0054] The first determining module is used for:

[0055] According to the behavior characteristics of the multiple entities, the multiple entities are grouped to obtain at least one group of entities, each group of entities includes N entities, and the N entities belonging to the same group have the same behavior attributes, where N is an integer greater than 1;

[0056] For any group of entities in the at least one group of entities, establishing an association relationship between entities in the any group of entities that have the same behavior according to the behavior characteristics of the any group of entities;

[0057] An entity relationship network of any group of entities is constructed by taking N entities in any group of entities as nodes and the established association relationships as edges to obtain the at least one entity relationship network.

[0058] In a possible implementation of the present application, when each edge in the entity relationship network of any group of entities has directionality, the first determining module is used to:

[0059] For any first entity and second entity having an association relationship among the N entities in any group of entities, when the behavior execution time of the first entity is less than the behavior execution time of the second entity, determining that the direction of the edge between the first entity and the second entity is from the first entity to the second entity;

[0060] When the behavior execution time of the first entity is greater than the behavior execution time of the second entity, determining that the direction of the edge between the first entity and the second entity is from the second entity to the first entity;

[0061] Taking N entities in any group of entities as nodes, an entity relationship network of any group of entities is determined according to directed edges between all entities having association relationships in the determined N entities.

[0062] In a possible implementation of the present application, the second determining module is used to:

[0063] Based on the at least one entity relationship network, determining a feature vector for each entity in the plurality of entities, the feature vector for each entity comprising a probability that each entity is adjacent to other entities on the at least one entity relationship network;

[0064] Determining basic features of each of the multiple entities based on static attribute information of the multiple entities, at least one behavior sequence, and the at least one entity relationship network;

[0065] The feature vector of each entity in the multiple entities is concatenated with the basic feature to obtain a joint feature of each entity in the multiple entities.

[0066] In a possible implementation of the present application, the second determining module is used to:

[0067] For any entity relationship network in the at least one entity relationship network, randomly determining a plurality of different traversal paths on the any entity relationship network, wherein each entity in the any entity relationship network is traversed during the determination process;

[0068] Traversing the entities in each traversal path, and arranging the entities in each traversal path into an ordered sequence according to the traversal order, to obtain a plurality of random sequences corresponding to any entity relationship network;

[0069] Based on all random sequences corresponding to the at least one entity relationship network, a feature vector of each entity in the plurality of entities is determined.

[0070] In a possible implementation of the present application, the second determining module is used to:

[0071] For any random sequence among all the random sequences, traverse each entity in the random sequence, and form entity pairs with other entities that are adjacent to the front and back and located in a window of a reference size, to obtain multiple entity pairs corresponding to the random sequence;

[0072] Inputting the entity pairs corresponding to all the random sequences into the network model for training;

[0073] When the reference training condition is reached, the training is stopped, and each entity is input into the trained network model, and the feature vector of each entity is output.

[0074] In a possible implementation of the present application, when each edge in the entity relationship network of any group of entities has directionality, the second determining module is used to:

[0075] Extracting at least one of the static attribute information of each entity from the static attribute information of the plurality of entities;

[0076] Based on at least one behavior sequence of each entity in the multiple entities, at least one of the frequency, ratio and support of each entity is counted, wherein the frequency refers to the total number of times a reference behavior of the entity appears in at least one behavior sequence of the entity, the ratio refers to the ratio between the frequency of the reference behavior of the entity and the total number of behaviors included in at least one behavior sequence of the entity, and the support refers to the ratio of the reference behavior sequence in at least one behavior sequence of the entity to the occurrence of at least one behavior sequence of the multiple entities;

[0077] Based on the at least one entity relationship network, extract at least one of the number of neighboring nodes, out-degree, and in-degree of each entity in each entity relationship network;

[0078] Based on at least one of the static attribute information of each entity, at least one of the frequency, ratio and support, and at least one of the number of neighbor nodes, out-degree and in-degree, the basic feature of each entity is determined.

[0079] In a possible implementation of the present application, the detection module is used to:

[0080] For each feature in the joint feature, obtaining a feature value of each feature in the multiple entities; and determining a kurtosis value of each feature according to the obtained feature value;

[0081] Based on the kurtosis value of each feature, the lower quartile was determined;

[0082] For any feature in the joint features, when the kurtosis value of any feature is less than the lower quartile, delete the any feature from the joint features;

[0083] Based on the deleted joint features, abnormal data in the data to be processed is detected.

[0084] In another aspect, a device is provided, the device comprising:

[0085] processor;

[0086] a memory for storing processor-executable instructions;

[0087] The processor is configured to implement the steps of any one of the methods described in the above aspect.

[0088] On the other hand, a computer-readable storage medium is provided, on which instructions are stored, and when the instructions are executed by a processor, the steps of any one of the methods described in the above aspect are implemented.

[0089] In another aspect, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to perform the steps of any one of the methods described in the above aspect.

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

[0091] The data to be processed is obtained, and the data to be processed includes the behavior information and static attribute information of multiple entities. In this way, based on the behavior information of the multiple entities, at least one behavior sequence of each entity in the multiple entities can be determined, and at least one entity relationship network can be constructed. The at least one behavior sequence of each entity includes the behavior identification and behavior execution time of the multiple behaviors of each entity, that is, the at least one behavior sequence of each entity can represent the association relationship between the different behaviors of each entity. In addition, the entity relationship network can represent the association relationship between the various entities. Afterwards, based on the static attribute information and at least one behavior sequence of the multiple entities, and at least one entity relationship network, the joint features of each entity in the multiple entities are determined, and the joint features of each entity can represent the association relationship between the data. In this way, according to the joint features of each entity in the multiple entities, the abnormal data in the data to be processed is detected, and the mutual relationship between the data is further mined, which solves the problem that only considering the basic features of the data in the prior art may lose part of the information, resulting in inaccurate detection results, thereby improving the accuracy of the detection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0093] Figure 1 is a flow chart of a method for detecting abnormal data according to an exemplary embodiment;

[0094] Figure 2 is a flow chart of a method for detecting abnormal data according to another exemplary embodiment;

[0095] Figure 3 A directed entity relationship network is shown according to an exemplary embodiment;

[0096] Figure 4 is an undirected entity relationship network shown according to an exemplary embodiment;

[0097] Figure 5 is a directed entity relationship network shown according to another exemplary embodiment;

[0098] Figure 6 is an undirected entity relationship network shown according to another exemplary embodiment;

[0099] Figure 7 is an isolated tree shown according to an exemplary embodiment;

[0100] Figure 8 is a schematic structural diagram of a device for detecting abnormal data according to an exemplary embodiment;

[0101] Fig. 9 It is a schematic structural diagram of a device according to an exemplary embodiment. DETAILED DESCRIPTION

[0102] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0103] First, the implementation environment involved in the embodiments of the present application is described.

[0104] The method for detecting abnormal data provided in the embodiment of the present application can be executed by a device. The device can obtain the data to be processed, and based on the behavior information and static attribute information of the multiple entities included in the data to be processed, determine at least one behavior sequence of each entity in the multiple entities, and construct at least one entity relationship network, based on the static attribute information of the multiple entities and at least one behavior sequence, and at least one entity relationship network, determine the joint features of each entity in the multiple entities, and then detect abnormal data in the data to be processed according to the joint features. As an example, the device can be a terminal or a server, which is not limited in the embodiment of the present application.

[0105] Figure 1 The following is a flow chart of a method for detecting abnormal data according to an exemplary embodiment. The method is described by taking the method applied in the above implementation environment as an example. The method may include the following implementation steps:

[0106] Step 101: Obtain data to be processed, where the data to be processed includes behavior information and static attribute information of multiple entities, and the behavior information of each entity includes behavior identifiers and behavior execution time of multiple behaviors.

[0107] Among them, static attribute information may include some information that is relatively difficult to change. For example, static attribute information may include but is not limited to place of origin, height, and weight, which is not limited in the embodiments of the present application.

[0108] The behavior identifier can be used to uniquely indicate a behavior, and the behavior execution time can be used to indicate the time when a behavior occurs.

[0109] In some embodiments, due to some reasons, there may be some abnormal data in the database. In order to detect the abnormal data, it is usually necessary to obtain some data in the database as the data to be processed, and the data to be processed may include relevant data of multiple entities. When the relevant data of the multiple entities are stored in the database, the entity identifier of each entity and the relevant data of each entity can be stored correspondingly according to the entity identifier of each entity.

[0110] As an example, when obtaining data to be processed, the entity identifier of each entity in the multiple entities can be obtained, and according to the entity identifier of each entity in the multiple entities, the relevant data corresponding to each entity in the multiple entities can be obtained from the database, and these data can be used as the data to be processed. The entity identifier is used to uniquely indicate an entity.

[0111] That is, when obtaining the data to be processed, relevant data corresponding to the entity identifier of each entity in the multiple entities can be obtained from the database according to the entity identifier of each entity in the multiple entities, and these data are used as the data to be processed.

[0112] Furthermore, if Figure 2 As shown, after obtaining the data to be processed, the data to be processed can also be preprocessed. That is, after obtaining the data to be processed, the data to be processed can be cleaned to remove abnormal values ​​in the data to be processed, fill in missing values ​​in the data to be processed, etc.

[0113] For example, suppose that the data of entity 1 includes the behavior information of taking a flight, but in reality, entity 1 did not take a flight, and the behavior information of taking a flight can be removed. Suppose that the data of entity 1 lacks the data of height, the height of other entities with the same gender and similar age as entity 1 can be determined based on the gender and age of entity 1, and the average height of other entities can be supplemented as the height data of entity 1.

[0114] Furthermore, after obtaining the data to be processed, the static attribute information of multiple entities can also be binned. For example, multiple entities can be grouped according to age, and entities aged 20 to 40 can be grouped into one group, entities aged 41 to 60 can be grouped into one group, and entities aged 61 to 80 can be grouped into one group. In the subsequent isolation forest model, if the age feature is selected, grouping can be performed according to this group.

[0115] Step 102: Based on the behavior information of the multiple entities, at least one behavior sequence of each entity in the multiple entities is determined, where each behavior sequence includes behavior identifiers of at least two behaviors in the multiple behaviors.

[0116] That is, for any entity among the multiple entities, based on the behavior information of the any entity, at least one behavior sequence of the any entity can be determined, and each behavior sequence includes at least two behavior identifiers among the multiple behaviors of the any entity.

[0117] As an example, for any entity among multiple entities, the behavior identifiers of multiple behaviors of any entity can be sorted according to the behavior execution time of the multiple behaviors of any entity and the order in which the behaviors are executed. In the order from front to back, each adjacent M behavior identifiers in the sorted behavior identifiers can be taken as a behavior sequence to obtain at least one behavior sequence of any entity, and there is a cross behavior identifier between two adjacent behavior sequences in the at least one behavior sequence. Wherein, M is an integer greater than 1 and can be set according to business needs.

[0118] That is to say, since the behavior information of each entity includes behavior identifiers and behavior execution times of multiple behaviors, for any entity among the multiple entities, the behavior identifiers of the multiple behaviors of any entity can be sorted according to the behavior execution times of the multiple behaviors of the any entity and in the order of the behavior execution times of the multiple behaviors. According to the order of the behavior identifiers from front to back, each of the M adjacent behavior identifiers in the sorted behavior identifiers is determined as a behavior sequence, and at least one behavior sequence of any entity can be obtained. In the at least one behavior sequence, in two adjacent behavior sequences, the first behavior identifier of the latter behavior sequence can be the last behavior identifier of the former behavior sequence.

[0119] Exemplarily, assume that any one of multiple entities includes 5 behaviors, and the behavior identifiers of these 5 behaviors are A, B, C, D, and E, respectively. The behavior execution time of behavior A is 8:00, the behavior execution time of behavior B is 9:20, the behavior execution time of behavior C is 12:00, the behavior execution time of behavior D is 16:00, and the behavior execution time of behavior E is 21:00. According to the order of the behavior execution time, the behavior identifiers of the multiple behaviors of any entity can be sorted as ABCDE. Assuming M is 2, the behavior sequence of any entity can be AB, BC, CD, and DE. Assuming M is 3, the behavior sequence of any entity can be ABC and CDE.

[0120] Step 103: Construct at least one entity relationship network based on the behavior information of multiple entities.

[0121] The behavior information of each entity also includes behavior characteristics of multiple behaviors, which are used to describe the behavior attributes and specific behaviors of the behaviors. For example, assuming that the behavior attribute is taking a plane, the specific behavior may be taking a model A plane. For another example, assuming that the behavior attribute is making a phone call, the specific behavior may be making a phone call to user C.

[0122] In order to better mine the mutual relationship between data, the association relationship between multiple entities can be mined, that is, a relationship network between multiple entities can be established. In some embodiments, based on the behavior information of multiple entities, building at least one entity relationship network can include the following steps:

[0123] (1) According to the behavior characteristics of the multiple entities, the multiple entities are grouped to obtain at least one group of entities, each group of entities includes N entities, and the behavior attributes of the N entities belonging to the same group are the same, where N is an integer greater than 1.

[0124] That is, multiple entities are grouped according to their behavioral attributes, and N entities with the same behavioral attributes are grouped into one group.

[0125] For example, entity 1 and entity 2 took a plane in the morning, entity 3 and entity 4 took a plane in the afternoon, and entity 5 called entity 1 in the evening. It can be seen that the behavior attributes of entity 1, entity 2, entity 3 and entity 4 are all taking a plane, while the behavior attribute of entity 5 is making a phone call. Therefore, entity 1, entity 2, entity 3 and entity 4 can be grouped together.

[0126] (2) For any group of entities in at least one group of entities, based on the behavior characteristics of any group of entities, an association relationship is established between entities in any group of entities that have the same behavior.

[0127] That is to say, for any group of entities in at least one group of entities, determine the specific behavior of each entity in the group of entities. Since some entities in the group of entities may perform the same specific behavior, it can be considered that there is an association relationship between the entities that perform the same specific behavior, and the entities in the group of entities with the same specific behavior can be established with an association relationship.

[0128] For example, assuming that entity 1, entity 2, entity 3 and entity 4 are a group, for specific behavior, assuming that entity 1 and entity 2 take the same flight model A in the morning, entity 2 and entity 3 take the same flight model B in the afternoon, and entity 1 and entity 4 take the same flight model C in the afternoon, an association relationship can be established between entity 1 and entity 2, an association relationship can be established between entity 2 and entity 3, and an association relationship can be established between entity 1 and entity 4.

[0129] (3) Using N entities in any group of entities as nodes and the established association relationships as edges, an entity relationship network of any group of entities is constructed to obtain at least one entity relationship network.

[0130] In some embodiments, when constructing an entity relationship network, an undirected entity relationship network or a directed entity relationship network can be established. For a directed entity relationship network, the direction of the edge in the entity relationship network can be determined according to the behavior execution time of the entity, thereby obtaining a directed entity relationship network.

[0131] As an example, when each edge in the entity relationship network of any group of entities has directionality, for any first entity and second entity with an associated relationship among the N entities of any group of entities, when the behavior execution time of the first entity is less than the behavior execution time of the second entity, the direction of the edge between the first entity and the second entity is determined to be from the first entity to the second entity; when the behavior execution time of the first entity is greater than the behavior execution time of the second entity, the direction of the edge between the first entity and the second entity is determined to be from the second entity to the first entity; with the N entities in any group of entities as nodes, the entity relationship network of any group of entities is determined according to the directed edges between all entities with an associated relationship among the determined N entities.

[0132] That is to say, when it is necessary to establish a directed entity relationship network, the behavior execution time of the first entity and the behavior execution time of the second entity can be compared according to any first entity and second entity that have established an association relationship in any group of entities, and the direction of the edge between the first entity and the second entity can be determined according to the order of the behavior execution time, that is, the direction of the edge between the first entity and the second entity is always from the entity with the earlier behavior execution time to the entity with the later behavior execution time, or from the entity with the smaller behavior execution time to the entity with the larger behavior execution time. After determining the direction of the edge, the entities that have established an association relationship can be connected with directed edges using N entities in any group of entities as nodes, and the directed entity relationship network of any group of entities can be obtained.

[0133] For example, see Figure 3, entity 1, entity 2, entity 3 and entity 4 are a group. Entity 1 and entity 2 take the same flight model A in the morning. Assume that entity 1 boards at 8:12 am and entity 2 boards at 8:20 am. Entity 2 and entity 3 take the same flight model B in the afternoon. Assume that entity 2 boards at 18:51 pm and entity 3 boards at 18:45 pm. Entity 1 and entity 4 take the same flight model C in the afternoon. Assume that entity 1 boards at 17:25 pm and entity 4 boards at 17:28 pm. Entity 1 and entity 2 have established an association relationship, and the behavior execution time of entity 1 is less than the behavior execution time of entity 2. It can be determined that entity The edge between entity 1 and entity 2 is directed from entity 1 to entity 2, entity 2 and entity 3 have established an association relationship, and the behavior execution time of entity 2 is greater than the behavior execution time of entity 3. It can be determined that the edge between entity 2 and entity 3 is directed from entity 3 to entity 2, entity 1 and entity 4 have established an association relationship, and the behavior execution time of entity 1 is less than the behavior execution time of entity 4. It can be determined that the edge between entity 1 and entity 4 is directed from entity 1 to entity 4. After determining the direction of each edge, take entity 1, entity 2, entity 3 and entity 4 as nodes, and use each directed edge to connect the entities that establish an association relationship, so as to obtain a directed entity relationship network.

[0134] It should be noted that the above description is based on the example of establishing a directed entity relationship network. In practice, an undirected entity relationship network may also be established. Next, the process of establishing an undirected entity relationship network will be described.

[0135] As an example, when each edge in the entity relationship network of any group of entities has no directionality, the entity relationship network of any group of entities can be constructed with N entities in any group of entities as nodes and the association relationships established between the entities as edges, and at least one undirected entity relationship network can be obtained.

[0136] For example, see Figure 4 , entity 1, entity 2, entity 3 and entity 4 are a group, entity 1 and entity 2 establish an association relationship, entity 2 and entity 3 establish an association relationship, and entity 1 and entity 4 establish an association relationship. Entity 1, entity 2, entity 3 and entity 4 can be used as nodes, and the association relationships established between the entities can be used as edges, that is, entity 1 and entity 2 are connected by an edge, entity 2 and entity 3 are connected by an edge, and entity 1 and entity 4 are connected by an edge. An undirected entity relationship network can be established.

[0137] It should be noted that the above steps 102 to 103 are used to implement operations of determining at least one behavior sequence of each entity in the multiple entities based on the behavior information of the multiple entities, and constructing at least one entity relationship network.

[0138] Step 104: Based on at least one entity relationship network, determine a feature vector for each entity in the plurality of entities, wherein the feature vector for each entity includes a probability that each entity is adjacent to other entities on the at least one entity relationship network.

[0139] As an example, for any entity relationship network in at least one entity relationship network, a network embedding learning method may be used to determine a feature vector of each entity in a plurality of entities on any entity relationship network.

[0140] In some embodiments, based on at least one entity relationship network, determining a feature vector of each entity in the plurality of entities may include the following steps:

[0141] (1) For any entity relationship network in at least one entity relationship network, a plurality of different traversal paths are randomly determined on any entity relationship network, and each entity in any entity relationship network is traversed during the determination process.

[0142] As an example, for any entity relationship network in at least one entity relationship network, an entity can be randomly determined from the entity relationship network as the starting entity of the traversal path, and a random walk can be performed in the entity relationship network starting from the entity. Since the starting entity selected each time may be different, the random walk method may also be different, so multiple random walk traversal paths can be obtained, that is, multiple different traversal paths are randomly determined.

[0143] Exemplarily, assuming that any entity relationship network includes entity 1, entity 2, entity 3, entity 4, entity 5 and entity 6, assuming that a random walk starts from entity 1, the determined traversal path includes entity 1, entity 2, entity 3, entity 4 and entity 5; assuming that a random walk starts from entity 3, the determined traversal path includes entity 1, entity 3, entity 4, entity 5 and entity 6; assuming that a random walk starts from entity 6, the determined traversal path includes entity 6, entity 5, entity 4, entity 2 and entity 1.

[0144] (2) Traverse the entities in each traversal path, and organize the entities in each traversal path into an ordered sequence according to the traversal order, so as to obtain multiple random sequences corresponding to any entity relationship network.

[0145] That is to say, when a plurality of different traversal paths are randomly determined, any one of the plurality of different traversal paths may include a plurality of entities, and the entities in the traversal path can be traversed according to the order of random walk of any traversal path, and the entities in the traversal path can be sorted in the order of traversal to form an ordered sequence.

[0146] Exemplarily, assuming that any traversal path includes entity 1, entity 3, entity 4, entity 5 and entity 6, the random walk order of the traversal path is entity 1, entity 3, entity 5, entity 6 and entity 4. By traversing the multiple entities according to the random walk order and sorting the multiple entities, an ordered sequence entity 1-entity 3-entity 5-entity 6-entity 4 can be obtained.

[0147] (3) Determine a feature vector of each entity in the plurality of entities based on all random sequences corresponding to at least one entity relationship network.

[0148] That is to say, based on all random sequences corresponding to at least one entity relationship network, each random sequence in all random sequences includes multiple entities, that is, each random sequence can represent the association relationship between multiple entities, and the association relationship between each entity in the multiple entities and other entities can be determined as a feature vector of each entity in the multiple entities.

[0149] In some embodiments, based on all random sequences corresponding to at least one entity relationship network, determining the feature vector of each entity in a plurality of entities includes: for any random sequence among all random sequences, traversing each entity in any random sequence, forming an entity pair with other entities that are adjacent to the front and back and located within a window of a reference size, so as to obtain multiple entity pairs corresponding to any random sequence; inputting the entity pairs corresponding to all random sequences into a network model for training; when the reference training condition is reached, stopping the training, and inputting each entity into the trained network model, so as to output the feature vector of each entity.

[0150] The reference size can be set according to business needs, for example, the reference size can be set to 2, 3, etc. When the reference size is set to 2, it means that two entities in front of the entity and two entities behind the entity can be included in the window of the reference size.

[0151] The reference training condition can be set according to actual needs, for example, the difference between the predicted value and the actual value of the network model can be less than the difference threshold or the number of training times of the network model reaches the training times threshold. The difference threshold and the training times threshold can be set according to actual needs.

[0152] That is to say, for any random sequence among all random sequences, traverse each entity in any random sequence, determine the reference size of the window, and then determine the other entities in the window corresponding to each entity. The other entities in the window corresponding to each entity are respectively combined with each entity to form entity pairs, and multiple entity pairs of any random sequence can be obtained. Similarly, multiple entity pairs of all random sequences are obtained, and the multiple entity pairs of all random sequences are input into the network model for training. When the reference training condition is reached, the training is stopped, and each entity is input into the trained network model. The probability of each entity being adjacent to other entities can be output, that is, the feature vector of each entity can be obtained.

[0153] For example, assuming that any random sequence is entity 1-entity 3-entity 5-entity 6-entity 4, and the reference size of the window is 2, each entity in the random sequence is traversed. For example, when traversing to entity 5, the window before entity 5 includes entity 1 and entity 3, and the window after entity 5 includes entity 6 and entity 4, so that entity pair I is entity 5 and entity 1, entity pair II is entity 5 and entity 3, entity pair III is entity 5 and entity 6, and entity pair IV is entity 5 and entity 4; for entity 3, the window before entity 3 includes entity 1, and the window after entity 3 includes entity 5 and entity 6, so that entity pair I is entity 3 and entity 1, entity pair II is entity 3 and entity 5, and entity pair III is entity 3 and entity 6; for entity 1, the window before entity 1 is empty, and the window after entity 1 includes entity 3 and entity 5, so that entity pair I is entity 1 and entity 3, and entity pair II is entity 1 and entity 5. By performing the above operations on all random sequences, multiple entity pairs of all random sequences can be obtained, and the multiple entity pairs are input into the network model for training.

[0154] As an example, before starting training, the parameters of the network model can be randomly initialized. During the training process, the entity pairs corresponding to all random sequences are input into the network model. The network model can continuously predict the probability of each entity being adjacent to other entities. According to the difference between the predicted value and the actual value, the parameters of the network model can be adjusted until the reference training conditions are met. The training can be stopped, and each entity can be input into the trained network model to obtain the feature vector of each entity.

[0155] As an example, the difference between the predicted value of the network model and the actual value can be calculated by the following formula (1).

[0156]

[0157] Among them, V represents the set of nodes in the network, f represents mapping nodes to feature space, and S represents the strategy of randomly determining paths.

[0158] As an example, the parameters of the network model can be adjusted according to the calculation result of formula (1) so that the prediction of the network model develops in a direction closer to the actual situation.

[0159] For example, after training the network model, when entity 1 is input, it can be obtained that the probability of entity 1 being adjacent to entity 2 is 0.3, the probability of being adjacent to entity 3 is 0.15, the probability of being adjacent to entity 4 is 0.5, and the probability of being adjacent to entity 5 is 0.05, that is, the feature vector of entity 1 is (0.3, 0.15, 0.5, 0.05).

[0160] Step 105: Determine basic features of each entity in the multiple entities based on static attribute information of the multiple entities, at least one behavior sequence, and at least one entity relationship network.

[0161] As an example, based on the static attribute information of the multiple entities, at least one behavior sequence, and at least one entity relationship network, determining the basic features of each of the multiple entities may include the following steps:

[0162] (1) From static attribute information of a plurality of entities, at least one of the static attribute information of each entity is extracted.

[0163] For example, assuming that the static attribute information of any entity includes native place, height, weight and age, the static attribute information of height can be extracted, or both the static attribute information of native place and height can be extracted.

[0164] (2) Based on at least one behavior sequence of each entity among the multiple entities, at least one of the frequency, ratio and support of each entity is counted, where the frequency refers to the total number of times the reference behavior of the entity appears in at least one behavior sequence of the entity, the ratio refers to the ratio between the frequency of the reference behavior of the entity and the total number of behaviors included in at least one behavior sequence of the entity, and the support refers to the ratio of the reference behavior sequence in at least one behavior sequence of the entity to the occurrence of at least one behavior sequence of the multiple entities.

[0165] Among them, the reference behavior and reference behavior sequence can be set according to business needs.

[0166] That is to say, based on at least one behavior sequence of each entity among the multiple entities, for any entity among the multiple entities, to determine the reference behavior, the total number of times the reference behavior appears in at least one behavior sequence of any entity and the ratio of the frequency of the reference behavior to the total number of behaviors included in at least one behavior sequence of any entity can be counted to determine the reference behavior sequence. The ratio of the reference behavior sequence appearing in at least one behavior sequence of the multiple entities can be counted.

[0167] Exemplarily, assuming that the behavior sequence of entity 1 is ABCAD, if the behavior identifier of the reference behavior is determined to be A, the frequency of entity 1 can be obtained to be 2, and the ratio of entity 1 is 0.4. If the behavior identifier of the reference behavior is determined to be C, the frequency of entity 1 can be obtained to be 1, and the ratio of entity 1 is 0.2. Assuming that the behavior sequence of entity 1 is AB and BC, the behavior sequence of entity 2 is BC and CD, and the behavior sequence of entity 3 is CD, if the reference behavior sequence is determined to be AB, the support of entity 1 can be obtained to be 0.2, and the support of entity 2 and entity 3 can be obtained to be 0. If the reference behavior sequence is determined to be CD, the support of entity 1 can be obtained to be 0, the support of entity 2 can be obtained to be 0.4, and the support of entity 3 can be obtained to be 0.4.

[0168] (3) Based on at least one entity relationship network, extract at least one of the number of neighboring nodes, out-degree and in-degree of each entity in each entity relationship network.

[0169] Among them, the out-degree can represent the number of edges pointing from the entity to other entities, and the in-degree can represent the number of edges pointing from other entities to the entity.

[0170] As an example, based on any entity relationship network in at least one entity relationship network, when each edge in the any entity relationship network has directionality, at least one of the number of neighboring nodes, out-degree and in-degree of each entity in each entity relationship network can be extracted.

[0171] For example, when each edge in the entity relationship network has directionality, see Figure 5 ,Depend on Figure 5 It can be seen that the entity relationship network includes entity 1, entity 2, entity 3 and entity 4, and there is an edge between entity 1 and entity 2, an edge between entity 2 and entity 3, an edge between entity 2 and entity 4, an edge between entity 1 and entity 3, and an edge between entity 4 and entity 3. The direction of the edge between entity 1 and entity 2 is from entity 1 to entity 2, the direction of the edge between entity 2 and entity 3 is from entity 2 to entity 3, the direction of the edge between entity 2 and entity 4 is from entity 2 to entity 4, the direction of the edge between entity 1 and entity 3 is from entity 3 to entity 1, and the direction of the edge between entity 4 and entity 3 is from entity 3 to entity 4. It can be determined that the out-degree of entity 1 is 1 and the in-degree is 1, the out-degree of entity 2 is 2 and the in-degree is 1, the out-degree of entity 3 is 2 and the in-degree is 1, the out-degree of entity 4 is 0 and the in-degree is 2.

[0172] As an example, based on any entity relationship network in at least one entity relationship network, when each edge in the any entity relationship network has no directionality, the number of neighboring nodes of each entity in each entity relationship network may be extracted.

[0173] For example, when each edge in the entity relationship network has no directionality, see Figure 6 ,Depend on Figure 6 It can be seen that the entity relationship network includes entity 1, entity 2, entity 3 and entity 4, and there is an edge between entity 1 and entity 2, an edge between entity 2 and entity 3, an edge between entity 2 and entity 4, an edge between entity 1 and entity 3, and an edge between entity 4 and entity 3. It can be determined that the number of neighbor nodes of entity 1 is 2, the number of neighbor nodes of entity 2 is 3, the number of neighbor nodes of entity 3 is 3, and the number of neighbor nodes of entity 4 is 2.

[0174] (4) Determine the basic features of each entity based on at least one of the static attribute information of each entity, at least one of the frequency, ratio and support, and at least one of the number of neighboring nodes, out-degree and in-degree.

[0175] Exemplarily, assuming that the height, frequency of the entity and the number of neighboring nodes of the entity are extracted from the static attribute information of any entity, the height, frequency and number of neighboring nodes can be determined as the basic features of the any entity.

[0176] Step 106: concatenate the feature vector of each entity in the multiple entities with the basic feature to obtain a joint feature of each entity in the multiple entities.

[0177] In other words, the feature vectors and basic features belonging to the same entity are concatenated together to obtain the joint features of the entity.

[0178] Exemplarily, assume that the feature vector of entity 1 is (0.2, 0.1, 0.4, 0.3), that is, the probability that entity 1 is adjacent to entity 2 is 0.2, the probability that entity 1 is adjacent to entity 3 is 0.1, the probability that entity 1 is adjacent to entity 4 is 0.4, and the probability that entity 1 is adjacent to entity 5 is 0.3. The basic features of entity 1 include that the frequency of entity 1 is 2, the height of entity 1 is 187, and the out-degree of entity 1 is 2; the seven features can be spliced ​​together to obtain the joint features of entity 1, which include being adjacent to entity 2, adjacent to entity 3, adjacent to entity 4, adjacent to entity 5, frequency, height and out-degree.

[0179] As an example, the feature vector and the basic features can be sorted, and the sorted features can be determined as the joint features of the entity. For example, according to the above example, the height can be used as feature 1, the frequency can be used as feature 2, the out-degree can be used as feature 3, the adjacency to entity 2 can be used as feature 4, the adjacency to entity 3 can be used as feature 5, the adjacency to entity 4 can be used as feature 6, and the adjacency to entity 5 can be used as feature 7.

[0180] It should be noted that the above steps 104 to 106 are used to implement an operation of determining a joint feature of each entity in a plurality of entities based on static attribute information of the plurality of entities and at least one behavior sequence and at least one entity relationship network.

[0181] Step 107: Detect abnormal data in the data to be processed according to the joint features of each entity in the multiple entities.

[0182] That is, based on the joint features of each entity in the multiple entities, abnormal data in the data to be processed is detected according to the data corresponding to the joint features of each entity.

[0183] As an example, before detecting abnormal data in the data to be processed, the joint features can be selected by the kurtosis test method to remove redundant features to improve the accuracy of the detection algorithm and thus improve the accuracy of the detection results.

[0184] In some embodiments, selecting joint features by using the kurtosis test method may include the following steps:

[0185] (1) For each feature in the joint feature, obtain the feature value of each feature in multiple entities; and determine the kurtosis value of each feature based on the obtained feature value.

[0186] As an example, the kurtosis value of each feature can be calculated by the following formula (2).

[0187]

[0188] Among them, Kurt (X i ) represents the kurtosis value of any feature, μ represents the mean of any feature, σ represents the standard deviation of any feature, X i represents the eigenvalue of any feature of the i-th entity, and E represents the mathematical expectation of i values.

[0189] Exemplarily, based on the eigenvalue of feature 1 in each entity, the mean of feature 1 can be calculated, and then the standard deviation of feature 1 can be calculated. Substituting the mean, standard deviation and the eigenvalue of feature 1 in each entity into the above formula, the kurtosis value of feature 1 can be obtained.

[0190] (2) Determine the lower quartile based on the kurtosis value of each feature.

[0191] Among them, when calculating the lower quartile, all values ​​can be arranged in ascending order, and the position at 25% is determined as the position of the lower quartile. If there is a value at this position, the value is determined as the lower quartile; if there is no value at this position, the lower quartile is determined based on the previous and next values ​​of the position, and the lower quartile can be represented by ε.

[0192] As an example, the position of the lower quartile can be calculated by the following formula (3).

[0193] Q 1 =(n+1)×0.25 (3)

[0194] Among them, Q 1 represents the position of the lower quartile, and n represents the number of kurtosis values.

[0195] Exemplarily, assuming that the number of kurtosis values ​​is 11, and the kurtosis values ​​of each feature are in order: 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49, it can be calculated that the position of the lower quartile is 3, and there is a value at this position, so the lower quartile ε is 15; assuming that the number of kurtosis values ​​is 6, and the kurtosis values ​​of each feature are in order: 7, 15, 36, 39, 40, 41, it can be calculated that the position of the lower quartile is 1.75, and there is no value at this position, indicating that the lower quartile is located between the first kurtosis value and the second kurtosis value, and the lower quartile ε is 15×0.75+7×0.25=13.

[0196] (3) For any feature in the joint features, when the kurtosis value of any feature is less than the lower quartile, delete any feature from the joint features.

[0197] That is, traverse all features in the joint feature, such as Figure 2 As shown in the figure, when the kurtosis value of any feature is less than the lower quartile, it means that the feature has little significance for the abnormal data detection result and can be ignored, so the feature can be deleted.

[0198] For example, assuming that there are 6 features in the joint features, the kurtosis value of feature 1 is 15, the kurtosis value of feature 2 is 40, the kurtosis value of feature 3 is 7, the kurtosis value of feature 4 is 39, the kurtosis value of feature 5 is 41, the kurtosis value of feature 6 is 36, and the lower quartile is 13, it can be determined that the kurtosis value of feature 3 is less than the lower quartile, and feature 3 is deleted from the joint features.

[0199] (4) Detect abnormal data in the data to be processed based on the deleted joint features.

[0200] That is to say, after traversing all the features in the joint features, abnormal data in the data to be processed is detected based on the remaining joint features.

[0201] As an example, the abnormal data in the processed data can be detected by establishing an isolation forest model. The method includes: establishing multiple isolated trees based on the deleted joint features, calculating the value of the path from each entity to the root node in any of the multiple isolated trees based on any of the isolated trees, and then calculating the average value of the path from each entity to the root node, using the average value as the abnormal score, sorting each entity from small to large according to the abnormal score, and determining that the data of the top K entities are abnormal data. Wherein, K is an integer greater than or equal to 1, which can be set according to business needs.

[0202] As an example, when establishing an isolated tree, Q entities can be randomly selected from multiple entities as the root nodes of the isolated tree, a feature can be randomly selected from the joint features, the feature values ​​corresponding to the Q entities can be obtained, and a feature value can be randomly selected from the Q feature values ​​as the feature value threshold. Entities with feature values ​​greater than or equal to the feature value threshold can be grouped together, and entities with feature values ​​less than the feature value threshold can be grouped together. The child nodes are divided according to the above process until the height threshold of the isolated tree is reached, and the next isolated tree is established, and the entities are divided according to the same method. Among them, Q is an integer greater than 1, the height threshold can be set by yourself, and the number of isolated trees can also be set by yourself.

[0203] For example, see Figure 7 ,Should Figure 7 It is an isolated tree. As can be seen from the figure, randomly select entity 1, entity 2, entity 3 and entity 4 as the root node of the isolated tree. Assuming that the frequency of each entity is selected, the frequency of entity 1 is 2, the frequency of entity 2 is 3, the frequency of entity 3 is 1, and the frequency of entity 4 is 2, and 2 is randomly selected as the characteristic value threshold, it can be determined that entity 1, entity 2 and entity 4 are one group, and entity 3 is one group; continue to divide the group of entity 1, entity 2 and entity 4, assuming that the out-degree of each entity is selected, the out-degree of entity 1 is 5, the out-degree of entity 2 is 0, and the out-degree of entity 4 is 3, and 3 is randomly selected as the characteristic value threshold, it can be determined that entity 1 and entity 4 are one group, and entity 2 is one group; continue to divide entity 1 and entity 4, assuming that the ratio of each entity is selected, the ratio of entity 1 is 0.2, and the ratio of entity 4 is 0.4, and 0.4 is randomly selected as the characteristic value threshold, it can be determined that entity 1 is one group, and entity 4 is one group.

[0204] As an example, after establishing multiple isolated trees, the value of the path from each entity to the root node in any isolated tree is calculated. Based on the values ​​of multiple paths from any entity to the root node in each entity, the average value of the path from each entity to the root node can be obtained. The average value is used as the anomaly score, and each entity is sorted from small to large according to the anomaly score. The data of the top K entities can be determined as abnormal data.

[0205] For example, see Figure 7 ,exist Figure 7 In the isolated tree, the value of the path of entity 1 is 3, the value of the path of entity 2 is 2, the value of the path of entity 3 is 1, and the value of the path of entity 4 is 3. In this way, the value of the path of each entity in other isolated trees can be determined.

[0206] For example, assuming that there are 4 isolated trees, the path value of entity 1 in isolated tree 1 is 3, the path value in isolated tree 2 is 4, the path value in isolated tree 3 is 1, and the path value in isolated tree 4 is 4. It can be determined that the average value of the path from entity 1 to the root node is (3+4+1+4)÷4=3; the path value of entity 2 in isolated tree 1 is 6, the path value in isolated tree 2 is 4, the path value in isolated tree 3 is 3, and the path value in isolated tree 4 is 3. It can be determined that the average value of the path from entity 2 to the root node is (6+4+3+ 3)÷4=4; The path value of entity 3 in isolated tree 1 is 1, the path value in isolated tree 2 is 2, the path value in isolated tree 3 is 3, and the path value in isolated tree 4 is 2. It can be determined that the average value of the path from entity 3 to the root node is (1+2+3+2)÷4=2; The path value of entity 4 in isolated tree 1 is 5, the path value in isolated tree 2 is 6, the path value in isolated tree 3 is 7, and the path value in isolated tree 4 is 6. It can be determined that the average value of the path from entity 4 to the root node is (5+6+7+6)÷4=6. Entity 1, entity 2, entity 3 and entity 4 are sorted from small to large according to the abnormal value, and the order is entity 3, entity 1, entity 2 and entity 4. In this way, assuming K is 1, it can be determined that the data of entity 3 is abnormal data.

[0207] In an embodiment of the present application, data to be processed is obtained, and the data to be processed includes behavior information and static attribute information of multiple entities. In this way, based on the behavior information of the multiple entities, at least one behavior sequence of each entity in the multiple entities can be determined, and at least one entity relationship network can be constructed. The at least one behavior sequence of each entity includes the behavior identifiers and behavior execution times of the multiple behaviors of each entity, that is, the at least one behavior sequence of each entity can represent the association relationship between the different behaviors of each entity. In addition, the entity relationship network can represent the association relationship between the various entities. Afterwards, based on the static attribute information and at least one behavior sequence of the multiple entities, and at least one entity relationship network, the joint features of each entity in the multiple entities are determined, and the joint features of each entity can represent the association relationship between the data. In this way, according to the joint features of each entity in the multiple entities, the abnormal data in the data to be processed is detected, and the mutual relationship between the data is further mined, which solves the problem that only the basic features of the data in the prior art may lose part of the information, resulting in inaccurate detection results, thereby improving the accuracy of the detection results.

[0208] Figure 8 is a schematic diagram of a structure of an abnormal data detection device according to an exemplary embodiment. The device can be implemented by software, hardware or a combination of both. Figure 8 , the device may include: an acquisition module 801, a first determination module 802, a second determination module 803 and a detection module 804.

[0209] The acquisition module 801 is used to acquire the data to be processed, where the data to be processed includes behavior information and static attribute information of multiple entities, and the behavior information of each entity includes behavior identifiers and behavior execution time of multiple behaviors;

[0210] A first determination module 802 is used to determine at least one behavior sequence of each entity in the multiple entities based on the behavior information of the multiple entities, and to construct at least one entity relationship network, wherein each behavior sequence includes behavior identifiers of at least two behaviors in the multiple behaviors;

[0211] A second determination module 803, configured to determine a joint feature of each entity in the plurality of entities based on static attribute information of the plurality of entities and at least one behavior sequence and at least one entity relationship network;

[0212] The detection module 804 is used to detect abnormal data in the data to be processed according to the joint features of each entity in the multiple entities.

[0213] In a possible implementation of the present application, the first determining module 802 is used to:

[0214] For any entity among the multiple entities, the behavior identifiers of the multiple behaviors of any entity are sorted according to the behavior execution time of the multiple behaviors of any entity and the order in which the behaviors are executed;

[0215] In order from front to back, each adjacent M behavior identifiers in the sorted behavior identifiers are taken as a behavior sequence to obtain at least one behavior sequence of any entity, and there is an intersecting behavior identifier between two adjacent behavior sequences in at least one behavior sequence.

[0216] In a possible implementation of the present application, the behavior information of each entity also includes behavior characteristics of multiple behaviors, and the behavior characteristics are used to describe the behavior attributes and specific behaviors of the behaviors;

[0217] The first determining module 802 is used for:

[0218] According to the behavior characteristics of the multiple entities, the multiple entities are grouped to obtain at least one group of entities, each group of entities includes N entities, and the behavior attributes of the N entities belonging to the same group are the same, where N is an integer greater than 1;

[0219] For any group of entities in at least one group of entities, establishing association relationships among entities in any group of entities that have the same behavior according to the behavior characteristics of the entities in the group of entities;

[0220] An entity relationship network of any group of entities is constructed by taking N entities in any group of entities as nodes and the established association relationships as edges, and obtaining at least one entity relationship network.

[0221] In a possible implementation of the present application, when each edge in the entity relationship network of any group of entities has directionality, the first determining module 802 is used to:

[0222] For any first entity and second entity having an association relationship among N entities in any group of entities, when the behavior execution time of the first entity is less than the behavior execution time of the second entity, determine that the direction of the edge between the first entity and the second entity is from the first entity to the second entity;

[0223] When the behavior execution time of the first entity is greater than the behavior execution time of the second entity, determining that the direction of the edge between the first entity and the second entity is from the second entity to the first entity;

[0224] Taking N entities in any group of entities as nodes, an entity relationship network of any group of entities is determined based on directed edges between all entities with association relationships in the determined N entities.

[0225] In a possible implementation of the present application, the second determining module 803 is used to:

[0226] Determine a feature vector for each entity in the plurality of entities based on at least one entity relationship network, wherein the feature vector for each entity includes a probability that each entity is adjacent to other entities in the at least one entity relationship network;

[0227] Determine basic features of each of the multiple entities based on static attribute information of the multiple entities, at least one behavior sequence, and at least one entity relationship network;

[0228] The feature vector of each entity in the multiple entities is concatenated with the basic feature to obtain the joint feature of each entity in the multiple entities.

[0229] In a possible implementation of the present application, the second determining module 803 is used to:

[0230] For any entity relationship network in at least one entity relationship network, a plurality of different traversal paths are randomly determined on any entity relationship network, and each entity in any entity relationship network is traversed during the determination process;

[0231] Traverse the entities in each traversal path, and organize the entities in each traversal path into an ordered sequence according to the traversal order, and obtain multiple random sequences corresponding to any entity relationship network;

[0232] Based on all random sequences corresponding to at least one entity relationship network, a feature vector of each entity in the plurality of entities is determined.

[0233] In a possible implementation of the present application, the second determining module 803 is used to:

[0234] For any random sequence among all random sequences, traverse each entity in any random sequence, and form entity pairs with other entities that are adjacent to the front and back and located in a window of a reference size, to obtain multiple entity pairs corresponding to any random sequence;

[0235] Input the entity pairs corresponding to all random sequences into the network model for training;

[0236] When the reference training condition is reached, the training is stopped, and each entity is input into the trained network model, and the feature vector of each entity is output.

[0237] In a possible implementation of the present application, when each edge in the entity relationship network of any group of entities has directionality, the second determination module 803 is used to:

[0238] Extracting at least one of the static attribute information of each entity from the static attribute information of the plurality of entities;

[0239] Based on at least one behavior sequence of each entity in a plurality of entities, at least one of the frequency, ratio and support of each entity is counted, wherein the frequency refers to the total number of times a reference behavior of an entity appears in at least one behavior sequence of the entity, the ratio refers to the ratio between the frequency of the reference behavior of an entity and the total number of behaviors included in at least one behavior sequence of the entity, and the support refers to the ratio of the reference behavior sequence in at least one behavior sequence of an entity to the occurrence of at least one behavior sequence of a plurality of entities;

[0240] Based on at least one entity relationship network, extract at least one of the number of neighboring nodes, out-degree and in-degree of each entity in each entity relationship network;

[0241] Based on at least one of the static attribute information of each entity, at least one of the frequency, ratio and support, and at least one of the number of neighbor nodes, out-degree and in-degree, the basic feature of each entity is determined.

[0242] In a possible implementation of the present application, the detection module 804 is used to:

[0243] For each feature in the joint feature, obtain the feature value of each feature in multiple entities; and determine the kurtosis value of each feature according to the obtained feature value;

[0244] Based on the kurtosis value of each feature, the lower quartile was determined;

[0245] For any feature in the joint features, when the kurtosis value of any feature is less than the lower quartile, delete any feature from the joint features;

[0246] Based on the deleted joint features, detect abnormal data in the data to be processed.

[0247] In an embodiment of the present application, data to be processed is obtained, and the data to be processed includes behavior information and static attribute information of multiple entities. In this way, based on the behavior information of the multiple entities, at least one behavior sequence of each entity in the multiple entities can be determined, and at least one entity relationship network can be constructed. The at least one behavior sequence of each entity includes the behavior identifiers and behavior execution times of the multiple behaviors of each entity, that is, the at least one behavior sequence of each entity can represent the association relationship between the different behaviors of each entity. In addition, the entity relationship network can represent the association relationship between the various entities. Afterwards, based on the static attribute information and at least one behavior sequence of the multiple entities, and at least one entity relationship network, the joint features of each entity in the multiple entities are determined, and the joint features of each entity can represent the association relationship between the data. In this way, according to the joint features of each entity in the multiple entities, the abnormal data in the data to be processed is detected, and the mutual relationship between the data is further mined, which solves the problem that only the basic features of the data in the prior art may lose part of the information, resulting in inaccurate detection results, thereby improving the accuracy of the detection results.

[0248] It should be noted that: the abnormal data detection device provided in the above embodiment only uses the division of the above functional modules as an example when detecting abnormal data. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the abnormal data detection device provided in the above embodiment and the abnormal data detection method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.

[0249] Fig. 9It is a schematic diagram of a structure of a device 900 according to an exemplary embodiment, and the device 900 can be a terminal or a server. The device 900 can have relatively large differences due to different configurations or performances, and can include one or more processors (central processing units, CPU) 901 and one or more memories 902, wherein the memory 902 stores at least one instruction, and the at least one instruction is loaded and executed by the processor 901 to implement the detection method of abnormal data provided by the above-mentioned various method embodiments.

[0250] Of course, the device 900 may also have components such as a wired or wireless network interface, a keyboard, and an input / output interface for input and output. The device 900 may also include other components for realizing the functions of the device, which will not be described in detail here.

[0251] The embodiment of the present application also provides a non-transitory computer-readable storage medium, when the instructions in the storage medium are executed by the processor of the mobile terminal, the mobile terminal can execute the above Figure 1 The illustrated embodiment provides a method for detecting abnormal data.

[0252] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the abnormal data detection methods provided in the above-mentioned embodiments.

[0253] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0254] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for detecting abnormal data, It is characterized in that The method comprises: Acquire data to be processed, wherein the data to be processed includes behavior information and static attribute information of multiple entities, and the behavior information of each entity includes behavior identifiers and behavior execution times of multiple behaviors; Based on the behavior information of the multiple entities, determining at least one behavior sequence of each entity in the multiple entities, and constructing at least one entity relationship network, each behavior sequence including behavior identifiers of at least two behaviors in the multiple behaviors; Based on the static attribute information of the multiple entities and at least one behavior sequence, and the at least one entity relationship network, determine the joint features of each entity in the multiple entities, the joint features of each entity are determined based on the feature vector and basic features of each entity, the feature vector of each entity includes the probability of each entity being adjacent to other entities on the at least one entity relationship network, and the basic features of each entity are determined based on at least one of the static attribute information of each entity, at least one of the frequency, ratio and support of each entity, and at least one of the number of neighboring nodes, out-degree and in-degree of each entity; the frequency refers to the total number of times the reference behavior of the entity appears in at least one behavior sequence of the entity, the ratio refers to the ratio between the frequency of the reference behavior of the entity and the total number of behaviors included in at least one behavior sequence of the entity, and the support refers to the ratio of the reference behavior sequence in at least one behavior sequence of the entity to the at least one behavior sequence of the multiple entities; According to the joint features of each entity in the multiple entities, an isolation forest model is used to detect abnormal data in the data to be processed.

2. The method according to claim 1, It is characterized in that The determining, based on the behavior information of the multiple entities, at least one behavior sequence of each entity in the multiple entities comprises: For any entity among the multiple entities, sorting the behavior identifiers of the multiple behaviors of the any entity according to the behavior execution time of the multiple behaviors of the any entity and in the order in which the behaviors are executed; In order from front to back, each adjacent M behavior identifiers in the sorted behavior identifiers are taken as a behavior sequence to obtain at least one behavior sequence of any entity, and there is a cross behavior identifier between two adjacent behavior sequences in the at least one behavior sequence.

3. The method according to claim 1, It is characterized in that The behavior information of each entity also includes behavior characteristics of the multiple behaviors, where the behavior characteristics are used to describe the behavior attributes and specific behaviors of the behaviors; Based on the behavior information of the multiple entities, at least one entity relationship network is constructed, including: According to the behavior characteristics of the multiple entities, the multiple entities are grouped to obtain at least one group of entities, each group of entities includes N entities, and the N entities belonging to the same group have the same behavior attributes, where N is an integer greater than 1; For any group of entities in the at least one group of entities, establishing association relationships among entities in the any group of entities that have the same behavior according to the behavior characteristics of the any group of entities; An entity relationship network of any group of entities is constructed by taking N entities in any group of entities as nodes and the established association relationships as edges to obtain the at least one entity relationship network.

4. The method according to claim 3, It is characterized in that When each edge in the entity relationship network of any group of entities has directionality, constructing the entity relationship network of any group of entities with N entities in the any group of entities as nodes and the established association relationships as edges includes: For any first entity and second entity having an association relationship among the N entities in any group of entities, when the behavior execution time of the first entity is less than the behavior execution time of the second entity, determining that the direction of the edge between the first entity and the second entity is from the first entity to the second entity; When the behavior execution time of the first entity is greater than the behavior execution time of the second entity, determining that the direction of the edge between the first entity and the second entity is from the second entity to the first entity; Taking N entities in any group of entities as nodes, an entity relationship network of any group of entities is determined according to directed edges between all entities having association relationships in the determined N entities.

5. The method according to any one of claims 1 to 4, It is characterized in that The determining, based on the static attribute information of the multiple entities and the at least one behavior sequence, and the at least one entity relationship network, a joint feature of each of the multiple entities comprises: Determining a feature vector for each entity in the plurality of entities based on the at least one entity relationship network; Determining basic features of each of the multiple entities based on static attribute information of the multiple entities, at least one behavior sequence, and the at least one entity relationship network; The feature vector of each entity in the multiple entities is concatenated with the basic feature to obtain a joint feature of each entity in the multiple entities.

6. The method according to claim 5, It is characterized in that The determining, based on the at least one entity relationship network, a feature vector of each entity in the plurality of entities comprises: For any entity relationship network in the at least one entity relationship network, randomly determining a plurality of different traversal paths on the any entity relationship network, wherein each entity in the any entity relationship network is traversed during the determination process; Traversing the entities in each traversal path, and arranging the entities in each traversal path into an ordered sequence according to the traversal order, to obtain a plurality of random sequences corresponding to any entity relationship network; Based on all random sequences corresponding to the at least one entity relationship network, a feature vector of each entity in the plurality of entities is determined.

7. The method according to claim 6, It is characterized in that The determining, based on all random sequences corresponding to the at least one entity relationship network, a feature vector of each entity in the plurality of entities comprises: For any random sequence among all the random sequences, traverse each entity in the random sequence, and form entity pairs with other entities that are adjacent to the front and back and located in a window of a reference size, to obtain multiple entity pairs corresponding to the random sequence; Inputting the entity pairs corresponding to all the random sequences into the network model for training; When the reference training condition is reached, the training is stopped, and each entity is input into the trained network model, and the feature vector of each entity is output.

8. The method according to claim 5, It is characterized in that When each edge in the entity relationship network of any group of entities has directionality, determining the basic features of each entity in the multiple entities based on the static attribute information of the multiple entities, at least one behavior sequence, and the at least one entity relationship network includes: Extracting at least one of the static attribute information of each entity from the static attribute information of the plurality of entities; Based on at least one behavior sequence of each entity in the plurality of entities, counting at least one of a frequency, a ratio, and a support of each entity; Based on the at least one entity relationship network, extract at least one of the number of neighboring nodes, out-degree, and in-degree of each entity in each entity relationship network; Based on at least one of the static attribute information of each entity, at least one of the frequency, ratio and support, and at least one of the number of neighbor nodes, out-degree and in-degree, the basic feature of each entity is determined.

9. The method according to claim 1, It is characterized in that The detecting abnormal data in the data to be processed according to the joint features of each entity in the multiple entities includes: For each feature in the joint feature, obtaining a feature value of each feature in the multiple entities; and determining a kurtosis value of each feature according to the obtained feature value; Based on the kurtosis value of each feature, the lower quartile was determined; For any feature in the joint features, when the kurtosis value of any feature is less than the lower quartile, delete the any feature from the joint features; Based on the deleted joint features, abnormal data in the data to be processed is detected.

10. A device for detecting abnormal data, It is characterized in that The device comprises: An acquisition module is used to acquire data to be processed, wherein the data to be processed includes behavior information and static attribute information of multiple entities, and the behavior information of each entity includes behavior identifiers and behavior execution times of multiple behaviors; A first determination module, configured to determine at least one behavior sequence of each of the multiple entities based on the behavior information of the multiple entities, and to construct at least one entity relationship network, wherein each behavior sequence includes behavior identifiers of at least two behaviors of the multiple behaviors; A second determination module is used to determine the joint features of each entity in the multiple entities based on the static attribute information of the multiple entities and at least one behavior sequence, and the at least one entity relationship network, the joint features of each entity are determined based on the feature vector and basic features of each entity, the feature vector of each entity includes the probability of each entity being adjacent to other entities on the at least one entity relationship network, and the basic features of each entity are determined based on at least one of the static attribute information of each entity, at least one of the frequency, ratio and support of each entity, and at least one of the number of neighboring nodes, out-degree and in-degree of each entity; the frequency refers to the total number of times the reference behavior of the entity appears in at least one behavior sequence of the entity, the ratio refers to the ratio between the frequency of the reference behavior of the entity and the total number of behaviors included in at least one behavior sequence of the entity, and the support refers to the ratio of the reference behavior sequence in at least one behavior sequence of the entity to the at least one behavior sequence of the multiple entities; A detection module is used to detect abnormal data in the data to be processed by using an isolation forest model according to the joint features of each entity in the multiple entities.

11. A device, It is characterized in that The device comprises: processor; memory for storing processor executable instructions; The processor is configured to implement the steps of any one of the methods described in claims 1-9.

12. A computer-readable storage medium having stored thereon instructions, It is characterized in that When the instructions are executed by a processor, the steps of any method described in claims 1-9 are implemented.