Method for identifying risk account of decentralized social media platform
By modeling heterogeneous graphs of account behavior on a decentralized social media platform, and using graph neural networks and classification models for feature fusion and risk identification, the problem of risk account identification and management on the platform is solved, and effective identification and management of risk accounts is achieved.
Patent Information
- Application Number
- CN202510160323.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-13
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2045-02-13
AI Technical Summary
Due to its decentralized and anonymous characteristics, decentralized social media platforms are difficult to effectively regulate and manage account behavior, especially the identification and management of risk accounts.
By modeling the social behavior of the account on the platform to form a heterogeneous graph, extracting the social characteristics of the account and publishing content characteristics, and using graph neural network and classification model for feature fusion and risk identification, the identification of risk accounts on the decentralized social media platform is achieved.
This method can effectively identify and manage risk accounts on decentralized social media platforms, providing a risk management mechanism to solve the problem of difficult to monitor and manage account behavior due to anonymity and decentralization.
Smart Images

Figure CN119628972A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of artificial intelligence and blockchain technology, and in particular to a method for identifying risky accounts on a decentralized social media platform. Background Art
[0002] Blockchain technology is widely used in finance, healthcare, privacy protection, social media and many other fields due to its decentralization, anonymity and immutability. As a new application of blockchain technology, decentralized social media platforms give users the ability to decentralized management, autonomous creation and publishing of content, while also making user behavior more private and autonomous. User activities on blockchain social media platforms include posting multimedia content such as text, pictures, and videos, as well as interactive behaviors such as forwarding, liking, and commenting, and obtaining blockchain incentives from other accounts through these behaviors. These platforms use the underlying blockchain system for content storage, reward distribution and other mechanisms to ensure transparency and immutability of operations.
[0003] Decentralized social media is based on the blockchain system and built on the underlying decentralized protocol. Its core features are the decentralization of data ownership, the protection of user privacy, and the transparency of content management. Unlike traditional social media platforms, the storage characteristics of decentralized social media platforms mean that no single entity or organization can fully control the content and account assets on the platform.
[0004] However, these characteristics also bring new challenges to content supervision and account security. On the one hand, the content on decentralized social media is highly mobile and immutable. Once risky content is published or spread on the platform, it will be difficult to effectively supervise it through traditional centralized means. On the other hand, the anonymity of the account makes the chain of tracking malicious user behavior more complicated. Users may use multiple account operations, hidden identities and other means to spread harmful content or conduct illegal transactions on the platform. These problems make these platforms face major challenges in content and behavior risks while promoting user autonomy and freedom. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention provides a method for identifying risky accounts on a decentralized social media platform for risky accounts on decentralized social media to be regulated. The method first needs to model the social behavior of the account on the platform to form a heterogeneous graph. Secondly, the account social features and published content features are extracted from the heterogeneous graph. After the features are aggregated, they are used as the input of the account risk identification model. Finally, the risk account identification result of the model is obtained.
[0006] The objective of the present invention is achieved through the following technical solution: A method for identifying risky accounts on a decentralized social media platform, comprising the following steps: (1) Collect the required data set from the decentralized social media Lenster; (2) Convert the data set including node and edge information into the node set, edge set, and adjacency matrix of the heterogeneous graph; (3) Preliminarily calculate the statistical characteristics of different types of account nodes and obtain the feature representation vector of the account; (4) The feature representation vectors of the node and its neighbor nodes are fused through the graph neural network to obtain the final feature representation vector; (5) The node is embedded into the final representation vector and input into the classification model to obtain the risk classification results of the decentralized social media account nodes.
[0007] Specifically, the step (1) includes the following sub-steps: (1.1) Use the Selenium library to write an automated crawler program to simulate browser behavior to crawl posts, comments, likes, and citation records on the Lenster platform; (1.2) Obtain information about posts and associated accounts through the data query interface provided by the underlying Lens protocol; (1.3) Construct post information table, account information table, and post account relationship table in MySQL to form a decentralized social media platform dataset.
[0008] Furthermore, the step (2) is specifically as follows: by constructing the relationship data between posts and accounts into a heterogeneous graph , represents the account behavior of the decentralized social media platform; its node set , edge set , adjacency matrix The construction method is as follows: (2.1) Node set in a heterogeneous graph , including a collection of post nodes for decentralized social media platforms and account node collection , that is, the node set ; (2.2) Edge Sets in Heterogeneous Graphs , represents the interaction between accounts and posts; the edge set Divided into five types, with different positive real weights attached : (a) Account Follow another account for: , focus on ; (b) Account Comments Post a comment as: , Comment ; (c) Account Comments Forward or quote as: , Forward or Quote ; (d) Account Comments Like this: , Like ; (e) Account Comments Tips: , Tips ; (2.3) Adjacency matrix Used to represent the interaction relationship between nodes, initialize a size of A matrix filled with initial zero values, where Represents a node collection The size of , add the weight value added in step (2.2) Fill in the adjacency matrix In terms of location.
[0009] Furthermore, the step (3) preliminarily calculates the statistical features of different types of account nodes and obtains the feature representation vector of the account; specifically, the social features of social media accounts in nine dimensions are calculated. To reflect the behavioral characteristics and risk level: the number of posts containing external links , the number of posts containing risky images , the number of posts containing risky text content , Likes of posts containing external links , the number of posts with risky image content that were liked , the number of posts with risky text content that were liked , Number of forwarded posts containing external links , the number of posts containing risky images and content that were forwarded or liked , the number of posts forwarding risky text content ; Use commercial content security products to identify risks in images and text in posts.
[0010] Furthermore, the step (4) performs feature fusion on the feature representation vectors of the node and the neighboring nodes through the graph neural network to obtain an accurate node embedding representation; specifically, the graph neural network model used is the graph attention neural network GAT, and the initial input is the heterogeneous graph ,in For a node collection, is the edge set, is the adjacency matrix; each node has a feature representation vector ; The input of each layer of the GAT network is the feature vector set of all nodes, which can be expressed as: ; After feature aggregation, the output is: ; The following is the feature aggregation process of each layer of the neural network: For two adjacent nodes , you need to calculate the attention score To indicate the importance of neighbor nodes to the target node; it needs to go through the following two steps: (a) Calculating attention scores : ; The parameters that need to be trained are the linear transformation matrices and the attention weight matrix ; (b) End use Function, get the normalized attention score : ; The feature aggregation process of each layer of GAT network is expressed as: ; A total of three layers of GAT networks were designed to aggregate node features, and finally a final feature representation vector with a dimension of 16 was obtained.
[0011] Furthermore, the step (5) embeds the node into the final representation vector input classification model to obtain the risk classification result of the decentralized social media account node, specifically: using a fully connected neural network to build a classification model to perform risk binary classification on the account; using the feature vector of the social media account node as the model input; the input vector passes through the input layer, two hidden layers, and the output layer respectively; the input layer contains 16 neurons, corresponding to the 16-dimensional feature vector, and is responsible for receiving the input data; the two hidden layers contain 64 and 32 neurons respectively, and perform nonlinear transformation on the input vector through the weight matrix, and use the ReLU function as the activation function to alleviate the gradient vanishing problem; the output layer contains two neurons, and obtains the final binary classification recognition result of whether the account has risk.
[0012] The second aspect of the present invention is a decentralized social media risk account identification device, comprising the following modules: Dataset collection module: collects posts and account-related datasets from the decentralized social media platform Lenster; Build heterogeneous graph module: convert social dataset into heterogeneous graph; Statistical feature module: Preliminarily calculate the statistical features of different types of account nodes and obtain the feature representation vector of the account; Feature fusion module: Through the graph neural network, the feature representation vectors of the node and the neighboring nodes are fused to obtain the final feature representation vector; Obtaining risk results module: embed the node into the final representation vector and input it into the classification model to obtain the risk classification results of the decentralized social media account nodes.
[0013] The third aspect of the present invention: an electronic device, comprising: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method for identifying risky accounts on a decentralized social media platform as described.
[0014] The fourth aspect of the present invention: a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method for identifying risky accounts on a decentralized social media platform as described above.
[0015] The beneficial effects of the present invention are as follows: The application scenario of the present invention is the users of decentralized social media, and it mainly focuses on the identification of risky accounts on the platform. Technically, the GAT graph neural network is used to aggregate the features of accounts and neighbor nodes, solving the problem that account behaviors are difficult to monitor and manage due to anonymity and decentralization. The present invention can centrally identify account risks on decentralized social media platforms, effectively track the social footprint of accounts, and provide a risk management mechanism. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0017] Figure 1 is a flowchart of decentralized social media risk account identification of the present invention; Figure 2 It is the account social behavior classification diagram of the present invention; Figure 3 It is the account statistical feature classification diagram of the present invention; Figure 4 It is a schematic diagram of a decentralized social media risk account identification device of the present invention. DETAILED DESCRIPTION
[0018] Here, exemplary embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application.
[0019] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0020] The purpose of the present invention is achieved through the following technical solutions: Figure 1 As shown, a method for identifying risky accounts on a decentralized social media platform is implemented based on a heterogeneous graph neural network, and specifically includes the following steps: S1: Collect data from Lenster decentralized social media platform; S2: Convert the dataset including node and edge information into a heterogeneous graph; S3: Preliminary calculation of statistical characteristics of social media account nodes; S4: Generate feature representation of nodes through graph neural network; S5: Finally, the risk classification results of social media account nodes are obtained through the classification model.
[0021] S1. Collecting decentralized social media platform data The collection platform includes Lenster social media platform, and the specific steps are as follows: (1.1) Use the Selenium library to write an automated crawler program to simulate browser behavior to crawl post data on social media, including the publisher of the post, the number of likes / reposts / comments, post content, pictures, external links, etc.
[0022] The crawler program specifically includes: after loading the Chrome driver, dynamically loading the page through the Scroll page turning method, and locating the specific elements of the page using the find_elements method.
[0023] (1.2) The underlying Lens decentralized protocol provides a GraphQL API to obtain data. Specifically, the explorePublication query method can obtain post-related data, and the exploreProfile query method can obtain social media account data.
[0024] (1.3) Construct post information table, account information table, and post account relationship table in MySQL to form a decentralized social media platform dataset.
[0025] S2. Building a social heterogeneous graph By constructing the relationship data between posts and accounts into a heterogeneous graph , represents the account behavior of the decentralized social media platform; its node set , edge set , adjacency matrix The construction method is as follows: (2.1) Node set in a heterogeneous graph , including a collection of post nodes for decentralized social media platforms and account node collection , that is, the node set ; (2.2) Edge Sets in Heterogeneous Graphs , represents the interaction between accounts and posts; the edge set Divided into five types, with different positive real weights attached ;like Figure 2 As shown: (a) Account Follow another account for: , focus on ; (b) Account Comments Post a comment as: , Comment ; (c) Account Comments Forward or quote as: , Forward or Quote ; (d) Account Comments Like this: , Like ; (e) Account Comments Tips: , Tips ; (2.3) Adjacency matrix Used to represent the interaction relationship between nodes, initialize a size of A matrix filled with initial zero values, where Represents a node collection The size of; (2.2) step on either side , add the weight value added in step (2.2) Fill in the adjacency matrix In terms of location.
[0026] S3. Preliminary calculation of statistical characteristics of social media account nodes like Figure 3 As shown, the step (3) preliminarily calculates the statistical features of different types of account nodes and obtains the feature representation vector of the account; specifically, the social features of social media accounts in nine dimensions are counted. To reflect the behavioral characteristics and risk level: the number of posts containing external links , the number of posts containing risky images , the number of posts containing risky text content , Likes of posts containing external links , the number of posts with risky image content that were liked , the number of posts with risky text content that were liked , Number of forwarded posts containing external links , the number of posts containing risky images and content that were forwarded or liked , the number of posts forwarding risky text content ; Use commercial content security products to identify risks in images and text in posts.
[0027] S4. Obtain the deep feature representation vector of the account The graph neural network model used is the graph attention neural network GAT, and the initial input is a heterogeneous graph , including the node set obtained in step (2) , edge set , adjacency matrix ; Each node has the feature representation vector obtained in step (4) ; The vector obtained by each layer of GAT network is expressed as: ; For two adjacent nodes , you need to calculate the attention score To indicate the importance of neighbor nodes to the target node; it needs to go through the following two steps: Calculating attention scores : ; The parameters that need to be trained are the linear transformation matrices and the attention weight matrix ; Final use Function, get the normalized attention score :
[0028] The feature aggregation process of each layer of GAT network can be expressed as:
[0029] A total of three layers of GAT networks were designed to aggregate node features, and ultimately a deep feature representation vector with a dimension of 16 was obtained.
[0030] S5. Detecting whether decentralized social media accounts are risky A classification model is constructed using a fully connected neural network to perform binary risk classification of accounts; the feature vector of the social media account node is used as the model input, and the input vector passes through the input layer, two hidden layers, and the output layer respectively; the input layer contains 16 neurons, corresponding to the 16-dimensional feature vector, and is responsible for receiving input data; the two hidden layers contain 64 and 32 neurons respectively, and the input vector is nonlinearly transformed through the weight matrix, and the ReLU function is used as the activation function to alleviate the gradient vanishing problem; the output layer contains two neurons, and the final binary classification recognition result of whether the account is risky is obtained.
[0031] The second aspect of the present invention also provides a device for identifying risky accounts on a decentralized social media platform, such as Figure 4 As shown, it includes the following modules: Dataset collection module: collects posts and account-related datasets from the decentralized social media platform Lenster; Build heterogeneous graph module: convert social dataset into heterogeneous graph; Statistical feature module: Preliminarily calculate the statistical features of different types of account nodes and obtain the feature representation vector of the account; Feature fusion module: Through the graph neural network, the feature representation vectors of the node and the neighboring nodes are fused to obtain the final feature representation vector; Obtaining risk results module: embed the node into the final representation vector and input it into the classification model to obtain the risk classification results of the decentralized social media account nodes.
[0032] A third aspect of the present invention provides an electronic device, comprising: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement a method for identifying risky accounts on a decentralized social media platform as described.
[0033] And a computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method for identifying risky accounts on a decentralized social media platform as described above.
[0034] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the contents disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0035] It should be understood that the present application is not limited to the exact construction that has been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof.
Claims
1. A method for identifying risky accounts on a decentralized social media platform, characterized in that: The following steps are involved: (1) Collect the required data set from the decentralized social media Lenster; (2) Convert the data set including node and edge information into the node set, edge set, and adjacency matrix of the heterogeneous graph; (3) Preliminarily calculate the statistical characteristics of different types of account nodes and obtain the feature representation vector of the account; (4) The feature representation vectors of the node and its neighbor nodes are fused through the graph neural network to obtain the final feature representation vector; (5) The node is embedded into the final representation vector and input into the classification model to obtain the risk classification results of the decentralized social media account nodes.
2. The method for identifying risky accounts on a decentralized social media platform according to claim 1, characterized in that: The step (1) comprises the following sub-steps: (1.1) Use the Selenium library to write an automated crawler program to simulate browser behavior to crawl posts, comments, likes, and citation records on the Lenster platform; (1.2) Obtain information about posts and associated accounts through the data query interface provided by the underlying Lens protocol; (1.3) Construct post information table, account information table, and post account relationship table in MySQL to form a decentralized social media platform dataset.
3. The method for identifying risky accounts on a decentralized social media platform according to claim 1, characterized in that: Place The specific step (2) is as follows: by constructing the relationship data between posts and accounts into a heterogeneous graph , represents the account behavior of decentralized social media platforms; Its node collection , edge set , adjacency matrix The construction method is as follows: (2.1) Node set in a heterogeneous graph , including a collection of post nodes for decentralized social media platforms and account node collection , that is, the node set ; (2.2) Edge Sets in Heterogeneous Graphs , represents the interaction between accounts and posts; the edge set Divided into five types, with different positive real weights attached : (a) Account Follow another account for: , focus on ; (b) Account Comments Post a comment as: , Comment ; (c) Account Comments Forward or quote as: , Forward or Quote ; (d) Account Comments Like this: , Like ; (e) Account Comments Tips: , Tips ; (2.3) Adjacency matrix Used to represent the interaction relationship between nodes, initialize a size of A matrix filled with initial zero values, where Represents a node collection The size of , add the weight value added in step (2.2) Fill in the adjacency matrix In terms of location.
4. The method for identifying risky accounts on a decentralized social media platform according to claim 1, characterized in that: The step (3) preliminarily calculates the statistical features of different types of account nodes and obtains the feature representation vector of the account; specifically, the social features of social media accounts in nine dimensions are calculated. To reflect the behavioral characteristics and risk level: the number of posts containing external links , the number of posts containing risky images , the number of posts containing risky text content , Number of posts containing external links that you liked , the number of posts with risky image content that were liked , the number of posts with risky text content that were liked , Number of forwarded posts containing external links , the number of posts containing risky images and content that were forwarded or liked , the number of posts forwarding risky text content ; Use commercial content security products to identify risks in images and text in posts.
5. The method for identifying risky accounts on a decentralized social media platform according to claim 1, characterized in that: The step (4) performs feature fusion on the feature representation vectors of the node and the neighboring nodes through the graph neural network to obtain an accurate node embedding representation; specifically, the graph neural network model used is the graph attention neural network GAT, and the initial input is a heterogeneous graph ,in For a node collection, is the edge set, is the adjacency matrix; each node has a feature representation vector ; The input of each layer of the GAT network is the feature vector set of all nodes, which can be expressed as: ; After feature aggregation, the output is: ; The following is the feature aggregation process of each layer of the neural network: For two adjacent nodes , you need to calculate the attention score To indicate the importance of neighbor nodes to the target node; it needs to go through the following two steps: (a) Calculating attention scores : ; The parameters that need to be trained are the linear transformation matrices and the attention weight matrix ; (b) End use Function, get the normalized attention score : ; The feature aggregation process of each layer of GAT network is expressed as: ; A total of three layers of GAT networks were designed to aggregate node features, and finally a final feature representation vector with a dimension of 16 was obtained.
6. The method for identifying risky accounts on a decentralized social media platform according to claim 1, characterized in that: The step (5) embeds the node into the final representation vector and inputs it into the classification model to obtain the risk classification result of the decentralized social media account node, specifically: using a fully connected neural network to build a classification model to perform risk binary classification on the account; using the feature vector of the social media account node as the model input; the input vector passes through the input layer, two hidden layers, and the output layer respectively; the input layer contains 16 neurons, corresponding to the 16-dimensional feature vector, and is responsible for receiving the input data; the two hidden layers contain 64 and 32 neurons respectively, and perform nonlinear transformation on the input vector through the weight matrix, and use the ReLU function as the activation function to alleviate the gradient vanishing problem; the output layer contains two neurons, and obtains the final binary classification recognition result of whether the account has risk.
7. A device for identifying risky accounts on a decentralized social media platform, characterized in that: Includes the following modules: Dataset collection module: collects required data sets from the decentralized social media Lenster; Constructing heterogeneous graph module: converting the data set including node and edge information into the node set, edge set and adjacency matrix of heterogeneous graph; Statistical feature module: Preliminarily calculate the statistical features of different types of account nodes and obtain the feature representation vector of the account; Feature fusion module: The feature representation vectors of nodes and neighboring nodes are fused through graph neural networks to obtain the final feature representation vector; Obtaining risk results module: embed the node into the final representation vector and input it into the classification model to obtain the risk classification results of the decentralized social media account nodes.
8. An electronic device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
User trust negotiation establishment method based on two-layer blockchain in heterogeneous alliance system
CN108964926A
Decentralized application information processing method and device, equipment and storage medium
CN111444202A
Social network system based on Web3.0 decentration and construction method thereof
CN117061550A
Social platform content management system based on block chain
CN118840077A