Detection method and system for social media robot

By extracting the characteristics of social media accounts and performing data normalization processing, combining a deep generation model with attention mechanism and an RBM pre-training algorithm based on parallel annealing, the problem of poor detection effect of social media robots in the prior art is solved, and more efficient and accurate detection effects are achieved.

CN120067784APending Publication Date: 2025-05-30CHINA ELECTRONICS IND ENG CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411949003.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

It is difficult for the existing technology to effectively detect social media robots, and traditional classification algorithms are difficult to utilize multi-dimensional deep features. The deep learning algorithm does not have significant effects when input is a feature vector, resulting in unsatisfactory detection results.

Method used

A detection method for social media robots is proposed. By extracting the characteristics of social media accounts, data normalization is performed, and the normalized feature vectors are input into the pre-trained deep generation model to add attention mechanisms, the probability of computer robots, suspected robots and non-robots. The RBM pre-training algorithm model based on parallel annealing is adopted, and the attention mechanism is added in the tuning stage to make full use of the association relationship between social accounts.

Benefits of technology

It improves the accuracy and efficiency of social media robot detection, and can more effectively utilize the multi-dimensional characteristics of social accounts to provide more accurate detection results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120067784A_ABST
    Figure CN120067784A_ABST
Patent Text Reader

Abstract

The invention discloses a social media robot detection method and system. The detection method comprises the following steps: extracting features of a social media account to be detected; normalizing the feature data to obtain a normalized feature vector; and inputting the normalized feature vector into a pre-trained depth generation model added with an attention mechanism, calculating the probability of the robot, the probability of the suspected robot and the probability of the non-robot, and outputting a recommended category. According to the method, an RBM pre-training algorithm model based on parallel annealing is adopted, an attention mechanism is added in the tuning stage, the incidence relation between social accounts is fully utilized, and the accuracy and efficiency of social media robot detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of cyberspace social media security governance, and in particular to a social media robot detection method and system. Background Art

[0002] With the rapid development of mobile Internet, online social networks have grown rapidly. Social platforms such as Facebook, Twitter, and Weibo have become important channels for acquiring, disseminating, and publishing information. A large number of opinions and speeches have formed strong social opinions, influencing the judgment of decision makers and the public.

[0003] Social robots are one of the most advanced and complex security threats in online social networks. Their main means is to automatically generate media content that conforms to specific topics based on certain strategies, and interact with normal human accounts on social media, imitating normal human social behavior. Their main goal is to create an atmosphere of public opinion. Sometimes they are used as a means of political infiltration to spread malicious content, posing a serious threat to the governance of cyberspace security.

[0004] The core idea of ​​current research on social media robot detection is to extract the features of social media accounts, and then classify them based on these features to obtain detection results. However, traditional classification algorithms, such as decision trees, random forests, Bayesian, etc., are difficult to fully utilize these multi-dimensional deep features. Classification algorithms based on deep learning, such as CNN and DNN, are not effective when the input is a feature vector, resulting in unsatisfactory results in social media robot detection. Summary of the invention

[0005] In view of the above problems, the present invention is proposed to provide a social media robot detection method and system that overcomes the above problems or at least partially solves the above problems.

[0006] According to one aspect of the present invention, a method for detecting a social media robot is provided, the detection method comprising:

[0007] Extract the features of the social media accounts to be detected;

[0008] Normalize the feature data to obtain a normalized feature vector;

[0009] The normalized feature vector is input into a pre-trained deep generative model with an attention mechanism to calculate the probabilities of robots, suspected robots, and non-robots, and output the recommended category.

[0010] Optionally, extracting the features of the social media account to be detected specifically includes: acquiring user-based features, content and language features, sentiment features, and time series features of the account.

[0011] Optionally, the normalization of the feature data specifically includes: a conversion method combining the log function and the atan function based on the user's feature normalization process.

[0012] Optionally, the deep generative model of the attention mechanism includes one visible layer, several hidden layers, and one classification layer to form a deep belief network;

[0013] The layers are connected by directed arrows from top to bottom. The topmost hidden layer and the address layer form a restricted Boltzmann machine (RBM) structure. The RBM is a Markov random field and also a bipartite undirected graph model.

[0014] Optionally, the Boltzmann machine RBM includes a visible layer v and a hidden layer h. The visible layer v contains m visible modules, and the hidden layer h contains n hidden modules, that is, feature modules. The weight matrix w, the weight vector b, and the weight vector c are the parameters of the RBM. For example, w ij represents the real-valued weight on the connection edge between the visible layer module i and the hidden layer module j, and b i represents the real-valued bias on the visible layer module i, and c j represents the real-valued bias term on the hidden layer module j.

[0015] Optionally, the training of the deep generative model includes: layer-by-layer training and parameter tuning;

[0016] 1) Combine the visible layer v and the hidden layer h 1 to form an undirected two-layer network structure. Use the feature vector of the social media account as the input data, and use the restricted Poisson model to learn the parameters;

[0017] 2) Combine the hidden layer h 1 and the hidden layer h 2 to form a new two-layer network structure. Use the activation probability of the hidden layer h 1 on the training data as the input, and adopt the RBM training method based on parallel tempering for training to obtain the parameters of the network structure;

[0018] 3) Repeat step 2), continuously stack new layers upward until the depth requirement is met.

[0019] Optionally, the RBM training method based on parallel tempering specifically includes:

[0020] Adopt the log-likelihood gradient ascent method. The calculation of the gradient includes two terms. The first term is called the positive-phase term, which is the result of sampling the hidden layer h when the visible layer v is assigned the training data, that is, the conditional probability P(h|v);

[0021] The second term is called the negative-phase term. Calculating this term requires obtaining the joint sample distribution P(v, h) of the model. When obtaining the joint sample distribution, a Markov chain sampling method based on parallel annealing is used. A continuous sequence of distributions is inserted between the required distribution and the more easily obtained distribution. Parallel annealing samples simultaneously at different temperatures, selects the highest value, and obtains the extreme value of the distribution.

[0022] Optionally, the RBM training method based on parallel annealing specifically includes:

[0023] 1) Initialize the parameter gradient to 0; initialize the current state of each Markov chain as a random vector;

[0024] 2) In the positive phase, for all visible layer inputs, sample the hidden layer features from them;

[0025] 3) In the negative phase, sample at all temperatures of the Markov chain, select the highest value, and determine whether to accept the new sample;

[0026] 4) Calculate the parameter gradient, and calculate the parameter gradient according to the positive-phase samples and negative-phase samples.

[0027] Optionally, the method for parameter tuning specifically includes:

[0028] Initialize the network parameters as the weight parameters after pre-training;

[0029] Input the training nodes into the visible layer;

[0030] Calculate the attention coefficients between the training nodes and any adjacent nodes;

[0031] Calculate the output vector value according to the attention coefficients;

[0032] Update the weights according to the gap between the output vector value and the true classification result;

[0033] Repeat the above steps to obtain the final parameters.

[0034] The present invention also provides a detection system for a social media robot, which applies the above-mentioned detection method for a social media robot. The detection system includes:

[0035] A feature extraction module, which is used to extract the features of the social media account to be detected;

[0036] A normalization processing module, which is used to normalize the feature data to obtain a normalized feature vector;

[0037] A detection module, which is used to input the normalized feature vector into a pre-trained deep generation model with an attention mechanism, calculate the probabilities of robots, suspected robots, and non-robots, and output the recommended category.

[0038] A detection method and system for a social media robot provided by the present invention, the detection method comprising: extracting features of a social media account to be detected; normalizing the feature data to obtain a normalized feature vector; inputting the normalized feature vector into a pre-trained deep generative model with an attention mechanism, calculating the probabilities of robots, suspected robots, and non-robots, and outputting a recommended category. The RBM pre-training algorithm model based on parallel annealing is adopted. In the tuning stage, the attention mechanism is added to make full use of the correlation relationship between social accounts, improving the accuracy and efficiency of social media robot detection.

[0039] The above description is only an overview of the technical solution of the present invention. In order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the specification. And in order to make the above and other objects, features, and advantages of the present invention more obvious and understandable, the specific embodiments of the present invention are specifically exemplified below. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0041] Figure 1 It is a flowchart of a detection method for a social media robot provided by an embodiment of the present invention;

[0042] Figure 2 It is a schematic structural diagram of a deep generative model of attention provided by an embodiment of the present invention;

[0043] Figure 3 It is a schematic structural diagram of a restricted Boltzmann machine (RBM) model provided by an embodiment of the present invention;

[0044] Figure 4 It is a schematic diagram of the layer-by-layer pre-training process of a deep generative model provided by an embodiment of the present invention;

[0045] Figure 5 It is a schematic diagram of the RBM training process based on parallel annealing provided by an embodiment of the present invention;

[0046] Figure 6 It is a schematic diagram of the tuning process of a deep generative model with an attention mechanism added provided by an embodiment of the present invention;

[0047] Figure 7 It is a schematic structural diagram of a social media robot detection system provided by an embodiment of the present invention; Detailed Implementation Modes

[0048] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present disclosure can be more thoroughly understood and the scope of the present disclosure can be fully conveyed to those skilled in the art.

[0049] The terms "comprising" and "having" in the description embodiments, claims and drawings of the present invention, and any variations thereof, are intended to cover non-exclusive inclusion. For example, including a series of steps or modules.

[0050] The technical solutions of the present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments.

[0051] Embodiment 1

[0052] As Figure 1 shown, a method for detecting a social media robot provided by the present invention includes the steps of:

[0053] Extracting the features of the social account to be detected;

[0054] Performing data normalization processing on the extracted features;

[0055] Inputting the processed feature vectors into a pre-trained deep generation model with an attention mechanism to obtain the probabilities of the three categories of robot, suspected robot, and non-robot, and outputting the recommended detection results.

[0056] The features of the social account include user-based features, content and language features, emotional features, and time series features. During the feature extraction process, for those related to distribution, such as the word count distribution feature in tweets, eight statistical values including the minimum value, maximum value, median, average value, standard deviation, skewness, kurtosis, and entropy are extracted as independent features; the emotional feature scores are based on public dictionaries.

[0057] User-based features include naming features, profile features, account age features, friend-related quantity features, and post-related quantity features;

[0058] Content and language features include: part-of-speech frequency features, part-of-speech ratio features, word count features, and word entropy features.

[0059] Emotional features include: happiness, valence, arousal, dominance features; emotional polarity features (polarity, entropy); emoji features (positive emoji entropy, negative emoji entropy, positive and negative emoji quantity features).

[0060] Time series features, including: continuous post time interval feature, continuous repost time interval feature, continuous mention time interval feature.

[0061] A conversion method combining the log function and the atan function for feature normalization processing based on users.

[0062] The deep generative model with an attention mechanism consists of 1 visible layer, several hidden layers, and 1 classification layer to form a deep belief network, as Figure 2 shown.

[0063] The visible layer and the hidden layer of the deep generative model form a deep belief network, and the layers are connected by directed arrows from top to bottom. The topmost hidden layer and the address layer form a restricted Boltzmann machine (RBM) structure. The RBM is a Markov random field and also a bipartite undirected graph model, as Figure 3 shown.

[0064] Figure 3 The RBM in is divided into a visible layer v and a hidden layer h. The visible layer v contains m visible modules, and the hidden layer h contains n hidden modules, that is, feature modules. The weight matrix w, the weight vector b, and the weight vector c are the parameters of the RBM. For example, w ij represents the real-valued weight on the connecting edge between the visible layer module i and the hidden layer module j, and b i represents the real-valued bias on the visible layer module i, and c j represents the real-valued bias term on the hidden layer module j.

[0065] The training of the deep generative model is divided into two steps: layer-by-layer pre-training and parameter tuning.

[0066] The layer-by-layer pre-training steps of the deep generative model are as Figure 4 shown, including:

[0067] 1) Combine the visible layer v and the hidden layer h 1 to form an undirected two-layer network structure, use the feature vector of the social media account as the input data, and use the restricted Poisson model to learn its parameters;

[0068] 2) Combine the hidden layer h 1 and the hidden layer h 2 to form a new two-layer network structure, use the activation probability of the hidden layer h 1 on the training data as the input, and adopt the RBM training method based on parallel annealing for training to obtain the parameters of this network structure;

[0069] 3) Repeat the steps similar to 2), continuously stack new layers upwards until the depth requirement is met.

[0070] The RBM training method based on parallel annealing adopts the log-likelihood gradient ascent method. The calculation of the gradient mainly includes two terms. The first term is called the positive-phase term, which is the result of sampling the hidden layer h when the visible layer v is assigned the training data, that is, the conditional probability P(h|v). The second term is called the negative-phase term. To calculate this term, the joint sample distribution P(v, h) of the model needs to be obtained. When obtaining the joint sample distribution, the Markov chain sampling method based on parallel annealing is used. A continuous sequence of distributions is inserted between the required distribution and the more easily obtained distribution. Parallel annealing samples simultaneously at different temperatures and selects the highest value, so as to obtain the extreme value of the distribution more quickly.

[0071] The steps of the RBM training method based on parallel annealing are as Figure 5 shown, including:

[0072] 1) Initialize the parameter gradient to 0; initialize the current state of each Markov chain as a random vector;

[0073] 2) In the forward phase, for all visible layer inputs, sample the hidden layer features from them;

[0074] 3) In the negative phase, sample at all temperatures of the Markov chain, select the highest value, and determine whether to accept the new sample;

[0075] 4) Calculate the parameter gradient, and calculate the parameter gradient according to the positive-phase samples and negative-phase samples.

[0076] The steps for optimizing the parameters of the deep generative model are as Figure 6 shown, including:

[0077] Initialize the network parameters as the weight parameters after pre-training;

[0078] Input the training nodes into the visible layer;

[0079] Calculate the attention coefficients between the training nodes and any adjacent nodes;

[0080] Calculate the output vector value according to the attention coefficients;

[0081] Update the weights according to the gap between the output vector value and the true classification result;

[0082] Repeat steps similar to 1) - 5) to obtain the final parameters.

[0083] The present invention provides a social media robot detection device, including:

[0084] A feature extraction module, which is used to process social media accounts to obtain user-based features, content and language features, emotional features, and time series features of the accounts;

[0085] A normalization processing module, which is used to receive the features of the feature extraction module, normalize the feature data, and obtain the normalized feature vector;

[0086] A detection module, which is used to receive the feature vector transmitted by the normalization module, input the feature vector into a pre-trained deep generation model with an attention mechanism, calculate the probabilities of robots, suspected robots, and non-robots, and output the recommended categories.

[0087] The social media robot detection method based on the deep generation model with an attention mechanism proposed by the present invention fully integrates various features of social media accounts, normalizes the features using a reasonable data normalization method, and performs detection using a deep generation model. In the pre-training stage, a parallel annealing-based RBM pre-training algorithm model is used. In the tuning stage, an attention mechanism is added to make full use of the correlation relationships between social accounts, so that the accuracy and efficiency of social media robot detection are better than existing methods.

[0088] Embodiment 2

[0089] The implementation process in the scenario of Twitter social media robot detection will be further described in detail.

[0090] This embodiment is divided into two parts: model training and actual application.

[0091] In the model training part, it is further divided into: feature extraction, data normalization, and parameter training.

[0092] In terms of feature extraction, it includes four types of features:

[0093] User-based features, obtaining 13 user-based features including the length of the username, the length of the nickname, the registration duration, whether the default profile is used, whether the default avatar is used, the number of friends, the number of fans, the number of follows, the number of tweets, the number of retweets, the number of mentions, the number of replies, and the number of times being retweeted. For example, the "length of the username" refers to the number of characters of the username used to log in to the social media account system; "whether the default profile is used" refers to whether the signature and background of the account use the system default, 1 for yes, 0 for no; the "number of friends" refers to the number of accounts that follow each other.

[0094] Content and language features. First, for each tweet, extract words of 8 representative parts of speech, namely verbs, nouns, adjectives, modal particles, prepositions, interjections, adverbs, and pronouns, obtain the quantity and proportion of words of each part of speech (a total of 16 features), and at the same time count the total number of extracted words and calculate the entropy value of the words, forming a total of 18 features. Then, obtain all tweets in a recent period of time, calculate 8 values of the minimum, maximum, median, average, standard deviation, skewness, kurtosis, and entropy of these 18 features in all tweets, and finally output 144 features. Selecting the 8 values of the minimum, maximum, median, average, standard deviation, skewness, kurtosis, and entropy of the data as feature values is more comprehensive than simply selecting one of them, increasing the richness of data expression.

[0095] Among them, skewness is used to measure the asymmetry of data distribution, and the calculation formula is: where X is an array, n is the number of data in the array, μ is the mean, and σ is the standard deviation; kurtosis is used to measure the steepness of data distribution, and the calculation formula is: where X is an array, n is the number of data in the array, μ is the mean, and σ is the standard deviation; entropy represents the uncertainty of data, and the calculation formula of the entropy value is: where p(x i ) is the probability value of the data.

[0096] Emotional features. Obtain all tweets in a recent period of time, extract the happiness score, valence score, arousal score, and control score of all tweets, extract the happiness score, valence score, arousal score, control score, positive expression entropy, negative expression entropy, expression entropy, positive expression quantity, negative expression quantity, and total expression quantity of each tweet, and calculate 8 values of the minimum, maximum, median, average, standard deviation, skewness, kurtosis, and entropy, generating 100 features. Among them, the "happiness score" refers to the research results of Kloumann et al. from the University of Vermont in the United States, and the "valence score, arousal score, and control score" refer to the research results of Amy Beth Warriner et al. from McMaster University.

[0097] Time series features. Obtain all tweets in a recent period of time, calculate the time intervals between every two consecutive tweets, the time intervals between consecutive forwards, and the time intervals between consecutive mentions, and calculate 8 values of the minimum, maximum, median, average, standard deviation, skewness, kurtosis, and entropy, generating 24 features.

[0098] In terms of data normalization, adopt the method of combining the log function and the atan function:

[0099]

[0100] Among them, v' is the normalized feature value, v is the original feature value, and n is the segment value, which varies according to the value characteristics of each feature. For example, for the feature of the number of fans, according to experiments, the value of n is 10,000.

[0101] In terms of parameter training, a deep generative model with G hidden layers is used. The number of social media accounts in the training data is N. The specific training steps are as follows:

[0102] In the model training part, it is further divided into: layer-by-layer pre-training and parameter tuning.

[0103] The detailed steps of layer-by-layer pre-training are as follows:

[0104] S1: Training visible layer v and hidden layer h 1 The model parameters between, including the weight matrix w 1 , the real-valued bias vector b of the visible layer v 1 and hidden layer h 1 The real-valued bias vector c 1 , the dimension of the visible layer v is m, that is, the visible layer v contains m visible modules, and the hidden layer h 1 Contains n hidden layer modules, namely feature modules.

[0105] S11: Initialize the weight matrix w 1 , weight vector b 1 and the weight vector c 1 For random data

[0106] S12: Input the feature vector of the social media account into the visible layer v and calculate the hidden layer vector h 1 Each module Values:

[0107]

[0108] where σ(x) = 1 / (1+e -x ) is the Sigmoid excitation equation. v i is the input value of the visible layer module i, b i is the real-valued bias term of the visible layer module i, w ij Represents the weight of the connection between visible module i and hidden module j.

[0109] S13: hidden layer h 1 Assign a random value to each visible layer module v i Reconstruct the Poisson rate:

[0110]

[0111] Where Ps(x,y)=e -y yx / x!, represents the total length of the feature, c j The real-valued bias term of the hidden layer module j respectively.

[0112] S14: Use the result vector obtained in step S13 as the input, execute the formula in S12 to obtain the hidden layer values. Thus, two sets of values of v and h are obtained, including those obtained in step S12, which is called the data distribution, and those obtained in S13 and S14, which is called the reconstruction distribution.

[0113] S15: The parameters are updated using the gradient ascent method of log-likelihood. Taking the weight between the visible layer module i and the hidden layer module j as an example, the update formula is:

[0114]

[0115] where η is the learning rate, represents the number of times that both the visible layer module i and the hidden layer module j are not zero in the data distribution, represents the number of times that both the visible layer module i and the hidden layer module j are not zero in the reconstruction distribution. The update of the weight vectors b and c is similar to the update of the weight matrix.

[0116] S2: For the hidden layer h g , 1 ≤ g ≤ G - 2, form the hidden layer h g and the hidden layer h g+1 into an RBM structure. The hidden layer h g is regarded as the visible layer v of the RBM, and the hidden layer h g+1 is regarded as the hidden layer h of the RBM. The parameters of the RBM formed by the hidden layer h g and the hidden layer h g+1 include the weight matrix w g , the weight vector b g and the weight vector c g . For the sake of convenient description, during the training process of the RBM, the hidden layer h g is replaced by v, and the hidden layer h g +1 is replaced by h. The model parameters w g , b g and c g are respectively replaced by w, b, and c.

[0117] S21: In the initialization stage, initialize the parameter gradients, that is, the change values of the parameters during the model training process. Δw, Δb, and Δc are all 0. Set the number of Markov chains K, and initialize the current state of each chain (v k , h k ) as a random vector, where 1 ≤ k ≤ K.

[0118] S22: Forward phase. For all samples v ∈ S, where S is the training sample set, calculate h:

[0119]

[0120] where σ(x) = 1 / (1 + e -x ) is the Sigmoid activation equation. h j is the value of the hidden layer module j, Vi is the value of the visible module i, m is the dimension of the visible layer v, w ij represents the weight of the connection between the visible module i and the hidden layer module j, and b i is the real-valued bias term of the visible module i.

[0121] S23: Backward phase. For all v ∈ S, define K Markov chains, each with a different inverse temperature β 1 ,..., β K , where β 1 <... < β K = 1. When k = K, the Markov chain is the original distribution, i.e., the distribution with the lowest temperature. When k = 1, the Markov chain is the highest temperature distribution. The training process in the backward phase traverses all temperatures, and the distribution is represented by (v k , h k ).

[0122] For each Markov chain (v k , h k ), for k from K to 2, use v k to calculate h k ,

[0123]

[0124] Then use h k to calculate v k-1 , and the calculation formula is:

[0125]

[0126] For the Markov chain (v 1 , h 1 ) with k = 1, similarly, use the above formula, input v 1 to get h 1 .

[0127] Finally, determine whether to accept (v K , h K ), and the determination basis is:

[0128]

[0129] Among them, K represents the number of Markov chains, β represents the inverse temperature of the Markov chain, β 1 <...<β K = 1, E(v, h) is the energy equation, and its calculation formula is:

[0130]

[0131] Among them, w ij is the real-valued weight on the edge between module v i and h j , b i and c j are the real-valued bias terms on the i-th visible module and the j-th hidden module respectively.

[0132] S24: Estimate the parameter gradient. Taking the weight matrix as an example:

[0133]

[0134] Among them, S is the number of the sample set, and the update of the weight vectors b and c is similar.

[0135] S3: Repeat the S2 step twice to obtain the initial parameters of the depth generation model of the G layer;

[0136] The detailed steps of parameter tuning are as follows:

[0137] S1: Initialize the parameters of the model as the weight matrix W (W 1 ~W G-1 ) and the weight vectors

[0138] S2: For any node i in N, input the feature vector of node i into the g-th layer graph attention layer, and calculate the feature vector

[0139] of the (g + 1)-th layer graph attention layer ij :

[0140]

[0141] S21: For each adjacent node j of node i, calculate the attention coefficient α

[0142]

[0143] S22: Calculate the output vector The calculation is as follows:

[0144]

[0145] S3: Repeat S2 until g + 1 = G to obtain the vector values of the G-th layer, i.e., the probability values P for each category. Update the weight matrix W and weight vector according to the cross-entropy loss function.

[0146]

[0147] Where S is the number of classification labels, N is the number of samples, and y i,s indicates that the true label of the i-th sample is s, and p i,s indicates the probability that the i-th sample is predicted as the s label.

[0148] S4: Repeat S1, S2, and S3 for each of the N feature vectors to obtain the final model parameters.

[0149] Figure 6 FIG. 18 is a schematic structural diagram of the social media robot detection system provided by the embodiment of the present invention. The detection system includes:

[0150] A processing module for processing information related to social media accounts, including text cleaning, text tokenization, and feature extraction;

[0151] A normalization module for normalizing the four major types of feature data to generate the final feature vectors;

[0152] A detection module for receiving the feature vectors, inputting them into a pre-trained graph attention network model, outputting the probabilities of robots, suspected robots, and non-robots, and outputting the recommended detection results.

[0153] Based on the same inventive concept, another embodiment of the present invention provides an electronic device (such as a computer, a server, a smart phone, etc.), which includes a memory and a processor. The memory stores a computer program, and the computer program is configured to be executed by the processor. The computer program includes instructions for executing the steps in the method of the present invention.

[0154] Based on the same inventive concept, another embodiment of the present invention provides a computer-readable storage medium (such as ROM, RAM, disk, optical disc). The computer-readable storage medium stores a computer program, and when the computer program is executed by a computer, it implements each step of the method of the present invention.

[0155] Advantageous effects: It fully integrates various features of social media accounts, uses a reasonable data normalization method to normalize the features, and uses a deep generation model for detection. In the pre-training stage, a parallel annealing-based RBM pre-training algorithm model is used. In the tuning stage, an attention mechanism is added to make full use of the correlation relationship between social accounts, improving the accuracy and efficiency of social media robot detection.

[0156] In the above specific embodiments, the object, technical solution and beneficial effects of the present invention have been further described in detail. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for detecting social media robots, characterized in that: The detection method comprises: Extract the features of the social media accounts to be detected; Normalize the feature data to obtain a normalized feature vector; The normalized feature vector is input into a pre-trained deep generative model with an attention mechanism to calculate the probabilities of robots, suspected robots, and non-robots, and output the recommended category.

2. A method for detecting a social media robot according to claim 1, characterized in that: The extracting of the features of the social media account to be detected specifically includes: obtaining user-based features, content and language features, sentiment features, and time series features of the account.

3. A social media robot detection method according to claim 1, characterized in that: The normalizing of the feature data specifically includes: a conversion method combining a log function and an atan function based on the user's feature normalization processing.

4. The method for detecting a social media robot according to claim 1, characterized in that: The deep generative model of the attention mechanism includes a visible layer, several hidden layers and a classification layer to form a deep belief network; The layers are connected by directed arrows from top to bottom. The top hidden layer and address layer form a restricted Boltzmann machine (RBM) structure. RBM is a Markov random field and a bilateral undirected graph model.

5. A social media robot detection method according to claim 5, characterized in that: The Boltzmann machine RBM includes a visible layer v and a hidden layer h. The visible layer v contains m visible modules, and the hidden layer h contains n hidden modules, i.e., feature modules. The weight matrix w, weight vector b and weight vector c are the parameters of the RBM. For example, w ij represents the real-valued weight on the edge connecting the visible layer module i and the hidden layer module j, b i represents the real-valued bias on the visible layer module i, c j represents the real-valued bias term on the hidden layer module j.

6. The method for detecting a social media robot according to claim 1, characterized in that: The training of the deep generative model includes: layer-by-layer training and parameter tuning; 1) The visible layer v and the hidden layer h 1 An undirected two-layer network structure is constructed, the feature vectors of social media accounts are used as input data, and the restricted Poisson model is used to learn parameters; 2) Set the hidden layer h 1 and hidden layer h 2 Construct a new two-layer network structure, using hidden layer h 1 The activation probability on the training data is used as input, and the RBM training method based on parallel annealing is used for training to obtain the parameters of the network structure; 3) Repeat step 2) and continue to stack new layers upwards until the required depth is reached.

7. A social media robot detection method according to claim 6, characterized in that: The RBM training method based on parallel annealing specifically includes: The log-likelihood gradient ascent method is used. The calculation of the gradient includes two items. The first item is called the positive phase item, which is the result of sampling the hidden layer h when the visible layer v is assigned with training data, that is, the conditional probability P(h|v); The second item is called the negative phase item. Calculating this item requires obtaining the joint sample distribution P(v,h) of the model. When obtaining the joint sample distribution, a Markov chain sampling method based on parallel annealing is used to insert a continuous distribution sequence between the required distribution and the easier-to-obtain distribution. Parallel annealing samples simultaneously at different temperatures, selects the highest value, and obtains the extreme value of the distribution.

8. The method for detecting a social media robot according to claim 6, characterized in that: The RBM training method based on parallel annealing specifically includes: 1) Initialize the parameter gradient to 0; initialize the current state of each Markov chain to a random vector; 2) In the forward phase, for all visible layer inputs, hidden layer features are sampled; 3) In the negative phase, samples are taken at all temperatures of the Markov chain, the highest value is selected, and a decision is made as to whether to accept the new sample; 4) Calculate the parameter gradient based on the positive stage samples and the negative stage samples.

9. The method for detecting a social media robot according to claim 6, characterized in that: The parameter tuning method specifically includes: Initialize the network parameters to the weight parameters after pre-training; Input the training nodes into the visible layer; Calculate the attention coefficient of the training node and any adjacent node; According to the attention coefficient, calculate the output vector value; Update the weights based on the gap between the output vector value and the actual classification result; Repeat the above steps to obtain the final parameters.

10. A social media robot detection system, using a social media robot detection method according to any one of claims 1 to 9, characterized in that: The detection system comprises: A feature extraction module is used to extract the features of the social media accounts to be detected; A normalization processing module is used to normalize the feature data and obtain a normalized feature vector; The detection module is used to input the normalized feature vector into a pre-trained deep generative model with an attention mechanism, calculate the probabilities of robots, suspected robots, and non-robots, and output the recommended category.

Citation Information

Cited By

  • Social robot detection method based on uncertainty driving and agent dynamic arrangement, electronic equipment and storage medium

    CN121958892A

  • Social robot detection method based on uncertainty driving and agent dynamic arrangement, electronic device and storage medium

    CN121958892B