Social robot detection method and device based on multi-dimensional feature fusion and residual graph neural network
Through multi-dimensional feature fusion and residual graph neural network, combined with graph neural network and attention mechanism, a high-accuracy social robot detection model is constructed, which solves the problems of low detection accuracy and incomplete features in the existing technology, and achieves To effectively detect social robots.
Patent Information
- Application Number
- CN202310557958.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-17
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2043-05-17
AI Technical Summary
Existing social robot detection methods are difficult to detect rapidly developing social robots, and designers adjust their behaviors to evade detection, resulting in a decrease in detection accuracy. Traditional methods focus on one aspect of the user's characteristics and cannot fully represent user characteristics, resulting in low or only low detection accuracy. Ability to detect specific categories of social bots.
Using a method based on multi-dimensional feature fusion and residual graph neural network, we construct and extract features through multiple dimensions such as user attributes, user published content, time information, user activity behavior, etc., and perform feature fusion, using graph neural network and attention The mechanism performs parallel training to build a high-accuracy social robot detection model.
It improves the accuracy of social robot detection, can effectively detect social robots in real environments, solves the problem of incomplete user features, reduces model degradation, and improves the ability to respond to the impact of uneven distribution of social robots.
Smart Images

Figure CN116738331B
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of social robot detection, and specifically relates to a social robot detection method and device based on multi-dimensional feature fusion and residual graph neural network. Background Art
[0002] With the widespread popularity of online social networks, the number of users has also increased exponentially in recent years. Online social networks enable users to communicate in real time on a large scale, which has a significant impact on public life. However, as online social networks become widely popular, a type of program-controlled users, namely social robots, has gradually emerged. Although there are benign social robots in online social networks, the emergence of some malicious social robots has brought serious adverse effects to online social networks. Therefore, social robot detection is crucial to the security of online social networks, and this issue has also become a research hotspot in the field of network security. However, on the one hand, traditional social robot detection methods use general classification algorithms and methods to analyze whether they are independent accounts. These methods are already difficult to detect today's rapidly developing social robots. On the other hand, in order to evade detection by traditional methods, designers will adjust their behavior when designing social robots, that is, confuse the activity behavior patterns of social robots with normal users, which brings high challenges to the accuracy of detection and identification. At the same time, artificial intelligence technologies such as machine learning, deep learning, and neural networks have gradually emerged and have been widely used. Because they are suitable for tasks such as data processing, feature extraction, and model optimization, they can provide assistance for social robot detection.
[0003] Looking at the development of social robot detection in academia and industry, the research on related technologies can be divided into two stages. In the early days, traditional social robot detection methods used general classification algorithms and methods to analyze whether they were independent accounts. These methods initially achieved high detection accuracy, but later with the development of social robots, designers would adopt various strategies to adjust social robots to evade these general classification algorithms. Similarly, the method of analyzing independent accounts also lost its applicability. In recent years, both at home and abroad, attention has gradually been paid to the application of artificial intelligence technology in this work, aiming to improve the effectiveness of social robot detection. Existing methods are generally divided into two categories: feature engineering and deep learning. However, the limitations of existing feature engineering-based methods are that they require manual construction of features and often only focus on one aspect of user features, and fail to use comprehensive user feature representation to model online social network users. Deep learning-based methods solve the limitations of feature engineering-based methods, but deep learning-based methods do not use comprehensive user information to build models, resulting in low detection accuracy or only being able to detect specific categories of social robots. In addition, online social networks are actually large-scale graphs. If general deep neural network training is used, feature and model training will consume a lot of time, resulting in a decrease in the performance of detecting social robots. In addition, current methods tend to build a single model. Although relying solely on such an automated strategy can achieve good detection results under ideal circumstances, it is unable to solve the negative impact of the uneven distribution of social media robot users in real environments, causing serious model degradation. Summary of the invention
[0004] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and to provide a social robot detection method and device based on multi-dimensional feature fusion and residual graph neural network. The present invention constructs and extracts features that are conducive to detecting social robots from multiple dimensions such as user attributes, user published content, time information, user activity behavior, etc., and performs effective feature fusion operations, thereby solving the problem that the prior art only focuses on one aspect of user features or can only detect specific categories of social robots, thereby improving the detection accuracy.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] In a first aspect, the present invention provides a social robot detection method based on multi-dimensional feature fusion and residual graph neural network, comprising the following steps:
[0007] Based on the user social relationship data, a graph is constructed with users as nodes and user social relationships as edges;
[0008] Extract single features of each dimension based on user attribute data and user published content data, obtain features based on user attributes, features based on user published content, features based on time information, and features based on user activity behavior, and horizontally splice and fuse the above features to obtain the user's feature vector in all dimensions;
[0009] Extract some nodes and their feature vectors in all dimensions in turn and put them into the graph neural network model for parallel training. Finally, fuse the low-dimensional dense vectors trained in parallel through graph representation learning at the node level to form a low-dimensional dense vector based on the feature data and topological structure of each node. Since the importance of features in different dimensions is different, an attention mechanism is introduced in graph representation learning. The attention mechanism will give different weights to features in different dimensions during training to avoid the problem that features in different dimensions have the same weights.
[0010] Using residual graph neural networks and model integration strategies, a social robot model based on multi-dimensional feature fusion and residual graph neural networks is constructed.
[0011] As a preferred technical solution, the social relationship data includes an account ID and a social relationship type, wherein the account ID includes a master node account ID, a social relationship type and a relationship account ID; the account ID is deduplicated and then re-indexed, and the indexed account ID is used as a node of the graph; the social relationship type includes social relationship followers and social relationship friends, wherein the social relationship followers indicates that the relationship account follows the master node account; the social relationship friends indicates that the master node account follows the relationship account; according to the type of the social relationship, the source node and target node of each social relationship are determined, that is, if the social relationship type is followers, it indicates that the source node is the relationship account and the target node is the master node account; if the social relationship type is friends, it indicates that the source node is the master node account and the target node is the relationship account; in this way, the social relationship between the accounts is used as an edge, the source node and target node of each edge are obtained, and after obtaining the information of the nodes and edges, the information of the nodes and edges is input into the graph learning framework, thereby constructing a graph with users as nodes and user social relationships as edges.
[0012] As a preferred technical solution, the feature extraction method based on user attributes is as follows:
[0013] The basic features and category features in the user attribute data are horizontally spliced and merged to obtain the first part of the feature vector based on the user attribute features; the basic features include account ID, user nickname, personal description, number of fans, number of followers, number of posts, time information, and account setting information; the category features include whether it is an authenticated account and whether to use the system default avatar;
[0014] The text type features in the user attribute data are processed by TF-IDF to obtain a feature matrix about the text information, wherein the feature vector of each user's text information corresponds to each row vector of the feature matrix, thereby obtaining the second part of the feature vector based on the user attribute features;
[0015] The first part of the feature vectors and the second part of the feature vectors are horizontally spliced to obtain a feature vector based on user attributes for each user;
[0016] The feature extraction method based on user-published content is as follows:
[0017] Construct a co-occurrence matrix of words in user-posted content, and use the Glove method to reduce the dimension of the co-occurrence matrix, so as to convert the user-posted content data into a feature matrix and obtain features based on the user-posted content;
[0018] The feature extraction method based on time information is as follows:
[0019] Time information includes the registration time in the user attribute data and the time of posting the article in the user posting content data;
[0020] The registration time in the user attribute data is in UTC format. Convert it to datetime type data, extract time features from it, and concatenate and fuse them to obtain the feature vector of the user at the registration time.
[0021] For the time of publishing articles in the user's published content data, each day of the user is divided into a sequence of time intervals in minutes, and a feature vector of whether an article is published every minute of the day is obtained. The feature vectors of whether an article is published every day are vertically spliced together to obtain a feature vector of the time when the user publishes an article in the user's published content data.
[0022] As a preferred technical solution, the features based on user activity behavior are specifically:
[0023] The user-published content data also records the types of articles published by users, including ordinary published articles, forwarded articles, reply articles, and commented articles. The article type reflects the user's activity behavior. The activity behavior feature matrix is constructed based on the article type in the user-published content data. First, the four article types are encoded, among which ordinary published articles are encoded by "0"; forwarded articles are encoded by "1"; reply articles are encoded by "2"; and commented articles are encoded by "3". Secondly, according to the type of articles published by each user, each published article is encoded based on the above encoding rules; after performing the above operations on each user, the feature vector of the user's activity behavior is obtained.
[0024] As a preferred technical solution, horizontal splicing and fusion of features are used to obtain the user's features in all dimensions, specifically:
[0025] After completing the extraction of a single feature, we obtain the feature vector i based on user attributes, the feature matrix C based on user published content, the feature vector r based on user registration time, the feature matrix Γ based on user activity time, and the feature vector a based on user activity behavior. First, in order to facilitate the fusion of features, the feature matrix C and Γ are first converted into one-dimensional feature vectors c and τ. Secondly, r and τ are concatenated to form t = [r τ] as a time-based feature. Finally, the feature vectors i, c, t, and a are horizontally concatenated and fused:
[0026] u=[icta]
[0027] This constitutes the user's feature vector in the comprehensive dimension, denoted as u. In order to study the importance of features in each dimension for detecting social robots, the features of each dimension are eliminated from the comprehensive dimensional feature combination to obtain feature ablation analysis data, and the feature ablation analysis data is used to reflect the importance of the eliminated dimensional features.
[0028] As a preferred technical solution, some nodes and their feature vectors in all dimensions are extracted in turn and put into the graph neural network model for parallel training. Finally, the trained low-dimensional dense vectors are fused at the node level to form a low-dimensional dense vector based on the feature data and topological structure of each node. Due to the different importance of features in different dimensions, an attention mechanism is introduced in the graph neural network. The attention mechanism will give different weights to features of different dimensions during representation learning training to avoid the problem of features of different dimensions having the same weight.
[0029] As the preferred technical solution, three graph neural network models based on residual structure, namely ResGAT, ResGCN, and ResAPPNP, are used for semi-supervised learning training to obtain the prediction probability of users of unknown categories; in addition, the feature ablation analysis data constructed in the feature fusion stage are (1) u1 = [cta]: {features based on user-posted content, features based on time information, features based on user activity behavior}, (2) u2 = [ita]: {features based on user attributes, features based on time information, features based on user activity behavior}, (3) u3 = [ica]: {features based on user attributes, features based on user-posted content, features based on user activity behavior}, (4) u4 = [ict]: {features based on user attributes, features based on user-posted content, features based on time information}. After the data after combining these four features are graph-represented and learned, they are input into the three models of ResGAT, ResGCN, and ResAPPNP, and the changes in model performance are used to characterize the impact of each dimension of features on the detection of social robots.
[0030] As the preferred technical solution, after training the three models ResGAT, ResGCN and ResAPPNP, the predicted probabilities of users with unknown categories are obtained respectively. Since the features learned by each model are different, the voting integration strategy is chosen to explore the advantages of each model, and the predicted probability values of the three models are weighted averaged to realize the integrated processing of multiple models and obtain the final predicted probability result.
[0031] In a second aspect, the present invention provides a social robot detection system based on multi-dimensional feature fusion and residual graph neural network, which is applied to the social robot detection method based on multi-dimensional feature fusion and residual graph neural network, including a graph construction module, a feature extraction module, a graph representation learning module and a model training and integration module;
[0032] The graph construction module is used to construct a graph with users as nodes and user social relationships as edges based on user social relationship data;
[0033] The feature extraction module is used to extract single features of various dimensions based on user attribute data and user published content data, obtain features based on user attributes, features based on user published content, features based on time information and features based on user activity behavior, and horizontally splice and fuse the above features to obtain a feature vector of the user in all dimensions;
[0034] The graph representation learning module is used to sequentially extract feature vectors of some nodes and their overall dimensions and put them into the graph neural network model for parallel training. Finally, the trained low-dimensional dense vectors are fused at the node level to form a low-dimensional dense vector based on the feature data and topological structure of each node. Since the importance of features of different dimensions is different, an attention mechanism is introduced into the graph neural network. The attention mechanism assigns different weights to features of different dimensions during training to avoid the problem that features of different dimensions have the same weights.
[0035] The model training and integration module is used to use the residual graph neural network and the model integration strategy to build a social robot model based on multi-dimensional feature fusion and the residual graph neural network.
[0036] In a fourth aspect, the present invention provides an electronic device, the electronic device comprising:
[0037] at least one processor; and,
[0038] a memory communicatively connected to the at least one processor; wherein,
[0039] The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the social robot detection method based on multi-dimensional feature fusion and residual graph neural network.
[0040] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0041] 1. The feature engineering work done by the present invention for detecting social robots in online social networks is relatively detailed. Features that are conducive to detecting social robots are constructed and extracted from multiple dimensions such as user attributes, user published content, time information, user activity behavior, etc., and effective feature fusion operations are performed, which solves the problem that previous methods often only focus on one aspect of user features or can only detect specific categories of social robots, improves the detection accuracy, and to a certain extent provides a feasible idea for detecting social robots in real social networks. In addition, the present invention also performs feature ablation analysis to study the impact of features in each dimension on model performance, so as to explore features that play a greater role in detecting social robots.
[0042] 2. The present invention adopts a graph neural network model that introduces an attention mechanism to perform graph representation learning based on node features. This representation learning fully considers the feature data of the node and the topological structure information of the graph, thereby giving each node a low-dimensional dense feature vector. In addition, in order to solve the problem that representation learning on large-scale graphs takes a long time and the performance of the model may decline, the present invention adopts a method of batch extracting some nodes into the model for parallel training, and then fusing them at the node level, which can learn more effective low-dimensional dense node vectors.
[0043] 3. When constructing the model, the present invention adopts a graph neural network model based on a residual structure. The residual graph neural network model is conducive to reducing the error of model training and improving the accuracy of detecting social robots. In addition, the present invention makes full use of the advantages of model integration, explores the advantages of each residual graph neural network model, improves the detection accuracy, and provides a method for solving the impact of uneven distribution of social robot users in real environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 This is a flow chart of a social robot detection method based on multi-dimensional feature fusion and residual graph neural network according to an embodiment of the present invention;
[0046] Figure 2 Schematic diagram of the structure of the residual network of the present invention;
[0047] Figure 3 It is a block diagram of a social robot detection system based on multi-dimensional feature fusion and residual graph neural network according to an embodiment of the present invention;
[0048] Figure 4 4 is a structural diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0049] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application.
[0050] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described in this application may be combined with other embodiments.
[0051] See also Figure 1 The present invention is a social robot detection method based on multi-dimensional feature fusion and residual graph neural network. First, the method constructs a graph with users as nodes and user social relationships as edges based on user social relationship data; secondly, based on user attribute data, user published content data and user social relationship data, feature extraction of each dimension is performed, and feature fusion is performed on this basis, and the importance of each dimensional feature for detecting social robots is subsequently studied; then, the graph representation learning technology is used to perform batch node parallel training to obtain the feature vector representation of the node; at the same time, artificial intelligence strategies such as residual graph neural network and model integration are used to construct a social robot detection model with high detection accuracy and strong generalization ability; specifically, the following steps are included:
[0052] S1, graph construction;
[0053] First, the user social relationship data in JSON format is converted into structured data. The data contains social relationship data between accounts, including three fields: primary node account ID, social relationship type, and relationship account ID. The account ID is originally random and disordered, which is not conducive to building a graph. Therefore, it is necessary to construct a coding mapping dictionary, that is, merge and remove the account IDs in the user social relationship data (the total number is n), sort them, and then use the dict function and zip function in Python to map the original account ID to an index in the range of [0, n-1]. After the account ID is re-indexed, it is used as a node of the graph. The social relationship types include followers and friends. The social relationship followers means that the relationship account follows the primary node account; the social relationship friends means that the primary node account follows the relationship account. According to the type of social relationship, the source node and target node of each social relationship can be determined, that is, the social relationship type of followers means that the source node is the relationship account and the target node is the primary node account; the social relationship type of friends means that the source node is the primary node account and the target node is the relationship account. In this way, the social relationship between accounts is used as an edge, and the source node and target node of each edge are obtained. After obtaining the node and edge information, it is input into the graph learning framework to construct a graph with users as nodes and user social relationships as edges. In addition, according to the user label data, in this graph, only some nodes have labels, that is, whether they are social robot users, where "0" represents a normal user and "1" represents a social robot user.
[0054] S2. Single feature extraction; the extracted features include features based on user attributes, features based on user published content, features based on time information, and features based on user activity behavior, as follows:
[0055] S2.1. Features based on user attributes
[0056] First, the module converts the user attribute data in JSON format into structured data. The basic features of user attribute data include account ID, user nickname, personal description, number of fans, number of followers, number of posts, time information, account setting information, etc. Based on the encoding mapping dictionary constructed in the previous step, the account ID in the user attribute data is re-indexed. For the number of fans and the number of followers, the fan growth rate and the follower growth rate over a period of time can be combined with time information, which will help detect regular social robots. Secondly, for the categorical features in the basic features of user attributes, such as whether it is an authenticated account and whether the system default avatar is used, the categorical feature encoding technology is used to process them. For example, if it is not an authenticated account, it is marked as "0"; if it is an authenticated account, it is marked as "1". Based on this, the basic features of user attributes, the construction features and the categorical features are horizontally spliced and fused to obtain the first part of the feature vector based on the user attribute features, which is recorded as b. There are also many text-type features in the user attribute data, such as user nicknames, personal descriptions, user-defined locations, URL information, etc. These text information can further mine features that are helpful for detecting social robots. However, text type features cannot be used directly for model training, so the TF-IDF (Term Frequency-Inverse Document Frequency) features of these text information must be extracted first. TF-IDF features refer to the features obtained by processing the basic features of text types in user attribute data using term frequency-inverse document frequency (TF-IDF). The main idea of TF-IDF is that the number of times a word, phrase or sentence in user information appears in the user is n, but in order to facilitate comparison between different users, the term frequency TF is standardized:
[0057]
[0058] Then, calculate the IDF:
[0059]
[0060] Among them, N represents the total number of user text information, df represents the number of users containing the word, and the purpose of adding 1 is to prevent the situation where df = 0. Then, calculate TF-IDF:
[0061] TF-IDF=TF'XIDF
[0062] In simple terms, if a word, phrase or sentence appears frequently in this user but rarely in other users, it is considered that this word, phrase or sentence has good category distinction ability and is suitable for detecting social robots.
[0063] Based on this idea, the present invention performs TF-IDF processing on the text type features in the user attribute data, thereby obtaining a feature matrix T about the text information. Among them, the text information feature vector of each user corresponds to each row vector of the feature matrix T, thereby obtaining the second part of the feature vector based on the user attribute feature, which is recorded as t. Then, the feature vectors b and t are horizontally spliced, that is, i=[bt], and the feature vector i based on the user attribute of each user can be obtained.
[0064] S2.2, based on the characteristics of user-posted content;
[0065] The user published content data records the 200 articles, article types and time information published by each user. This section first processes the 200 articles. Similarly, as text type data, article data cannot be directly used for model training. The present invention uses the Glove (Global Vectors for Word Representation) method to process article data and encode the articles into a matrix form. Each word in the corpus can be regarded as the central word of a sentence, and a window of a certain size can be defined in its context with the word as the center. Based on this, first construct a co-occurrence matrix X of the vocabulary in the article data, X ij It represents the number of times word j appears in the context window of word i in the corpus. The total number of words appearing in the context window of word i is expressed as:
[0066]
[0067] Since the context window is not limited to one word i, but a combination of multiple words, its dimension is very large, so it is necessary to reduce the dimension on this dimension and learn the low-dimensional representation of the word. Therefore, Glove is essentially a dimensionality reduction of the co-occurrence matrix. The present invention is based on a free and open source corpus, and trains the article data published by each user, thereby converting the article data into a feature matrix, denoted as C. This process converts articles containing user subjective behavior and the regularity of user-published content into digital vectors, and such vectorized representation will help detect social robots.
[0068] S2.3. Features based on time information
[0069] Time information includes two parts, namely the registration time in the user attribute data and the time of posting articles in the user content data. On the one hand, for the registration time in the user attribute data, the format is UTC format, which is converted into datetime type data, and then the time features such as "month", "day", "weekofyear", "dayofyear", "dayofweek", "is_weekend", "is_month_start", "is_month_end" are extracted from it. After splicing and fusion, the feature vector of the user at the registration time is obtained, which is recorded as r. These features reflect the regularity of the time when a normal user or social robot registers an account. On the other hand, since the time when social robots post articles is not random, but follows certain rules. Therefore, in order to mine features that are more conducive to detecting social robots, it is necessary to extract features from the time when users post articles. The present invention divides the time interval for user u to post articles into days (D), and |D| represents the time interval between the first and last articles posted by the user. According to the fact that one day is equal to 1440 minutes, the present invention divides each day d∈D into a sequence with time intervals of minutes, that is, Γ d ={τ1, τ2, τ3,…,τ 1440}. Further, the information of “day” and “minute” is extracted from the time when the user publishes the article (in UTC format), and it is mapped to the time interval sequence Γ d and τ k d (k ranges from 1 to 1440) is marked as "1", indicating that the user has published an article at this minute of the day; otherwise, it is marked as "0", indicating that the user has not published an article at this minute of the day. Get the feature vector Γ of whether user u publishes an article every day d Afterwards, the present invention calculates all the feature vectors Γ of the user every day within |D| d Splice them together vertically to form the feature matrix Γ of the user's activity time, that is:
[0070]
[0071] S2.4. Features based on user activity behavior
[0072] In online social networks, the activities of normal users are often random, while the activities performed by social robots follow certain rules. Therefore, the user's activity behavior is a good indicator for detecting social robots. The user-published content data also records the types of articles published by users, including four types: ordinary published articles, forwarded articles, reply articles, and commented articles. The article type reflects the user's activity behavior. The present invention constructs their activity behavior feature matrix based on the types of 200 articles published by each user in the user-published content data. First, the four article types are encoded, where ordinary published articles are encoded by "0"; forwarded articles are encoded by "1"; reply articles are encoded by "2"; and commented articles are encoded by "3". Secondly, according to the type of articles published by each user, each article published by it is encoded based on the above-mentioned encoding rules. For example, for user u, its activity behavior can be encoded as:
[0073] a u ={01,12,33,34,15…,2 199 ,0 200}
[0074] 33 indicates that the third article published by the user is a comment article. Since each user in the user published content data records 200 articles, the activity behavior vectors of each user are of equal length. After performing the above operations on each user, their activity behaviors will be encoded into a feature vector, recorded as a.
[0075] S3, feature fusion;
[0076] After completing the extraction of a single feature, the present invention considers fusing the features of each part, usually by splicing and merging specific features to improve the classification accuracy of the model. After completing the extraction of a single feature, the present invention obtains a feature vector i based on user attributes, a feature matrix C based on user-published content, a feature vector r based on user registration time, a feature matrix Γ based on user activity time, and a feature vector a based on user activity behavior. First, in order to facilitate the fusion between features, the feature matrices C and Γ are first converted into one-dimensional feature vectors c and τ. Secondly, r and τ are spliced together to form t = [r τ] as a time-based feature. Finally, the feature vectors i, c, t, and a are spliced and fused horizontally:
[0077] u=[icta]
[0078] Thus, the feature vector of the user in the comprehensive dimension is formed, which is recorded as u. In order to study the importance of each dimensional feature to the detection of social robots, the present invention removes the features of each dimension from the comprehensive dimensional feature combination to obtain feature ablation analysis data, namely, {features based on user-published content, features based on time information, features based on user activity behavior}, expressed as u1 = [cta]; {features based on user attributes, features based on time information, features based on user activity behavior}, expressed as u2 = [ita]; {features based on user attributes, features based on user-published content, features based on user activity behavior}, expressed as u3 = [ica]; {features based on user attributes, features based on user-published content, features based on time information}, expressed as u4 = [ict]. For example, in order to study the importance of user attribute feature i, it is removed from the comprehensive dimensional feature combination to obtain u1 {features based on user-published content, features based on time information, features based on user activity behavior}, to observe the impact of the fusion of the remaining three dimensional features on the model performance, so as to reflect the importance of user attribute features to the detection of social robots.
[0079] S4. Graph representation learning based on node features;
[0080] Based on single feature extraction and feature fusion, a feature vector of the user in a comprehensive dimension is constructed. The "account ID" field in the feature vector can uniquely identify each user, so that it can correspond to each node in the graph, that is, each node is assigned a feature vector of the node. The dimension of this feature vector is relatively high, so the present invention inputs the user's feature vector into the graph neural network model for batch node parallel training. Accordingly, the node feature data is converted into a low-dimensional dense vector through graph representation learning based on node features, while retaining as much topological structure information of the graph as possible, ensuring that the properties of the structure and feature data can also be mapped in the vector space. On the one hand, online social networks form large-scale graphs. If graph representation learning is performed on all nodes, the learning effect will be reduced due to the decline in model performance. Therefore, the present invention extracts some nodes in turn and puts them into the graph neural network model for parallel training. Finally, the trained low-dimensional dense vectors are fused at the node level to form a low-dimensional dense vector based on the feature data and topological structure of each node. On the other hand, the present invention introduces an attention mechanism into the graph neural network. This mechanism assigns different weights to features of different dimensions during training. The main principle is: in the feature fusion stage, the feature vector u=[icta] of the user in the comprehensive dimension is obtained. In order to give the feature vector u of the four dimensions k ∈u assigns weights and adopts component-level attention mechanism, where ω and b represent weights and biases respectively, v c represents the component level context vector. Finally, Uu Represents the weighted feature vector of four dimensions.
[0081] u k′ =tanh(wu k +b)
[0082]
[0083]
[0084] After the introduction of the attention mechanism, features that are helpful in improving the model effect will be given greater weight, thereby improving model performance.
[0085] S5. Model training
[0086] Based on the graph representation learning module, the node feature data is converted into a low-dimensional dense vector while retaining the topological structure information of the graph as much as possible. The node vector is used as the input for model training. The present invention uses a residual graph neural network to train the model. The residual network structure is a deep convolutional network structure composed of several residual blocks, such as Figure 2 The following is a residual block: Figure 2 In the above equation, x is the input of the residual block, and H(x) is the expected output. Identity means the same mapping, that is, if the input is x, the output is also x. F(x) means the residual between the expected output H(x) and the input x, that is, F(x) = H(x)-x, so the residual structure learns the residual. Introducing the residual structure in the graph neural network will at least not lead to an increase in error even if the number of network layers increases, which can improve the accuracy of the model.
[0087] The present invention adopts three graph neural network models based on residual structure, namely ResGAT, ResGCN, and ResAPPNP, to perform semi-supervised learning training to obtain the prediction probability of users with unknown categories. In addition, the feature ablation analysis data constructed based on the feature fusion stage are (1) u1 = [cta]: {features based on user-posted content, features based on time information, features based on user activity behavior}, (2) u2 = [ita]: {features based on user attributes, features based on time information, features based on user activity behavior}, (3) u3 = [ica]: {features based on user attributes, features based on user-posted content, features based on user activity behavior}, (4) u4 = [ict]: {features based on user attributes, features based on user-posted content, features based on time information}. After the data after the four features are combined are graph-represented and learned, they are input into the three models to observe the changes in model performance, so as to study the influence of each dimension of features on the detection of social robots.
[0088] S6, model integration;
[0089] After training the three models ResGAT, ResGCN, and ResAPPNP, the predicted probabilities of users with unknown categories are obtained respectively. Because the features learned by each model are different, the present invention chooses to use a voting integration strategy to tap the advantages of each model. The present invention performs a weighted average of the predicted probability values of the three models to achieve multi-model integration processing and obtain the final predicted probability result.
[0090] The prior art, whether based on feature engineering or deep learning, especially graph neural networks, generally does not use comprehensive information of users in online social networks to build models. The present invention extracts key features of multiple dimensions based on user attributes, user published content, time information, and user activity behavior, and performs feature fusion on this basis, and considers the importance of features of different dimensions in graph representation learning, so as to better deal with the evasion techniques of social robots and is not limited to detecting specific categories of social robots.
[0091] It should be noted that, for the sake of convenience, the aforementioned method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited to the described order of actions, because according to the present invention, certain steps can be performed in other orders or simultaneously.
[0092] Based on the same idea as the social robot detection method based on multi-dimensional feature fusion and residual graph neural network in the above-mentioned embodiment, the present invention also provides a social robot detection system based on multi-dimensional feature fusion and residual graph neural network, which can be used to execute the above-mentioned social robot detection method based on multi-dimensional feature fusion and residual graph neural network. For ease of explanation, the structural schematic diagram of the embodiment of the social robot detection system based on multi-dimensional feature fusion and residual graph neural network only shows the parts related to the embodiment of the present invention. Those skilled in the art can understand that the illustrated structure does not constitute a limitation on the device, and may include more or fewer components than shown in the diagram, or combine certain components, or arrange the components differently.
[0093] See also Figure 3 , in another embodiment of the present application, a social robot detection system 100 based on multi-dimensional feature fusion and residual graph neural network is provided, the system comprising a graph construction module 101, a feature extraction module 102, a graph representation learning module 103 and a model training and integration module 104;
[0094] The graph construction module 101 is used to construct a graph with users as nodes and user social relationships as edges based on user social relationship data;
[0095] The feature extraction module 102 is used to extract single features of various dimensions based on user attribute data, user published content data and user social relationship data, obtain features based on user attributes, features based on user published content, features based on time information and features based on user activity behavior, and horizontally splice and fuse the above features to obtain a feature vector of the user in a comprehensive dimension;
[0096] The graph representation learning module 103 is used to sequentially extract feature vectors of some nodes and their overall dimensions and put them into the graph neural network model for parallel training, and finally fuse the trained low-dimensional dense vectors at the node level to form a low-dimensional dense vector based on the feature data and topological structure of each node; since the importance of features of different dimensions is different, an attention mechanism is introduced into the graph neural network, and the attention mechanism will give different weights to features of different dimensions during training to avoid the problem that features of different dimensions have the same weights;
[0097] The model training and integration module 104 is used to use the residual graph neural network and the model integration strategy to build a social robot model based on multi-dimensional feature fusion and residual graph neural network.
[0098] It should be noted that the social robot detection system based on multi-dimensional feature fusion and residual graph neural network of the present invention corresponds one-to-one to the social robot detection method based on multi-dimensional feature fusion and residual graph neural network of the present invention. The technical features and beneficial effects described in the above-mentioned embodiment of the social robot detection method based on multi-dimensional feature fusion and residual graph neural network are applicable to the embodiment of social robot detection based on multi-dimensional feature fusion and residual graph neural network. For specific contents, please refer to the description in the embodiment of the method of the present invention, which will not be repeated here.
[0099] In addition, in the implementation of the social robot detection system based on multi-dimensional feature fusion and residual graph neural network in the above-mentioned embodiment, the logical division of each program module is only an example. In actual applications, the above-mentioned functions can be assigned to different program modules as needed, for example, for the configuration requirements of the corresponding hardware or the convenience of software implementation. That is, the internal structure of the social robot detection system based on multi-dimensional feature fusion and residual graph neural network is divided into different program modules to complete all or part of the functions described above.
[0100] See also Figure 4In one embodiment, an electronic device for implementing a social robot detection method based on multi-dimensional feature fusion and residual graph neural network is provided. The electronic device 200 may include a first processor 201, a first memory 202 and a bus, and may also include a computer program stored in the first memory 202 and executable on the first processor 201, such as a social robot detection program 203.
[0101] Among them, the first memory 202 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the first memory 202 can be an internal storage unit of the electronic device 200, such as a mobile hard disk of the electronic device 200. In other embodiments, the first memory 202 can also be an external storage device of the electronic device 200, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 200. Further, the first memory 202 can also include both an internal storage unit of the electronic device 200 and an external storage device. The first memory 202 can not only be used to store application software and various types of data installed in the electronic device 200, such as the code of the robot detection program 203, but also can be used to temporarily store data that has been output or is to be output.
[0102] In some embodiments, the first processor 201 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The first processor 201 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes various functions and processes data of the electronic device 200 by running or executing programs or modules stored in the first memory 202, and calling data stored in the first memory 202.
[0103] Figure 4 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 4 The structure shown does not constitute a limitation on the electronic device 200 , and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0104] The robot detection program 203 stored in the first memory 202 in the electronic device 200 is a combination of multiple instructions, and when executed in the first processor 201, it can achieve:
[0105] Based on the user social relationship data, a graph is constructed with users as nodes and user social relationships as edges;
[0106] Extract single features of each dimension based on user attribute data, user published content data and user social relationship data, and obtain features based on user attributes, features based on user published content, features based on time information and features based on user activity behavior. The above features are horizontally spliced and integrated to obtain the user's feature vector in all dimensions;
[0107] Extract some nodes and their feature vectors in all dimensions in turn and put them into the graph neural network model for parallel training. Finally, fuse the trained low-dimensional dense vectors at the node level to form a low-dimensional dense vector based on the feature data and topological structure of each node. Since the importance of features in different dimensions is different, an attention mechanism is introduced into the graph neural network. The attention mechanism will give different weights to features in different dimensions during training to avoid the problem that features in different dimensions have the same weights.
[0108] Using residual graph neural networks and model integration strategies, a social robot model based on multi-dimensional feature fusion and residual graph neural networks is constructed.
[0109] Furthermore, if the module / unit integrated in the electronic device 200 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0110] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0111] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0112] The above embodiments are preferred implementation modes of the present invention, but the implementation modes of the present invention are not limited to the above embodiments. Any other changes, modifications, substitutions, combinations, and simplifications that do not deviate from the spirit and principles of the present invention should be equivalent replacement methods and are included in the protection scope of the present invention.
Claims
1. A social robot detection method based on multi-dimensional feature fusion and residual graph neural network, characterized in that: The steps include: Based on the user social relationship data, a graph is constructed with users as nodes and user social relationships as edges; Extract single features of each dimension based on user attribute data and user published content data, obtain features based on user attributes, features based on user published content, features based on time information, and features based on user activity behavior, and horizontally splice and fuse the above features to obtain the user's feature vector in all dimensions; The feature vectors of some nodes and their overall dimensions are extracted in turn and put into the graph neural network model for parallel training. Finally, the low-dimensional dense vectors trained in parallel through graph representation learning are fused at the node level to form a low-dimensional dense vector based on the feature data and topological structure of each node. Due to the different importance of features in different dimensions, an attention mechanism is introduced in graph representation learning. The attention mechanism will give different weights to features of different dimensions during training to avoid the problem that features of different dimensions have the same weights. Three graph neural network models based on residual structure are used for semi-supervised learning training to obtain the prediction probability of users with unknown categories. The three graph neural network models are ResGAT, ResGCN, and ResAPPNP. In addition, the feature ablation analysis data constructed in the feature fusion stage are (1) u1 = [cta]: {features based on user-posted content, features based on time information, features based on user activity behavior}, (2) u2 = [ita]: { Features based on user attributes, features based on time information, features based on user activity behavior}, (3) u3 = [ica]: {features based on user attributes, features based on user published content, features based on user activity behavior}, (4) u4 = [ict]: {features based on user attributes, features based on user published content, features based on time information}. After the data after the combination of these four features is graph-represented and learned, it is input into the three models of ResGAT, ResGCN, and ResAPPNP. The impact of the features of each dimension on the detection of social robots is characterized by the change in model performance. After the three models of ResGAT, ResGCN, and ResAPPNP are trained, the prediction probabilities of unknown users are obtained respectively. Since the features learned by each model are different, the voting integration strategy is selected to explore the advantages of each model. The prediction probability values of the three models are weighted averaged to realize the integration processing of multiple models and obtain the final prediction probability result. Using residual graph neural networks and model integration strategies, a social robot model based on multi-dimensional feature fusion and residual graph neural networks is constructed.
2. The social robot detection method based on multi-dimensional feature fusion and residual graph neural network according to claim 1 is characterized in that: The social relationship data includes an account ID and a social relationship type, wherein the account ID includes a master node account ID, a social relationship type, and a relationship account ID; The account ID is deduplicated and re-indexed, and the indexed account ID is used as a node of the graph; the social relationship types include social relationship followers and social relationship friends, and the social relationship followers indicates that the relationship account follows the main node account; The social relationship friends indicates that the master node account follows the account; According to the type of social relationship, determine the source node and target node of each social relationship. That is, if the social relationship type is followers, it means that the source node is a relationship account and the target node is a master node account; if the social relationship type is friends, it means that the source node is a master node account and the target node is a relationship account. In this way, the social relationships between accounts are used as edges, and the source node and target node of each edge are obtained. After obtaining the information of the nodes and edges, the information of the nodes and edges is input into the graph learning framework, thereby constructing a graph with users as nodes and user social relationships as edges.
3. The social robot detection method based on multi-dimensional feature fusion and residual graph neural network according to claim 1 is characterized in that: The feature extraction method based on user attributes is as follows: The basic features and category features in the user attribute data are horizontally spliced and merged to obtain the first part of the feature vector based on the user attribute features; the basic features include account ID, user nickname, personal description, number of fans, number of followers, number of posts, time information, and account setting information; the category features include whether it is an authenticated account and whether to use the system default avatar; The text type features in the user attribute data are processed by TF-IDF to obtain a feature matrix about the text information, wherein the feature vector of each user's text information corresponds to each row vector of the feature matrix, thereby obtaining the second part of the feature vector based on the user attribute features; The first part of the feature vectors and the second part of the feature vectors are horizontally spliced to obtain a feature vector based on user attributes for each user; The feature extraction method based on user-published content is as follows: Construct a co-occurrence matrix of words in user-posted content, and use the Glove method to reduce the dimension of the co-occurrence matrix, so as to convert the user-posted content data into a feature matrix and obtain features based on the user-posted content; The feature extraction method based on time information is as follows: Time information includes the registration time in the user attribute data and the time of posting the article in the user posting content data; The registration time in the user attribute data is in UTC format. Convert it to datetime type data, extract time features from it, and concatenate and fuse them to obtain the feature vector of the user at the registration time. For the time of publishing articles in the user's published content data, each day of the user is divided into a sequence of time intervals in minutes, and a feature vector of whether an article is published every minute of the day is obtained. The feature vectors of whether an article is published every day are vertically spliced together to obtain a feature vector of the time when the user publishes an article in the user's published content data.
4. The social robot detection method based on multi-dimensional feature fusion and residual graph neural network according to claim 1 is characterized in that: The features based on user activity behavior are specifically: The user-published content data also records the types of articles published by users, including ordinary published articles, forwarded articles, reply articles, and commented articles. The article type reflects the user's activity behavior. Based on the article types in the user-published content data, the activity behavior feature matrix is constructed. First, the four article types are encoded, where ordinary published articles are encoded by "0"; forwarded articles are encoded by "1"; and reply articles are encoded by "2"; The comment article is coded by "3". Secondly, according to the type of article published by each user, each published article is encoded based on the above coding rules. After performing the above operations on each user, the feature vector of user activity behavior is obtained.
5. The social robot detection method based on multi-dimensional feature fusion and residual graph neural network according to claim 1 is characterized in that: The features are horizontally spliced and fused to obtain the user's features in all dimensions, specifically: After completing the extraction of a single feature, we obtain the feature vector i based on user attributes, the feature matrix C based on user published content, the feature vector r based on user registration time, the feature matrix Γ based on user activity time, and the feature vector a based on user activity behavior. First, in order to facilitate the fusion of features, the feature matrix C and Γ are first converted into one-dimensional feature vectors c and τ. Secondly, r and τ are concatenated to form t = [r τ] as a time-based feature. Finally, the feature vectors i, c, t, and a are horizontally concatenated and fused: u=[icta] This constitutes the user's feature vector in all dimensions.
6. A social robot detection system based on multi-dimensional feature fusion and residual graph neural network, characterized in that: A social robot detection method based on multi-dimensional feature fusion and residual graph neural network applied to any one of claims 1-5, comprising a graph construction module, a feature extraction module, a graph representation learning module, and a model training and integration module; The graph construction module is used to construct a graph with users as nodes and user social relationships as edges based on user social relationship data; The feature extraction module is used to extract single features of various dimensions based on user attribute data and user published content data, obtain features based on user attributes, features based on user published content, features based on time information and features based on user activity behavior, and horizontally splice and fuse the above features to obtain a feature vector of the user in all dimensions; The graph representation learning module is used to sequentially extract feature vectors of some nodes and their overall dimensions and put them into the graph neural network model for parallel training. Finally, the trained low-dimensional dense vectors are fused at the node level to form a low-dimensional dense vector based on the feature data and topological structure of each node. Since the importance of features of different dimensions is different, an attention mechanism is introduced into the graph neural network. The attention mechanism assigns different weights to features of different dimensions during training to avoid the problem that features of different dimensions have the same weights. The model training and integration module is used to use the residual graph neural network and the model integration strategy to build a social robot model based on multi-dimensional feature fusion and the residual graph neural network.
7. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores computer program instructions that can be executed by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the social robot detection method based on multi-dimensional feature fusion and residual graph neural network as described in any one of claims 1-5.
