Social network user matching method and device based on rapid aggregation of graph network features
By constructing a graph network feature aggregation module that requires no training, and combining it with a linear neural network and a SoftMax classifier, the problems of high complexity and low flexibility in cross-social platform user matching methods are solved, achieving fast and accurate user matching and concise embedding of new users.
Patent Information
- Application Number
- CN202311062080.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-22
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-08-22
AI Technical Summary
Existing cross-social platform user matching methods rely on high-quality user-generated content or complex graph neural networks, resulting in high algorithm complexity, insufficient data utilization, difficulty in handling multiple graph scenarios, low flexibility, and unsuitability for multi-level tasks.
A fast feature aggregation module for graph networks that does not require training is constructed. By modifying the GIN model to remove the W matrix, activation function and ε parameter, and combining a linear neural network and SoftMax classifier, the feature matrix of user nodes is directly extracted and concatenated, reducing model complexity and improving flexibility.
It enables fast and accurate user matching across social networks, reduces the complexity of end-to-end models, and improves the flexibility and accuracy of models. It is suitable for fast embedding vector generation and concise matching of new users in large social networks.
Smart Images

Figure CN116992307B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of user relationship mining technology in social networks, and in particular to a method and apparatus for matching social network users based on rapid aggregation of graph network features. Background Technology
[0002] Graph data has a wide range of applications in our lives, such as social networks, knowledge graphs, spatiotemporal prediction, program understanding, and point clouds for autonomous driving. Many existing deep learning models capture the topological features of graph data structures to accomplish various tasks.
[0003] Cross-platform user account association has significant application value in user data mining and service recommendation, playing a crucial role in social network analysis and enjoying widespread application. However, existing methods either heavily rely on high-quality user-generated content (including user profiles) or focus on network topology (i.e., graph neural networks), leading to algorithmic complexity and insufficient data utilization. The main reason is that graph neural networks have relatively high complexity and number of layers, which can result in excessive network layers and high complexity when combined with downstream user pair association matching and other tasks. Furthermore, they struggle to handle situations involving splicing and multiple graphs after passing through graph neural network layers, exhibiting relatively low flexibility. In general, graph neural networks are more suitable for single-level tasks such as node classification / regression, graph classification / regression, and link prediction. Summary of the Invention
[0004] To ensure user matching accuracy while reducing the complexity of the matching method, this invention provides a social network user matching method and apparatus based on rapid aggregation of graph network features.
[0005] In a first aspect, the present invention provides a social network user matching method based on fast aggregation of graph network features, comprising:
[0006] Step 1: Construct a fast feature aggregation module for graph networks that does not require training, based on graph neural networks;
[0007] Step 2: Obtain first social network graph data from the first social media platform and second social network graph data from the second social media platform. The first social media platform and the second social media platform belong to two different types of media platforms;
[0008] Step 3: Input the first social network graph data and the second social network graph data into the graph network feature fast aggregation module respectively, and extract the corresponding first user node feature matrix and second user node feature matrix;
[0009] Step 4: Concatenate the feature matrices of the first user node and the second user node to obtain the concatenated vector;
[0010] Step 5: Input the concatenated vector into the trained classifier model to obtain the user matching results between the first social media platform and the second social media platform.
[0011] Furthermore, the characteristic feature is that step 1 specifically includes:
[0012] By removing the W matrix, activation function, and ε parameter from the GIN model, the modified GIN model updates the node feature matrix using the following formula:
[0013]
[0014] in, It is an adjacency matrix, A e =I |V| +A, where A represents a matrix generated based on the relationships between user nodes in the social network graph data; I |V| Let V represent the N×N dimensional identity matrix, V represent the set of all user nodes in the social network graph data, and N represent the number of user nodes. X is the output vector of the k-th layer of the modified GIN model. When k = 0, X e This represents the feature matrix composed of the initial feature vectors of all user nodes in the social network graph data;
[0015] The modified GIN model is the graph network feature fast aggregation module.
[0016] Furthermore, in step 5, the classifier model includes a linear neural network and a SoftMax classifier.
[0017] Secondly, the present invention provides a social network user matching device based on rapid aggregation of graph network features, comprising:
[0018] Build modules for constructing fast graph network feature aggregation modules that do not require training, based on graph neural networks;
[0019] The social data acquisition module is used to acquire first social network graph data from a first social media platform and second social network graph data from a second social media platform. The first social media platform and the second social media platform are two different types of media platforms.
[0020] The feature extraction module is used to input the first social network graph data and the second social network graph data into the graph network feature fast aggregation module to extract the corresponding first user node feature matrix and second user node feature matrix.
[0021] The concatenation module is used to concatenate the feature matrix of the first user node and the feature matrix of the second user node to obtain the concatenation vector.
[0022] A classifier is used to input the concatenated vectors into a trained classifier model to obtain user matching results between the first and second social media platforms.
[0023] Furthermore, the building module is specifically used for:
[0024] By removing the W matrix, activation function, and ε parameter from the GIN model, the modified GIN model updates the node feature matrix using the following formula:
[0025]
[0026] in, It is an adjacency matrix, A e =I |V| +A, where A represents a matrix generated based on the relationships between user nodes in the social network graph data; I |V| Let V represent the N×N dimensional identity matrix, V represent the set of all user nodes in the social network graph data, and N represent the number of user nodes. X is the output vector of the k-th layer of the modified GIN model. When k = 0, X e This represents the feature matrix composed of the initial feature vectors of all user nodes in the social network graph data;
[0027] The modified GIN model is the graph network feature fast aggregation module.
[0028] Furthermore, the classifier model includes a linear neural network and a SoftMax classifier.
[0029] Thirdly, the present invention provides an electronic device, comprising: a processor and a memory, wherein the processor and the memory communicate with each other via a bus; the memory stores program instructions executable by the processor, and the processor can execute any of the methods described above by calling the program instructions.
[0030] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the methods described above.
[0031] The beneficial effects of this invention are:
[0032] (1) By constructing a graph network feature fast aggregation module that does not require training, the graph network feature fast aggregation module is used to process social network graph data. The feature extraction process of social network graph data becomes part of the data preprocessing, and there is no need to nest the aggregation module and the classifier model together for training. Therefore, for multi-level tasks such as social network user matching, the complexity of the end-to-end model is reduced, the accuracy of the end-to-end model is preserved, and the flexibility of the entire model is improved.
[0033] (2) For large graph networks such as social networks, since the learnable parameters are removed, there is no need to use community detection algorithms to divide communities. Even large-scale social network graphs can quickly generate graph embedding vectors through the graph network feature fast aggregation module of this invention, thereby quickly obtaining cross-social network user matching results.
[0034] (3) When training a classifier model for user matching, the graph embedding vector of the corresponding node pair can be directly found based on the positive and negative labels of the user node pair to train the classifier model, which has very high flexibility.
[0035] (4) For new users entering the social network, the graph embedding vectors of themselves and their neighbors can be directly aggregated to generate the node embedding vector of the new user. This makes it very simple and convenient to add new users to the old social network or to select new users for social network matching tests. Attached Figure Description
[0036] Figure 1 This is a flowchart illustrating the social network user matching method based on fast aggregation of graph network features provided in an embodiment of the present invention.
[0037] Figure 2 This is a structural block diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of the embodiments of this invention will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0039] Example 1
[0040] like Figure 1 As shown, this embodiment provides a method for social network user matching based on fast aggregation of graph network features, including the following steps:
[0041] S101: A fast feature aggregation module for graph networks that does not require training, based on graph neural networks;
[0042] Specifically, common graph neural networks (GNNs) include graph convolutional networks (GCN), graph attention networks (GAT), and graph isomorphic networks (GIN). Compared to the GCN model, the GIN model changes the node feature aggregation method from averaging to summing. Summation-based aggregation has better injectivity. Therefore, this embodiment of the invention uses the GIN model to construct a fast graph network feature aggregation module. To distinguish between the center node and its neighboring nodes, a learnable parameter ε is introduced as the aggregation weight for the center node.
[0043] The GIN model will be briefly introduced below.
[0044] Suppose we have graph data G = {V, E}, where V is the set of nodes in graph G and E is the set of edges in graph G. Assume node set V contains N nodes, each with its own features, which together form an N×D matrix X. Based on the relationships between the nodes, we can form an N×N matrix A, also known as the adjacency matrix. The GIN model updates the feature matrices of adjacent layers as follows:
[0045]
[0046] in, It is the adjacency matrix, σ() represents the nonlinear activation function, and k represents the number of network layers in the GIN model. W is the output vector of the k-th layer. k This represents the weight vector of the k-th layer.
[0047] Adjacency matrix A e It can be represented as:
[0048] A e =(1+ε)I |V| +A
[0049] Where ε is a learnable parameter, I |V| This represents an N×N dimensional identity matrix.
[0050] To achieve rapid aggregation of graph network features, this embodiment of the invention directly removes the W matrix, activation function, and ε parameter from the GIN model, so that the modified GIN model updates the node feature matrix using the following formula:
[0051]
[0052] Among them, A e =I |V| +A;
[0053] Thus, the modified GIN model no longer needs to be trained, but is instead used as part of the data preprocessing, thereby reducing the model complexity.
[0054] S102: Obtain first social network graph data from a first social media platform and second social network graph data from a second social media platform, where the first and second social media platforms are two different types of media platforms;
[0055] Specifically, a social network graph is constructed based on the connections between users on the social media platform. Assume each user on the social media platform represents a node in the graph, and the social relationships between users (such as following, following, commenting, reposting, etc.) represent edges in the graph; for example, if user A follows user B, a directed edge B→A is formed. Simultaneously, each user has their own attribute information (such as number of followers, number of posts, gender, region, etc.). Preprocessing the user's attribute information transforms it into a fixed-dimensional (let's say D-dimensional) feature vector, called the initial feature vector of that node. Assuming there are N users, the initial feature vectors of all users can form an N×D-dimensional feature matrix X; correspondingly, an N×N-dimensional adjacency matrix A can be formed based on the relationships between nodes. Finally, the social media platform data can be constructed into a social network graph G={V,E,X}, where V represents the set of user nodes, including N user nodes, and E represents the set of edges.
[0056] S103: Input the first social network graph data and the second social network graph data into the graph network feature fast aggregation module respectively, and extract the corresponding first user node feature matrix and second user node feature matrix;
[0057] S104: Concatenate the feature matrix of the first user node and the feature matrix of the second user node to obtain the concatenated vector;
[0058] S105: Input the concatenated vector into the trained classifier model to obtain the user matching results between the first social media platform and the second social media platform, that is, whether the user pairs from the two social media platforms belong to the same person.
[0059] Specifically, in this embodiment, the classifier model includes a linear neural network and a softmax classifier.
[0060] Existing cross-social network user alignment models based on graph neural networks (GNNs) process social network graph data using GNNs. However, GNNs need to be nested with classification models, which increases the complexity of the end-to-end task and reduces flexibility. The method provided in this invention uses a fast GNN feature aggregation module to process social network graph data. This module requires no training and does not need to be nested with a classifier model; only the linear neural network part of the classifier model needs to be trained. In other words, the feature extraction process of the social network graph data becomes part of the data preprocessing and no longer requires training, thereby reducing model complexity and improving the flexibility of the solution.
[0061] Example 2
[0062] Corresponding to the above method, this embodiment of the invention provides a social network user matching device based on rapid aggregation of graph network features, including: a construction module, a social data acquisition module, a feature extraction module, and a splicing module;
[0063] The system comprises the following modules: a construction module for building a graph network feature fast aggregation module that requires no training, based on a graph neural network; a social data acquisition module for acquiring first social network graph data from a first social media platform and second social network graph data from a second social media platform, which are two different types of media platforms; a feature extraction module for inputting the first and second social network graph data into the graph network feature fast aggregation module to extract the corresponding first and second user node feature matrices; a concatenation module for concatenating the first and second user node feature matrices to obtain a concatenated vector; and a classifier for inputting the concatenated vector into a trained classifier model to obtain the user matching results between the first and second social media platforms.
[0064] As one possible implementation, the building module is specifically used to: remove the W matrix, activation function, and ε parameter from the GIN model, so that the modified GIN model updates the node feature matrix using the following formula:
[0065]
[0066] in, It is an adjacency matrix, A e =I |V| +A, where A represents a matrix generated based on the relationships between user nodes in the social network graph data; I |V| Let V represent an N×N dimensional identity matrix. Let V represent the set of all user nodes in the social network graph data. X is the output vector of the k-th layer of the modified GIN model. When k = 0, X e This represents the feature matrix composed of the initial feature vectors of all user nodes in the social network graph data;
[0067] The modified GIN model is the graph network feature fast aggregation module.
[0068] As one possible implementation, the classifier model includes a linear neural network and a SoftMax classifier.
[0069] Example 3
[0070] To verify the effectiveness of the method provided by the present invention, the present invention also provides the following experimental data.
[0071] (I) Dataset
[0072] Data includes information from three social networking platforms: Sina Weibo, Toutiao, and Douyin. A single node in each social network represents a user within that network, and edges represent relationships between users (such as following, commenting, and sharing). The total number of user nodes and edges across the three platforms is shown in Table 1.
[0073] Table 1 Dataset Information
[0074] Social networking platforms Number of user nodes Number of connected edges Sina Weibo 124,138 197,673 Today's Headlines 41,897 40,335 Tik Tok 150,119 378,639
[0075] Each user node on a platform contains the user's attribute information, such as the number of followers, number of posts, gender, region, verification status, and description. We transform this information into a fixed-dimensional vector through data preprocessing. It should be noted that the vector dimension is consistent within the same social network platform; however, the vector dimension may differ between two different social network platforms.
[0076] (II) Experimental Procedure
[0077] (1) The graph embedding vector matrices of the two social network platforms are extracted using the graph network feature fast aggregation module;
[0078] (2) Map the value of each column of the graph embedding vector matrix to the interval (0,1);
[0079] (3) Based on the positive and negative sample label pairs, select the corresponding graph embedding vector pairs from the graph embedding vector matrix, concatenate them into the input vector of the classification model, and train the classification model;
[0080] (4) Randomly divide the dataset into three parts: training set, validation set, and test set.
[0081] (5) Train the classification model using the training set, and use the validation set to select the optimal model. The test set demonstrates the model's performance.
[0082] (III) Experimental Results
[0083] Two types of cross-platform user matching were conducted: user matching between Weibo and Toutiao; and user matching between Weibo and Douyin.
[0084] (1) User matching between Weibo and Toutiao
[0085] 87 pairs of positive samples (from the same user across platforms) and 87 pairs of negative samples were manually selected. The matching information of the training set, validation set and test set of the sample pairs is shown in Table 2.
[0086] Table 2. Sample pair partitioning information
[0087] - positive sample logarithm negative sample log total training set 57 57 114 Validation set 15 15 30 test set 15 15 30 Total dataset 87 87 174
[0088] At the end of training, the model achieved an accuracy of 95.61% on the training set, 90.00% on the validation set, and its performance on the test set is shown in Table 3.
[0089] Table 3 Model performance on the test set
[0090] accuracy Accuracy Recall rate F1 value AUC 93.33% 88.24% 100% 93.75% 93.33%
[0091] Where TN, FP, FN, TP = 13, 2, 0, 15. TP: True Positive, the number of positive samples correctly identified when the classifier predicts a positive result. FP: False Positive, the number of falsely reported negative samples when the classifier predicts a positive result. TN: True Negative, the number of falsely reported negative samples when the classifier predicts a negative result. FN: False Negative, the number of falsely reported positive samples when the classifier predicts a negative result.
[0092] (2) User matching between Weibo and Douyin
[0093] 167 pairs of positive samples (from the same user across platforms) and 334 pairs of negative samples were manually selected. The pairing information for the training set, validation set, and test set is shown in Table 4.
[0094] Table 4. Sample pair partitioning information
[0095] - positive sample logarithm negative sample log total training set 127 254 381 Validation set 20 40 60 test set 20 40 60 Total dataset 167 334 501
[0096] At the end of training, the model achieved an accuracy of 93.18% on the training set and 93.33% on the validation set. The performance on the test set is shown in Table 5.
[0097] Table 5 Model performance on the test set
[0098] accuracy Accuracy Recall rate F1 value AUC 86.67% 77.27% 85% 80.95% 86.25%
[0099] Where TN,FP,FN,TP=35,5,3,17.
[0100] Based on the above embodiments, such as Figure 2 As shown, this embodiment of the invention also provides an electronic device, including: a processor 201 and a memory 202, the processor 201 and the memory 202 communicating with each other via a bus 203; the memory 202 stores program instructions executable by the processor 201, the processor 201 calling the program instructions to execute the above-mentioned method, for example including a graph network feature fast aggregation module based on a graph neural network to construct a graph network feature fast aggregation module without training; acquiring first social network graph data from a first social media platform and second social network graph data from a second social media platform, the first social media platform and the second social media platform being two different types of media platforms; inputting the first social network graph data and the second social network graph data into the graph network feature fast aggregation module respectively, extracting the corresponding first user node feature matrix and second user node feature matrix; concatenating the first user node feature matrix and the second user node feature matrix to obtain a concatenated vector; inputting the concatenated vector into a trained classifier model to obtain user matching results between the first social media platform and the second social media platform.
[0101] This invention also provides a computer-readable storage medium storing a computer program thereon. When executed by a processor, the computer program implements the above-described method, which includes, for example, a graph network feature fast aggregation module based on a graph neural network to construct a graph network feature fast aggregation module that does not require training; acquiring first social network graph data from a first social media platform and second social network graph data from a second social media platform, wherein the first and second social media platforms are two different types of media platforms; inputting the first and second social network graph data into the graph network feature fast aggregation module respectively to extract corresponding first and second user node feature matrices; concatenating the first and second user node feature matrices to obtain a concatenated vector; and inputting the concatenated vector into a trained classifier model to obtain user matching results between the first and second social media platforms.
[0102] It should be noted that this invention reduces algorithm complexity and improves flexibility by extracting the core components of the graph neural network. This invention not only demonstrates excellent performance in social network user matching applications but can also be applied to other algorithms involving graph networks to improve performance.
[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A social network user matching method based on quick aggregation of graph network features, characterized in that, The method comprises the following steps: Step 1: constructing a non-training graph network feature fast aggregation module based on a graph neural network; Specifically, the W matrix, the activation function and the epsilon parameter of the GIN model are removed, so that the modified GIN model updates the node feature matrix by using the following formula: wherein, is an adjacency matrix, , represents a matrix generated according to the relationships between the user nodes in the social network graph data; represents an N x N dimensional identity matrix, represents a set of all user nodes in the social network graph data, and N represents the number of user nodes, is the output vector of the kth layer of the modified GIN model, when k = 0, represents a feature matrix composed of initial feature vectors of all user nodes in the social network graph data; The modified GIN model is a graph network feature fast aggregation module; Step 2: obtaining first social network graph data from a first social media platform and second social network graph data from a second social media platform, the first social media platform and the second social media platform belonging to two different types of media platforms; Step 3: inputting the first social network graph data and the second social network graph data into the graph network feature fast aggregation module respectively to extract a first user node feature matrix and a second user node feature matrix; Step 4: splicing the first user node feature matrix and the second user node feature matrix to obtain a spliced vector; Step 5: inputting the spliced vector into a trained classifier model to obtain a user matching result between the first social media platform and the second social media platform. 2.The social network user matching method based on fast aggregation of graph network features according to claim 1, characterized in that, In step 5, the classifier model comprises a linear neural network and a SoftMax classifier.
3. A social network user matching device based on fast aggregation of graph network features, characterized in that, The method comprises the following steps: The constructing module is configured to construct a non-training graph network feature fast aggregation module based on a graph neural network; and specifically configured to: remove the W matrix, the activation function and the epsilon parameter of the GIN model, so that the modified GIN model updates the node feature matrix by using the following formula: wherein, is an adjacency matrix, , represents a matrix generated according to the relationships between the user nodes in the social network graph data; represents an N x N dimensional identity matrix, represents a set of all user nodes in the social network graph data, and N represents the number of user nodes, is the output vector of the kth layer of the modified GIN model, when k = 0, represents a feature matrix composed of initial feature vectors of all user nodes in the social network graph data; The modified GIN model is a graph network feature fast aggregation module; The social data obtaining module is configured to obtain first social network graph data from a first social media platform and second social network graph data from a second social media platform, the first social media platform and the second social media platform belonging to two different types of media platforms; The feature extracting module is configured to input the first social network graph data and the second social network graph data into the graph network feature fast aggregation module to extract a first user node feature matrix and a second user node feature matrix; The splicing module is configured to splice the first user node feature matrix and the second user node feature matrix to obtain a spliced vector; The classifier is configured to input the spliced vector into a trained classifier model to obtain a user matching result between the first social media platform and the second social media platform. 4.The social network user matching device based on fast aggregation of graph network features according to claim 3, characterized in that, The classifier model comprises a linear neural network and a SoftMax classifier.
5. An electronic device, comprising: The method comprises the following steps: A processor and a memory, the processor and the memory complete mutual communication through a bus; The memory stores program instructions executable by the processor, and the processor calling the program instructions can execute the method in any one of claims 1 or 2.
6. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the method in any one of claims 1 or 2.