Social media false account identification method and device based on decision tree

Through a decision tree-based method, combined with multi-dimensional features and incremental learning, the problem of poor accuracy and real-time performance in social media false account recognition is solved, and fast and efficient identification and dynamic adaptation are achieved, which improves recognition accuracy and explanatory ability. sex.

CN119202549AInactive Publication Date: 2024-12-27ONE NETWORK INTEROPERABILITY (BEIJING) TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411718004.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2024-12-27
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The prior art has problems such as insufficient identification accuracy, poor real-time, lack of dynamic behavioral adaptability and high model complexity in the identification of false social media accounts, resulting in high misjudgment rate, low processing efficiency and high computing resource consumption.

Method used

Using a decision tree-based method, by collecting multi-dimensional behavioral data from social media platforms, performing data cleaning and standardization processing, extracting account information, behavior patterns and social network features, calculating entropy and conditional entropy, generating a decision tree model, and increasing it quantitative learning and adaptive adjustment mechanism to identify false accounts in real time.

Benefits of technology

It realizes fast and efficient identification of false accounts, improves identification accuracy and dynamic adaptability, reduces computing resource consumption, is suitable for real-time detection, and provides good interpretability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119202549A_ABST
    Figure CN119202549A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a social media false account identification method and device based on a decision tree and electronic equipment, and belongs to the technical field of data processing.The method comprises the steps that data cleaning, data deduplication and data standardization processing are conducted on collected behavior data, and standard data DB is obtained; extracting a feature vector X from the standard data DB through a feature extraction function Ft, and calculating an entropy H (DB) of the data set DB and conditional entropies of features Zh, Xw, Sw and Nt; dividing the standard data into a plurality of subsets Dz based on the characteristic value of the root node; and based on the feature vector Xn, the decision tree DT and a preset classification function Fc, generating a prediction result y = Fc (DT, Xn) corresponding to the behavior data Dn of the new user. According to the invention, the accuracy of social media false account identification can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device and electronic device for identifying fake social media accounts based on a decision tree. Background Art

[0002] With the widespread use of social media, the number of fake accounts (including robot accounts, impersonation accounts and malicious accounts) has increased dramatically. The existence of fake accounts not only interferes with normal user interactions, but also has a negative impact on the content quality of the platform and user experience.

[0003] The existing technology has the following problems in the process of fake account identification:

[0004] 1. Insufficient recognition accuracy: Existing methods usually rely on simple behavioral features or a single dimension and are unable to capture the complex features of fake accounts, resulting in a high misjudgment rate.

[0005] 2. Poor real-time performance: There are a huge number of fake accounts, and existing methods are inefficient in processing large amounts of data, making it difficult to achieve real-time detection.

[0006] 3. Lack of adaptation to dynamic behaviors: The behavioral characteristics of fake accounts change over time. Existing algorithms are unable to adaptively adjust parameters and have difficulty keeping up with the behavioral changes of new types of fake accounts.

[0007] 4. High model complexity: Some complex recognition methods require high computing resources and model training time, making them difficult to deploy and apply quickly.

[0008] The above problems become technical problems that need to be solved. Summary of the invention

[0009] In view of this, the embodiments of the present invention provide a method, device and electronic device for identifying fake social media accounts based on a decision tree, which at least partially solve the problems existing in the prior art.

[0010] In a first aspect, an embodiment of the present invention provides a method for identifying fake social media accounts based on a decision tree, comprising:

[0011] Collect multi-dimensional behavior data DY of target users from social media platforms, perform data cleaning, data deduplication and data standardization on the collected behavior data to obtain standard data DB;

[0012] Extract feature vector X from standard data DB through feature extraction function Ft, X=Ft(DB)=[Zh,Xw,Sw,Nt], Zh represents account information features, Xw represents behavior pattern features, Sw represents social network features, and Nt represents content features;

[0013] Calculate the entropy H(DB) of the data set DB, and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), H(DB|Nt) of the features Zh, Xw, Sw, and Nt, calculate the information gain IG(DB,X) of the feature vector X based on the entropy H(DB) and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), H(DB|Nt), and determine the root node of the decision tree according to the information gain IG(DB,X);

[0014] Based on the characteristic value of the root node, the standard data is divided into multiple subsets Dz, and based on the process of dividing the subsets, the decision sub-nodes Jz and decision rules Rj of the decision tree are generated. Each path of the decision tree represents a decision rule from the root node to the leaf node. The leaf node of the decision tree represents the classification result Fz, thereby forming a decision tree DT=Fj(Dz,Jz,Rj,Fz), where Fj is a decision tree processing function;

[0015] After receiving the behavior data Dn of the new user, the behavior data Dn is feature extracted to generate a feature vector Xn corresponding to the behavior data Dn. Based on the feature vector Xn, the decision tree DT and the preset classification function Fc, a prediction result y=Fc(DT,Xn) corresponding to the behavior data Dn of the new user is generated. The prediction result is used to determine whether the user account corresponding to the behavior data Dn of the new user is a fake account.

[0016] According to a specific implementation of the embodiment of the present invention, the method further includes:

[0017] Based on the newly added behavior data Dn and the model update function U, the decision tree is updated to obtain an updated decision tree model DT′=U(DT,Dn);

[0018] Using the updated decision tree model DT′, the test data set Dts and the model adaptive adjustment function Fa, the decision tree model DT′ is adaptively adjusted to obtain the adaptively adjusted decision tree model DT′′=Fa(DT′,Dts);

[0019] The pruning function Fp is used to remove the overfitting nodes in the decision tree DT′′, and the pruned decision tree model DTf=Fp(DT′′) is obtained. The decision tree model DTf is used to identify fake accounts.

[0020] According to a specific implementation of an embodiment of the present invention, the multi-dimensional behavior data DY of the target user is collected from the social media platform, and the collected behavior data is cleaned, deduplicated, and standardized to obtain standard data DB, including:

[0021] Clean the collected data to remove duplicate, invalid and noisy data;

[0022] Standardize the data, including unifying the time format, encoding the behavior type, and normalizing user identifiers.

[0023] According to a specific implementation of the embodiment of the present invention, the extracting the feature vector X from the standard data DB by the feature extraction function Ft includes:

[0024] Extract each user's account creation time, number of users followed, and number of posts to form account information features Zh;

[0025] Extract each user’s posting frequency, number of likes, number of reposts, and number of comments to form the behavior pattern feature Xw;

[0026] Extract each user’s interaction frequency and network relationship information to form social network features Sw;

[0027] The text features and sentiment analysis results of each user’s post content are extracted to form content features Nt.

[0028] According to a specific implementation method of an embodiment of the present invention, the entropy H(DB) of the data set DB and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), H(DB|Nt) of the features Zh, Xw, Sw, and Nt are calculated, and the information gain IG(DB,X) of the feature vector X is calculated based on the entropy H(DB) and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), and H(DB|Nt), including:

[0029] Calculate the entropy H(DB) of the data set DB:

[0030]

[0031] DB is the standard data set, m is the number of categories of the category label Y corresponding to the standard data set DB, and pj is the frequency of the j-th category label appearing in the data set DB;

[0032] According to the different values ​​v1 of feature Zh, the dataset DB is divided into multiple subsets D v1 , for each subset D v1 Calculate the entropy H(D v1 ), calculate the conditional entropy H(DB|Zh) according to the entropy of the subset and the size of the subset:

[0033]

[0034] According to the different values ​​v2 of feature Xw, the dataset DB is divided into multiple subsets D v2 , for each subset Dv2 Calculate the entropy H(D v2 ), calculate the conditional entropy H(DB|Xw) according to the entropy of the subset and the size of the subset:

[0035]

[0036] According to the different values ​​v3 of the feature Sw, the data set DB is divided into multiple subsets D v3 , for each subset D v3 Calculate the entropy H(D v3 ), calculate the conditional entropy H(DB|Sw) according to the entropy of the subset and the size of the subset:

[0037]

[0038] According to the different values ​​v4 of feature Nt, the data set DB is divided into multiple subsets Dv4, and the entropy H(Dv4) is calculated for each subset Dv4. The conditional entropy H(DB|Nt) is calculated based on the entropy of the subset and the size of the subset:

[0039]

[0040] |DB|,|D v1 |、|D v2 |、|D v3 | and |D v4 | respectively represent the data set DB and the subset D v1 , D v2 , D v3 , D v4 The size of , H() is the entropy calculation function.

[0041] According to a specific implementation method of an embodiment of the present invention, the entropy H(DB) of the data set DB and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), H(DB|Nt) of the features Zh, Xw, Sw, and Nt are calculated, and the information gain IG(DB,X) of the feature vector X is calculated based on the entropy H(DB) and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), and H(DB|Nt), and further includes:

[0042] Calculate the information gain of each feature:

[0043] IG(DB,Zh)=H(DB)-H(DB|Zh)

[0044] IG(DB,Xw)=H(DB)-H(DB|Xw)

[0045] IG(DB,Sw)=H(DB)-H(DB|Sw)

[0046] IG(DB,Nt)=H(DB)-H(DB|Nt)

[0047] Calculate main effect information gain :

[0048]

[0049] Calculate feature interaction effect information gain :

[0050]

[0051] IG(DB,Zh), IG(DB,Xw), IG(DB,Sw) and IG(DB,Nt) are the information gains of features Zh, Xw, Sw and Nt respectively. is the weight of each feature, IG(DB,Z·Xw), IG(DB,Zh·Sw), IG(DB,Zh·Nt), IG(DB,Xw·Sw), IG(DB,Xw·Nt) and IG(DB,Sw·Nt) are the information gains of the feature interaction effects, is the weight of the feature interaction effect;

[0052] The information gain IG(DB,X) of the feature vector X is expressed as:

[0053] .

[0054] According to a specific implementation of an embodiment of the present invention, the standard data is divided into multiple subsets Dz based on the characteristic value of the root node, and based on the process of dividing the subsets, the decision sub-nodes Jz and decision rules Rj of the decision tree are generated, including:

[0055] After selecting the root node feature Zh, according to the value of feature Zh , divide the dataset DB into subsets :

[0056]

[0057] For each subset , generating a decision subnode , for each child node Generate the corresponding decision rule Rj:

[0058] .

[0059] According to a specific implementation of an embodiment of the present invention, the generation of a prediction result y=Fc(DT,Xn) corresponding to the behavior data Dn of a new user based on the feature vector Xn, the decision tree DT and the preset classification function Fc includes:

[0060] Use decision tree DT to classify feature vector Xn and generate prediction result ty;

[0061] The output ty of the decision tree DT is converted into the final prediction result y through the classification function Fc.

[0062] In a second aspect, an embodiment of the present invention provides a social media fake account identification device based on a decision tree, comprising:

[0063] The acquisition module collects the multi-dimensional behavior data DY of the target users from the social media platform, cleans, deduplicates and standardizes the collected behavior data to obtain the standard data DB;

[0064] The extraction module extracts the feature vector X from the standard data DB through the feature extraction function Ft, X=Ft(DB)=[Zh,Xw,Sw,Nt], where Zh represents the account information feature, Xw represents the behavior pattern feature, Sw represents the social network feature, and Nt represents the content feature;

[0065] A calculation module calculates the entropy H(DB) of the data set DB, and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), and H(DB|Nt) of the features Zh, Xw, Sw, and Nt, and calculates the information gain IG(DB,X) of the feature vector X based on the entropy H(DB) and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), and H(DB|Nt), and determines the root node of the decision tree according to the information gain IG(DB,X);

[0066] A generation module, based on the characteristic value of the root node, divides the standard data into multiple subsets Dz, and based on the process of dividing the subsets, generates decision subnodes Jz and decision rules Rj of the decision tree, each path of the decision tree represents a decision rule from the root node to the leaf node, and the leaf node of the decision tree represents the classification result Fz, thereby forming a decision tree DT=Fj(Dz,Jz,Rj,Fz), where Fj is a decision tree processing function;

[0067] After receiving the behavior data Dn of the new user, the prediction module extracts features of the behavior data Dn and generates a feature vector Xn corresponding to the behavior data Dn. Based on the feature vector Xn, the decision tree DT and the preset classification function Fc, the prediction result y=Fc(DT,Xn) corresponding to the behavior data Dn of the new user is generated. The prediction result is used to determine whether the user account corresponding to the behavior data Dn of the new user is a fake account.

[0068] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0069] at least one processor; and,

[0070] a memory communicatively connected to the at least one processor; wherein,

[0071] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the decision tree-based social media fake account identification method in any of the aforementioned first aspects or any of the implementations of the first aspect.

[0072] In a fourth aspect, an embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the decision tree-based social media fake account identification method in the aforementioned first aspect or any implementation of the first aspect.

[0073] In a fifth aspect, an embodiment of the present invention further provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the decision tree-based social media fake account identification method in the aforementioned first aspect or any implementation of the first aspect.

[0074] The social media fake account identification solution based on a decision tree in an embodiment of the present invention includes: collecting multi-dimensional behavior data DY of target users from a social media platform, performing data cleaning, data deduplication and data standardization processing on the collected behavior data to obtain standard data DB; extracting a feature vector X from the standard data DB through a feature extraction function Ft, X=Ft(DB)=[Zh,Xw,Sw,Nt], Zh represents account information features, Xw represents behavior pattern features, Sw represents social network features, and Nt represents content features; calculating the entropy H(DB) of the data set DB, and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), and H(DB|Nt) of the features Zh, Xw, Sw, and Nt, and calculating the information gain I of the feature vector X based on the entropy H(DB) and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), and H(DB|Nt). G(DB,X), determine the root node of the decision tree according to the information gain IG(DB,X); based on the characteristic value of the root node, divide the standard data into multiple subsets Dz, and based on the process of dividing the subsets, generate the decision subnodes Jz and decision rules Rj of the decision tree, each path of the decision tree represents a decision rule from the root node to the leaf node, and the leaf node of the decision tree represents the classification result Fz, thereby forming a decision tree DT=Fj(Dz,Jz,Rj,Fz), where Fj is the decision tree processing function; after receiving the behavior data Dn of the new user, extract the features of the behavior data Dn, generate the feature vector Xn corresponding to the behavior data Dn, and based on the feature vector Xn, the decision tree DT and the preset classification function Fc, generate the prediction result y=Fc(DT,Xn) corresponding to the behavior data Dn of the new user, and the prediction result is used to determine whether the user account corresponding to the behavior data Dn of the new user is a false account. The present invention has the following beneficial effects:

[0075] aEfficient identification:

[0076] Based on the decision tree algorithm, the system can process large-scale user data quickly and efficiently, identify fake accounts quickly, and is suitable for real-time detection.

[0077] b Strong interpretability:

[0078] The decision tree model has good interpretability. Platform managers can clearly see the characteristics and decision paths for identifying fake accounts, which helps to understand and regulate the algorithm.

[0079] cMulti-dimensional feature analysis:

[0080] The present invention combines multiple dimensions such as account information, user behavior, social network and content characteristics to improve the accuracy of recognition.

[0081] d. High dynamic adaptability:

[0082] Through incremental learning and adaptive adjustment mechanisms, the system can respond to changes in the behavior patterns of fake accounts and maintain efficient recognition capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0084] Figure 1 A flowchart of a method for identifying fake social media accounts based on a decision tree is provided in an embodiment of the present invention;

[0085] Figure 2 A schematic diagram of another method for identifying fake social media accounts based on a decision tree according to an embodiment of the present invention;

[0086] Figure 3 A schematic diagram of the structure of a social media fake account identification device based on a decision tree provided by an embodiment of the present invention;

[0087] Figure 4 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0088] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0089] The following describes the embodiments of the present disclosure through specific examples, and those skilled in the art can easily understand other advantages and effects of the present disclosure from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all of the embodiments. The present disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present disclosure. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present disclosure.

[0090] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein may be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present disclosure, it should be understood by those skilled in the art that an aspect described herein may be implemented independently of any other aspect, and two or more of these aspects may be combined in various ways. For example, any number of aspects described herein may be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein may be used to implement this device and / or practice this method.

[0091] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present disclosure. The drawings only show components related to the present disclosure rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.

[0092] Additionally, in the following description, specific details are provided to facilitate a thorough understanding of the examples. However, it will be understood by those skilled in the art that the aspects described may be practiced without these specific details.

[0093] The embodiment of the present disclosure provides a method for identifying fake social media accounts based on a decision tree. The method for identifying fake social media accounts based on a decision tree provided in this embodiment can be executed by a computing device, which can be implemented as software, or as a combination of software and hardware, and can be integrated in a server, terminal device, etc.

[0094] See also Figure 1 and Figure 2 The present disclosure provides a method for identifying fake social media accounts based on a decision tree, including:

[0095] S101, collect multi-dimensional behavior data DY of target users from social media platforms, perform data cleaning, data deduplication and data standardization on the collected behavior data to obtain standard data DB.

[0096] Based on the data collection and preprocessing module, users' multi-dimensional behavior data can be collected from social media platforms and cleaned and standardized. The specific steps include:

[0097] aData collection:

[0098] Through the API interface or data crawling tools of the social media platform, collect user account information (such as account creation time, number of followed users, number of posts, etc.), behavioral data (such as posting frequency, number of likes, number of reposts, number of comments, etc.), interaction data (such as frequency of interaction with other users, network relationships) and content data (such as the text content of posts).

[0099] bData cleaning and deduplication:

[0100] Remove duplicate data, invalid data, and noise data (such as incomplete account information, accounts marked as invalid, etc.) to ensure data accuracy and consistency.

[0101] cData standardization:

[0102] In order to enable different features to be effectively processed in the same model, the system standardizes numerical features, such as unifying timestamp formats and normalizing behavior frequencies.

[0103] S102, extracting a feature vector X from the standard data DB through a feature extraction function Ft, X=Ft(DB)=[Zh,Xw,Sw,Nt], where Zh represents account information features, Xw represents behavior pattern features, Sw represents social network features, and Nt represents content features.

[0104] The feature extraction module is responsible for extracting multi-dimensional features from the user's behavior data to provide training data for the decision tree model. The extracted features include:

[0105] aAccount information characteristics:

[0106] Account creation time: Fake accounts usually have a shorter lifespan, and newer accounts may be higher risk.

[0107] Growth rate of followers: The growth rate of followers of fake accounts may be abnormal, such as gaining a large number of followers in a short period of time or keeping the number of followers unchanged for a long time.

[0108] Avatar setting: Fake accounts may not set an avatar or use a default avatar.

[0109] Is the account description complete? Accounts with simple or blank descriptions are more likely to be fake accounts.

[0110] bBehavioral pattern characteristics:

[0111] Posting frequency: Fake accounts often post a large amount of information in a short period of time or remain inactive for a long time.

[0112] Content similarity: The content published is highly repetitive or templated, often machine-generated false information.

[0113] Abnormal interactions: behaviors such as frequently forwarding a specific content, excessive number of likes, or an abnormal number of meaningless comments.

[0114] c Social network characteristics:

[0115] Friends / following user networks: Fake accounts often follow a large number of other fake accounts, forming an unnatural network structure.

[0116] Interaction depth: The frequency and depth of interaction between fake accounts and other users are shallow, and the interaction is often one-way.

[0117] dContent features:

[0118] Text features: Natural language processing (NLP) technology is used to analyze the complexity and diversity of user-posted content. The content of fake accounts is usually simple, repetitive, and has little emotional fluctuation.

[0119] Sentiment analysis: Conduct sentiment analysis on the content of posts. The content of fake accounts often lacks natural emotional expression.

[0120] S103, calculate the entropy H(DB) of the data set DB, and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), H(DB|Nt) of the features Zh, Xw, Sw, and Nt, calculate the information gain IG(DB,X) of the feature vector X based on the entropy H(DB) and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), H(DB|Nt), and determine the root node of the decision tree according to the information gain IG(DB,X).

[0121] The decision tree algorithm can be used to train the model and identify fake accounts:

[0122] aFeature selection and construction:

[0123] The multi-dimensional features extracted by the feature extraction module are used as input data to construct feature vectors. In order to improve the effect of the model, the system further selects and constructs these features.

[0124] Information gain calculation: Use information gain to select the features that are most helpful in distinguishing fake accounts. The formula for information gain is:

[0125]

[0126] Among them, 𝐼𝐺(𝐷,𝐴) represents the information gain of feature 𝐴 for data set 𝐷, 𝐻(𝐷) is the information entropy of data set 𝐷, 𝐷𝑣 is the data subset when feature 𝐴 takes the value of 𝑣, and 𝑉(𝐴) is all possible values ​​of feature 𝐴.

[0127] Feature partitioning: Based on the value of the feature, the system recursively divides the data set into different subsets until the samples in each subset are pure enough (that is, most samples belong to the same class), thereby generating a decision tree.

[0128] S104, based on the characteristic value of the root node, the standard data is divided into multiple subsets Dz, and based on the process of dividing the subsets, the decision sub-nodes Jz and decision rules Rj of the decision tree are generated. Each path of the decision tree represents a decision rule from the root node to the leaf node. The leaf node of the decision tree represents the classification result Fz, thereby forming a decision tree DT=Fj(Dz,Jz,Rj,Fz), where Fj is the decision tree processing function.

[0129] The training process of a decision tree consists of the following steps:

[0130] Constructing the root node: The system first selects the feature with the largest information gain as the root node, and divides the data set into multiple subsets based on this feature.

[0131] Recursively construct child nodes: For each subset, the system repeats the process of feature selection and dataset partitioning, generating new nodes until a stopping condition is reached (such as the data in the node meets the purity requirement, or the maximum depth limit of the tree).

[0132] Forming decision rules: Each path of the decision tree represents a decision rule from the root node to the leaf node, and the final leaf node represents the classification result (real account or fake account).

[0133] Pruning: To avoid overfitting, the system prunes the trained decision tree and removes redundant nodes. Pruning can be based on the minimum description length (MDL) principle or the cross-validation method.

[0134] S105, after receiving the behavior data Dn of the new user, perform feature extraction on the behavior data Dn to generate a feature vector Xn corresponding to the behavior data Dn, and based on the feature vector Xn, the decision tree DT and the preset classification function Fc, generate a prediction result y=Fc(DT,Xn) corresponding to the behavior data Dn of the new user. The prediction result is used to determine whether the user account corresponding to the behavior data Dn of the new user is a fake account.

[0135] After training is completed, the decision tree model is used to identify whether a new user is a fake account. The identification process is as follows:

[0136] Input feature data: The new user's behavior data is processed by the feature extraction module to generate the corresponding feature vector.

[0137] Model prediction: The feature vector passes through each node of the decision tree in turn, and is matched to the corresponding child node according to the feature value until it reaches the leaf node.

[0138] Result output: The output result of the leaf node is the predicted classification result of the account (real account or fake account).

[0139] The present invention has the following advantages:

[0140] a Efficient identification:

[0141] Based on the decision tree algorithm, the system can process large-scale user data quickly and efficiently, identify fake accounts quickly, and is suitable for real-time detection.

[0142] b Strong interpretability:

[0143] The decision tree model has good interpretability. Platform managers can clearly see the characteristics and decision paths for identifying fake accounts, which helps to understand and regulate the algorithm.

[0144] cMulti-dimensional feature analysis:

[0145] The present invention combines multiple dimensions such as account information, user behavior, social network and content characteristics to improve the accuracy of recognition.

[0146] d. High dynamic adaptability:

[0147] Through incremental learning and adaptive adjustment mechanisms, the system can respond to changes in the behavior patterns of fake accounts and maintain efficient recognition capabilities.

[0148] According to a specific implementation of the embodiment of the present invention, the method further includes:

[0149] Based on the newly added behavior data Dn and the model update function U, the decision tree is updated to obtain an updated decision tree model DT′=U(DT,Dn);

[0150] Using the updated decision tree model DT′, the test data set Dts and the model adaptive adjustment function Fa, the decision tree model DT′ is adaptively adjusted to obtain the adaptively adjusted decision tree model DT′′=Fa(DT′,Dts);

[0151] The pruning function Fp is used to remove the overfitting nodes in the decision tree DT′′, and the pruned decision tree model DTf=Fp(DT′′) is obtained. The decision tree model DTf is used to identify fake accounts.

[0152] According to a specific implementation of an embodiment of the present invention, the multi-dimensional behavior data DY of the target user is collected from the social media platform, and the collected behavior data is cleaned, deduplicated, and standardized to obtain standard data DB, including:

[0153] Clean the collected data to remove duplicate, invalid and noisy data;

[0154] Standardize the data, including unifying the time format, encoding the behavior type, and normalizing user identifiers.

[0155] According to a specific implementation of the embodiment of the present invention, the extracting the feature vector X from the standard data DB by the feature extraction function Ft includes:

[0156] Extract each user's account creation time, number of users followed, and number of posts to form account information features Zh;

[0157] Extract each user’s posting frequency, number of likes, number of reposts, and number of comments to form the behavior pattern feature Xw;

[0158] Extract each user’s interaction frequency and network relationship information to form social network features Sw;

[0159] The text features and sentiment analysis results of each user’s post content are extracted to form content features Nt.

[0160] According to a specific implementation method of an embodiment of the present invention, the entropy H(DB) of the data set DB and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), H(DB|Nt) of the features Zh, Xw, Sw, and Nt are calculated, and the information gain IG(DB,X) of the feature vector X is calculated based on the entropy H(DB) and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), and H(DB|Nt), including:

[0161] Calculate the entropy H(DB) of the data set DB:

[0162]

[0163] DB is the standard data set, m is the number of categories of the category label Y corresponding to the standard data set DB, and pj is the frequency of the j-th category label appearing in the data set DB;

[0164] According to the different values ​​v1 of feature Zh, the dataset DB is divided into multiple subsets D v1 , for each subset D v1 Calculate the entropy H(D v1 ), calculate the conditional entropy H(DB|Zh) according to the entropy of the subset and the size of the subset:

[0165]

[0166] According to the different values ​​v2 of feature Xw, the dataset DB is divided into multiple subsets D v2, for each subset D v2 Calculate the entropy H(D v2 ), calculate the conditional entropy H(DB|Xw) according to the entropy of the subset and the size of the subset:

[0167]

[0168] According to the different values ​​v3 of the feature Sw, the data set DB is divided into multiple subsets D v3 , for each subset D v3 Calculate the entropy H(D v3 ), calculate the conditional entropy H(DB|Sw) according to the entropy of the subset and the size of the subset:

[0169]

[0170] According to the different values ​​v4 of feature Nt, the data set DB is divided into multiple subsets Dv4, and the entropy H(Dv4) is calculated for each subset Dv4. The conditional entropy H(DB|Nt) is calculated based on the entropy of the subset and the size of the subset:

[0171]

[0172] |DB|,|D v1 |、|D v2 |、|D v3 | and |D v4 | respectively represent the data set DB and the subset D v1 , D v2 , D v3 , D v4 The size of , H() is the entropy calculation function.

[0173] According to a specific implementation method of an embodiment of the present invention, the entropy H(DB) of the data set DB and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), H(DB|Nt) of the features Zh, Xw, Sw, and Nt are calculated, and the information gain IG(DB,X) of the feature vector X is calculated based on the entropy H(DB) and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), and H(DB|Nt), and further includes:

[0174] Calculate the information gain of each feature:

[0175] IG(DB,Zh)=H(DB)-H(DB|Zh)

[0176] IG(DB,Xw)=H(DB)-H(DB|Xw)

[0177] IG(DB,Sw)=H(DB)-H(DB|Sw)

[0178] IG(DB,Nt)=H(DB)-H(DB|Nt)

[0179] Calculate main effect information gain :

[0180]

[0181] Calculate feature interaction effect information gain :

[0182]

[0183] IG(DB,Zh), IG(DB,Xw), IG(DB,Sw) and IG(DB,Nt) are the information gains of features Zh, Xw, Sw and Nt respectively. is the weight of each feature, IG(DB,Z·Xw), IG(DB,Zh·Sw), IG(DB,Zh·Nt), IG(DB,Xw·Sw), IG(DB,Xw·Nt) and IG(DB,Sw·Nt) are the information gains of the feature interaction effects, is the weight of the feature interaction effect;

[0184] The information gain IG(DB,X) of the feature vector X is expressed as:

[0185] .

[0186] According to a specific implementation of an embodiment of the present invention, the standard data is divided into multiple subsets Dz based on the characteristic value of the root node, and based on the process of dividing the subsets, the decision sub-nodes Jz and decision rules Rj of the decision tree are generated, including:

[0187] After selecting the root node feature Zh, according to the value of feature Zh , divide the dataset DB into subsets :

[0188]

[0189] For each subset , generating a decision subnode , for each child node Generate the corresponding decision rule Rj:

[0190] .

[0191] According to a specific implementation of an embodiment of the present invention, the generation of a prediction result y=Fc(DT,Xn) corresponding to the behavior data Dn of a new user based on the feature vector Xn, the decision tree DT and the preset classification function Fc includes:

[0192] Use decision tree DT to classify feature vector Xn and generate prediction result ty;

[0193] The output ty of the decision tree DT is converted into the final prediction result y through the classification function Fc.

[0194] Corresponding to the above method embodiment, see Figure 3 The embodiment of the present invention further discloses a social media fake account identification device 30 based on a decision tree, comprising:

[0195] The collection module 301 collects multi-dimensional behavior data DY of target users from the social media platform, performs data cleaning, data deduplication and data standardization on the collected behavior data to obtain standard data DB;

[0196] Extraction module 302, extracting feature vector X from standard data DB through feature extraction function Ft, X=Ft(DB)=[Zh,Xw,Sw,Nt], Zh represents account information feature, Xw represents behavior pattern feature, Sw represents social network feature, Nt represents content feature;

[0197] A calculation module 303 calculates the entropy H(DB) of the data set DB, and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), and H(DB|Nt) of the features Zh, Xw, Sw, and Nt, and calculates the information gain IG(DB,X) of the feature vector X based on the entropy H(DB) and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), and H(DB|Nt), and determines the root node of the decision tree according to the information gain IG(DB,X);

[0198] A generation module 304 divides the standard data into multiple subsets Dz based on the feature value of the root node, and generates a decision sub-node Jz and a decision rule Rj of a decision tree based on the process of dividing the subsets. Each path of the decision tree represents a decision rule from the root node to the leaf node. The leaf node of the decision tree represents the classification result Fz, thereby forming a decision tree DT=Fj(Dz, Jz, Rj, Fz), where Fj is a decision tree processing function;

[0199] After receiving the behavior data Dn of the new user, the prediction module 305 extracts features from the behavior data Dn to generate a feature vector Xn corresponding to the behavior data Dn, and based on the feature vector Xn, the decision tree DT and the preset classification function Fc, generates a prediction result y=Fc(DT,Xn) corresponding to the behavior data Dn of the new user. The prediction result is used to determine whether the user account corresponding to the behavior data Dn of the new user is a fake account.

[0200] See also Figure 4 The embodiment of the present invention further provides an electronic device 60, the electronic device comprising:

[0201] at least one processor; and,

[0202] a memory communicatively connected to the at least one processor; wherein,

[0203] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the social media fake account identification method based on the decision tree in the aforementioned method embodiment.

[0204] An embodiment of the present invention further provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the aforementioned method embodiment.

[0205] An embodiment of the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the decision tree-based social media fake account identification method in the aforementioned method embodiment.

[0206] Reference below Figure 4 , which shows a schematic diagram of the structure of an electronic device 60 suitable for implementing the embodiment of the present disclosure. The electronic device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 4 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0207] like Figure 4 As shown, the electronic device 60 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 60 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0208] Typically, the following devices may be connected to the I / O interface 605: an input device 606 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, a gage, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 60 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 4 The electronic device 60 is shown with various devices, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have instead.

[0209] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0210] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A method for identifying fake social media accounts based on decision trees, characterized in that: include: Collect multi-dimensional behavior data DY of target users from social media platforms, perform data cleaning, data deduplication and data standardization on the collected behavior data to obtain standard data DB; Extract feature vector X from standard data DB through feature extraction function Ft, X=Ft(DB)=[Zh,Xw,Sw,Nt], Zh represents account information features, Xw represents behavior pattern features, Sw represents social network features, and Nt represents content features; Calculate the entropy H(DB) of the data set DB, and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), H(DB|Nt) of the features Zh, Xw, Sw, and Nt, calculate the information gain IG(DB,X) of the feature vector X based on the entropy H(DB) and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), H(DB|Nt), and determine the root node of the decision tree according to the information gain IG(DB,X); Based on the characteristic value of the root node, the standard data is divided into multiple subsets Dz, and based on the process of dividing the subsets, the decision sub-nodes Jz and decision rules Rj of the decision tree are generated. Each path of the decision tree represents a decision rule from the root node to the leaf node. The leaf node of the decision tree represents the classification result Fz, thereby forming a decision tree DT=Fj(Dz,Jz,Rj,Fz), where Fj is a decision tree processing function; After receiving the behavior data Dn of the new user, the behavior data Dn is feature extracted to generate a feature vector Xn corresponding to the behavior data Dn. Based on the feature vector Xn, the decision tree DT and the preset classification function Fc, a prediction result y=Fc(DT,Xn) corresponding to the behavior data Dn of the new user is generated. The prediction result is used to determine whether the user account corresponding to the behavior data Dn of the new user is a fake account.

2. The method according to claim 1, characterized in that The method further comprises: Based on the newly added behavior data Dn and the model update function U, the decision tree is updated to obtain an updated decision tree model DT′=U(DT,Dn); Using the updated decision tree model DT′, the test data set Dts and the model adaptive adjustment function Fa, the decision tree model DT′ is adaptively adjusted to obtain the adaptively adjusted decision tree model DT′′=Fa(DT′,Dts); The pruning function Fp is used to remove the overfitting nodes in the decision tree DT′′, and the pruned decision tree model DTf=Fp(DT′′) is obtained. The decision tree model DTf is used to identify fake accounts.

3. The method according to claim 2, characterized in that The multi-dimensional behavior data DY of the target user is collected from the social media platform, and the collected behavior data is cleaned, deduplicated, and standardized to obtain standard data DB, including: Clean the collected data to remove duplicate, invalid and noisy data; Standardize the data, including unifying the time format, encoding the behavior type, and normalizing user identifiers.

4. The method according to claim 3, characterized in that: The extracting of the feature vector X from the standard data DB by the feature extraction function Ft comprises: Extract each user's account creation time, number of users followed, and number of posts to form account information features Zh; Extract each user’s posting frequency, number of likes, number of reposts, and number of comments to form the behavior pattern feature Xw; Extract each user’s interaction frequency and network relationship information to form social network features Sw; The text features and sentiment analysis results of each user’s post content are extracted to form content features Nt.

5. The method according to claim 4, characterized in that The entropy H(DB) of the computing data set DB and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), H(DB|Nt) of the features Zh, Xw, Sw, and Nt are calculated, and the information gain IG(DB,X) of the feature vector X is calculated based on the entropy H(DB) and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), H(DB|Nt), including: Calculate the entropy H(DB) of the data set DB: DB is the standard data set, m is the number of categories of the category label Y corresponding to the standard data set DB, and pj is the frequency of the j-th category label appearing in the data set DB; According to the different values ​​v1 of feature Zh, the dataset DB is divided into multiple subsets D v1 , for each subset D v1 Calculate the entropy H(D v1 ), calculate the conditional entropy H(DB|Zh) according to the entropy of the subset and the size of the subset: According to the different values ​​v2 of feature Xw, the dataset DB is divided into multiple subsets D v2 , for each subset D v2 Calculate the entropy H(D v2 ), calculate the conditional entropy H(DB|Xw) according to the entropy of the subset and the size of the subset: According to the different values ​​v3 of the feature Sw, the data set DB is divided into multiple subsets D v3 , for each subset D v3 Calculate the entropy H(D v3 ), calculate the conditional entropy H(DB|Sw) according to the entropy of the subset and the size of the subset: According to the different values ​​v4 of feature Nt, the data set DB is divided into multiple subsets Dv4, and the entropy H(Dv4) is calculated for each subset Dv4. The conditional entropy H(DB|Nt) is calculated based on the entropy of the subset and the size of the subset: |DB|,|D v1 |、|D v2 |、|D v3 | and |D v4 | respectively represent the data set DB and the subset D v1 , D v2 , D v3 , D v4 The size of , H() is the entropy calculation function.

6. The method according to claim 5, characterized in that The entropy H(DB) of the computing data set DB and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), H(DB|Nt) of the features Zh, Xw, Sw, and Nt are calculated, and the information gain IG(DB,X) of the feature vector X is calculated based on the entropy H(DB) and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), and H(DB|Nt), and further includes: Calculate the information gain of each feature: IG(DB,Zh)=H(DB)-H(DB|Zh) IG(DB,Xw)=H(DB)-H(DB|Xw) IG(DB,Sw)=H(DB)-H(DB|Sw) IG(DB,Nt)=H(DB)-H(DB|Nt) Calculate main effects information gain : Calculate feature interaction effect information gain : IG(DB,Zh), IG(DB,Xw), IG(DB,Sw) and IG(DB,Nt) are the information gains of features Zh, Xw, Sw and Nt respectively. is the weight of each feature, IG(DB,Z·Xw), IG(DB,Zh·Sw), IG(DB,Zh·Nt), IG(DB,Xw·Sw), IG(DB,Xw·Nt) and IG(DB,Sw·Nt) are the information gains of the feature interaction effects, is the weight of the feature interaction effect; The information gain IG(DB,X) of the feature vector X is expressed as: 。 7. The method according to claim 6, characterized in that The method of dividing the standard data into a plurality of subsets Dz based on the characteristic value of the root node, and generating a decision sub-node Jz and a decision rule Rj of a decision tree based on the process of dividing the subsets includes: After selecting the root node feature Zh, according to the value of feature Zh , divide the dataset DB into subsets : For each subset , generating a decision subnode , for each child node Generate the corresponding decision rule Rj: 。 8. The method according to claim 7, characterized in that The method of generating a prediction result y=Fc(DT,Xn) corresponding to the behavior data Dn of a new user based on the feature vector Xn, the decision tree DT and the preset classification function Fc includes: Use decision tree DT to classify feature vector Xn and generate prediction result ty; The output ty of the decision tree DT is converted into the final prediction result y through the classification function Fc.

9. A social media fake account identification device based on a decision tree, characterized in that: include: The acquisition module collects the multi-dimensional behavior data DY of the target users from the social media platform, cleans, deduplicates and standardizes the collected behavior data to obtain the standard data DB; The extraction module extracts the feature vector X from the standard data DB through the feature extraction function Ft, X=Ft(DB)=[Zh,Xw,Sw,Nt], where Zh represents the account information feature, Xw represents the behavior pattern feature, Sw represents the social network feature, and Nt represents the content feature; A calculation module calculates the entropy H(DB) of the data set DB, and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), and H(DB|Nt) of the features Zh, Xw, Sw, and Nt, and calculates the information gain IG(DB,X) of the feature vector X based on the entropy H(DB) and the conditional entropies H(DB|Zh), H(DB|Xw), H(DB|Sw), and H(DB|Nt), and determines the root node of the decision tree according to the information gain IG(DB,X); A generation module, based on the characteristic value of the root node, divides the standard data into multiple subsets Dz, and based on the process of dividing the subsets, generates decision subnodes Jz and decision rules Rj of the decision tree, each path of the decision tree represents a decision rule from the root node to the leaf node, and the leaf node of the decision tree represents the classification result Fz, thereby forming a decision tree DT=Fj(Dz,Jz,Rj,Fz), where Fj is a decision tree processing function; After receiving the behavior data Dn of the new user, the prediction module extracts features from the behavior data Dn to generate a feature vector Xn corresponding to the behavior data Dn. Based on the feature vector Xn, the decision tree DT and the preset classification function Fc, the prediction result y=Fc(DT,Xn) corresponding to the behavior data Dn of the new user is generated. The prediction result is used to determine whether the user account corresponding to the behavior data Dn of the new user is a fake account.

10. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the decision tree-based social media fake account identification method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Method and system for classifying and predicting user behaviors

    CN107818344A

  • A purchaser account period risk prediction method

    CN113191771A

  • Social robot account detection method based on feature evaluation and improved algorithm

    CN114708114A

  • Decision tree generation method, system and device capable of incremental learning, and terminal

    CN116523037A

  • Social media robot detection method and system based on random forest and XGBoost model

    CN117407800A