Behavior analysis method

By obtaining the social and auxiliary characteristics of the target personnel, using pre-constructed decision tree analysis, the screening limitations due to privacy data limitations in traditional methods are solved, and effective identification and prediction of network violations are achieved.

CN118898035APending Publication Date: 2024-11-05CHINESE PEOPLES LIBERATION ARMY UNIT 92228
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411306810.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-06-07
Filing Date
2024-09-19
Publication Date
2024-11-05

AI Technical Summary

Technical Problem

Traditional methods cannot conduct large-scale screening when judging illegal interactions on the Internet because they involve personal privacy data, which has limitations.

Method used

By obtaining the social and auxiliary characteristics of the target person, analyzing is done using a pre-constructed target behavior decision tree to avoid infringement of personal privacy and identifying illegal interactions on the Internet.

Benefits of technology

It realizes effective identification and prediction of illegal interaction behaviors on the Internet without infringing on personal privacy, and guides subsequent behavioral intervention or decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118898035A_ABST
    Figure CN118898035A_ABST
Patent Text Reader

Abstract

The invention discloses a behavior analysis method. Firstly, social features and auxiliary features of a target person can be obtained, and the auxiliary features comprise one or more features, except the social features, affecting behavior analysis of the target person. Then, on the basis of the social features and the auxiliary features of the target personnel, behaviors of the target personnel are obtained through a target behavior decision tree, the target behavior decision tree is constructed in advance based on a training set, the training set comprises a plurality of samples with behavior tags, and the samples comprise a plurality of features of sample personnel; the personnel characteristics of the target personnel are consistent with the characteristics in each sample. According to the method, on the premise of effectively avoiding infringement of personal privacy, behavior analysis can be carried out through the public social features and the auxiliary features. And meanwhile, compared with a traditional behavior analysis mode, the method pays more attention to behavior analysis by using public personnel characteristics, so that the personnel involving online violation interaction can be identified more effectively.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims the priority of the Chinese patent application filed with the State Intellectual Property Office on June 7, 2024, with application number 2024107358887 and invention name “A Behavior Analysis Method”, all contents of which are incorporated by reference in this application. Technical Field

[0002] The present application relates to the technical field of data analysis, and in particular to a behavior analysis method. Background Art

[0003] In recent years, the leakage of important information and other problems are mostly caused by the Internet. In particular, some target persons interact with other users in violation of regulations on the Internet, which may lead to the leakage of important information carried by the target persons.

[0004] The traditional method is to obtain the target person's online behavior data to determine whether he or she is involved in illegal online interactive behavior. Since online behavior data is private data, this method cannot perform universal screening on a large number of people, so it has certain limitations. Summary of the invention

[0005] Based on the above problems, this application provides a behavior analysis method that can analyze the illegal interactions of any person by using public online data while effectively avoiding infringement of personal privacy.

[0006] The embodiments of the present application disclose the following technical solutions:

[0007] A behavior analysis method, comprising:

[0008] Acquire personnel characteristics of a target person; the personnel characteristics include social characteristics and auxiliary characteristics; the auxiliary characteristics include one or more characteristics other than the social characteristics that affect the behavior analysis of the target person;

[0009] Based on the personnel characteristics of the target personnel, the behavior of the target personnel is obtained through a target behavior decision tree;

[0010] Among them, the target behavior decision tree is pre-constructed based on a training set; the training set includes multiple samples with behavior labels; the samples include multiple characteristics of sample personnel; the personnel characteristics of the target personnel are consistent with the characteristics of the sample personnel in each sample.

[0011] In a possible implementation, the process of constructing the target behavior decision tree based on the training set includes:

[0012] Determine the personnel features and behavior labels of each sample constituting the training set; the personnel features include a feature name and a feature value; the behavior label includes a behavior name and a behavior value; the feature value is used to indicate whether the feature is present; the behavior value is used to indicate whether the behavior is present;

[0013] Constructing a preliminary behavior decision tree according to the personnel characteristics of the sample and the behavior labels of the sample;

[0014] The target behavior decision tree is obtained by performing decision tree pruning on the preliminary behavior decision tree based on the loss function of the preliminary behavior decision tree.

[0015] In a possible implementation, constructing a preliminary behavior decision tree according to the personnel characteristics of the sample and the behavior labels of the sample includes:

[0016] Calculating the information gain ratio of the personnel characteristics of each of the samples to obtain a first information gain ratio set;

[0017] Selecting a personnel feature corresponding to an information gain ratio that meets the target condition from the first information gain ratio set as a first optimal feature;

[0018] The root node of the preliminary behavior decision tree is constructed according to the first optimal feature, and the training set is divided according to the first optimal feature and the first non-optimal feature to obtain a divided training set; the first optimal feature is the node feature of the root node of the preliminary behavior decision tree; the divided training set includes a first divided training set and a second divided training set; the first divided training set includes samples with behavior labels corresponding to the first optimal feature; the second divided training set includes samples with behavior labels corresponding to the first non-optimal feature;

[0019] The sub-nodes of the preliminary behavior decision tree are constructed according to the value of the first optimal feature and the number of samples in the divided training set to obtain the preliminary behavior decision tree.

[0020] In a possible implementation, constructing the subnodes of the preliminary behavior decision tree according to the value of the first optimal feature and the number of samples in the divided training set to obtain the preliminary behavior decision tree includes:

[0021] Querying the number of personnel features in each training set of the divided training sets;

[0022] For the training set in which the number of personnel features in the divided training set is greater than 1, constructing a subnode based on the value of the first optimal feature;

[0023] The training sets in which the number of personnel features in the divided training sets is greater than 1 are continuously divided and new sub-nodes are constructed until the number of samples in all training sets in the divided training sets is equal to 1, thereby obtaining the preliminary behavior decision tree; during the construction process, the new sub-nodes are constructed based on the values ​​of the new optimal features; the new optimal features are the personnel features contained in the first non-optimal features.

[0024] In a possible implementation, for the training set in which the number of personnel features in the divided training set is greater than 1, constructing a subnode based on the value of the first optimal feature includes:

[0025] Calculate the information gain ratio of each of the personnel features in the training set in which the number of samples in the divided training set is greater than 1, to obtain a second information gain ratio set;

[0026] Selecting a personnel feature corresponding to an information gain ratio that meets the target condition from the second information gain ratio set as the second optimal feature;

[0027] The first layer of child nodes of the preliminary behavior decision tree is constructed according to the value of the first optimal feature and the second optimal feature; the first layer of child nodes includes a first leaf node and a second leaf node; the first leaf node includes a value of the first optimal feature; the second optimal feature is the node feature of the second leaf node of the preliminary behavior decision tree.

[0028] In a possible implementation, the step of performing decision tree pruning on the preliminary behavior decision tree based on the loss function of the preliminary behavior decision tree to obtain the target behavior decision tree includes:

[0029] Calculating the loss function of the preliminary behavior decision tree as a first loss function, and calculating the loss function of a pruned decision tree of the preliminary behavior decision tree as a second loss function; the pruned decision tree is obtained by pruning the last layer of child nodes of the preliminary behavior decision tree;

[0030] When the first loss function is less than the second loss function, the pruned decision tree is used as the target behavior decision tree.

[0031] In a possible implementation, the method further includes:

[0032] When the first loss function is greater than or equal to the second loss function, the target behavior decision tree is obtained by replacing the preliminary behavior decision tree with a pruned decision tree of the preliminary behavior decision tree.

[0033] Compared with the prior art, this application has the following beneficial effects:

[0034] The present application provides a behavior analysis method. Specifically, when executing the behavior analysis method provided in the embodiment of the present application, the personnel characteristics of the target person can be obtained first, and the personnel characteristics include social characteristics and auxiliary characteristics, and the auxiliary characteristics include one or more characteristics other than social characteristics that affect the behavior analysis of the target person. Then, based on the personnel characteristics of the target person, the behavior of the target person is obtained through a target behavior decision tree, and the target behavior decision tree is pre-constructed based on a training set. The training set includes multiple samples with behavior labels, and the samples include multiple characteristics of the sample personnel. The personnel characteristics of the target person are consistent with the characteristics of the sample personnel in each sample. The present application uses public social characteristics and auxiliary characteristics to perform behavior analysis, effectively avoiding problems such as infringement of personal privacy. At the same time, compared with traditional behavior analysis methods, more attention is paid to using public personnel characteristics for behavior analysis, so that people involved in illegal interactions can be more effectively identified. In addition, the trained target behavior decision tree can more accurately predict the behavior of the target person, which helps to guide subsequent behavior intervention or decision-making. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0036] Figure 1 A method flow chart of a behavior analysis method provided in an embodiment of the present application;

[0037] Figure 2 A flowchart of an implementation method of a target behavior decision tree construction method provided in an embodiment of the present application;

[0038] Figure 3 A flowchart of an implementation method of a preliminary behavior decision tree construction method provided in an embodiment of the present application;

[0039] Figure 4 A flowchart of another implementation method of a preliminary behavior decision tree construction method provided in an embodiment of the present application;

[0040] Figure 5 A schematic diagram of the structure of a preliminary behavior decision tree provided in an embodiment of the present application;

[0041] Figure 6 A schematic diagram of a decision tree pruning structure provided in an embodiment of the present application;

[0042] Figure 7 A schematic diagram of the structure of another decision tree pruning provided in an embodiment of the present application;

[0043] Figure 8 A schematic diagram of the structure of a target behavior decision tree provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] To facilitate understanding of the technical solutions provided by the embodiments of the present application, the background technology involved in the embodiments of the present application will be described below.

[0045] Target persons refer to individuals who are given special attention in a specific social context because of their occupation, social status, behavior, etc.

[0046] With the popularization of the Internet in recent years, some important information leakage and other problems are closely related to the Internet, especially the frequent problems of some target persons interacting with other users in violation of regulations online. This behavior may lead to the leakage of important information and other problems. The traditional method is to collect the network activity data of the target person to determine whether they are involved in illegal behavior. However, since this data involves personal privacy, this method is not suitable for large-scale screening of everyone, so it has certain limitations.

[0047] In order to solve this problem, a behavior analysis method is provided in an embodiment of the present application. First, the personnel characteristics of the target person are obtained. The personnel characteristics include social characteristics and auxiliary characteristics. The auxiliary characteristics include one or more characteristics other than social characteristics that affect the behavior analysis of the target person. Then, based on the personnel characteristics of the target person, the behavior of the target person is obtained through a target behavior decision tree. The target behavior decision tree is pre-constructed based on a training set. The training set includes multiple samples with behavior labels. The samples include multiple characteristics of the sample personnel. The personnel characteristics of the target person are consistent with the characteristics of the sample personnel in each sample. The present application uses public social characteristics and auxiliary characteristics to perform behavior analysis, effectively avoiding problems such as infringement of personal privacy. At the same time, compared with traditional behavior analysis methods, more emphasis is placed on using public personnel characteristics for behavior analysis, so that target personnel who interact with other users in violation of regulations on the network can be more effectively identified.

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0049] See also Figure 1 , which is a flow chart of a behavior analysis method provided in an embodiment of the present application, such as Figure 1As shown, the behavior analysis method may include steps S101-S102:

[0050] S101: Acquire the personnel characteristics of the target person.

[0051] The personnel characteristics include social characteristics and auxiliary characteristics. The auxiliary characteristics include one or more characteristics other than social characteristics that affect the behavior analysis of the target personnel.

[0052] In order to determine whether the target person has certain specific behaviors, it is necessary to first collect relevant feature information that can affect the target person's behavior analysis. These characteristics of the target person are consistent with the characteristics used in the target behavior decision tree during the training process.

[0053] Optionally, social features may include, but are not limited to, status attributes of the target social status, whether the target social platform account has been registered, whether illegal interaction information is involved in public speeches, whether the person pays attention to and interacts with speeches related to illegal interactions, whether social media is active, whether the communication method often involves illegal interactions, and other social features.

[0054] Optionally, the auxiliary features include but are not limited to whether the economic situation is good.

[0055] It should be noted that the personal characteristics involved in this application (including but not limited to social characteristics and auxiliary characteristics, etc.) are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0056] S102: Based on the personnel characteristics of the target personnel, the behavior of the target personnel is obtained through a target behavior decision tree.

[0057] Among them, the target behavior decision tree is pre-constructed based on the training set; the training set includes multiple samples with behavior labels; the samples include multiple characteristics of the sample personnel, and the personnel characteristics of the target personnel are consistent with the characteristics of the sample personnel in each sample.

[0058] After obtaining the corresponding personnel characteristics of the target person, the personnel characteristics can be used to determine whether the target person has a specific behavior through the target behavior decision tree.

[0059] Behavior labels are the behavior labels corresponding to each sample, that is, the behavior exhibited by the sample. Behavior labels include behavior names and behavior values. Behavior names refer to the names that describe the behavior, such as "illegal online interaction", "purchasing goods", "clicking on ads"; behavior values ​​are used to indicate whether the sample has the behavior, usually expressed as a binary value, such as "yes" or "no".

[0060] See also Figure 2, Figure 2 A flowchart of an implementation method of a target behavior decision tree construction method provided in an embodiment of the present application. Accordingly, the specific implementation of the step of constructing the target behavior decision tree based on the training set may include A1-A3:

[0061] A1: Determine the personal characteristics of each sample in the training set and the behavior label of each sample.

[0062] When constructing the target behavior decision tree, it is necessary to determine the personnel features and behavior labels of each sample in the training set. Personnel features include feature names and feature values, and behavior labels include behavior names and behavior values.

[0063] The personnel characteristics of the sample are the personnel characteristics that describe each sample. The personnel characteristics of the sample are similar to those of the target person, and also include social characteristics and auxiliary characteristics.

[0064] In a possible implementation, the personnel characteristics of each sample in the determined training set and the behavior labels of each sample can be edited into a table form. For example, Table 1 is a training data table for illegal interaction analysis:

[0065] Table 1 Illegal interaction behavior analysis training data table

[0066]

[0067] By determining the personnel characteristics and behavior labels of the samples, a decision tree can be established to learn the relationship between personnel characteristics and behaviors, thereby predicting the behavior of the target personnel.

[0068] A2: Construct a preliminary behavior decision tree according to the personnel characteristics of the sample and the behavior labels of the sample.

[0069] Based on the provided sample data, which includes the characteristics of people and their behavior labels, a preliminary behavior decision tree model is constructed.

[0070] See also Figure 3 , Figure 3 A flowchart of an implementation method of a preliminary behavior decision tree construction method provided in an embodiment of the present application. Accordingly, the specific implementation of the step of constructing a preliminary behavior decision tree according to the personnel characteristics of the sample and the behavior labels of the sample in step A2 may include B1-B3:

[0071] B1: Calculate the information gain ratio of the personnel characteristics of each of the samples to obtain a first information gain ratio set.

[0072] To construct a preliminary behavioral decision tree, we first need to calculate the corresponding information gain ratio for each personnel feature. The information gain ratio is an indicator used to measure the influence of a feature on the classification result, which can help select the most representative feature.

[0073] In a possible implementation, the information gain ratio is calculated as follows:

[0074]

[0075] Where D is the training set, A is the personnel feature, and information gain g(D,A) = H(D) - H(D|A). n is the number of values ​​of feature A. Let the training data set be D, and |D| represents its sample capacity, that is, the number of samples. Let there be K classes C k , k = 1, 2, ..., K, | C k | belongs to class C k The number of samples, Assume that feature A has n different values ​​{a1,a2...a n}, according to the value of feature A, D is divided into n subsets D1, D2, ..., D n ,|D i | for D i The number of samples, Note subset D i Belongs to class C k The set of samples is D ik , that is, D ik =D i ∩C k ,|D ik | belongs to class D ik The number of samples.

[0076] The empirical entropy H(D) of the training set D is:

[0077]

[0078] The empirical conditional entropy H(D|A) of feature A on training set D is:

[0079]

[0080] Example 1, taking Table 1 as an example, assume that there are 15 samples in the training set, each of which contains 4 features, namely feature A1: the state attribute of the target social status; feature A2: whether the target social platform account has been registered; feature A3: whether the public speech involves illegal interaction information; feature A4: whether the public speech involves illegal interaction related speech and interacts. Then, to calculate the information gain of the above 4 features, we need to calculate the empirical entropy H(D) first.

[0081]

[0082] Then calculate the information gain ratio of features A1, A2, A3, and A4

[0083] (1) Information gain ratio of feature A1

[0084] Calculate the empirical conditional entropy of feature A for training set D:

[0085]

[0086] Information Gain:

[0087] g(D,A1)=H(D)-H(D|A1)=0.722-0.564=0.158

[0088]

[0089] (2) Information gain ratio of feature A2

[0090]

[0091] g(D, A2)=H(D)-H(D|A2)=0.722-0.339=0.383

[0092]

[0093] (3) Information gain ratio of feature A3

[0094]

[0095] g(D, A3)=H(D)-H(D|A3)=0.722-0.704=0.018

[0096]

[0097] (4) Information gain ratio of feature A4

[0098]

[0099] g(D, A4)=H(D)-H(D|A4)=0.722-0.767=-0.045

[0100]

[0101] B2: Filter out the personnel feature corresponding to the information gain ratio that meets the target condition from the first information gain ratio set as the first optimal feature.

[0102] In order to determine the most representative feature so as to construct the root node of the decision tree, it is necessary to select the personnel feature corresponding to the information gain ratio that meets the target condition from the first information gain ratio set as the first optimal feature.

[0103] Example 2, taking Example 1 as an example to continue the explanation, by comparing the information gain ratios of the features in Example 1, it is found that feature A2 (whether the target social platform account has been registered) has the largest information gain ratio, so feature A2 is selected as the first optimal feature.

[0104] B3: constructing the root node of the preliminary behavior decision tree according to the first optimal feature, and dividing the training set according to the first optimal feature and the first non-optimal feature to obtain a divided training set.

[0105] The first optimal feature is a node feature of a root node of a preliminary behavior decision tree. The partition training set includes a first partition training set and a second partition training set. The first partition training set includes samples with behavior labels corresponding to the first optimal feature. The second partition training set includes samples with behavior labels corresponding to the first non-optimal feature.

[0106] The root node of the decision tree is constructed according to the first optimal feature, that is, the training set is divided to obtain the divided training set by taking the first optimal feature as the judgment basis, thus forming the first layer of sub-nodes of the decision tree.

[0107] Example 3, taking Example 1 and Example 2 as examples, we continue to explain and build a decision tree for the illegal interaction analysis training data set D. Taking feature A2 (whether the target social platform account has been registered) as the feature of the root node, the training data set D is divided into two subsets: the first partition training set D1 (A2 value is "yes") and the second partition training set D2 (A2 value is "no"). Since D1 has only sample points of the same class, it becomes a child node, and the class of the node is marked as "yes".

[0108] B4: constructing sub-nodes of the preliminary behavior decision tree according to the value of the first optimal feature and the number of samples in the divided training set to obtain the preliminary behavior decision tree.

[0109] According to the value of the first optimal feature and the number of samples in the divided training set, the sub-nodes of the preliminary behavior decision tree are constructed, and this process is repeated until the stopping condition is met, thereby obtaining the final preliminary behavior decision tree.

[0110] See also Figure 4 , Figure 4A flowchart of another implementation method of a preliminary behavior decision tree construction method provided in an embodiment of the present application. Accordingly, in step B4, sub-nodes of the preliminary behavior decision tree are constructed according to the value of the first optimal feature and the number of samples in the divided training set. The specific implementation of obtaining the preliminary behavior decision tree may include C1-C3:

[0111] C1: Query the number of personnel features in each training set in the divided training set.

[0112] When constructing the child nodes of the preliminary behavior decision tree according to the value of the first optimal feature and the number of samples in the divided training set, it is first necessary to check the number of samples in each training set to determine whether the current node needs to be further divided.

[0113] Example 4: For Example 3, the first partition training set in the partition training set has only one sample corresponding to feature A1, while the second partition training set has three samples corresponding to features A2, A3, and A4.

[0114] C2: For the training set in which the number of personnel features in the divided training set is greater than 1, construct a sub-node based on the value of the first optimal feature.

[0115] A subnode is created on the subnode where the value of the first optimal feature is negative. At the same time, the training set is divided into different subsets. In this way, a subnode can be created on the current node so that each subnode contains samples with similar features.

[0116] Example 5: Based on Example 4, the second partition training set D2 needs to be divided into two subsets D3 (A4 takes the value of "yes") and D4 (A4 takes the value of "no"). Since D4 only has sample points of the same class, it becomes a new child node, and the class of the node is marked as "no".

[0117] In a possible implementation, for the training set in which the number of personnel features in the divided training set is greater than 1, constructing a subnode based on the value of the first optimal feature includes:

[0118] First, the information gain ratio of each personnel feature in the training set with a sample number greater than 1 in the divided training set is calculated to obtain a second information gain ratio set. Then, the personnel features corresponding to the information gain ratios that meet the target conditions are selected from the second information gain ratio set as the second optimal features. Finally, the first-level child nodes of the preliminary behavior decision tree are constructed based on the value of the first optimal feature and the second optimal feature.

[0119] The first layer of sub-nodes includes a first leaf node and a second leaf node. The first leaf node includes a value of the first optimal feature. The second optimal feature is a node feature of the second leaf node of the preliminary behavior decision tree.

[0120] Example 6 is based on Example 4. For D2, new features need to be selected from A1 (status attributes of the target social status), A3 (whether illegal interaction information is involved in public speeches), and A4 (whether to pay attention to speeches related to illegal interactions and interact with them), and the information gain ratio of each feature needs to be calculated.

[0121]

[0122] Therefore, the second information gain ratio set is {0.090, 0.137, 0.159}, and the maximum information gain ratio in the second information gain ratio set is 0.159. The feature A4 (whether to pay attention to the relevant comments of illegal interaction and interact) corresponding to the maximum information gain ratio of 0.159 is selected as the second optimal feature and the feature of the node. Since A4 has two possible values, two child nodes are derived from this node: one child node corresponding to "yes", contains 4 samples, and does not belong to the same class, so this is an internal node; the other is a child node corresponding to "no", contains 9 samples, and belongs to the same class, so this is a leaf node, and the class is marked as "no".

[0123] C3: Continuously divide the training sets whose number of personnel features in the divided training sets is greater than 1 and construct new sub-nodes until the number of samples in all training sets in the divided training sets is equal to 1, thereby obtaining the preliminary behavior decision tree.

[0124] The new sub-node is constructed based on the value of the new optimal feature during the construction process. The new optimal feature is the personnel feature included in the first non-optimal feature.

[0125] Repeat the above steps to further divide each child node until the number of samples in all training sets is equal to 1. In this way, a preliminary behavioral decision tree can be obtained.

[0126] Each child node represents a specific behavior category. When constructing a new child node, a new optimal feature will be selected for division. The optimal feature is selected from the remaining non-optimal features. This ensures that the information between different features is fully utilized during the construction of the decision tree, improving the generalization ability of the model.

[0127] Example 7 is based on Example 6. With feature A4 as the feature of the internal node, the training data set D2 is divided into two subsets D3 (A4 value is "yes") and D4 (A4 value is "no"). Since D4 has only sample points of the same class, it becomes a child node, and the class of the node is marked as "no".

[0128] For D3, it is necessary to select new features from A1 (the status attributes of the target social status) and A3 (whether illegal interactive information is involved in public speech) and calculate the information gain ratio of each feature.

[0129]

[0130] Since the information gain ratio is the same, a feature (A3 for example) is randomly selected as the feature of the node. Since A3 has two possible values, two child nodes are derived from this node: one child node corresponding to "yes", contains 2 samples, and does not belong to the same class, so this is an internal node; the other child node corresponding to "no", contains 2 samples, and belongs to the same class, so this is a leaf node, and the class is marked as "no".

[0131] Similarly, feature A1 (the state attribute of the target social state) is used as the feature of the internal node, and the training data set D3 is divided into two subsets D5 (A1 value is "attribute 1") and D6 (A1 value is "attribute 3"). Since D5 and D6 only have sample points of the same category, all of them are called child nodes. The initial behavior decision tree generated in this way is as follows Figure 5 shown.

[0132] A3: Perform decision tree pruning on the preliminary behavior decision tree based on the loss function of the preliminary behavior decision tree to obtain the target behavior decision tree.

[0133] After obtaining the preliminary behavior decision tree, its loss function can be calculated, and the preliminary behavior decision tree is pruned based on the loss function to obtain the target behavior decision tree.

[0134] In a possible implementation, performing decision tree pruning on the preliminary behavior decision tree based on the loss function of the preliminary behavior decision tree to obtain the target behavior decision tree can be implemented by the following steps:

[0135] First, the loss function of the preliminary behavior decision tree is calculated as the first loss function, and the loss function of the pruned decision tree of the preliminary behavior decision tree is calculated as the second loss function. The pruned decision tree is obtained by pruning the last layer of child nodes of the preliminary behavior decision tree.

[0136] Then when the first loss function is less than the second loss function, the pruned decision tree is used as the target behavior decision tree.

[0137] In a possible implementation, the method further includes:

[0138] When the first loss function is greater than or equal to the second loss function, the pruned decision tree of the preliminary behavior decision tree is used to replace the preliminary behavior decision tree to perform decision tree pruning to obtain the target behavior decision tree.

[0139] Example 8, for example 7 generated Figure 5 The initial behavior decision tree shown is pruned using the loss function that minimizes the overall decision tree:

[0140] First, suppose the leaf node traces back to the entire tree before the parent node (such as Figure 5 T B , the entire tree after the parent node (i.e. pruning Figure 6 The preliminary behavioral decision tree for the dashed box in . Figure 6 In the above example, t1 represents the first leaf node, t2 represents the fourth leaf node, t3 represents the sixth leaf node, t4 represents the seventh leaf node, and t5 represents the eighth leaf node. The second, third, and fifth leaf nodes become the first, second, and third parent nodes in the process of constructing new leaf nodes. A , and the corresponding loss function values ​​are C α (T B ) and C α (T A ), assuming parameter α=3.

[0141] Calculate the loss function value:

[0142]

[0143] Due to C α (T A )≤C α (T B ), then prune and turn the parent node into a new leaf node, and get the following Figure 6 The decision tree shown is pruned.

[0144] Then, continue to use the loss function of the decision tree as a whole to prune, assuming that the leaf node traces back to the entire tree after the parent node (that is, pruning away Figure 7 The initial behavior decision tree of the dashed box content in Figure 7 Where t1 represents the first leaf node, t2 represents the fourth leaf node, t3 represents the sixth leaf node, and t4 represents the fifth leaf node. The second and third leaf nodes become the first and second parent nodes during the pruning process, and the third parent node becomes the sixth leaf node. ) is T' A , and its corresponding loss function value is C α (T' A ).

[0145] Calculate the loss function value:

[0146]

[0147] Due to C α (T' A )>C α (TA ), no more pruning is performed. Finally, the target behavior decision tree with the minimum loss function is obtained as follows Figure 8 ( Figure 8 In the figure, t1 represents the first leaf node, t2 represents the fourth leaf node, t3 represents the sixth leaf node, and t4 represents the fifth leaf node. The second and third leaf nodes become the first and second parent nodes during the pruning process, and the third parent node becomes the sixth leaf node. ) as shown.

[0148] Based on the contents of S101-S102, we can know that we first obtain the social characteristics and auxiliary characteristics of the target person. The auxiliary characteristics include one or more characteristics other than social characteristics that affect the behavior analysis of the target person. Finally, based on the social characteristics and auxiliary characteristics of the target person, the behavior of the target person is obtained through a target behavior decision tree. The target behavior decision tree is pre-constructed based on a training set. The training set includes multiple samples with behavioral labels. The samples include multiple characteristics of the sample persons. The personnel characteristics of the target person are consistent with the characteristics of the sample persons in each sample. This application uses public social characteristics and auxiliary characteristics to perform behavioral analysis, effectively avoiding problems such as infringement of personal privacy.

[0149] The above is a detailed introduction to a behavior analysis method provided by the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the embodiments can refer to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can refer to the method part description. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.

[0150] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0151] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0152] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A behavior analysis method, characterized in that: The method comprises: Acquire personnel characteristics of a target person; the personnel characteristics include social characteristics and auxiliary characteristics; the auxiliary characteristics include one or more characteristics other than the social characteristics that affect the behavior analysis of the target person; Based on the personnel characteristics of the target personnel, the behavior of the target personnel is obtained through a target behavior decision tree; Among them, the target behavior decision tree is pre-constructed based on a training set; the training set includes multiple samples with behavior labels; the samples include multiple characteristics of sample personnel; the personnel characteristics of the target personnel are consistent with the characteristics of the sample personnel in each sample.

2. The method according to claim 1, characterized in that The process of constructing the target behavior decision tree based on the training set includes: Determine the personnel features and behavior labels of each sample constituting the training set; the personnel features include a feature name and a feature value; the behavior label includes a behavior name and a behavior value; the feature value is used to indicate whether the feature is present; the behavior value is used to indicate whether the behavior is present; Constructing a preliminary behavior decision tree according to the personnel characteristics of the sample and the behavior labels of the sample; The target behavior decision tree is obtained by performing decision tree pruning on the preliminary behavior decision tree based on the loss function of the preliminary behavior decision tree.

3. The method according to claim 1, characterized in that: The step of constructing a preliminary behavior decision tree according to the personnel characteristics of the sample and the behavior labels of the sample includes: Calculating the information gain ratio of the personnel characteristics of each of the samples to obtain a first information gain ratio set; Selecting a personnel feature corresponding to an information gain ratio that meets the target condition from the first information gain ratio set as a first optimal feature; The root node of the preliminary behavior decision tree is constructed according to the first optimal feature, and the training set is divided according to the first optimal feature and the first non-optimal feature to obtain a divided training set; the first optimal feature is the node feature of the root node of the preliminary behavior decision tree; the divided training set includes a first divided training set and a second divided training set; the first divided training set includes samples with behavior labels corresponding to the first optimal feature; the second divided training set includes samples with behavior labels corresponding to the first non-optimal feature; The sub-nodes of the preliminary behavior decision tree are constructed according to the value of the first optimal feature and the number of samples in the divided training set to obtain the preliminary behavior decision tree.

4. The method according to claim 3, characterized in that The step of constructing the sub-nodes of the preliminary behavior decision tree according to the value of the first optimal feature and the number of samples in the divided training set to obtain the preliminary behavior decision tree includes: Querying the number of personnel features in each training set of the divided training sets; For the training set in which the number of personnel features in the divided training set is greater than 1, constructing a subnode based on the value of the first optimal feature; The training sets in which the number of personnel features in the divided training sets is greater than 1 are continuously divided and new sub-nodes are constructed until the number of samples in all training sets in the divided training sets is equal to 1, thereby obtaining the preliminary behavior decision tree; during the construction process, the new sub-nodes are constructed based on the values ​​of the new optimal features; the new optimal features are the personnel features contained in the first non-optimal features.

5. The method according to claim 4, characterized in that The step of constructing a sub-node based on the value of the first optimal feature for the training set in which the number of personnel features in the divided training set is greater than 1 includes: Calculate the information gain ratio of each of the personnel features in the training set in which the number of samples in the divided training set is greater than 1, to obtain a second information gain ratio set; Selecting a personnel feature corresponding to an information gain ratio that meets the target condition from the second information gain ratio set as the second optimal feature; The first layer of child nodes of the preliminary behavior decision tree is constructed according to the value of the first optimal feature and the second optimal feature; the first layer of child nodes includes a first leaf node and a second leaf node; the first leaf node includes a value of the first optimal feature; the second optimal feature is the node feature of the second leaf node of the preliminary behavior decision tree.

6. The method according to claim 2, characterized in that The step of performing decision tree pruning on the preliminary behavior decision tree based on the loss function of the preliminary behavior decision tree to obtain the target behavior decision tree includes: Calculating the loss function of the preliminary behavior decision tree as a first loss function, and calculating the loss function of a pruned decision tree of the preliminary behavior decision tree as a second loss function; the pruned decision tree is obtained by pruning the last layer of child nodes of the preliminary behavior decision tree; When the first loss function is less than the second loss function, the pruned decision tree is used as the target behavior decision tree.

7. The method according to claim 6, characterized in that The method further comprises: When the first loss function is greater than or equal to the second loss function, the target behavior decision tree is obtained by replacing the preliminary behavior decision tree with a pruned decision tree of the preliminary behavior decision tree.