A social network group classification method, system, device and storage medium
By constructing a social network group classification method for hypergraph networks, and using hypergraph network to train the topic group classification model, the problem that traditional graph structures cannot accurately identify user group preferences in social networks is solved, and more efficient social network analysis and user preference classification are achieved.
Patent Information
- Application Number
- CN202510502868.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-04-22
AI Technical Summary
The prior art is difficult to accurately identify the group preferences of users in social networks, and traditional graph structures cannot effectively express complex relationships, resulting in limited accuracy and efficiency of social network analysis.
A social network group classification method based on hypergraph network is constructed. By constructing a target user feature that includes endpoint features and hyperede edge features, and using hypergraph network to train a topic group classification model, calculate the correlation parameters between users and topic groups, and determine the most likely topic group.
It improves the accuracy and robustness of user topic group classification in social networks, can better capture the complex relationship between users and topic group, and achieve accurate circle recognition and user preference classification.
Smart Images

Figure CN120181093B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a social network group classification method, system, device and storage medium. Background Art
[0002] In modern society, social networks have become a key platform for communication. With the exponential growth of data volumes and the increasing complexity of social network structures, extracting valuable information from massive and diverse datasets presents a significant challenge.
[0003] In this technical domain, groups organized based on shared preferences can be referred to as social network groups. Accurately assessing the preferences of social network groups is crucial for improving user experience and driving innovation in social network applications. Therefore, accurately identifying the social network groups to which users belong has become a pressing issue. Summary of the Invention
[0004] The primary objective of this invention is to provide a method, system, device, and storage medium for classifying social network groups. By constructing a comprehensive target user feature set encompassing both endpoint and hyperedge features, and using a topic group classification model trained on a hypergraph network, the method more accurately captures the complex relationships between users and topic groups, thereby improving the accuracy of classifying the topic groups to which target users belong. Each target user is assigned a most appropriate topic group label, enabling precise identification and classification of user topic preferences.
[0005] In order to achieve the above objectives, the embodiments of the present application provide the following technical solutions:
[0006] According to a first aspect of an embodiment of the present application, a method for classifying social network topic groups is provided, the method comprising:
[0007] Constructing target user features based on target user data to be classified; the target user features include endpoint features and hyperedge features of the target user;
[0008] Calling a topic group classification model to calculate correlation parameters between the target user feature and at least two topic group features, wherein the correlation parameters are used to characterize the likelihood that the target user belongs to the topic group corresponding to the corresponding topic group feature; the topic group classification model is trained based on a hypergraph network; the hypergraph network is constructed based on endpoint features and hyperedge features between user and topic information in a social network;
[0009] The topic group corresponding to the maximum value of the relevance parameter is determined as the topic group to which the target user data belongs.
[0010] Optionally, calling a topic group classification model to calculate correlation parameters between the target user feature and at least two topic group features respectively includes:
[0011] The topic group classification model is called to perform forward propagation on the endpoint features and hyperedge features of the target user to calculate the probability distribution that the target user belongs to at least two topic groups.
[0012] Optionally, the topic group classification model is trained based on the hypergraph network according to the following steps:
[0013] Acquire a plurality of training samples, wherein any training sample is the hypergraph network, the hypergraph network including a plurality of endpoint features and real topic groups corresponding to the endpoint features, and a plurality of hyperedge features, the endpoint features being features of training elements, the training elements including a first type of user, a second type of user, and topic information; the hyperedge features representing the interactive relationship between the first type of user, the second type of user, and the topic information;
[0014] For each endpoint feature, call the initial topic group classification model to predict the predicted topic group corresponding to the endpoint feature;
[0015] Calculating a loss function between the predicted topic group and the true topic group;
[0016] When the loss function does not meet the convergence condition, the parameters of the initial topic group classification model are adjusted by back propagation, and the above steps are repeated until the loss function meets the convergence condition to obtain the trained topic group classification model.
[0017] Optionally, calling the initial topic group classification model to predict the predicted topic group corresponding to the endpoint feature includes:
[0018] Inputting the endpoint features and the hyperedge features into the initial topic group classification model, performing linear transformation through a convolutional layer, and updating the endpoint features and the hyperedge features through an aggregation function;
[0019] The updated endpoint features and the hyperedge features are input into a classifier to obtain a predicted topic group corresponding to the endpoint features.
[0020] Optionally, the hypergraph network is constructed according to the following steps:
[0021] Collecting postings of the plurality of first-type users and the plurality of second-type users from a social networking platform; wherein the first-type users represent users meeting a set influence condition, and the second-type users are all users except the first-type users;
[0022] Extracting endpoint features of a plurality of first-type users and endpoint features of a plurality of second-type users from the posting content respectively;
[0023] Determine, based on endpoint features of a plurality of first-type users, endpoint features of a plurality of second-type users, and a plurality of topic information, a real topic group corresponding to each endpoint feature;
[0024] Constructing a plurality of hyperedge features based on the interactive relationship between the plurality of endpoint features;
[0025] Assign a weight to each hyperedge feature to obtain a hyperedge weight set;
[0026] The hypergraph network is constructed based on a plurality of endpoint features and a real topic group corresponding to the endpoint features, the plurality of hyperedge features and the hyperedge weight set.
[0027] Optionally, constructing a plurality of hyperedge features based on the interactive relationship between the plurality of endpoint features includes:
[0028] Constructing, for each user of the first type, a hyperedge feature of all second-type users who follow the first-type user;
[0029] Constructing, for each of the first type of users, a hyperedge feature of all second type users who forward and / or comment on the content posted by the first type of user;
[0030] For each topic information, a hyperedge feature of all first-type users belonging to the topic information is constructed.
[0031] Optionally, extracting endpoint features of a plurality of first-type users and endpoint features of a plurality of second-type users from the post content respectively includes:
[0032] performing vectorization processing on the posting contents of the plurality of first-type users and the plurality of second-type users to obtain a first feature representation;
[0033] Performing feature mapping and pooling processing on the first feature representation to obtain a second feature representation;
[0034] The structure of the endpoint feature is determined, and the second feature representations of the first type of users and the second type of users are respectively placed in different parts of the structure of the endpoint feature.
[0035] According to a second aspect of an embodiment of the present application, a social network group classification system is provided, the system comprising:
[0036] A feature construction module is used to construct target user features based on the target user data to be classified; the target user features include endpoint features and hyperedge features of the target user;
[0037] a model prediction module, configured to call a topic group classification model to calculate correlation parameters between the target user feature and at least two topic group features, wherein the correlation parameters are used to characterize the likelihood that the target user belongs to the topic group corresponding to the corresponding topic group feature; the topic group classification model is trained based on a hypergraph network; the hypergraph network is constructed based on endpoint features and hyperedge features between user and topic information in a social network;
[0038] The classification module is used to determine the topic group corresponding to the maximum value of the correlation parameter as the topic group to which the target user data belongs.
[0039] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect above.
[0040] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the method described in the first aspect above.
[0041] In summary, the embodiments of the present application provide a social network group classification method, system, device and storage medium. By constructing target user features based on the target user data to be classified; the target user features include the endpoint features and hyperedge features of the target user; calling the topic group classification model to calculate the correlation parameters of the target user features and at least two topic group features respectively, and the correlation parameters are used to characterize the possibility that the target user belongs to the topic group corresponding to the corresponding topic group features; the topic group classification model is based on hypergraph network training; the hypergraph network is constructed based on the endpoint features and hyperedge features between users and topic information in the social network; the topic group corresponding to the maximum value of the correlation parameter is determined as the topic group to which the target user data belongs. By constructing a comprehensive target user feature including endpoint features and hyperedge features, and a topic group classification model based on hypergraph network training, the complex relationship between users and topic groups can be captured more accurately, thereby improving the classification accuracy of the topic group to which the target user belongs. Assign a most appropriate topic group label to each target user to achieve accurate identification and classification of user topic preferences. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0043] The structures, proportions, sizes, etc. illustrated in this specification are intended solely to complement the contents disclosed herein and to facilitate understanding and reading by persons skilled in the art. They are not intended to limit the conditions under which the present invention may be implemented and therefore have no substantive technical significance. Any structural modifications, changes in proportions, or adjustments in sizes, without affecting the efficacy and objectives of the present invention, shall remain within the scope of the technical contents disclosed herein.
[0044] Figure 1 A flow chart of a method for classifying social network topic groups provided in an embodiment of the present application;
[0045] Figure 2 A schematic diagram of a social network structure provided in an embodiment of the present application;
[0046] Figure 3 A schematic diagram of a hypergraph representation of a social network provided in an embodiment of the present application;
[0047] Figure 4 A hypergraph convolutional neural network diagram provided in an embodiment of the present application;
[0048] Figure 5 A schematic diagram of a social network topic group classification system provided in an embodiment of the present application;
[0049] Figure 6 A structural diagram of an electronic device provided in an embodiment of the present application is shown;
[0050] Figure 7 A diagram showing a computer-readable storage medium provided in an embodiment of the present application.
[0051] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0052] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0053] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the various components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0054] In addition, the terms "first," "second," and so on, used in this disclosure are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referenced. Thus, a feature specified as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of this disclosure, "plurality" means at least two, such as two or three, unless otherwise specifically defined.
[0055] In the present invention, unless otherwise specified or limited, the terms "connection" and "fixation" should be understood in a broad sense. For example, "fixation" can mean fixed connection, detachable connection, or integration; mechanical connection or electrical connection; direct connection or indirect connection through an intermediate medium; internal communication between two elements or interaction between two elements, unless otherwise specified. Those skilled in the art will be able to understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0056] In addition, the technical solutions between the various embodiments of the present invention can be combined with each other, but it must be based on the fact that ordinary technicians in this field can implement it. When the combination of technical solutions is mutually contradictory or cannot be implemented, it should be deemed that such a combination of technical solutions does not exist and is not within the scope of protection required by the present invention.
[0057] Currently, there are two main methods for identifying circles on social networks: one based on post content and the other based on social network relationships. The problem with identifying circles based on post content is that most users post relatively little or no content on social networks, but are still very active users, such as watching, liking, following, and commenting. For such users, if there is no user posting behavior, the circle grouping based on post content will miss a large part of users. For circle group identification based on social network relationships, the grouping is often based on pure network relationships, ignoring the circle information reflected by the post content, which leads to poor network recognition results.
[0058] Traditional graph structures struggle to effectively distinguish and express relationships between groups. For example, they can't clearly define the group characteristics of "a group of users following a KOL," limiting our in-depth understanding of group behavior on social networks and insufficiently expressing group relationships. Traditional graph networks, when processing complex relationships within social networks, are limited to simple binary relationships and fail to capture advanced interactions between nodes, impacting the depth and accuracy of analysis and hindering their ability to process high-order social relationships. When building large-scale graphs, traditional graph structures place significant demands on memory and graphics card resources. Especially when the number of endpoints is large, graphics card usage rapidly increases, limiting the model's ability to process large amounts of data. These challenges collectively limit the accuracy and efficiency of social network analysis.
[0059] In order to solve the above problems, hypergraphs have significant advantages in processing high-order relationships. By considering high-order social relationships, this new network structure can more comprehensively capture the high-level interactions between nodes, thereby improving the performance and effect of social recommendation algorithms. However, there are still some challenges, such as considering the rich semantics between nodes in social networks. Therefore, the practical problem to be solved by the present invention is to use hypergraphs to model the complex high-order relationships between users, KOLs, and posts in the network. In addition, it is necessary to select a suitable hyperedge structure, which can, on the one hand, represent enough potential semantic associations, and on the other hand, can control the scale to make ultra-large-scale hypergraph computing possible.
[0060] The hypergraph of the present invention uses a more efficient graph structure to greatly save resource usage, allowing more users to make predictions in a hypergraph, and better preserving the integrity of the relationship network between users and KOLs. When expressing something like a "follow relationship", the traditional graph structure can only express "user A follows KOL B", but it is difficult to distinguish "a group of users follows KOL B" from "a group of users follows KOL C" in terms of edge attributes. The hypergraph structure of the present invention can show the characteristics of "common attention", and can flexibly and uniformly give unified management of a type of attention and differentiated management of attention to different objects. The embodiment of the present application utilizes the powerful expression ability of the hypergraph to capture the complex relationships in social networks, and uses a hypergraph neural network to learn the embedded representation of users in these relationships, thereby achieving accurate circle identification.
[0061] Figure 1 A method for classifying social network topic groups provided by an embodiment of the present application is shown, and the method includes:
[0062] Step 101: constructing target user features based on target user data to be classified; the target user features include endpoint features and hyperedge features of the target user;
[0063] Step 102: Calling a topic group classification model to calculate correlation parameters between the target user feature and at least two topic group features, wherein the correlation parameters are used to represent the likelihood that the target user belongs to the topic group corresponding to the corresponding topic group feature; the topic group classification model is trained based on a hypergraph network; the hypergraph network is constructed based on endpoint features and hyperedge features between user and topic information in a social network;
[0064] Step 103: Determine the topic group corresponding to the maximum value of the correlation parameter as the topic group to which the target user data belongs.
[0065] By leveraging hypergraph networks to model the complex relationships between users and topics in social networks, we can improve the accuracy and robustness of topic group classification. Hypergraph networks can effectively represent the endpoint features and hyperedge features between users and topics, capturing richer structural information and interaction patterns.
[0066] In a possible implementation, in step 102, calling a topic group classification model to calculate correlation parameters between the target user feature and at least two topic group features respectively includes:
[0067] The topic group classification model is called to perform forward propagation on the endpoint features and hyperedge features of the target user to calculate the probability distribution that the target user belongs to at least two topic groups.
[0068] Suppose there is a target user named Xiaoming on a social network who frequently posts and participates in discussions on topics related to "technology" and "food." We now need to use the aforementioned social network topic group classification method to determine the topic group to which Xiaoming is most likely to belong. First, we extract basic information from Xiaoming's profile, such as age and occupation. We also extract text features from his posts, such as the frequency of keywords like "technology" and "food." Finally, we extract behavioral features from his interactions, such as the number of likes and comments on posts related to technology and food. We then analyze Xiaoming's interactions with other users, such as following, forwarding, and commenting. We then construct hyperedges and extract their characteristic information, such as the frequency of interaction with technology KOLs and the intensity of interaction with food enthusiasts.
[0069] Xiao Ming's target user characteristics are then input into a topic group classification model trained on a hypergraph network. The model uses forward propagation to calculate the probability distribution of Xiao Ming belonging to different topic groups. For example, the model might calculate that Xiao Ming has a probability of 0.7 belonging to the "Technology" topic group and a probability of 0.3 belonging to the "Food" topic group. Based on the maximum value of the correlation parameter, Xiao Ming is most likely to belong to the "Technology" topic group, as it has the highest corresponding probability value. This example demonstrates that this method can accurately identify user topic preferences based on user data and social network structure information, providing strong support for content recommendation, advertising, and other services on social network platforms.
[0070] In one possible implementation, the topic group classification model is trained based on the hypergraph network according to the following steps:
[0071] Acquire a number of training samples, any one of which is the hypergraph network, and the hypergraph network includes a number of endpoint features and real topic groups corresponding to the endpoint features, and a number of hyperedge features, wherein the endpoint features are features of training elements, and the training elements include a first type of user, a second type of user, and topic information; the hyperedge features characterize the interactive relationship between the first type of user, the second type of user, and the topic information; for each endpoint feature, call the initial topic group classification model to predict the predicted topic group corresponding to the endpoint feature; calculate the loss function between the predicted topic group and the real topic group; when the loss function does not meet the convergence condition, adjust the parameters of the initial topic group classification model through back propagation, repeat the above steps until the loss function meets the convergence condition, and obtain the trained topic group classification model.
[0072] The endpoint features in the training samples cover the characteristics of first-type users, second-type users, and topic information, while the hyperedge features represent the interactive relationship between these elements. By training the topic group classification model on the hypergraph network, we can fully tap the value of social network data, capture the complex connection between users and topics, and provide richer data support and more accurate prediction basis for topic group classification.
[0073] By obtaining training samples containing endpoint features, real topic groups, and hyperedge features, the initial topic group classification model is used for prediction, and the loss function between the predicted results and the real labels is calculated. The model parameters are then adjusted through backpropagation. This process is repeated until the loss function meets the convergence condition. The goal is to train a model that can accurately predict the topic group to which a user belongs. By training on a variety of training samples, the model can learn the characteristic patterns and interaction patterns between different users and topics, thereby improving the model's generalization ability and enabling it to maintain high classification accuracy even when faced with new, unseen data. At the same time, the backpropagation and parameter adjustment process also helps to enhance the model's robustness, enabling it to stably output prediction results when faced with noisy data or abnormal situations.
[0074] In a possible implementation, calling the initial topic group classification model to predict the predicted topic group corresponding to the endpoint feature includes:
[0075] The endpoint features and the hyperedge features are input into the initial topic group classification model, linear transformation is performed through the convolution layer, and the endpoint features and the hyperedge features are updated through the aggregation function; the updated endpoint features and the hyperedge features are input into the classifier to obtain the predicted topic group corresponding to the endpoint features.
[0076] By inputting endpoint and hyperedge features into an initial topic group classification model, followed by linear transformations in the convolutional layer and updates using aggregation functions, the classifier ultimately generates predicted topic groups. This approach aims to improve the model's accuracy in predicting the topic groups to which users belong. This approach fully leverages the complex relationships between users and topics, capturing richer structural information and interaction patterns, thereby more accurately identifying users' interests and preferences. By leveraging the structural characteristics of hypergraph networks and processing endpoint and hyperedge features through convolutional layers and aggregation functions, the model can better model the complex relationships between users and topics. Hypergraph networks can represent many-to-many relationships, enabling the model to capture group interactions between users and connections between topics, improving its expressiveness and predictive performance. By continuously adjusting model parameters during training, the model learns more general feature representations and classification rules, thereby improving its generalization to new data. This approach not only works well for training data but also maintains high prediction accuracy on unseen data, enhancing the model's practicality and reliability.
[0077] In one possible embodiment, the hypergraph network is constructed according to the following steps: collecting the posting content of the several first type users and the several second type users from the social networking platform; wherein the first type users represent users with set influence conditions, and the second type users are all users except the first type users; extracting the endpoint features of several first type users and the endpoint features of several second type users from the posting content respectively; determining the real topic group corresponding to each endpoint feature based on the endpoint features of several first type users and the endpoint features of several second type users and several topic information; constructing several hyperedge features based on the interactive relationship between several said endpoint features; assigning weights to each hyperedge feature to obtain a hyperedge weight set; constructing the hypergraph network based on several endpoint features and the real topic groups corresponding to the endpoint features, the several hyperedge features and the hyperedge weight set.
[0078] By collecting posts from different types of users on social networking platforms, extracting endpoint features, and constructing hyperedge features based on the interactive relationships between endpoint features, the goal is to build a hypergraph network that accurately reflects the complex relationships between users and topics in social networks. Users are divided into Type I users (users with defined influence criteria) and Type II users (other users), and endpoint features are extracted for each of them to distinguish the influence of different types of users in the hypergraph network. Type I users typically have higher influence and authority, and their characteristics and behaviors may have a greater impact on topic propagation and user classification, thus requiring special attention and distinction. By constructing hyperedge features and assigning weights to each hyperedge feature, the goal is to capture the interactive relationships between users and topics, such as user participation in the topic and the level of discussion activity. Hyperedge weights reflect the strength and importance of interactive relationships, enabling the model to better understand and analyze the complex connections between users and topics, thereby improving the accuracy of topic group classification.
[0079] Assume that there are multiple hot topics on a social networking platform, such as "technological innovation," "healthy living," and "fashion trends," and that users include ordinary users and influential KOLs. Collect posts from several first-type users (such as well-known KOLs in the technology field) and several second-type users (ordinary users). For example, collect posts from technology KOLs about reviews of the latest technology products, analysis of industry trends, and other posts from ordinary users about discussions about technological innovation and personal user experiences. Extract endpoint features from the post content, including text features (such as keywords and word frequency), user behavior features (such as posting frequency and number of interactions), and so on. For example, endpoint features extracted from technology KOLs may include the word frequency of keywords such as "artificial intelligence" and "big data," as well as their number of followers and forwarding volume; endpoint features extracted from ordinary users may include their participation in technological innovation topics and the activeness of discussions.
[0080] Based on the endpoint features and topic information, the real topic group corresponding to each endpoint feature is determined. For example, the endpoint feature of a tech KOL might correspond to the "technological innovation" topic group, while discussions about healthy eating by ordinary users might correspond to the "healthy living" topic group. Hyperedge features are constructed based on the interactive relationships between endpoint features. For example, if multiple ordinary users participate in a discussion about artificial intelligence posted by a tech KOL, a hyperedge can be established between these users and the KOL, representing the interactive relationship between them. Weights are assigned to each hyperedge feature to obtain a set of hyperedge weights. Weights can be determined based on the strength and importance of the interactive relationship, such as the number of likes, comments, and reposts a user receives on a post. For example, if a user repeatedly reposts and comments on a tech KOL post, this hyperedge may have a larger weight. A hypergraph network is constructed based on the endpoint features, the real topic groups corresponding to the endpoint features, the hyperedge features, and the set of hyperedge weights. This hypergraph network comprehensively represents the complex relationships between users and topics in social networks, providing an accurate and rich data foundation for topic group classification models.
[0081] In a possible implementation, constructing a plurality of hyperedge features based on the interactive relationship between the plurality of endpoint features includes:
[0082] For each of the first-type users, a hyperedge feature of all the second-type users who follow the first-type user is constructed; for each of the first-type users, a hyperedge feature of all the second-type users who forward and / or comment on the content posted by the first-type user is constructed; for each of the topic information, a hyperedge feature of all the first-type users who belong to the topic information is constructed.
[0083] By constructing hyperedge features for all second-type users who follow, forward, and comment on posts by first-type users, and for each topic, constructing hyperedge features for all first-type users affiliated with that topic, the goal is to accurately represent user interactions and topic participation in the hypergraph network. These hyperedge features can capture group interactions between users and the propagation paths of topics, providing richer structural information for topic group classification models and improving the model's accuracy in predicting user topic preferences.
[0084] Suppose there are multiple trending topics on a social networking platform, such as "Technological Innovation," "Healthy Living," and "Fashion Trends." Users include both ordinary users (Type II users) and influential KOLs (Type I users). For example, if KOL A in the technology field is followed by 100 ordinary users, a hyperedge can be constructed for KOL A, connecting these 100 ordinary users and representing their following relationship with KOL A. This hyperedge reflects KOL A's influence and the size of its follower base. For example, if KOL A posts about artificial intelligence, 50 ordinary users retweet it, and 30 ordinary users comment on it, two hyperedges can be constructed for KOL A: one connecting the 50 ordinary users who retweeted the post, and the other connecting the 30 ordinary users who commented on it. These hyperedges capture the engagement and interaction of ordinary users with KOL A's content. For example, if five KOLs post related posts on the topic of "Technological Innovation," a hyperedge can be constructed for this topic, connecting these five KOLs and representing their participation and contribution to the topic. This super edge can reflect the activity of the topic and the KOL's position in the topic.
[0085] In one possible implementation, endpoint features of several first-type users and endpoint features of several second-type users are extracted from the posted content, including: vectorizing the posted content of the several first-type users and the several second-type users to obtain a first feature representation; performing feature mapping and pooling on the first feature representation to obtain a second feature representation; determining the structure of the endpoint feature, and placing the second feature representations of the first-type users and the second-type users in different parts of the structure of the endpoint feature.
[0086] By vectorizing, mapping, and pooling the posts of first- and second-type users, and determining the structure of endpoint features, we aim to extract high-quality feature vectors that effectively characterize user characteristics. These endpoint features, which include user text information and behavioral patterns, provide accurate input data for the topic group classification model, helping the model better understand user interests and preferences, thereby improving classification accuracy and reliability.
[0087] For example, the posts of KOLs and ordinary users are vectorized to obtain a first feature representation. For example, the TF-IDF method is used to convert the text into a word frequency vector, or the Word2Vec model is used to convert the text into a word vector. The first feature representation is feature mapped and pooled to obtain a second feature representation. For example, the word vector is mapped to a vector space of a fixed length and an average pooling operation is performed to obtain a feature vector for each user or KOL. The structure of the endpoint feature is determined, and the second feature representations of the first type of users and the second type of users are respectively placed in different parts of the structure of the endpoint feature. For example, the feature vector of the KOL can be placed in the first half of the feature vector, and the feature vector of the ordinary user can be placed in the second half, so that the model can distinguish between different types of user features.
[0088] Based on the content and network structure of posts on social networks, the present invention constructs a hypergraph network structure of KOLs, posts, and users. Using a hypergraph learning algorithm, it can better identify groups of people in circles, expand the size of groups of people in circles, and better discover the preferences of people in circles. The following is a detailed description of the method provided in the embodiments of the present application with reference to the accompanying drawings.
[0089] Part I: Introduction to hypergraph data structures.
[0090] First, it is necessary to define the basic components of a hypergraph, including the endpoint set V, the hyperedge set E, and the weight set W. The hypergraph involved in the embodiment of the present application is a data structure that extends the concept of an ordinary graph. Unlike ordinary graphs, the edges in a hypergraph can connect multiple nodes, not just two nodes. This makes the hypergraph more flexible and powerful in expressing multi-party relationships or connections. A hypergraph consists of three parts: endpoints, hyperedges, and hyperedge weights G=(V, E, W). The endpoint set V (Vertices) is different from the ordinary Figure 1 Hyperedges are different from regular graphs. A hyperedge can connect two or more vertices and can express more complex relationships than the edges of regular graphs. For example, in the scenario of "a group of users following a KOL", a hypergraph can be represented by a single hyperedge instead of a regular graph. Figure 1 A large number of edges are used to connect KOLs and each user. Weights are a collection of hyperedge weights. Different hyperedges have different weights, and different endpoints on a hyperedge can also have different weights. This allows the model to capture the specific contribution and importance of each node within the hyperedge.
[0091] Based on the content and network structure of posts on social networks, this paper constructs a hypergraph network structure of KOLs, posts, and users. Using a hypergraph learning algorithm, it can better identify and expand the size of circle populations and better discover their preferences. Real-world data can naturally be represented as a graph data structure, in which objects and the relationships between them are represented by nodes and edges, respectively. Figure 2 The simplified social network structure is shown in Figure 1. Three main types of nodes and three types of relationships can be seen, which together constitute the graph data structure of the social network.
[0092] First aspect: Node types include:
[0093] 1. KOL (K) refers to key opinion leaders (KOLs) and key opinion consumers (KOCs) on social media platforms. These individuals typically have high influence and visibility, and their social circles are well-known.
[0094] 2. Ordinary users (U) refer to ordinary netizens on social media platforms. They may not have the fame of KOLs, but they are still important participants in social networks. The circle affiliation of some users is known, while others require analysis to determine.
[0095] 3. Circle Topic Set (T) refers to topics extracted from user posts. These topics represent user interests and discussion focus and are key elements in social network analysis.
[0096] The second aspect: relationship types include:
[0097] 1. Posting: This occurs between KOL users and ordinary users when their posts mention a certain topic or topics. This is usually achieved by using hashtags to indicate users' attention and participation in a specific topic.
[0098] 2. Follow: Indicates the attention of ordinary users to the KOL.
[0099] 3. Common Circle: This relationship exists between multiple KOLs who share the same topic. This relationship helps identify and analyze the connections between KOLs and how they collectively influence or represent a specific circle.
[0100] In social network analysis, graph data structures can effectively represent and analyze the complex relationships between users, KOLs, and topics. This structure enables the following analyses: User behavior analysis: By analyzing users' posting and following behaviors, we can understand their interests and preferences. Influence analysis: By analyzing following relationships, we can assess the influence of KOLs and how they influence ordinary users. Circle identification: By using shared circle relationships, we can identify and analyze the characteristics and dynamics of different circles. This graph data structure provides a powerful tool for social network analysis, helping to gain a deeper understanding of the interactions and structure within social networks.
[0101] Figure 3 The hypergraph representation of the social network provided in an embodiment of the present application is shown, which expresses the complex relationship between users, topics and KOLs through hyperedges, including 4 user nodes, 2 topic nodes and 4 KOL nodes, as well as the posting relationship and follow relationship between these nodes.
[0102] The first aspect: nodes include:
[0103] User nodes (U1, U2, U3, U4): represent the general user group. In this embodiment, only the circle affiliation of some users is known, and the user's circle affiliation is the main prediction object.
[0104] Topic nodes (T1, T2): represent community topics. They exist in the graph as endpoints and hyperedge attributes, rather than as actual nodes. Topics are part of hyperedges and are used to connect users and KOLs.
[0105] KOL nodes (K1, K2, K3, K4): represent the key opinion leader (KOL) group and play the role of guiding circle information.
[0106] The second aspect: relationships include:
[0107] Following relationships: The dotted circles around U1 / U2 / U3 / T1 / K1 and U2 / U3 / U4 / T2 / K4 represent the following relationships between users and KOLs. There are two following hyperedges in the diagram, each consisting of three followers and one KOL, indicating that multiple users are following the same KOL.
[0108] Retweet relationships: The dotted circles around U2 / U3 / T1 / K1, and U3 / U4 / T2 / K4, respectively, represent users retweeting KOL posts. Multiple users retweet the same KOL's posts, and a KOL may have multiple posts. This relationship demonstrates user dissemination and engagement with KOL content.
[0109] Common Circle Relationships: The dashed circles in the circles K1 / K2 / K3 and K2 / K3 / K4 represent the relationships between KOLs within the same circle. Since the first two relationships only associate one KOL, they lack sufficient circle information support. Therefore, the features are enhanced by connecting other KOLs within the same circle. This enhances the features and provides sufficient circle information support.
[0110] Third aspect: The composition of the hypergraph network provided by the embodiment of the present application:
[0111] Vertices: Individual elements in the data, including users, topics, and KOLs.
[0112] Hyperedges: Unlike edges in regular graphs, hyperedges can connect two or more vertices and express complex relationships, such as a group of users following a key opinion leader (KOL).
[0113] Weights: A collection of hyperedge weights. Different hyperedges have different weights, and different endpoints on a hyperedge can also have different weights. This helps the model capture the importance of each node within the hyperedge.
[0114] This hypergraph network representation method more flexibly models higher-order relationships in social networks, providing a new perspective for social network analysis. Hypergraphs can more accurately identify and predict user circles, thereby improving the personalization and precision of social network services. The hypergraph structure employed in this invention significantly reduces resource usage, enabling the processing of more users within a single hypergraph and better preserving the integrity of the network of relationships between users and KOLs.
[0115] Part 2: Data preparation.
[0116] First, you need to label the social network data into circles and prepare the user pool and KOL pool. This includes labeling circles, creating sub-datasets, and randomly partitioning the dataset. This step provides the necessary dataset for model training, specifically including:
[0117] Step 1: Circle Labeling: First, circle labeling is performed on the entire hypergraph network data to identify and mark the circles to which users and KOLs belong. This step provides important label information for the dataset, which is used for subsequent model training and evaluation.
[0118] Step 2: Sub-dataset creation: After circle labeling is complete, select a certain number of users and KOLs from the user pool and KOL pool for each circle to form a sub-dataset. This process requires balancing the number of users and KOLs in each circle to ensure that the model can learn the characteristics of different circles and effectively identify users with specific circle labels.
[0119] Step 3: Randomly partition the dataset: Randomly partition the sub-dataset of each circle into training, validation, and test sets. This random partitioning helps reduce bias and ensures that the model's performance on different data subsets is representative.
[0120] ① The training set is used for model training. It contains data that has been labeled with circle labels. The model identifies the circle to which the user belongs by learning the patterns and relationships in this data.
[0121] ② The validation set is used to fine-tune model metrics. It also contains data annotated with circle labels, which is used to adjust model parameters during training to improve model accuracy and generalization.
[0122] The test set is used for final model evaluation. It contains data with known relationships but no circle labels. After model training is complete, the test set is used to evaluate the model's predictive performance, ensuring that the model can accurately identify user circles even on unseen data.
[0123] This data partitioning method allows for systematic model training and evaluation, ensuring the accuracy and reliability of the model in identifying user circles. This approach helps improve the depth and breadth of social network analysis, providing more accurate user circle identification capabilities for social network services.
[0124] The third part is the construction of hypergraph points and edges.
[0125] Based on the labeled data, a hypergraph network structure consisting of KOLs, users, and topics is constructed. Using the DHG framework and the HGNN+ algorithm, the endpoints and hyperedges of the hypergraph are constructed based on the interactive relationships between users and KOLs. This step is performed after data partitioning because it requires the partitioned dataset to construct the hypergraph.
[0126] The DHG (Dynamic Hypergraph Neural Networks) framework is a neural network framework for processing dynamic hypergraphs that can adapt to changes in graph structures over time. The HGNN+ algorithm is a neural network algorithm based on hypergraphs. It captures high-order relationships between nodes through hyperedges to achieve feature learning in complex data structures such as social networks. The present invention applies the HGNN+ algorithm under the DHG framework to perform predictive reasoning on user circles, and draws on the HHGNN algorithm to add support for heterogeneous data to process various types of data such as text, images, and links. The computational logic of the present invention adjusts feature combinations based on the HGNN+ algorithm to achieve heterogeneous endpoint computing to meet the needs of user circle identification in social networks.
[0127] In hypergraph construction, endpoints (V), hyperedges (E), and hyperedge weights (W) are the three basic components of a hypergraph, which together constitute the hypergraph. .
[0128] 1. Endpoint set V: represents individual elements such as users, KOLs, and topics. In the data partitioning stage, users and KOLs are labeled and used as endpoints. In the feature extraction stage, the features of these endpoints are obtained by vectorizing the post content. The degree of the endpoint (d(v)) reflects the connection strength of the endpoint in the hypergraph, which is an important attribute in hypergraph construction. For a vertex, its degree can be expressed as .
[0129] 2. Hyperedge set E: connects two or more endpoints and expresses complex relationships. Hyperedges are constructed based on the interactive relationships between users and KOLs, such as following, forwarding, and common circle relationships. These relationships are identified in the data partitioning stage and converted into hyperedges in the hypergraph construction stage. The degree of a hyperedge (δ(e)) represents the number of endpoints connected by the hyperedge, which helps to understand group behavior in social networks. For a hyperedge, its degree can be expressed as .
[0130] 3. Hyperedge Weight Set W: Assigns weights to hyperedges and endpoints, reflecting the contribution and importance of nodes within the hyperedge. Weight Set W assigns weights to hyperedges, reflecting the importance or influence of endpoints within the hyperedge. In hypergraph construction, weights can be assigned based on endpoint degrees, interaction frequency between endpoints, or other relevant metrics.
[0131] 4. Degree Calculation: Vertex degree (d(v)) and hyperedge degree (δ(e)) are key metrics in hypergraph analysis. Vertex degree (d(v)) represents the sum of the weights of all hyperedges in which vertex v participates, reflecting the vertex's importance in the hypergraph. Hyperedge degree (δ(e)) represents the sum of the number of vertices connected by hyperedge e, reflecting the complexity of the hyperedge in the hypergraph. In a hypergraph, the degree of a vertex can be defined as the sum of the weights of the hyperedges containing that vertex. The vertex degree calculation considers the weights of all hyperedges connected to the vertex (w(e)) and the relationships between the endpoints and the hyperedges (h(v,e)). The hyperedge degree is defined as the number of vertices contained on the hyperedge. The hyperedge degree calculation considers the relationships between all endpoints connected to the hyperedge (h(v,e)).
[0132] In hypergraph edge construction, these components and degree calculations provide the HGNN+ algorithm with the necessary structure and information, enabling it to effectively learn features and predict user circles within social networks. In this way, hypergraph construction is closely linked to data partitioning, feature extraction, and algorithm application, forming the complete process of social network analysis.
[0133] Part 4: Feature extraction.
[0134] After the hypergraph network is built, endpoint features (users and KOLs) need to be processed. This includes generating raw labels, selecting topic circles and users, selecting KOLs, extracting endpoint features, creating endpoint labels, and adjusting heterogeneous endpoint features. These steps convert raw data into feature vectors that the model can understand and provide the necessary labels for supervised learning.
[0135] The entire process of preparing raw text data into feature vectors and labels that can be used for model training includes:
[0136] Step 1: Generate raw labels: Provide basic data for model training.
[0137] Extracting post data from social media, we identify and label influential KOLs and users participating in topics as belonging to certain social circles. These labels serve as raw tags and are used to infer potential social circle tags for more users.
[0138] The original labels of the present invention are derived from the circle judgment of posts in social media. A certain number of influential KOLs and some users who participated in the topic are labeled with circle topics. These original labels will be used as part of the training data to help the model learn how to infer the potential circle labels of users from their posts.
[0139] Step 2: Selection of circle topics, user screening, and KOL selection: Build a diverse training data set to improve the generalization ability of the model.
[0140] Select circle topics with different popularity and user groups, and screen out users with the circle label for each topic (the number may range from thousands to tens of thousands) as positive examples for model training, and randomly select an equal number of users without the circle label as negative examples for model training.
[0141] We further select KOLs who form hyperedges with the aforementioned users to conserve the hardware required for graph construction. When constructing a hypergraph, we need to determine which nodes (users and KOLs) have connections, known as hyperedges. Selecting KOLs to form hyperedges with the aforementioned users means that during hypergraph construction, only those KOLs with direct or indirect relationships with a specific user group are considered, rather than including all possible KOLs. This selection of KOLs to form hyperedges with the aforementioned users ensures that the hypergraph effectively represents the relationships between users and KOLs while minimizing the graph structure, improving computational efficiency, and conserving hardware resources, thereby enabling more efficient and cost-effective graph construction and analysis.
[0142] Step 3: Extract endpoint features: Convert user and KOL posts into feature vectors that the model can process. This provides input features for model training, enabling the model to infer circle labels based on these features.
[0143] Count Vectorizer is used to vectorize user and KOL posts, converting text data into numerical feature vectors to form endpoint features. Stop words are further excluded to reduce noise and improve the quality of the feature vectors. Furthermore, user and KOL posts are mapped onto the word vector plane and average pooled. This process generates endpoint vector representations, which helps capture semantic information in the text data.
[0144] For endpoint features, this paper uses the content of posts and forwarded posts by users and KOLs as their respective features. First, all posts are vectorized after eliminating stop words using sklearn's CountVectorizer. The feature dimension size is primarily limited by the size of the video memory and can be flexibly configured to several thousand dimensions. Users and KOLs then aggregate all their posts, map them to the word vector plane, and perform average pooling.
[0145] Step 4: Create endpoint labels: Make it clear whether each endpoint belongs to a certain circle.
[0146] According to whether the endpoint belongs to a certain circle, a corresponding label is assigned to each endpoint. The circle label of each endpoint is represented by a binary vector, 1 means it belongs to the circle, and 0 means it does not belong to the circle. The label is made separately in the training of each circle based on whether each endpoint belongs to a certain circle, which can be regarded as .
[0147] It provides target output for model training, helping the model learn how to predict the correct circle label from the input features.
[0148] Step 5: Adjust the feature structure to support heterogeneity: Avoid confusion between user endpoints and KOL endpoints, and ensure that the model can correctly distinguish endpoints of different feature types.
[0149] When creating endpoint features, place user features at the beginning and KOL features at the end, and set any unrelated parts to zero. Place user features at the beginning and end of the feature vector, respectively, and fill any unrelated parts with zeros. This adjustment helps the model correctly identify and process different types of endpoint features during training. Adjusting the feature structure based on the previously constructed endpoint features provides accurate feature input for subsequent model training and label inference, helping to improve the model's predictive accuracy and reliability.
[0150] To avoid confusion between user endpoints and KOL endpoints, this paper has made heterogeneous adjustments to the feature structure of the HGNN+ algorithm. When creating endpoint features, the head represents user features, the tail represents KOL features, and any unrelated parts are set to zero. This ensures that endpoints with different feature types are correctly distinguished during the propagation process.
[0151] Part 5: Hyperedge Construction: Hyperedges are constructed based on the following relationships, forwarding and commenting behaviors, and shared circle relationships between users and KOLs. This step is performed after endpoint feature processing because hyperedge construction depends on the relationship between endpoints.
[0152] Step 1: Users who follow the same KOL together form a hyperedge with the KOL;
[0153] When constructing the hypergraph endpoints, users and KOLs are incorporated as nodes, and the user's following information and the KOL's identity information are captured. If multiple users follow the same KOL, a hyperedge is formed between these users and the KOL. This hyperedge captures the potential connections and group relationships between users that arise from their shared attention to a particular KOL. This relationship can reflect users' preferences and interests for specific KOLs, as well as the clustering characteristics of user groups. This hyperedge construction provides important structural information for subsequent model training and analysis, enabling the model to leverage the following relationships between users and KOLs to infer users' potential circle tags or perform other related analysis tasks.
[0154] Step 2: Users who jointly forward and comment on a KOL post form a hyperedge with the KOL who posted it;
[0155] When constructing the hypergraph endpoints, users and KOLs are included as nodes, and the user's forwarding and commenting information and the KOL's posting information are captured. If multiple users forward or comment on the same KOL post, a hyperedge is formed between these users and the KOL who posted it. This hyperedge captures the interactive relationship between users arising from their shared participation in a discussion surrounding a KOL post. This relationship reflects the user's level of attention and engagement with specific content, as well as the interaction patterns and influence transmission paths between users. This hyperedge construction provides rich interactive information for subsequent model training and analysis, enabling the model to leverage the forwarding and commenting relationships between users and KOLs to infer users' potential social network tags, analyze information dissemination processes, and perform other related analytical tasks.
[0156] Step 3: For each topic in a circle, construct a hyperedge of all KOLs belonging to that circle;
[0157] When acquiring raw tags and selecting circle topics, we already identified topics within different circles and the KOLs belonging to those circles. For each circle topic, all KOLs belonging to that circle are connected together to form a hyperedge. This hyperedge connects KOLs within the same circle, reflecting the internal structure of the circle and the relationships between KOLs. This relationship helps analyze the characteristics of the circle, the status and role of KOLs within the circle, and the flow of information and influence distribution within the circle. This hyperedge construction provides circle-level structural information for subsequent model training and analysis, enabling the model to leverage KOL relationships within the circle to infer users' potential circle tags, analyze circle influence, and perform other related analytical tasks.
[0158] Overall, these three hyperedge construction methods capture the complex connections between users and KOLs from the perspectives of attention relationships, interaction relationships, and circle structure. This provides rich structural information for hypergraph construction and lays the foundation for subsequent model training and analysis. Through these hyperedges, the model can better understand and analyze the behavioral characteristics, circle relationships, and information dissemination processes of users and KOLs.
[0159] The construction of hyperedges corresponds to the three relationships mentioned above: users who follow the same KOL will form a hyperedge with the KOL, and the number of such hyperedges will be the same as the number of KOLs they follow; users who forward and comment on a KOL post will form a hyperedge with the KOL who posted it, and the number of such hyperedges will be the same as the number of posts; each circle topic will construct a hyperedge of all KOLs belonging to that circle, and the number of such hyperedges will be the same as the total number of known circles.
[0160] A hypergraph is further constructed, in which endpoints include users, KOLs, and topics. Hyperedges are constructed based on the follow, forwarding, and common circle relationships between users and KOLs. The hyperedge weight reflects the contribution and importance of the endpoint in the hyperedge.
[0161] Part 6, model training.
[0162] Propagation refers to the process by which information is transferred between nodes in a neural network. In the HGNN+ algorithm, this is implemented using two HGNNP convolutional layers. The first layer maps input features to the hidden layer, and the second layer maps the hidden layer to the output layer. This process involves linear transformations, vertex aggregation functions to update vertex features, and nonlinear activation functions. Applying propagation is a step in the training process involving forward and backpropagation, used to calculate outputs and update model weights.
[0163] Figure 4This diagram shows a hypergraph convolutional neural network used for propagation computation, demonstrating how deep learning models can be used to process social network data to identify and classify the circles to which users belong. Graph computation consists of two HGNNP (Hypergraph Neural Network Plus) convolutional layers. The first layer maps input features to the hidden layer, while the second layer maps the hidden layer features to the output layer. The output layer features are processed by a SoftMax classifier to generate the probability that each user belongs to a different circle, namely the circle affiliation probability. This structure enables the model to learn complex patterns of user behavior and interaction, thereby improving the accuracy of social network analysis. The specific application process includes:
[0164] Step 1: Input features: The network's input layer receives raw data features, which may be text features extracted from user and KOL posts, or other types of data. These endpoint features are vectorized using CountVectorizer and then input into the model.
[0165] Step 2: First convolutional layer: Maps input features to the hidden layer. Extracts and transforms input features to prepare for subsequent feature learning and classification tasks. The input features are derived from the construction of endpoint features. After processing by the first convolutional layer, they provide a higher-level feature representation for the second convolutional layer. The second convolutional layer maps the hidden layer to the output layer. It further extracts features and outputs the final classification result. The output of the first convolutional layer is received and processed to obtain the feature representation of the output layer, which provides input for the SoftMax classifier. The internal propagation process of the convolutional layer includes:
[0166] 1. Linear transformation: perform a linear transformation on the vertex feature matrix Mapped to the hidden layer. Where X is the vertex feature matrix, A is the weight matrix, and b is the bias. This linear transformation performs a preliminary transformation and combination of vertex features, providing a foundation for subsequent feature aggregation.
[0167] 2. Vertex aggregation function: updates vertex features, which consists of two parts: aggregation and update from vertex to hyperedge, and aggregation and update from hyperedge to vertex.
[0168] This process is implemented through a mean vertex aggregation function, and the updated vertex features are expressed as , where σ represents a nonlinear activation function, Dv and De are the degree matrices of vertices and hyperedges respectively, H is the adjacency matrix, We is the hyperedge weight, and Θ is a learnable parameter.
[0169] Vertex features are updated through aggregation functions so that the features of each vertex can contain information about its neighboring vertices and hyperedges, thereby capturing the complex relationships and features in the graph structure.
[0170] 3. In the case of non-last convolutional layer, ReLU activation function and dropout operation are used.
[0171] After vertex aggregation, features are introduced into nonlinearity through activation layers (such as ReLU). Furthermore, a dropout layer (a technique called dropout regularization) is used to prevent overfitting by randomly dropping (setting to zero) some neurons in the network during training. This further enhances the model’s feature learning and generalization capabilities.
[0172] 4. If it is the last convolutional layer, the output will be directly passed to the SoftMax classifier to obtain the final classification result. If it is not the last convolutional layer, continue.
[0173] Convolutional layer 2: The features processed by convolutional layer 1 are further mapped to the output layer through convolutional layer 2 to extract higher-level features.
[0174] Step 3: SoftMax Classifier: The output of the final convolutional layer is processed by the SoftMax classifier to generate circle affiliation probabilities. The features of the output layer are converted into a probability distribution, indicating the probability that each endpoint belongs to a different circle, providing a basis for subsequent classification decisions. The SoftMax classifier generates the probability that each user belongs to a different circle.
[0175] Step 4: Circle determination result: Determine the user's circle affiliation based on the output probability of the SoftMax classifier.
[0176] Step 5: Back propagation process:
[0177] 1. Loss function: The cross entropy function is used to test the effect of parameter updates. The gap between the current network calculation results and the actual results is used to guide the model parameter update.
[0178] 2. Weight update: Use the Adam optimizer to dynamically adjust the direction and step size of weight changes.
[0179] Based on the gradient information of the loss function, the model's weight parameters are updated, enabling the model to better fit the training data and improve classification accuracy. Through this propagation calculation process, hypergraph convolutional neural networks can process high-order social relationships in social networks and capture complex interactions between nodes, thereby improving the performance and effectiveness of social recommendation algorithms. This approach is particularly suitable for processing heterogeneous data in social networks, such as text, images, and links, providing a new perspective and tool for social network analysis.
[0180] The training phase involves using the constructed hypergraph and endpoint features to train the model, specifically:
[0181] Step 1: Get the features of the training set.
[0182] The training set contains data from multiple circles, and the model learns how to identify the characteristics of different circles through this data.
[0183] Endpoint features: These are the features of user and KOL posts extracted from social networks and vectorized using the Count Vectorizer. These features may include text features and other types of data (such as images and links), depending on the data type and model design requirements.
[0184] Hyperedge features: Hyperedges (edges connecting multiple nodes) represent relationship features, such as shared attention, forwarded comments, etc. These relationship features help the model understand the social interactions between users and KOLs, thereby better identifying circles.
[0185] Label information: Each sample in the training set has a corresponding circle label, indicating which circle the user or KOL belongs to. This label information is used for supervised learning, guiding the model to learn how to predict the correct circle affiliation based on input features.
[0186] Step 2: Using the hypergraph computing method, forward propagation is performed from the input layer to the convolutional layer 2 to calculate the output of the network.
[0187] Step 3: Calculate the difference between the predicted output and the true label through a loss function (such as cross entropy). The model uses the cross entropy loss function to evaluate the difference between the predicted result and the true label. Specifically, the loss function calculation formula is , this function can quantify the inconsistency between the probability distribution of the model output and the true label. It is suitable for binary classification problems, but can also be extended to multi-classification scenarios.
[0188] Step 4: Perform backpropagation to update the network parameters based on the gradient calculated by the loss function. Use the Adam optimizer to dynamically adjust the weights to minimize the loss function.
[0189] To minimize this loss function, the model uses the Adam optimizer during the weight update phase. The Adam optimizer is an adaptive learning rate optimization algorithm that combines the advantages of gradient descent and adaptive gradient algorithms, dynamically adjusting the direction and step size of weight changes. This approach helps the model converge quickly and improves performance during training.
[0190] Through the backpropagation algorithm, the model updates its weights based on the gradients calculated from the loss function. During backpropagation, the gradients propagate backward from the output layer to the input layer, layer by layer, and the weights of each layer are adjusted based on the gradients of the previous layer. This process ensures that the updated model parameters effectively reduce prediction errors, thereby improving the model's accuracy and generalization ability.
[0191] Step 5: After multiple rounds of iterations, until the weight parameters are stable, the model training is completed.
[0192] During the training phase, for each circle layer, a hypergraph is constructed using the endpoints and hyperedge structures described above, with nodes set as hypergraph endpoints and relationships set as hypergraph hyperedges. The hypergraph calculation described above completes forward propagation from the input layer to convolutional layer 2. Then, after loss calculation and forward propagation, the hidden layer losses are calculated layer by layer, and backpropagation updates are performed based on the optimizer's parameter updates. After multiple rounds of iterations to stabilize the weight parameters, the model is trained. In each iteration, the model first performs forward propagation, calculating the output through a propagation calculation process. Then, the model calculates the value of the loss function and calculates the parameter gradients through backpropagation. These gradients are then used to update the model weights as part of the optimization process.
[0193] The seventh aspect is the group prediction process, and the prediction stage uses the trained model to predict the circle affiliation of new data.
[0194] Step 1: Hypergraph preparation:
[0195] 1. Set the hypergraph to evaluation mode (eval()), set the hypergraph model to evaluation mode, and disable operations such as dropout that are only used in the training phase to ensure that the model can output stable results during prediction.
[0196] 2. Load the trained model parameters: Load the optimal model parameters saved in the training phase into the hypergraph model, so that the model has the learned feature representation and classification capabilities.
[0197] Step 2: Input data preprocessing:
[0198] 1. Construct a test set hypergraph: Based on the posting content, follow-up relationships, and other information of the test set users, as well as the posting content of the KOLs, construct a hypergraph structure for the test set, including endpoints (test set users and KOLs) and hyperedges (relationships between users and KOLs).
[0199] 2. Extract test set endpoint features: Vectorize the posts of test set users and KOLs to obtain feature representations of test set endpoints. This method is consistent with the feature extraction method used in the training phase so that the model can recognize and process them.
[0200] Step 3: Forward propagation:
[0201] 1. Input layer processing: Input the features of the test set endpoints into the input layer of the hypergraph model as the starting point of model calculation.
[0202] 2. First convolution layer calculation: Perform linear transformation, vertex aggregation and other operations on the input features to obtain the feature representation of the hidden layer. Specifically including:
[0203] Linear transformation: Perform linear transformation on vertex feature matrices, perform preliminary conversion and combine features.
[0204] Vertex aggregation: By aggregating and updating vertices to hyperedges and hyperedges to vertices, the features of each vertex contain information about its neighboring vertices and hyperedges, capturing the complex relationships in the graph structure.
[0205] 3. Second convolutional layer calculation: Receive the output of the first convolutional layer and continue to perform linear transformation, vertex aggregation and other operations to obtain the feature representation of the output layer. The output features of this layer will be used for subsequent classification decisions.
[0206] 4. SoftMax Classifier Processing: The output layer features are fed into the SoftMax classifier. After processing by the SoftMax function, the probability distribution of each test set endpoint belonging to different circles is obtained. The SoftMax function converts the output features into a probabilistic form, indicating the probability of the endpoint belonging to each circle.
[0207] Step 4: Result judgment and output:
[0208] 1. Set a threshold: Based on actual needs and model performance, set a threshold to determine whether an endpoint belongs to a certain circle. The threshold can be adjusted based on the model's performance on the validation set.
[0209] 2. Determine Circle Affiliation: For each endpoint in the test set, determine whether it belongs to a certain circle based on the probability distribution output by the SoftMax classifier and the set threshold. If the probability of the endpoint being in a certain circle is greater than the threshold, the endpoint is considered to belong to that circle; otherwise, it is considered not to belong to that circle.
[0210] 3. Output prediction results: The circle affiliation of each test set endpoint is output as the prediction result, which can be used for subsequent analysis, application, or as input data for other systems.
[0211] During the prediction phase, after the hypergraph is set to the eval() state, a forward propagation is performed on the hypergraph to obtain the probability that all input endpoints belong to a certain category, that is, the probability that all users in a certain circle should be labeled with that circle. Based on a certain threshold, the circle affiliation of the original endpoints that have not been labeled with a circle (users in the test set) can be determined.
[0212] This training and prediction process ensures that the model can learn effective feature representations on the training data and accurately predict circle affiliation on new data. In this way, the present invention can handle complex data in social networks and provide a new perspective and tool for social network analysis.
[0213] This paper achieves efficient identification of user circles in social networks by innovatively combining the HGNN+ algorithm with the HHGNN algorithm. This combination not only leverages the advantages of the hypergraph model in processing high-order social relationships, but also incorporates the expertise of hyperbolic space in representing hierarchical structures, thereby significantly improving the accuracy and efficiency of predictive reasoning. This approach effectively reduces the dependence of circle reasoning analysis on hardware resources, making it possible to process large-scale user data, while also adapting to the complexity and dynamic changes of relationship networks in social media.
[0214] In traditional graph structures, building and storing large-scale networks consumes significant amounts of memory and graphics card resources, especially when the number of endpoints reaches 100,000, where graphics card usage can exceed 10GB. In contrast, hypergraph structures, through their efficient graph structure design, significantly reduce resource usage, making it possible to predict more users within a single hypergraph. This not only improves efficiency but also better preserves the integrity of the network of relationships between users and KOLs. Another advantage of hypergraph structures lies in their expressive power. In traditional graph structures, it is difficult to distinguish between group behaviors, such as "a group of users follows KOL B" and "a group of users follows KOL L." However, hypergraph structures can easily express this "shared attention" characteristic, enabling unified management of a category of attention and differentiated management of attention to different objects, which is of great value in social network analysis.
[0215] This embodiment of the application constructs a network structure of KOLs, posts, and users based on the content and network structure of social network posts. By applying a hypergraph network algorithm, it can more accurately identify groups within a circle, expand the size of the group, and more deeply discover the preferences of people within the circle. This hypergraph-based social media circle prediction method exhibits significant advantages in hardware requirements and data volume support compared to traditional graph structures.
[0216] It should be noted that the embodiment of the present application uses a hypergraph structure and a hypergraph algorithm to calculate a method of user circles, which includes but is not limited to a hypergraph construction method, structural design, and algorithm implementation.
[0217] In summary, the embodiment of the present application provides a social network group classification method, which constructs target user features based on the target user data to be classified; the target user features include endpoint features and hyperedge features of the target user; the topic group classification model is called to calculate the correlation parameters of the target user features and at least two topic group features respectively, and the correlation parameters are used to characterize the possibility that the target user belongs to the topic group corresponding to the corresponding topic group features; the topic group classification model is trained based on a hypergraph network; the hypergraph network is constructed based on the endpoint features and hyperedge features between users and topic information in a social network; the topic group corresponding to the maximum value of the correlation parameter is determined as the topic group to which the target user data belongs. By constructing a comprehensive target user feature including endpoint features and hyperedge features, and a topic group classification model based on hypergraph network training, the complex relationship between users and topic groups can be captured more accurately, thereby improving the classification accuracy of the topic group to which the target user belongs. A most appropriate topic group label is assigned to each target user to achieve accurate identification and classification of user topic preferences.
[0218] Based on the same technical concept, the embodiment of the present application also provides a social network group classification system, such as Figure 5 As shown, the system includes:
[0219] A feature construction module 501 is configured to construct target user features based on target user data to be classified; the target user features include endpoint features and hyperedge features of the target user;
[0220] A model prediction module 502 is configured to call a topic group classification model to calculate correlation parameters between the target user feature and at least two topic group features, wherein the correlation parameters are used to represent the likelihood that the target user belongs to the topic group corresponding to the corresponding topic group feature; the topic group classification model is trained based on a hypergraph network; the hypergraph network is constructed based on endpoint features and hyperedge features between user and topic information in a social network;
[0221] The classification module 503 is configured to determine the topic group corresponding to the maximum value of the correlation parameter as the topic group to which the target user data belongs.
[0222] The present application also provides an electronic device corresponding to the method provided in the above embodiment. Figure 6, which shows an electronic device provided by some embodiments of the present application. The electronic device 20 may include: a processor 200, a memory 201, a bus 202, and a communication interface 203. The processor 200, the communication interface 203, and the memory 201 are connected via the bus 202. The memory 201 stores a computer program executable on the processor 200. When the processor 200 executes the computer program, it executes the method provided by any of the aforementioned embodiments of the present application.
[0223] Memory 201 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as at least one disk storage. Communication between the system network element and at least one other network element is achieved through at least one physical port (which may be wired or wireless), and may utilize the Internet, a wide area network, a local area network, a metropolitan area network, or the like.
[0224] The bus 202 may be an ISA bus, a PCI bus, or an EISA bus. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used to store programs. The processor 200 executes the programs upon receiving execution instructions. The methods disclosed in any of the aforementioned embodiments of the present application may be applied to or implemented by the processor 200.
[0225] The processor 200 may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by hardware integrated logic circuits in the processor 200 or by software instructions. The above processor 200 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in conjunction with the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory 201 , and the processor 200 reads the information in the memory 201 and completes the steps of the above method in combination with its hardware.
[0226] The electronic device provided in the embodiments of the present application and the method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, operated or implemented by them.
[0227] The present application also provides a computer-readable storage medium corresponding to the method provided in the above embodiment. Figure 7 The computer-readable storage medium shown is a CD 30 on which a computer program (ie, a program product) is stored. When the computer program is run by a processor, the method provided by any of the aforementioned embodiments is executed.
[0228] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical or magnetic storage media, which are not listed here one by one.
[0229] The computer-readable storage medium provided in the above-mentioned embodiments of the present application and the method provided in the embodiments of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.
[0230] It should be noted that the above embodiments illustrate rather than limit the present application, and that a person skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbols placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.
[0231] The above description is merely a preferred embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for classifying topic groups in a social network, characterized in that: The method comprises: Constructing target user features based on target user data to be classified; the target user features include endpoint features and hyperedge features of the target user; Calling a topic group classification model to calculate correlation parameters between the target user feature and at least two topic group features, wherein the correlation parameters are used to characterize the likelihood that the target user belongs to the topic group corresponding to the corresponding topic group feature; the topic group classification model is trained based on a hypergraph network; the hypergraph network is constructed based on endpoint features and hyperedge features between user and topic information in a social network; Determining the topic group corresponding to the maximum value of the relevance parameter as the topic group to which the target user data belongs; The topic group classification model is trained based on the hypergraph network according to the following steps: obtaining a number of training samples, any training sample being the hypergraph network, the hypergraph network including a number of endpoint features and real topic groups corresponding to the endpoint features, and a number of hyperedge features, the endpoint features being features of training elements, the training elements including a first type of user, a second type of user, and topic information; the hyperedge features characterizing the interactive relationship between the first type of user, the second type of user, and the topic information; for each endpoint feature, calling the initial topic group classification model to predict the predicted topic group corresponding to the endpoint feature; calculating the loss function between the predicted topic group and the real topic group; if the loss function does not meet the convergence condition, adjusting the parameters of the initial topic group classification model by backpropagation, repeating the above steps until the loss function meets the convergence condition, and obtaining the trained topic group classification model; The hypergraph network is constructed according to the following steps: collecting the posting content of the several first-type users and the several second-type users from the social network platform; wherein the first-type users represent users with set influence conditions, and the second-type users are all users except the first-type users; extracting the endpoint features of several first-type users and the endpoint features of several second-type users from the posting content respectively; determining the real topic group corresponding to each endpoint feature based on the endpoint features of several first-type users and the endpoint features of several second-type users and several topic information; constructing several hyperedge features based on the interactive relationship between several said endpoint features; assigning weights to each hyperedge feature to obtain a hyperedge weight set; constructing the hypergraph network based on several endpoint features and the real topic groups corresponding to the endpoint features, the several hyperedge features and the hyperedge weight set.
2. The method according to claim 1, wherein Calling the topic group classification model to calculate the correlation parameters between the target user feature and at least two topic group features, including: The topic group classification model is called to perform forward propagation on the endpoint features and hyperedge features of the target user to calculate the probability distribution that the target user belongs to at least two topic groups.
3. The method according to claim 1, wherein The calling of the initial topic group classification model to predict the predicted topic group corresponding to the endpoint feature includes: Inputting the endpoint features and the hyperedge features into the initial topic group classification model, performing linear transformation through a convolutional layer, and updating the endpoint features and the hyperedge features through an aggregation function; The updated endpoint features and the hyperedge features are input into a classifier to obtain a predicted topic group corresponding to the endpoint features.
4. The method according to claim 1, wherein The constructing of a plurality of hyperedge features based on the interactive relationship between the plurality of endpoint features includes: Constructing, for each user of the first type, a hyperedge feature of all second-type users who follow the first-type user; Constructing, for each of the first type of users, a hyperedge feature of all second type users who forward and / or comment on the content posted by the first type of user; For each topic information, a hyperedge feature of all first-type users belonging to the topic information is constructed.
5. The method according to claim 1, wherein Extracting endpoint features of a plurality of first-type users and endpoint features of a plurality of second-type users from the post content respectively includes: performing vectorization processing on the posting contents of the plurality of first-type users and the plurality of second-type users to obtain a first feature representation; Performing feature mapping and pooling processing on the first feature representation to obtain a second feature representation; The structure of the endpoint feature is determined, and the second feature representations of the first type of users and the second type of users are respectively placed in different parts of the structure of the endpoint feature.
6. A social network group classification system, characterized in that: The system comprises: A feature construction module is used to construct target user features based on the target user data to be classified; the target user features include endpoint features and hyperedge features of the target user; A model prediction module is used to call a topic group classification model to calculate the correlation parameters between the target user features and at least two topic group features respectively, and the correlation parameters are used to characterize the possibility that the target user belongs to the topic group corresponding to the corresponding topic group features; the topic group classification model is trained based on a hypergraph network; the hypergraph network is constructed based on the endpoint features and hyperedge features between users and topic information in a social network; wherein, the topic group classification model is trained based on the hypergraph network according to the following steps: obtaining a number of training samples, any one of which is the hypergraph network, the hypergraph network includes a number of endpoint features and real topic groups corresponding to the endpoint features, and a number of hyperedge features, the endpoint features are features of training elements, and the training elements include a first type of user, a second type of user and topic information; the hyperedge features characterize the interactive relationship between the first type of user, the second type of user and topic information; for each endpoint feature, calling the initial topic group classification model to predict the predicted topic group corresponding to the endpoint feature; calculating the loss function between the predicted topic group and the real topic group; In the case that the loss function does not meet the convergence condition, the parameters of the initial topic group classification model are adjusted by back propagation, and the above steps are repeated until the loss function meets the convergence condition to obtain the trained topic group classification model; the hypergraph network is constructed according to the following steps: collecting the posting content of the several first type users and the several second type users from the social network platform; wherein the first type users represent users with the set influence conditions, and the second type users are all users except the first type users; extracting the endpoint features of several first type users and the endpoint features of several second type users from the posting content; determining the real topic group corresponding to each endpoint feature based on the endpoint features of several first type users and the endpoint features of several second type users and several topic information; constructing several hyperedge features based on the interactive relationship between several endpoint features; assigning weights to each hyperedge feature to obtain a hyperedge weight set; constructing the hypergraph network based on several endpoint features and the real topic groups corresponding to the endpoint features, the several hyperedge features and the hyperedge weight set; The classification module is used to determine the topic group corresponding to the maximum value of the correlation parameter as the topic group to which the target user data belongs.
7. An electronic device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that Computer-readable instructions are stored thereon, and the computer-readable instructions can be executed by a processor to implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
User-topic interestingness evaluation method based on hypergraph convolution in social network
CN118210984A