User differentiation method and apparatus based on content and network features, device, and medium

By combining Markov random field models and graph convolutional neural networks, and utilizing social network graph and content features, the problem of low efficiency in spam message detection in traditional methods is solved, achieving more efficient and accurate identification of spam accounts.

CN116128671BActive Publication Date: 2026-04-21PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PING AN TECH (SHENZHEN) CO LTD
Filing Date
2023-02-15
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

In existing technologies, traditional supervised algorithms and prediction methods based on message attribute features and content features are inefficient in identifying spam senders and are easily bypassed by attackers, resulting in low detection accuracy.

Method used

By combining Markov random field models and graph convolutional neural networks, node features and content features are obtained through social network graphs. The probability distribution of Markov random field models and the activation function of graph convolutional neural networks are used in conjunction with the BERT base model to classify user types.

Benefits of technology

It improves the accuracy of spam account detection, reduces reliance on a large number of features, enhances detection efficiency, and prevents malicious users from bypassing it.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116128671B_ABST
    Figure CN116128671B_ABST
Patent Text Reader

Abstract

This application relates to the field of relational network analysis in artificial intelligence, specifically to a user differentiation method, apparatus, device, and medium based on content and network features, comprising: acquiring a social network graph; acquiring node features of each node based on the social network graph; inputting the node features into a Markov random field model to obtain a first classification result of the node; extracting content features from the content information; inputting the content features into a trained content classification model to obtain a second classification result of the content features; and determining the user type of the node based on the first classification result and the second classification result. This application combines the different characteristics of content features and network features, utilizing more comprehensive user information to detect whether users on social network platforms are spam accounts, making it less likely for malicious users to bypass the detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of relational network analysis in artificial intelligence, specifically to a user differentiation method, apparatus, device, and medium based on content and network characteristics. Background Technology

[0002] As online social platforms are constantly updated, more and more people are willing to share information on these platforms, such as videos, photos, local customs and culture, and news.

[0003] With the development of internet technology, online social networking (OSN) application platforms such as TikTok, Facebook, and Twitter have made user interaction and communication increasingly simple and convenient; today, they have become important means for users to discuss events and share personal experiences.

[0004] However, with the booming popularity of online social networking application platforms, many criminals have engaged in illegal activities to seek personal gain. For example, they send emails containing fake advertisements to users through fake accounts, or spread tweets containing links to unhealthy websites to lure users into clicking on them, thereby stealing real users' personal information and launching various attacks on real users and social networks. This poses a serious threat to the security of user accounts and social platforms, and severely affects the user experience.

[0005] Therefore, effectively and accurately identifying the senders of these spam messages and automatically intercepting and blocking them is of great significance in the development of OSNs. In traditional environments, there are two main methods for detecting fake accounts: one is to use traditional supervised algorithms, and the other is to predict based on the attribute and content features of the message. However, both of these methods require a large number of key features to distinguish them and are easily bypassed by attackers, resulting in low detection efficiency and accuracy. Summary of the Invention

[0006] This application provides a user differentiation method, apparatus, device, and medium based on content and network features, aiming to solve the problem that existing technologies using traditional supervised algorithms and prediction methods based on message attribute features and content features require a large number of key features and are easily bypassed by attackers, resulting in low detection efficiency and accuracy.

[0007] To address the aforementioned technical problems, firstly, this application provides a user differentiation method based on content and network characteristics, including:

[0008] Obtain a social network graph, which contains multiple nodes and corresponding connecting edges. Each node represents a user, and the connecting edges represent the connection relationships between the nodes.

[0009] The node features of each node are obtained from the social network graph, and the node features include the adjacency structure of the node and the content information between the nodes in the adjacency structure.

[0010] The node features are input into a Markov random field model to obtain the first classification result of the node;

[0011] Extract the content features of the content information;

[0012] The content features are input into the trained content classification model to obtain the second classification result of the content features;

[0013] The user type of the node is determined based on the first classification result and the second classification result.

[0014] Preferably, the step of obtaining the node features of each node based on the social network graph includes:

[0015] The social network graph is input into a trained graph convolutional neural network to calculate the node features of the nodes in the social network graph. The calculation formula is as follows:

[0016] ;

[0017] in, For the first convolutional neural network Node features in the layer It is the adjacency matrix passed unilaterally to node u in the social network graph. It is the adjacency matrix unilaterally transmitted by node u in the social network graph. It is the adjacency matrix of the bidirectional relationships of node u in the social network graph;

[0018] in:

[0019] ;

[0020] It is an adjacency matrix with added self-joins and bidirectional relationships. It is the identity matrix. yes The degree matrix; yes The weight matrix in the corresponding layer of the convolutional neural network; yes The weight matrix in the corresponding layer of the convolutional neural network; This is the activation function of a graph convolutional neural network. The input to the first layer of the convolutional neural network is:

[0021] H(0) = X;

[0022] ∈ {1, ..., K};

[0023] K is a positive integer. Let X be the number of layers in the graph convolutional neural network, and X be the user feature matrix.

[0024] Preferably, the step of obtaining the social network graph includes:

[0025] To analyze the social relationships of all users on a social network;

[0026] The social network graph G = (V, E) is constructed based on the social relationships, where V represents a node in the social network graph, each user corresponds to a node, and E is the connecting edge corresponding to the node.

[0027] Preferably, the step of inputting the node features into a Markov random field model to obtain the first classification result of the node includes:

[0028] The probability distribution of the Markov random field in the Markov random field model is calculated based on the energy function in the Gibbs distribution.

[0029] The first classification result of the node is determined based on the probability distribution of the Markov random field;

[0030] The calculation formula is as follows:

[0031] P ( ) = ));

[0032] in P ( Let represent the probability distribution of a Markov random field. These are the labels for all users, and Z is the normalization constant. ) is the energy function in the Gibbs distribution; This indicates that the user type corresponding to the current node is a spam user. This indicates that the user type corresponding to the current node is a legitimate user.

[0033] Preferably, the energy function is:

[0034] ;

[0035] in, The univariate potential of the energy function; It is a binary potential of the energy function. ) = - log , User v is labeled with a tag from the output of a graph convolutional neural network. The probability is given by uni, where uni represents one-way and bi represents two-way.

[0036] Preferably, the step of determining the first classification result of the node based on the probability distribution of the Markov random field includes:

[0037] The probability distribution of the Markov random field is approximated based on mean-field theory, and the approximate calculation results are obtained.

[0038] Based on the approximate calculation results, the probability distribution of the Markov random field is replaced with a decomposable distribution, wherein:

[0039]

[0040]

[0041] ;

[0042] in, For user nodes that follow node u, i.e., one-way input; For user nodes that u follows, i.e., one-way outgoing; A user node that follows node u and is also a bidirectional neighbor of node u.

[0043] Preferably, the training steps of the content classification model include:

[0044] Obtain training content information between nodes in the adjacent structure;

[0045] Extract training content features from the training content information;

[0046] The training content features are input into the BERT base model for training until the difference between adjacent loss function values ​​obtained after a preset number of consecutive iterations does not exceed a preset value, thus obtaining a well-trained content classification model.

[0047] Secondly, this application provides a user differentiation device based on content and network characteristics, comprising:

[0048] A social network graph acquisition module is used to acquire a social network graph, which contains multiple nodes and corresponding connecting edges. Each node represents a user, and the connecting edges are the connection relationships between the nodes.

[0049] The node feature acquisition module is used to acquire the node features of each node according to the social network graph. The node features include the adjacency structure of the node and the content information between the nodes in the adjacency structure.

[0050] The first classification result acquisition module is used to input the node features into the Markov random field model to obtain the first classification result of the node;

[0051] A content feature acquisition module is used to extract content features from the content information;

[0052] The second classification result acquisition module is used to input the content features into the trained content classification model to obtain the second classification result of the content features;

[0053] The user type determination module is used to determine the user type of the node based on the first classification result and the second classification result.

[0054] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the user differentiation method based on content and network characteristics described in any of the preceding claims.

[0055] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the user differentiation method based on content and network characteristics described in any of the preceding claims.

[0056] This application discloses a user differentiation method, apparatus, device, and medium based on content and network features, comprising: acquiring a social network graph containing multiple nodes and corresponding connecting edges, each node representing a user, and the connecting edges representing the connection relationships between the nodes; acquiring node features of each node based on the social network graph, the node features including the adjacency structure of the node and content information between the nodes in the adjacency structure; inputting the node features into a Markov random field model to obtain a first classification result for the node; extracting content features from the content information; inputting the content features into a trained content classification model to obtain a second classification result for the content features; and determining the user type of the node based on the first classification result and the second classification result. This application combines the different characteristics of content features and network features, utilizing more comprehensive user information to detect whether users on social network platforms are spam accounts. This method is less susceptible to being bypassed by malicious users and effectively solves the problem in existing technologies that use traditional supervised algorithms and prediction methods based on message attribute features and content features, which require a large number of key features and are easily bypassed by attackers, resulting in low detection efficiency and accuracy. Attached Figure Description

[0057] Figure 1This is a flowchart illustrating a user differentiation method based on content and network characteristics, as shown in one embodiment.

[0058] Figure 2 A schematic diagram of a user differentiation device based on content and network characteristics according to an embodiment;

[0059] Figure 3 This is a schematic block diagram of the structure of a computer device according to one embodiment.

[0060] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0061] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0062] Those skilled in the art will understand that, unless explicitly stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in the specification of this application means the presence of features, integers, steps, operations, elements, units, cells, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, units, cells, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless couplings. The term “and / or” as used herein includes all or any of the units and all combinations thereof of one or more associated listed items.

[0063] Those skilled in the art will understand that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0064] The embodiments of this application belong to the field of artificial intelligence and are applicable to the identification of user types (such as normal users and abnormal users) in social networking platforms such as Twitter, Facebook, TikTok, and Xiaohongshu.

[0065] Reference Figure 1This is a user differentiation method based on content and network characteristics provided in one embodiment of the present application, including:

[0066] S1: Obtain a social network graph, which contains multiple nodes and corresponding connecting edges. Each node represents a user, and the connecting edges are the connection relationships between the nodes.

[0067] As mentioned above, the social network graph refers to a directed or undirected graph constructed by users on a social platform based on their mutual following relationships. In the social network graph, each node corresponds to a user, and the connecting edges represent the connection relationships between the nodes, i.e., the following or following relationships between users.

[0068] S2: Obtain the node features of each node according to the social network graph, wherein the node features include the adjacency structure of the node and the content information between the nodes in the adjacency structure;

[0069] As mentioned above, based on the attention relationships between each node and its neighboring users in the social network graph, the adjacency structure relationship built around each node can be obtained. That is, based on the information propagation records between nodes, i.e. the content message records passed between users, we can obtain which users each user is followed by, which node users each user follows, and the mutual attention relationships of each user.

[0070] S3: Input the node features into the Markov random field model to obtain the first classification result of the node;

[0071] As mentioned above, by inputting the follow relationships between users in the corresponding social network graph into the Markov random field model, the probability of a user being an abnormal user can be initially calculated. Based on the homogeneity of social networks, users and their bidirectional neighbors generally have the same labels. If user u has many unidirectional incoming neighbors (i.e., u is followed by many users), then u is usually a legitimate normal user. If user u has many unidirectional outgoing neighbors (i.e., u follows many users), then u may be an abnormal user. Therefore, the probability of a user being an abnormal user can be initially determined through the user's node features, which is the first classification result. Here, it is a preliminary judgment of user attributes based on network features.

[0072] S4: Extract the content features of the content information;

[0073] S5: Input the content features into the trained content classification model to obtain the second classification result of the content features;

[0074] As mentioned above in S4-5, for message propagation between users and neighboring users, the content features of the messages between users can be extracted based on the message records between users and neighboring users. That is, keywords and key features in the message content between users and neighboring users can be extracted. Specifically, it can be whether there are sensitive words, images, or links. After inputting into the trained content classification model, the probability of whether it is an illegal message is calculated based on the keywords and key features in the message content, which is the second classification result.

[0075] S6: Determine the user type of the node based on the first classification result and the second classification result.

[0076] As described above, the average of the two classification results can be calculated based on the first classification result obtained in step S3 based on network attention features and the second classification result obtained based on the content features in the message records transmitted between users. If the average is greater than a preset value, such as greater than 0.6, the user can be determined to be an abnormal user.

[0077] Furthermore, different weights can be set for these two classification results, and the overall average can be calculated using the weights of these two classification results.

[0078] The user differentiation method based on content and network features provided by this invention can combine the different characteristics of content features and network features, and use more comprehensive user information to detect whether users on social networking platforms are spam accounts, avoiding malicious users from bypassing the detection, ensuring the accuracy of detection, and eliminating the need to define a large number of feature formulas to filter useful features, thereby improving detection efficiency.

[0079] In one embodiment, the step of obtaining the node features of each node based on the social network graph includes:

[0080] The social network graph is input into a trained graph convolutional neural network to calculate the node features of the nodes in the social network graph. The calculation formula is as follows:

[0081] ;

[0082] in, For the first convolutional neural network Node features in the layer It is the adjacency matrix passed unilaterally to node u in the social network graph. It is the adjacency matrix unilaterally transmitted by node u in the social network graph. It is the adjacency matrix of the bidirectional relationships of node u in the social network graph;

[0083] in:

[0084] ;

[0085] It is an adjacency matrix with added self-joins and bidirectional relationships. It is the identity matrix. yes The degree matrix; yes The weight matrix in the corresponding layer of the convolutional neural network; yes The weight matrix in the corresponding layer of the convolutional neural network; This is the activation function of a graph convolutional neural network. The input to the first layer of the convolutional neural network is:

[0086] H(0) = X;

[0087] ∈ {1, ..., K};

[0088] K is a positive integer. Let X be the number of layers in the graph convolutional neural network, and X be the user feature matrix.

[0089] As mentioned above, Graph Convolutional Neural Networks (GCNs) are used to capture information propagation between nodes. Due to the different directions of attention relationships—one-way inbound, one-way outbound, and two-way attention relationships—different aspects of user behavior are captured. Therefore, when performing graph convolution, these three types of neighbors should be processed separately, rather than using GCN forward propagation to compute on a single pair. That is, a separate weight matrix is ​​assigned to each different type of user, and the node features of the user are obtained by assigning weight matrices to different types of users.

[0090] In one embodiment, the step of obtaining the social network graph includes:

[0091] To analyze the social relationships of all users on a social network;

[0092] The social network graph G = (V, E) is constructed based on the social relationships, where V represents a node in the social network graph, each user corresponds to a node, and E is the connecting edge corresponding to the node.

[0093] As mentioned above, social networks are inherently directional. Therefore, in order to obtain a good social relationship graph, the directional information of the edges in the social graph is used to statistically analyze the social network graph of all users: G = (V, E), where V represents the nodes in the social network graph, each user corresponds to a node, and each E is the connecting edge corresponding to the node, that is, the follow or follow relationship between users.

[0094] In one embodiment, the step of inputting the node features into a Markov random field model to obtain the first classification result of the node includes:

[0095] The probability distribution of the Markov random field in the Markov random field model is calculated based on the energy function in the Gibbs distribution.

[0096] The first classification result of the node is determined based on the probability distribution of the Markov random field;

[0097] The calculation formula is as follows:

[0098] P ( ) = ));

[0099] in P ( Let represent the probability distribution of a Markov random field. These are the labels for all users, and Z is the normalization constant. ) is the energy function in the Gibbs distribution; This indicates that the user type corresponding to the current node is a spam user. This indicates that the user type corresponding to the current node is a legitimate user.

[0100] As mentioned above, in social networks, there are three intuitive assumptions for determining user types: First, user u's bidirectional neighbors generally have the same labels as u; this property is called the homogeneity of the social network. Second, user u has many unidirectional incoming neighbors (i.e., u is followed by many users), so u is usually a normal user. Third, user u has many unidirectional outgoing neighbors (i.e., u follows many users), so u may be an abnormal user. Markov random fields (MRFs) can be used to model the joint probability distribution of all user identities to capture these three intuitive assumptions. Simulating these three intuitive MRF layers (Markov random fields) helps improve the performance of GCNs (Graph Convolutional Neural Networks). According to the Hammersley-Clifford theorem, undirected graphical models and Gibbs distributions are consistent; therefore, the Gibbs distribution must satisfy the conditional independence property of Markov random fields, and the probability distribution of a Markov random field can always be represented as a Gibbs distribution. Therefore, we can define an MRF that conforms to the Gibbs distribution.

[0101] P ( ) = ));

[0102] in P ( Let represent the probability distribution of a Markov random field. These are the labels for all users, and Z is the normalization constant. ) is the energy function in the Gibbs distribution; This indicates that the user type corresponding to the current node is a spam user. This indicates that the user type corresponding to the current node is a legitimate user.

[0103] In one embodiment, the energy function is:

[0104] ;

[0105] in, The univariate potential of the energy function; It is a binary potential of the energy function. ) = - log , User v is labeled with a tag from the output of a graph convolutional neural network. The probability is given by uni, where uni represents one-way and bi represents two-way.

[0106] As mentioned above, the defined energy function E includes univariate and bivariate potential functions; in Markov random fields, the joint probability distribution is defined as the product of potential functions, i.e. ;when , )= , when ;otherwise , ) = This indicates that the first intuitive hypothesis is true; if , )= , when = 1 or = 0, which indicates that the second intuitive assumption is true; if , ) = when = 0 and When = 1, it indicates that the third intuitive hypothesis is true. and Both are greater than 0, and are two learnable parameters used to measure the intensity of homogeneity and heterogeneity.

[0107] In one embodiment, the step of determining the first classification result of the node based on the probability distribution of the Markov random field includes:

[0108] The probability distribution of the Markov random field is approximated based on mean-field theory, and the approximate calculation results are obtained.

[0109] Based on the approximate calculation results, the probability distribution of the Markov random field is replaced with a decomposable distribution, wherein:

[0110]

[0111]

[0112] ;

[0113] in, For user nodes that follow node u, i.e., one-way input; For user nodes that u follows, i.e., one-way outgoing; A user node that follows node u and is also a bidirectional neighbor of node u.

[0114] As mentioned above, since P in a Markov random field cannot be evaluated, we use mean-field theory for approximate inference; and we use the MRF (Markov Random Field) as an RNN (Residual Neural Network), calculating the output at each time step based on the result of the previous time step. P( Replace with a decomposable distribution Q( ):

[0115]

[0116]

[0117] ;

[0118] It can also be represented as a matrix:

[0119]

[0120]

[0121] ;

[0122] in, It is the output of the last layer of GCN (Graph Convolutional Neural Network). The function (normalized exponential function), which has the same shape as matrix Q, is used to predict the probability of user type. That is, the MRF layer can be stacked in GCN, and the output Q is used as the first classification result of the prediction, that is, the probability that the node belongs to abnormal user.

[0123] In one embodiment, the training steps of the content classification model include:

[0124] Obtain training content information between nodes in the adjacent structure;

[0125] Extract training content features from the training content information;

[0126] The training content features are input into the BERT base model for training until the difference between adjacent loss function values ​​obtained after a preset number of consecutive iterations does not exceed a preset value, thus obtaining a well-trained content classification model.

[0127] As described above, the training steps for the content classification model include: training content information between nodes in the adjacency structure of the social network graph; furthermore, randomly generated sentences, images, and text can be used as training materials. The training materials include a large number of normal words and sentences as well as some sensitive or illegal words and sentences to simulate the message content transmitted between various types of users. Training content features, i.e., keywords in the content information, can be extracted from the training content information based on the neural network. These keywords are then input into the BERT base model for training (BERT is an abbreviation for "Bidirectional Encoder Representations from Transformers," which is an autoencoder language model). The BERT base model parameters are updated by performing multiple iterative calculations on each training content feature until the difference between adjacent loss function values ​​obtained after a preset number of consecutive iterations does not exceed a preset value. For example, if the difference between adjacent loss function values ​​does not exceed 0.01 after 10 consecutive iterations on the same training content feature, it indicates that the BERT base model has been trained, and a well-trained content classification model can be obtained.

[0128] Reference Figure 2 Secondly, this application provides a user differentiation device based on content and network characteristics, comprising:

[0129] Social network graph acquisition modulo 100 is used to acquire a social network graph, which contains multiple nodes and corresponding connecting edges. Each node represents a user, and the connecting edges are the connection relationships between the nodes.

[0130] The node feature acquisition module 200 is used to acquire the node features of each node according to the social network graph. The node features include the adjacency structure of the node and the content information between the nodes in the adjacency structure.

[0131] The first classification result acquisition module 300 is used to input the node features into the Markov random field model to obtain the first classification result of the node;

[0132] The content feature acquisition module 400 is used to extract the content features of the content information;

[0133] The second classification result acquisition module 500 is used to input the content features into the trained content classification model to obtain the second classification result of the content features;

[0134] User type determination module 600 is used to determine the user type of the node based on the first classification result and the second classification result.

[0135] In one embodiment, the node feature acquisition module 200 includes:

[0136] The computation unit is used to input the social network graph into a trained graph convolutional neural network to calculate the node features of the nodes in the social network graph. The calculation formula is as follows:

[0137] ;

[0138] in, For the first convolutional neural network Node features in the layer It is the adjacency matrix passed unilaterally to node u in the social network graph. It is the adjacency matrix unilaterally transmitted by node u in the social network graph. It is the adjacency matrix of the bidirectional relationships of node u in the social network graph;

[0139] in:

[0140] ;

[0141] It is an adjacency matrix with added self-joins and bidirectional relationships. It is the identity matrix. yes The degree matrix; yes The weight matrix in the corresponding layer of the convolutional neural network; yes The weight matrix in the corresponding layer of the convolutional neural network; This is the activation function of a graph convolutional neural network. The input to the first layer of the convolutional neural network is:

[0142] H(0) = X;

[0143] ∈ {1, ..., K};

[0144] K is a positive integer. Let X be the number of layers in the graph convolutional neural network, and X be the user feature matrix.

[0145] In one embodiment, the social network graph acquisition module 100 includes:

[0146] The social relationship statistics unit is used to count the social relationships of all users in a social network;

[0147] The social network graph construction unit is used to construct the social network graph G = (V, E) based on the social relationships, where V represents a node in the social network graph, each user corresponds to a node, and E is the connecting edge corresponding to the node.

[0148] In one embodiment, the first classification result acquisition module 300 includes:

[0149] The probability distribution calculation unit is used to calculate the probability distribution of the Markov random field in the Markov random field model based on the energy function in the Gibbs distribution.

[0150] The first classification result determination unit is used to determine the first classification result of the node based on the probability distribution of the Markov random field.

[0151] The calculation formula is as follows:

[0152] P ( ) = ));

[0153] in P ( Let represent the probability distribution of a Markov random field. These are the labels for all users, and Z is the normalization constant. ) is the energy function in the Gibbs distribution; This indicates that the user type corresponding to the current node is a spam user. This indicates that the user type corresponding to the current node is a legitimate user.

[0154] In one embodiment, the energy function is:

[0155] ;

[0156] in, The univariate potential of the energy function; It is a binary potential of the energy function. )= - log , User v is labeled with a tag from the output of a graph convolutional neural network. The probability is given by uni, where uni represents one-way and bi represents two-way.

[0157] In one embodiment, the first classification result determination unit is further configured to:

[0158] The probability distribution of the Markov random field is approximated based on mean-field theory, and the approximate calculation results are obtained.

[0159] Based on the approximate calculation results, the probability distribution of the Markov random field is replaced with a decomposable distribution, wherein:

[0160]

[0161]

[0162] ;

[0163] in, For user nodes that follow node u, i.e., one-way input; For user nodes that u follows, i.e., one-way outgoing; A user node that follows node u and is also a bidirectional neighbor of node u.

[0164] In one embodiment, the second classification result acquisition module 500 is further configured to:

[0165] Obtain training content information between nodes in the adjacent structure;

[0166] Extract training content features from the training content information;

[0167] The training content features are input into the BERT base model for training until the difference between adjacent loss function values ​​obtained after a preset number of consecutive iterations does not exceed a preset value, thus obtaining a well-trained content classification model.

[0168] Reference Figure 3 This application also provides a computer device, which may be a server, and its internal structure may be as follows: Figure 3As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor is designed to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store data generated based on content and network characteristics for user differentiation. The network interface of the computer device is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a user differentiation method based on content and network characteristics, the method including:

[0169] Obtain a social network graph, which contains multiple nodes and corresponding connecting edges. Each node represents a user, and the connecting edges represent the connection relationships between the nodes.

[0170] The node features of each node are obtained from the social network graph, and the node features include the adjacency structure of the node and the content information between the nodes in the adjacency structure.

[0171] The node features are input into a Markov random field model to obtain the first classification result of the node;

[0172] Extract the content features of the content information;

[0173] The content features are input into the trained content classification model to obtain the second classification result of the content features;

[0174] The user type of the node is determined based on the first classification result and the second classification result.

[0175] In one embodiment, the step of obtaining the node features of each node based on the social network graph includes:

[0176] The social network graph is input into a trained graph convolutional neural network to calculate the node features of the nodes in the social network graph. The calculation formula is as follows:

[0177] ;

[0178] in, For the first convolutional neural network Node features in the layer It is the adjacency matrix passed unilaterally to node u in the social network graph. It is the adjacency matrix unilaterally transmitted by node u in the social network graph. It is the adjacency matrix of the bidirectional relationships of node u in the social network graph;

[0179] in:

[0180] ;

[0181] It is an adjacency matrix with added self-joins and bidirectional relationships. It is the identity matrix. yes The degree matrix; yes The weight matrix in the corresponding layer of the convolutional neural network; yes The weight matrix in the corresponding layer of the convolutional neural network; This is the activation function of a graph convolutional neural network. The input to the first layer of the convolutional neural network is:

[0182] H(0) = X;

[0183] ∈ {1, ..., K};

[0184] K is a positive integer. Let X be the number of layers in the graph convolutional neural network, and X be the user feature matrix.

[0185] In one embodiment, the step of obtaining the social network graph includes:

[0186] To analyze the social relationships of all users on a social network;

[0187] The social network graph G = (V, E) is constructed based on the social relationships, where V represents a node in the social network graph, each user corresponds to a node, and E is the connecting edge corresponding to the node.

[0188] In one embodiment, the step of inputting the node features into a Markov random field model to obtain the first classification result of the node includes:

[0189] The probability distribution of the Markov random field in the Markov random field model is calculated based on the energy function in the Gibbs distribution.

[0190] The first classification result of the node is determined based on the probability distribution of the Markov random field;

[0191] The calculation formula is as follows:

[0192] P ( ) = ));

[0193] in P ( Let represent the probability distribution of a Markov random field. These are the labels for all users, and Z is the normalization constant. ) is the energy function in the Gibbs distribution; This indicates that the user type corresponding to the current node is a spam user. This indicates that the user type corresponding to the current node is a legitimate user.

[0194] In one embodiment, the energy function is:

[0195] ;

[0196] in, The univariate potential of the energy function; It is a binary potential of the energy function. ) = - log , User v is labeled with a tag from the output of a graph convolutional neural network. The probability is given by uni, where uni represents one-way and bi represents two-way.

[0197] In one embodiment, the step of determining the first classification result of the node based on the probability distribution of the Markov random field includes:

[0198] The probability distribution of the Markov random field is approximated based on mean-field theory, and the approximate calculation results are obtained.

[0199] Based on the approximate calculation results, the probability distribution of the Markov random field is replaced with a decomposable distribution, wherein:

[0200]

[0201]

[0202] ;

[0203] in, For user nodes that follow node u, i.e., one-way input; For user nodes that u follows, i.e., one-way outgoing; A user node that follows node u and is also a bidirectional neighbor of node u.

[0204] In one embodiment, the training steps of the content classification model include:

[0205] Obtain training content information between nodes in the adjacent structure;

[0206] Extract training content features from the training content information;

[0207] The training content features are input into the BERT base model for training until the difference between adjacent loss function values ​​obtained after a preset number of consecutive iterations does not exceed a preset value, thus obtaining a well-trained content classification model.

[0208] Those skilled in the art will understand that Figure 3 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer equipment on which the present application is applied.

[0209] One embodiment of this application also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements a user differentiation method based on content and network characteristics, the method comprising:

[0210] Obtain a social network graph, which contains multiple nodes and corresponding connecting edges. Each node represents a user, and the connecting edges represent the connection relationships between the nodes.

[0211] The node features of each node are obtained from the social network graph, and the node features include the adjacency structure of the node and the content information between the nodes in the adjacency structure.

[0212] The node features are input into a Markov random field model to obtain the first classification result of the node;

[0213] Extract the content features of the content information;

[0214] The content features are input into the trained content classification model to obtain the second classification result of the content features;

[0215] The user type of the node is determined based on the first classification result and the second classification result.

[0216] In one embodiment, the step of obtaining the node features of each node based on the social network graph includes:

[0217] The social network graph is input into a trained graph convolutional neural network to calculate the node features of the nodes in the social network graph. The calculation formula is as follows:

[0218] ;

[0219] in, For the first convolutional neural network Node features in the layer It is the adjacency matrix passed unilaterally to node u in the social network graph. It is the adjacency matrix unilaterally transmitted by node u in the social network graph. It is the adjacency matrix of the bidirectional relationships of node u in the social network graph;

[0220] in:

[0221] ;

[0222] It is an adjacency matrix with added self-joins and bidirectional relationships. It is the identity matrix. yes The degree matrix; yes The weight matrix in the corresponding layer of the convolutional neural network; yes The weight matrix in the corresponding layer of the convolutional neural network; This is the activation function of a graph convolutional neural network. The input to the first layer of the convolutional neural network is:

[0223] H(0) = X;

[0224] ∈ {1, ..., K};

[0225] K is a positive integer. Let X be the number of layers in the graph convolutional neural network, and X be the user feature matrix.

[0226] In one embodiment, the step of obtaining the social network graph includes:

[0227] To analyze the social relationships of all users on a social network;

[0228] The social network graph G = (V, E) is constructed based on the social relationships, where V represents a node in the social network graph, each user corresponds to a node, and E is the connecting edge corresponding to the node.

[0229] In one embodiment, the step of inputting the node features into a Markov random field model to obtain the first classification result of the node includes:

[0230] The probability distribution of the Markov random field in the Markov random field model is calculated based on the energy function in the Gibbs distribution.

[0231] The first classification result of the node is determined based on the probability distribution of the Markov random field;

[0232] The calculation formula is as follows:

[0233] P ( ) = ));

[0234] in P ( Let represent the probability distribution of a Markov random field. These are the labels for all users, and Z is the normalization constant. ) is the energy function in the Gibbs distribution; This indicates that the user type corresponding to the current node is a spam user. This indicates that the user type corresponding to the current node is a legitimate user.

[0235] In one embodiment, the energy function is:

[0236] ;

[0237] in, The univariate potential of the energy function; It is a binary potential of the energy function. ) = - log , User v is labeled with a tag from the output of a graph convolutional neural network. The probability is given by uni, where uni represents one-way and bi represents two-way.

[0238] In one embodiment, the step of determining the first classification result of the node based on the probability distribution of the Markov random field includes:

[0239] The probability distribution of the Markov random field is approximated based on mean-field theory, and the approximate calculation results are obtained.

[0240] Based on the approximate calculation results, the probability distribution of the Markov random field is replaced with a decomposable distribution, wherein:

[0241]

[0242]

[0243] ;

[0244] in, For user nodes that follow node u, i.e., one-way input; For user nodes that u follows, i.e., one-way outgoing; A user node that follows node u and is also a bidirectional neighbor of node u.

[0245] In one embodiment, the training steps of the content classification model include:

[0246] Obtain training content information between nodes in the adjacent structure;

[0247] Extract training content features from the training content information;

[0248] The training content features are input into the BERT base model for training until the difference between adjacent loss function values ​​obtained after a preset number of consecutive iterations does not exceed a preset value, thus obtaining a well-trained content classification model.

[0249] It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0250] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in this application and in the embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0251] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0252] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A user differentiation method based on content and network characteristics, characterized in that, include: Obtain a social network graph, which contains multiple nodes and corresponding connecting edges. Each node represents a user, and the connecting edges represent the connection relationships between the nodes. The node features of each node are obtained from the social network graph, and the node features include the adjacency structure of the node and the content information between the nodes in the adjacency structure. The node features are input into a Markov random field model to obtain the first classification result of the node; Extract the content features of the content information; The content features are input into the trained content classification model to obtain the second classification result of the content features; The user type of the node is determined based on the first classification result and the second classification result; The step of obtaining the node features of each node based on the social network graph includes: The social network graph is input into a trained graph convolutional neural network to calculate the node features of the nodes in the social network graph. The calculation formula is as follows: ; ; Among them, D i D0 is the in-degree matrix, and D1 is the out-degree matrix. For the first convolutional neural network Node features in the layer It is the adjacency matrix passed unilaterally to node u in the social network graph. It is the adjacency matrix unilaterally transmitted by node u in the social network graph. It is the adjacency matrix of the bidirectional relationships of node u in the social network graph; It is an adjacency matrix with added self-joins and bidirectional relationships. It is the identity matrix. yes The degree matrix; yes The weight matrix in the corresponding layer of the convolutional neural network; yes The weight matrix in the corresponding layer of the convolutional neural network; This is the activation function of a graph convolutional neural network. The input to the first layer of the convolutional neural network is: H(0) = X; ∈ {1,..., K}; H(0) is the node feature matrix of the initial layer, and K is a positive integer. Let X be the number of layers in the graph convolutional neural network, and X be the user feature matrix. The step of inputting the node features into a Markov random field model to obtain the first classification result of the node includes: The probability distribution of the Markov random field in the Markov random field model is calculated based on the energy function in the Gibbs distribution. The first classification result of the node is determined based on the probability distribution of the Markov random field; The calculation formula is as follows: ; in P ( Let represent the probability distribution of a Markov random field. These are the labels for all users, and Z is the normalization constant. It is the energy function in the Gibbs distribution; This indicates that the user type corresponding to the current node is a spam user. This indicates that the user type corresponding to the current node is a legitimate user.

2. The user differentiation method based on content and network characteristics as described in claim 1, characterized in that, The steps for obtaining the social network graph include: To analyze the social relationships of all users on a social network; The social network graph G = (V, E) is constructed based on the social relationships, where V represents a node in the social network graph, each user corresponds to a node, and E is the connecting edge corresponding to the node.

3. The user differentiation method based on content and network characteristics as described in claim 2, characterized in that, The energy function is: ; in, The univariate potential of the energy function; It is a binary potential of the energy function. ) = - log , User v is labeled with a tag from the output of a graph convolutional neural network. The probability, where uni represents one-way and bi represents two-way. The label that refers to user node u.

4. The user differentiation method based on content and network characteristics as described in claim 3, characterized in that, The step of determining the first classification result of the node based on the probability distribution of the Markov random field includes: The probability distribution of the Markov random field is approximated based on mean-field theory, and the approximate calculation results are obtained. Based on the approximate calculation results, the probability distribution of the Markov random field is replaced with a decomposable distribution, wherein: ; in, To follow The user node of the node, i.e., one-way input; for The user node that the node follows, i.e., one-way transmission; for Node follow and follow User nodes of a node, i.e., bidirectional neighbors of the node, are categorized as follows: 1 indicates a spam user, and 0 indicates a legitimate user. Refers to the decomposable distribution of node u.

5. The user differentiation method based on content and network characteristics as described in claim 1, characterized in that, The training steps for the content classification model include: Obtain training content information between nodes in the adjacent structure; Extract training content features from the training content information; The training content features are input into the BERT base model for training until the difference between adjacent loss function values ​​obtained after a preset number of consecutive iterations does not exceed a preset value, thus obtaining a well-trained content classification model.

6. A user differentiation device based on content and network characteristics, used to implement the user differentiation method based on content and network characteristics as described in any one of claims 1-5, characterized in that, include: A social network graph acquisition module is used to acquire a social network graph, which contains multiple nodes and corresponding connecting edges. Each node represents a user, and the connecting edges are the connection relationships between the nodes. The node feature acquisition module is used to acquire the node features of each node according to the social network graph. The node features include the adjacency structure of the node and the content information between the nodes in the adjacency structure. The first classification result acquisition module is used to input the node features into the Markov random field model to obtain the first classification result of the node; A content feature acquisition module is used to extract content features from the content information; The second classification result acquisition module is used to input the content features into the trained content classification model to obtain the second classification result of the content features; The user type determination module is used to determine the user type of the node based on the first classification result and the second classification result.

7. A computer device, characterized in that, It includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the user differentiation method based on content and network features as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the steps of the user differentiation method based on content and network characteristics as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Communication behavior identification method based on social network graph calculation

    CN112153221A

  • Social network abnormal user detection method and device based on heterogeneous graph neural network

    CN112861967A