Social Network User Alignment Method Based on Graph Contrastive Learning

Through the combination of graph comparison learning and multi-head graph attention network, the accuracy and robustness of user alignment in social networks are solved, and more efficient user alignment is achieved.

CN115271986BActive Publication Date: 2025-08-01HENAN UNIV OF SCI & TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210956668.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-10
Publication Date
2025-08-01
Estimated Expiration
2042-08-10

AI Technical Summary

Technical Problem

In the prior art, when users are aligned in social networks, it is difficult to effectively deal with network characteristics and user data differences between different social networks, resulting in low alignment accuracy and poor robustness.

Method used

Using a graph comparison learning method, semantic fusion is performed through data augmentation and multi-head graph attention network, combined with multi-level feature extraction of user feature vectors, and using a contrast learning optimization graph encoder to update user feature vectors, and finally compute user similarity for alignment.

Benefits of technology

It improves the accuracy and robustness of user alignment, reduces the impact of noise, enhances the characterization performance of user feature vectors, and enhances the mutual information of the same user.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115271986B_ABST
    Figure CN115271986B_ABST
Patent Text Reader

Abstract

The present invention discloses a social network user alignment method based on graph contrastive learning. User feature vectors are extracted for the two social networks to be aligned respectively, and a number of aligned user pairs are determined as anchor users. Data augmentation is performed twice on each social network respectively to obtain two augmented views. Semantic fusion is carried out on the social network and the two augmented views respectively through a multi-head graph attention network. Then, contrastive learning is performed on the two augmented views of the source social network and the two augmented views of the target social network respectively to update the user feature vectors. Furthermore, contrastive learning is carried out on the source social network and the target social network according to the anchor users to obtain the final user feature vectors of each user. For each user in the source social network, the similarity between its final user feature vector and the final user feature vectors of each user in the target social network is calculated to achieve user alignment. The present invention can solve the semantic gap problem and improve the accuracy of user alignment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of social network analysis, and more specifically, relates to a social network user alignment method based on graph contrast learning. Background Art

[0002] With the prosperous development of social networks and the expansion of the scale of Internet users, due to the characteristics of openness, interactivity, and timeliness of social networks, malicious users posting false remarks on multiple social networks are likely to cause hyper-diffusion phenomena and trigger network security incidents. A large number of users have multiple social network accounts, and social networks are vertically developed with different main functions. Based on a single social network, it is impossible to comprehensively and accurately mine user information and timely discover the source of network security incidents. Only by analyzing the generated massive social network data and correlating the information in multiple social networks can malicious users be effectively mined to ensure the security of social networks. Social network user alignment is to associate the accounts belonging to the same user in different social networks, which is crucial for integrating multi-modal data in multiple social networks, analyzing the evolution law of social networks globally, mining abnormal users and their abnormal behaviors, and maintaining the security and stability of social networks.

[0003] User alignment is also often referred to as anchor link prediction, user identity association, and social network alignment, etc. The research directions can be divided into three categories: based on user characteristics, based on network topology, and combining user characteristics and network topology. Personal attributes such as user names and phone numbers can accurately map a user, but due to the protection of personal privacy by users, the attributes are often vacant or filled with incorrect data. The network topology data volume is smaller, and the efficiency of the user alignment algorithm is high, but this type of method has poor robustness for different social networks and low alignment accuracy. Mining user characteristics unilaterally has limitations, and only through collaborative training of multiple characteristics can the accuracy of user alignment be improved. Current research often mines user semantic characteristics through user attributes, user-generated content, and network topology to ensure the reliability and accuracy of user alignment. Graph neural network and network representation learning methods are often used for feature fusion, embedding users into a low-dimensional vector space, and aligning users by minimizing the distance between users. Some methods address the problem of uncertainty in embedding positions by representing nodes as Gaussian distributions in a low-dimensional space to reduce node matching errors. Some methods embed user attributes, user-generated content, and network features separately and then perform feature fusion. The above methods do not solve the differences in the content posted by users in different social networks and the differences in network features in different social networks, and further improvement is needed. Summary of the Invention

[0004] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a social network user alignment method based on graph contrastive learning, which reduces the impact of network differences through data augmentation, fuses multi-level semantic features, solves the semantic gap problem, and improves the accuracy of user alignment.

[0005] To achieve the above invention purpose, the social network user alignment method based on graph contrastive learning of the present invention includes the following steps:

[0006] S1: Denote the source social network to be aligned as G S =(U S , E S , A S ), and the target social network as G T =(U T , E T , A T ), where U i represents the user set of the social network G i , E i represents the edge set between users of the social network G i , A i represents the user data set of the social network G i , i ∈ {S, T}, and the user data includes the user name, the content published by the user within a preset time period, and the user check-in data; then extract the user feature vectors of each user from the user data of the source social network and the target social network respectively N i represents the number of users in the social network G i , so as to obtain the source social network after feature extraction and the target social network V i represents the user feature vector set of the social network G i ;

[0007] Pre-determine K pairs of aligned users in the source social network and the target social network as anchor users, k = 1, 2,..., K;

[0008] S2: Perform data augmentation on the social network twice to obtain two augmented views and

[0009] S3: Set a multi-head graph attention network as the graph encoder encoder for the source social network and the target social network respectively i , and use the graph encoder encoder i to encode the social network augmented view and Semantically fuse the user feature vectors in it to obtain the semantically fused user feature vectors, thereby constructing a semantically fused social network Augmented view and

[0010] S4: For the augmented views of the same social network and Use the same user in the two augmented views as the positive sample and other users as the negative sample. Aiming to improve the mutual information of the same user, use contrastive learning to optimize the graph encoder encoder i , use the optimized graph encoder encoder i to encode the social network to obtain the user feature vectors of each user in it Update the user feature vectors in the social network to Obtain the social network

[0011] Set the graph encoder encoder * , take the source social network and the target social network as two views, and take the K aligned user pairs in step S1 as the anchor users, and use contrastive learning to optimize the graph encoder encoder * , and iteratively update the user feature vectors of each user in the source social network and the target social network to obtain the final user feature vectors of each user;

[0012] S5: For each user in the source social network, calculate the similarity between its final user feature vector and the final user feature vector of each user in the target social network, and filter out the user pairs with the maximum similarity to each other and the similarity greater than the preset threshold as the aligned user pairs.

[0013] The social network user alignment method based on graph contrast learning in the present invention extracts user feature vectors for two social networks to be aligned respectively, and determines a number of aligned user pairs as anchor users; then performs data augmentation twice on each social network respectively to obtain two augmented views, performs semantic fusion on the social network and the two augmented views respectively through a multi-head graph attention network, then performs contrast learning on the two augmented views of the source social network and the two augmented views of the target social network respectively to update the user feature vectors of the social network, and then performs contrast learning on the source social network and the target social network according to the anchor users to obtain the final user feature vectors of each user; for each user in the source social network, calculates the similarity between its final user feature vector and the final user feature vectors of each user in the target social network to achieve user alignment.

[0014] The present invention has the following beneficial effects:

[0015] 1) The present invention takes into account the differences in network features and user data in different social networks, generates multiple data-augmented views to reduce the influence of noise, and improves the robustness of user alignment;

[0016] 2) The present invention fuses semantic information from the social network through a multi-head graph attention network, improves the representation performance of user feature vectors, and improves the accuracy of user alignment;

[0017] 3) The present invention enhances the mutual information of the same user in different views through contrast learning to enhance the semantic features of nodes, thereby improving the accuracy of user alignment. Description of the Drawings

[0018] Figure 1 is the flowchart of the specific implementation manner of the social network user alignment method based on graph contrast learning in the present invention;

[0019] Figure 2 is the flowchart of user feature vector extraction in the present invention;

[0020] Figure 3 is the flowchart of data augmentation in this embodiment;

[0021] Figure 4 is an example diagram of the generation of a preference sharing view in this embodiment;

[0022] Figure 5 is an example diagram of the implementation process of the present invention.

[0023] Figure 6 is a comparison diagram of the accuracy rates of the present invention and five comparison methods in this embodiment. Detailed Description of the Invention

[0024] The specific embodiments of the present invention will be described below with reference to the accompanying drawings so that those skilled in the art can better understand the present invention. It should be particularly noted that in the following description, when the detailed description of known functions and designs may obscure the main content of the present invention, such descriptions will be omitted here.

[0025] Embodiment

[0026] Figure 1 is a flowchart of the specific embodiment of the social network user alignment method based on graph contrast learning of the present invention. As Figure 1 shown, the specific steps of the social network user alignment method based on graph contrast learning of the present invention include:

[0027] S101: User feature vector extraction:

[0028] Denote the source social network to be aligned as G S =(U S , E S , A S ), the target social network as G T =(U T , E T , A T ), where U i represents the user set of the social network G i , E i represents the edge set between users of the social network G i , A i represents the user data set of the social network G i , i ∈ {S, T}, and the user data includes the username, the content published by the user within a preset time period, and the user check-in data. Then, the user feature vectors of each user are extracted from the user data of the source social network and the target social network respectively N i represents the number of users in the social network G i , so as to obtain the source social network after feature extraction and the target social network V i represents the user feature vector set of the social network G i .

[0029] Pre-determine K pairs of aligned users in the source social network and the target social network as anchor users, k = 1, 2,..., K.

[0030] In the present invention, the user data includes the username, the user's published content, and the user's check-in data. Since users may leave blank or fill in incorrect information to protect their privacy when filling in personal profiles, but the username is a required item for each user, and usually users will use their historical names, this data can reflect the user's habits. In addition, the present invention also extracts the topic frequency from the user's published content as the user preference, and analyzes the user's permanent residence area from the user's check-in data to ensure the reliability and authenticity of the user attributes. Then, the three features are fused to obtain the user feature vector. Figure 2 is the flowchart of the extraction of the user feature vector in the present invention. As Figure 2 shown, the specific steps of the extraction of the user feature vector in this embodiment include:

[0031] S201: Extract user preferences:

[0032] For each user Extract λ topics of user preferences from their published content to form the user preferences where the value of λ is determined according to actual needs.

[0033] In this embodiment, the user preferences are extracted from the user's published content based on the Latent Dirichlet Allocation (LDA) topic model. For the specific process, please refer to the literature "B. Liu, P. Zhang, T. Lu, and N. Gu, "A reliable cross-site user generated content modeling method based on topic model," Knowledge-Based Systems, vol. 209, p. 106435, Dec. 2020."

[0034] S202: Extract the user's permanent residence area:

[0035] According to each user Extract the user's permanent residence area from the check-in data

[0036] The frequently visited area can be extracted by directly counting the occurrences of each area in the check-in data and selecting the area with the highest number of occurrences as the frequently visited area. Alternatively, the method described in the literature "M. Ye, P. Yin, W.-C. Lee, and D.-L. Lee, "Exploiting geographical influence for collaborative point-of-interest recommendation," in Proceedings of the 34th International ACM SIGIR Conference on Research and Development in Information - SIGIR’11. Beijing, China: ACM Press, 2011, p. 325." can be used. Treating the extraction of the frequently visited city as a point-of-interest recommendation task, comprehensively considering the influence of user preferences, social relationships, and geographical locations on points of interest, calculating the preference score based on similar users, calculating the friend influence score according to the influence (degree) of friends in the social network, calculating the geographical score based on the distance of the user's check-in location, and linearly adding the three scores to obtain the probability of recommended points of interest. The input is the location of the user's check-in and the social relationship view, and the output is the ranking of recommended points of interest. The areas corresponding to the top-ranked points of interest are obtained, and the area with the highest number of occurrences is used as the user's frequently visited area.

[0037] S203: Extract the user attribute embedding vector:

[0038] For each user user name user preference and the user's frequently visited area as user attributes, thus constructing user attribute data. Use the word2vec method to extract the corresponding word vectors for each user attribute in the user attribute data, and perform weighted fusion on the word vectors of the three user attributes to obtain the user attribute embedding vector

[0039] The word2vec method is a commonly used natural language processing method. In this embodiment, the method disclosed in the literature "M. Chugh, P. A. Whigham, and G. Dick, 'Stability of Word Embeddings Using Word2Vec,' in AI 2018: Advances in Artificial Intelligence, T. Mitrovic, B. Xue, and X. Li, Eds., vol. 11320. Cham: Springer International Publishing Ag, 2018, pp. 812–818." is adopted when extracting the user attribute embedding vector.

[0040] S204: Extract the user post content embedding vector:

[0041] Compared with short text data such as usernames, user posts contain more semantic information such as emotions, preferences, and writing characteristics, which can be used as user features. However, due to the large amount of noise in user posts, the word2vec method cannot effectively mine its global semantic information. Therefore, in the present invention, the BERT model is used to extract feature vectors from each user's post content as the user post content embedding vector

[0042] Extracting text features based on the BERT model is a commonly used natural language processing method. In this embodiment, the method disclosed in the literature "J. Devlin, M. W. Chang, K. Lee, and K. Toutanova, 'BERT: Pretraining of Deep Bidirectional Transformers for Language Understanding,' 2018." is adopted when extracting the user attribute embedding vector.

[0043] S205: Extract the user spatio-temporal embedding vector:

[0044] Based on the time and location in the user check-in data, privacy information such as friendship, preferences, and social circles can be inferred. Therefore, mining features from check-in data can more accurately discover potential aligned users in different social networks. However, it is found that only based on spatial information, it is impossible to accurately determine whether two accounts are in close proximity during the same time period. It is necessary to model the location by combining time and space to mine the hidden semantics of the location. In the present invention, the user spatio-temporal embedding vector is obtained from the user check-in data based on the meta-graph The specific method is as follows:

[0045] According to the social network G i Get the social relationship view between users, for each user The check-in time and location in the check-in data are used as the user's adjacent nodes to form the user's user activity view. The meta-graph is used to associate the user activity view and social relationship view of all users to obtain a heterogeneous network. The heterogeneous network is embedded in the graph to obtain the embedding vector of each node. The embedding vector corresponding to the node is used as the user's spatiotemporal embedding vector

[0046] S206: Fusion to obtain user feature vector:

[0047] For each user Embed its user attributes into a vector User published content embedding vector User spatiotemporal embedding vector Splice and get the user feature vector

[0048] S102: Data augmentation:

[0049] On social networks Perform two data augmentations to obtain two augmented views and

[0050] The goal of data augmentation is to reduce the impact of noise in the data by increasing the diversity of samples while maintaining the semantics unchanged, so as to improve the generalization ability of the model. Therefore, in this embodiment, the semantic centrality of users is first calculated based on their preferences and relationships, and the importance of edges and features is calculated based on the semantic centrality. In this way, the probability of edge sampling and feature masking is calculated, and the social network is analyzed. Topology-level augmentation and feature-level augmentation are performed to obtain an augmented view. Figure 3 This is a flow chart of data augmentation in this embodiment. Figure 3 As shown, the specific steps of data augmentation in this embodiment include:

[0051] S301: Calculate semantic centrality:

[0052] Construct the preference sharing view and social relationship view, and calculate the semantic centrality of each user. The specific method is as follows:

[0053] For each user Remember it on social network G i The social relationship matrix corresponding to the social relationship view in is Then from the social network G i Click "User-Preferences - Extract user relationships to obtain a user preference view composed of users with common preferences and denote the corresponding user preference matrix as Based on the social relationship matrix and the user preference matrix obtain the preference sharing matrix of the user Thus, obtain the preference sharing view of the user. The calculation formula of the preference sharing matrix is as follows:

[0054]

[0055] where the superscript T represents transpose, and ⊙ represents element-wise multiplication.

[0056] In the above formula, calculate the preference sharing matrix, which is used to ensure that the constructed preference sharing view belongs to a subgraph of the social relationship view. Figure 4 This is an example graph for generating the preference sharing view in this embodiment. As Figure 4 shown, through the preference sharing view and the social relationship view, a view that combines the same preferences and friend relationships is obtained.

[0057] In a social network, the degree size can reflect the influence degree of a user, and the degree centrality can represent the importance degree of a user in the graph. Therefore, the present invention defines the semantic centrality of the user to represent the importance degree of the user. The calculation formula of the semantic centrality is as follows:

[0058]

[0059] where, respectively represent the degree centrality of the user calculated according to the social relationship view and the preference sharing view.

[0060] S302: Topological level augmentation:

[0061] For each social network G i , perform topological level augmentation based on user influence and user preferences, that is, sample from the original edge set E i to obtain a corrected subset The sampling probability of the unimportant edges is low, so as to reduce the influence of noise and improve the robustness of the algorithm. Based on the above method, the present invention performs two topological level augmentations on the social network to obtain two topological level augmented views. The specific method of topological level augmentation is as follows:

[0062] For the social network G i in the edge set E i for each edge e ∈ E i , denote the users corresponding to the edge e as and First, calculate the average of the semantic centralities of the two users as the semantic centrality w of the edge e e :

[0063]

[0064] Next, perform the normalization of the semantic centrality. To reduce the influence of the power-law distribution characteristics of the social network on the sampling probability, when normalizing the semantic centrality of the edge, the present invention takes the logarithm of the semantic centrality of the edge, that is, uses the following formula to normalize the semantic centrality w e to obtain the normalized value α(e):

[0065]

[0066] where w max , w min respectively represent the maximum and minimum values of the semantic centralities of all edges in the edge set E i , and p τ represents a preset truncation probability, which is used to prevent a relatively high removal probability from destroying the topological structure of the network.

[0067] Calculate the sampling probability P(e) of the edge e using the following formula:

[0068] P(e) = 1 - α(e)

[0069] Sample the edges in the edge set E i according to the sampling probability P(e) to obtain the edge set Combine the user set U i , the edge set and the user feature vector set V i to form the topological level augmented view of the social network .

[0070] S303: Feature level augmentation:

[0071] For the two topological level augmented views obtained in step S302, randomly set some dimensions of the feature vector to zero according to the semantic centrality of the user for the user feature vector, to achieve feature level augmentation, thereby obtaining the augmented views and The specific method of feature level augmentation is as follows:

[0072] Let the dimension of the user feature vector be D, and calculate the social network G using the following formula i for the weight of the d-th dimension feature in the user feature vector

[0073]

[0074] where represents the eigenvalue of the d-th dimension in the user feature vector of the user .

[0075] Normalize the feature weight to obtain the normalized value β(d):

[0076]

[0077] where respectively represent the maximum and minimum values among all the feature weights of the social network G i . Calculate the sampling probability Q(d) of the d-th dimension feature using the following formula:

[0078] Q(d) = 1 - β(d)

[0079] Randomly sample m from the Bernoulli distribution with probability 1 - Q(d) d , form a D-dimensional vector M, and calculate the sampled feature vector using the following formula

[0080]

[0081] where ⊙ represents element-wise multiplication.

[0082] Construct the augmented view of the social network i by the user set U , the edge set and the set of sampled user feature vectors .

[0083] S103: Semantic fusion:

[0084] In the view, if the degree of a node is too high, when using the ordinary graph neural network GNN to fuse neighbor information, it will cause the central node to aggregate too many feature quantities and produce an overfitting phenomenon, resulting in a decline in the performance of the model. Therefore, the present invention sets a multi-head graph attention network as the graph encoder encoder for the source social network and the target social network respectively i , and use the graph encoder encoder i to respectively process the augmented view of the social network and Semantically fuse the user feature vectors to obtain the semantically fused user feature vectors, thereby constructing a semantically fused social network Augmented view and

[0085] In the multi-head graph attention network, different weights are assigned according to the semantic centrality when fusing the features of surrounding neighbors through the attention mechanism to fuse more important semantic information. In this embodiment, in order to make the semantic fusion more effective, the semantic centrality is introduced when calculating the attention weights between users. Then, the calculation method of the attention weights between users in the multi-head graph attention network in this embodiment is as follows:

[0086] First, use the following formula to calculate the attention value and of

[0087]

[0088] where respectively represent the user feature vectors of users and in the current view, W represents the shared weight matrix, || represents vector concatenation, LeakyReLU() represents the activation function, and a represents the feed-forward neural network parameter matrix.

[0089] Use the following formula to normalize the attention value to obtain the attention weight and of users

[0090] [[ID=—42]]

[0091] where represents the set of first-order neighbors of user in the current view, represents the first-order neighbor of user represents the attention value between user and user respectively represent the semantic centralities of users and user

[0092]

[0092] ​In the multi-head attention network, in order to enable self-attention to stably represent nodes, the multi-head attention mechanism is used to improve the model's representation ability. That is, for the output features of the intermediate layer, multiple shared weight matrices W are used to calculate self-attention, and then the results obtained by each attention head are concatenated to obtain an output vector. The final result is the average of the output vectors of each attention head.

[0093] S104: Contrastive learning:

[0094] For the augmented views of the same social network and Regarding the same user in the two augmented views as positive samples and other users as negative samples, aiming to improve the mutual information of the same user, contrastive learning is used to optimize the graph encoder i , and the optimized graph encoder i is used to encode the social network to obtain the user feature vectors of each user in it The user feature vectors in the social network are updated to

[0095] Set the graph encoder * , taking the source social network and the target social network as two views, and taking the K aligned user pairs in step S101 as anchor users, using contrastive learning to optimize the graph encoder * , and iteratively updating the user feature vectors of each user in the source social network and the target social network to obtain the final user feature vectors of each user.

[0096] It can be seen that three contrastive learning processes are performed in the present invention: two augmented views of the source social network, two augmented views of the target social network, and the source social network and the target network. When performing contrastive learning on two augmented views of the same social network, the similarity between the user feature vectors of different users becomes smaller. When performing contrastive learning between the source social network and the target network, the similarity between the user feature vectors of the anchor users becomes larger, thus approaching the embedding vector distance between the anchor users and expanding the embedding vector distance between non-anchor users. Therefore, user alignment can be achieved by calculating the similarity distance of the embedding vectors. The principle and specific process of contrastive learning can refer to the literature “A. van den Oord, Y. Li, and O. Vinyals, “Representation Learning with Contrastive Predictive Coding,” arXiv:1807.03748 [cs, stat], Jan. 2019.”

[0097] S105: User alignment:

[0098] For each user in the source social network, calculate the similarity (usually the cosine similarity of vectors) between its final user feature vector and the final user feature vector of each user in the target social network, and filter out the user pairs with the maximum similarity to each other and a similarity greater than the preset threshold as the aligned user pairs.

[0099] To avoid errors and improve the accuracy of user alignment, before calculating the similarity between two users, conflict judgment can be performed first. If they are not conflict users, calculate the similarity normally. If they are conflict users, directly set the similarity to an absolute minimum value. The specific method of conflict judgment is as follows:

[0100] For two users, filter out the check-in data with a time difference of check-in time less than the preset threshold from their check-in data, and judge whether the distance between the corresponding check-in regions is greater than the preset threshold. If so, it means that there is no reachability in space-time, and these two users are conflict users. If not, further obtain the set of preferred topics of these two users. If the number of identical preferred topics is less than the preset threshold, these two users are conflict users, otherwise they are not conflict users.

[0101] In practical applications, to better utilize the inter-layer link features, when performing user alignment, the top H aligned user pairs with the largest similarity can be filtered out from the filtered aligned user pairs as anchor users and added to the anchor user set. Complete the target social network according to the users in the anchor user set, that is, if two users are friends in the source social network but not in the target social network, then in the target social network in the edge set E TAdd the edges of these two users, otherwise do nothing. Then return to step S102. After multiple iterations, the final user alignment result is obtained. By adopting the above method, the semantic features of users can be continuously enhanced, and the accuracy of user alignment can be improved.

[0102] Figure 5 is an example diagram of the implementation process of the present invention. As Figure 5 shown, first extract the user feature vectors of the two social networks to be aligned and determine the anchor users; then perform data augmentation on each social network twice to obtain two augmented views. Semantic fusion is performed on the social networks and the augmented views respectively through a multi-head graph attention network. Then, the two augmented views of the source social network and the two augmented views of the target social network are respectively subjected to contrastive learning to update the user feature vectors of the social networks. Then, the source social network and the target social network are subjected to contrastive learning to embed the users in the two social networks into the same vector space; finally, the similarity between users is calculated to achieve user alignment.

[0103] To better illustrate the technical effects of the present invention, specific examples are used to conduct experimental verification on the present invention. In this experimental verification, user data is crawled from two existing social networks to form a source social network and a target social network. Five existing user alignment methods are used as comparison methods, including the INFUNE algorithm, the Ulink algorithm, the MEgo2Vec algorithm, the PALE algorithm, and the GraphUIL algorithm, where:

[0104] The INFUNE algorithm performs information fusion on the network attributes, profiles, and generated content of users, and adaptively fuses neighborhood features based on a graph neural network to improve the accuracy of user alignment. For details, see the literature "S.Y. Chen, J.H. Wang, X. Du, and Y.Q. Hu, "A Novel Framework with Information Fusion and Neighborhood Enhancement for User Identity Linkage," AMSTERDAM, Sep. 2020, vol. 325, pp. 1754–1761. doi: 10.3233 / faia200289."

[0105] The ULink algorithm maps multiple social networks to a common latent space through projection. See the literature "X. Mu et al., “User Identity Linkage by Latent User Space Modelling,” NEW YORK, Aug. 2016, pp. 1775–1784. doi:10.1145 / 2939672.2939849."

[0106] The MEgo2Vec algorithm represents two social networks through a graph neural network, embeds user attributes and ego networks respectively, fuses neighbor features through an attention mechanism, and finally uses a binary classifier to determine whether two users are aligned. See the literature "J. Zhang et al., “MEgo2Vec: Embedding Matched Ego Networks for User Alignment Across Social Networks,” in Proceedings of the 27th ACM International Conference on Information and Knowledge Management, Torino Italy, 17 2018, pp. 327–336. doi:10.1145 / 3269206.3271705."

[0107] The PALE algorithm maps users to a low-dimensional vector space based on network topology and known anchor links, and realizes user alignment by minimizing the distance between users. See the literature "T. Man, H. Shen, S. Liu, X. Jin, and X. Cheng, “Predict Anchor Links across Social Networks via an Embedding Approach,” 2016, p. 7."

[0108] The GraphUIL algorithm encodes the local and global network structures, and realizes user alignment by minimizing the difference before and after reconstruction and the matching loss of anchor users. See the literature "W. Zhang, K. Shu, H. Liu, and Y. Wang, “Graph Neural Networks for User Identity Linkage,” ArXiv, vol. abs / 1903.02174, 2019."

[0109] Figure 6 It is a comparison chart of the accuracy rates of the present invention and five comparative methods in this embodiment.Figure 6 The horizontal axis is the proportion r of the training set in the data sample set, and the vertical axis is the probability of hitting in the top k results, i.e., hit-precision@k, where k is set to 30. As Figure 6 shown, the user alignment effect of the present invention is better than other baseline methods, with an average increase of 16.94%. For all methods, as the training ratio increases, the alignment accuracy also continuously improves. This is because as the number of training samples increases, the number of unknown samples in the test set decreases. In addition, the present invention establishes connections between users in different social networks based on known supervision information, which can better integrate semantic features and also improve the alignment accuracy. Compared with the INFUNE algorithm, the present invention has an average increase of 3.64%, and is more stable when the training set is 0.7 - 0.8. This is because the present invention not only considers user profiles and generated content, but also effectively reduces the noise problem caused by social network heterogeneity through graph data augmentation, which can improve the robustness of the model.

[0110] Although the above description of the illustrative specific embodiments of the present invention is provided for those skilled in the art of the present technology to understand the present invention, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art of the present technology, as long as various changes are within the spirit and scope of the present invention defined and determined by the appended claims, these changes are obvious, and all inventions and creations using the concept of the present invention are within the scope of protection.

Claims

1. A social network user alignment method based on graph contrastive learning, characterized in that, It includes the following steps: S1: Denote the source social network to be aligned as G S =(U S , E S , A S ), and the target social network as G T =(U T , E T , A T ), where U i represents the user set of the social network G i , E i represents the edge set between users of the social network G i , A i represents the user data set of the social network G i . Let i ∈ {S, T}, and the user data includes the username, the content posted by the user within a preset time period, and the user check-in data. Then, extract the user feature vectors of each user from the user data of the source social network and the target social network respectively j = 1, 2, …, N i , where N i represents the number of users in the social network G i , thus obtaining the source social network after feature extraction and the target social network V i represents the set of user feature vectors of the social network G i ; Pre-determine K pairs of aligned users in the source social network and the target social network in advance As anchor users, k = 1, 2, …, K; S2: Perform data augmentation on the social network twice to obtain two augmented views and The specific method of data augmentation for the social network is as follows: S2.1: For each user Record the social relationship matrix corresponding to the social relationship view of the user in the social network G i as Then extract the user relationships from the social network G i by "user - preference - user" to obtain a user preference view composed of users with common preferences and record the corresponding user preference matrix as Based on the social relationship matrix and the user preference matrix obtain the preference sharing matrix of the user Thus, obtain the preference sharing view of the user The calculation formula of the preference sharing matrix is as follows: Among them, the superscript T represents transpose, and ⊙ represents element-wise multiplication; Calculate the user 's semantic centrality Among them, respectively represent the user's degree centrality calculated according to the social relationship view and the preference sharing view; S2.2: For the social network perform two topological-level augmentations to obtain two topological-level augmented views. The specific method of topological-level augmentation is as follows: For the social network G i in the edge set E i for each edge e ∈ E i , denote the users corresponding to the edge e as and First, calculate the average of the semantic centralities of the two users as the semantic centrality w of the edge e e : The semantic centrality w of the side is normalized using the following formula e to obtain the normalized value α(e): Among them, w max and w min respectively represent the maximum and minimum of the semantic centrality of all edges in the edge set E i , and p τ represents a preset truncation probability; The sampling probability P(e) of edge e is calculated using the following formula: P(e) = 1 - α(e) Sample the edges in the edge set E according to the sampling probability P(e) to obtain the edge set i in it, and obtain the edge set Combine the user set U i , the edge set and the user feature vector set V i to form an augmented view of the topological level of the social network ; S2.3: Perform feature-level augmentation on the two topological-level augmented views obtained in step S2.2 to obtain augmented views and The specific method of feature-level augmentation is as follows: Let the dimension of the user feature vector be D, and the following formula is used to calculate the weight of the d-th dimension feature in the user feature vector of the social network G i ​ Among them, represents the eigenvalue of the d-th dimension in the user feature vector of the user For the feature weights perform normalization to obtain the normalized value β(d): Among them, respectively represent the maximum and minimum values among all the feature weights of the social network G i ; The sampling probability Q(d) of the d-th dimensional feature is calculated using the following formula: Q(d) = 1 - β(d) Randomly sample m from a Bernoulli distribution with probability 1 - Q(d) d , forming a D-dimensional vector M, and calculate the sampled feature vector using the following formula Among them, ⊙ represents element-wise multiplication; The user set U i , the edge set and the sampled user feature vector set constitute an augmented view of the social network ; S3: Set a multi-head graph attention network as the graph encoder encoder for the source social network and the target social network respectively i , and use the graph encoder encoder i to semantically fuse the user feature vectors in the social network augmented view and respectively, and obtain the semantically fused user feature vectors, so as to construct the semantically fused social network augmented view and S4: Augmented view of the same social network and Using the same user in the two augmented views as the positive sample and other users as the negative sample, aiming to improve the mutual information of the same user, contrastive learning is used to optimize the graph encoder i The optimized graph encoder i is used to encode the social network to obtain the user feature vectors of each user in it The user feature vectors in the social network are updated to to obtain the social network Set up the graph encoder * , take the source social network and the target social network as two views, and take the K aligned user pairs in step S1 as anchor users, and optimize the graph encoder using contrastive learning * , and iteratively update the user feature vectors of each user in the source social network and the target social network to obtain the final user feature vectors of each user; S5: For each user in the source social network, calculate the similarity between its final user feature vector and the final user feature vectors of each user in the target social network, and filter out the user pairs with the maximum similarity to each other and the similarity greater than the preset threshold as the aligned user pairs.

2. The social network user alignment method according to claim 1, wherein In step S1, the user feature vector is extracted using the following method: S1.1: For each user Extract λ topics preferred by the user based on the content they post to form the user preferences where the value of λ is determined according to actual needs; S1.2: According to each user 's check-in data, extract the user's resident area S1.3: For each user user name user preference and the user's resident area As user attributes, user attribute data is constructed. The word2vec method is used to extract the corresponding word vectors for each user attribute in the user attribute data, and the word vectors of the three user attributes are weighted and fused to obtain the user attribute embedding vector S1.4: Use the BERT model to extract feature vectors from the published content of each user as the user's published content embedding vector S1.5: According to the social network G i obtain the social relationship view among users. For each user take the check-in time and location in the check-in data as adjacent nodes of the user to form the user activity view of the user. Use a meta-graph to associate the user activity views and social relationship views of all users to obtain a heterogeneous network. Perform graph embedding on this heterogeneous network to obtain the embedding vectors of each node. Take the embedding vector corresponding to the node of the user as the user spatio-temporal embedding vector S1.6: For each user Embed its user attribute vector User-posted content embedding vector User spatio-temporal embedding vector Concatenate them to obtain the user feature vector 3. The social network user alignment method according to claim 1, characterized in that In step S3, the calculation method of the attention weights between users in the multi-head graph attention network is as follows: First, calculate the attention values of the user and using the following formula Among them, respectively represent the user and in the current view, the user feature vector, W represents the shared weight matrix, || represents vector concatenation, LeakyReLU() represents the activation function, and a represents the feedforward neural network parameter matrix; The attention value is normalized using the following formula to obtain the attention weights of the user and and ​ in, Represents a user The set of first-order neighbors in the current view, Represents a user The first-order neighbor of Represents a user and users The attention value between Represents users and users The semantic centrality of .

4. The social network user alignment method according to claim 1, characterized in that, In step S5, before calculating the similarity between two users, conflict judgment is first performed. If they are not conflict users, the similarity is calculated normally. If they are conflict users, the similarity is directly set to an absolute minimum value. The specific method of conflict judgment is as follows: For two users, filter out the check-in data with a time difference of check-in time less than the preset threshold from their check-in data, and judge whether the distance between the corresponding check-in regions is greater than the preset threshold. If so, it means that there is no reachability in space-time, and these two users are conflict users. If not, further obtain the preference topic sets of these two users. If the number of identical preference topics is less than the preset threshold, these two users are conflict users, otherwise they are not conflict users.

5. The social network user alignment method according to claim 1, characterized in that In step S5, when the users are aligned, the top H alignment user pairs with the greatest similarity can be selected from the filtered alignment user pairs as anchor users and added to the anchor user set; the target social network is completed according to the user pairs in the anchor user set, that is, if two users are friends in the source social network but not in the target social network, then an edge between these two users is added to the edge set E in the target social network T and otherwise no operation is performed; then step S2 is returned, and after multiple iterations, the final user alignment result is obtained.

Citation Information

Patent Citations

  • A social network alignment method based on graph convolution

    CN109636658A

  • Network alignment method based on double-layer graph attention neural network

    CN111931903A