A Social Network User Matching Method Based on Grid Clustering and Spatiotemporal Features

By using grid clustering and spatiotemporal features to match users on social networks, the problems of imbalanced and asymmetric check-in data are solved, improving the accuracy and noise resistance of user matching while reducing computational complexity.

CN115238757BActive Publication Date: 2025-11-14SOUTHWEAT UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111660942.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-30
Publication Date
2025-11-14
Estimated Expiration
2041-12-30

AI Technical Summary

Technical Problem

Existing social network user matching methods struggle to effectively identify the same user when faced with imbalances in the number of check-ins and asymmetric check-in times, resulting in high computational complexity and poor noise resistance.

Method used

A method based on grid clustering and spatiotemporal features is adopted to calculate the multi-attribute similarity of user pairs by obtaining the qualified grid clusters, check-in stability, check-in preference time and trajectory anchor points of users, and constructing a user matching model for training to achieve user matching.

Benefits of technology

It effectively handles imbalances and asymmetries in check-in data, improving the accuracy of user matching and noise resistance, while reducing computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115238757B_ABST
    Figure CN115238757B_ABST
Patent Text Reader

Abstract

This invention discloses a social network user matching method based on grid clustering and spatiotemporal features. First, several pairs of users known to be the same user are obtained from the two social networks of the users to be matched, serving as seed user pairs. Negative example user pairs are then obtained from the seed user pairs and used as sample user pairs. Each user's check-in records are obtained, and qualified grid clusters for each user are acquired based on grid clustering. Spatiotemporal features are extracted from the user's check-in records, including user check-in stability, user check-in preference time, and user trajectory anchor points. The similarity of the qualified grid clusters, user check-in stability, user check-in preference time, and user trajectory anchor points of the user pairs are calculated. A user matching model is constructed and trained using the sample user pair data. The data of the user pairs to be matched is then input into the trained user matching model to obtain the matching results. This invention can achieve user matching even with imbalanced check-in data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of social network technology, and more specifically, relates to a social network user matching method based on grid clustering and spatiotemporal features. Background Technology

[0002] In the information age, modern social networks have reached billions of users. The same user may post and share personal information on different social network platforms, making user matching across different networks to identify identical users crucial. Identifying user identity information through social networks will have significant practical implications for many applications, such as services derived from user identification: friend recommendations, community detection, information dissemination, personalized search, privacy protection, malicious user identification, online precision marketing, and providing researchers with more complete user data.

[0003] In user matching methods based on social network check-ins, existing research techniques mainly fall into two categories. The first is based on frequency distribution. This type of method typically statistically analyzes user check-in data across two feature dimensions: spatial and temporal. By analyzing the co-occurrence frequency of user geographic location and check-in time, it calculates the KL divergence or similarity of other distributions in the frequency of user check-in records, and uses methods such as kernel density estimation to calculate the similarity of user trajectories. The second method involves vectorizing or textualizing user trajectories, and calculating vector similarity or text topic distribution to characterize trajectory similarity. Vectorization methods typically first serialize user trajectories, using models such as TF-IDF or Paragraph2vec to transform the sequence into vectors, and finally using methods such as cosine similarity to calculate similarity. Textualization methods convert locations into semantic words, textualize user trajectories, use models such as LDA to obtain the user's topic distribution, and finally use KL divergence to determine the similarity between user trajectories.

[0004] Gao Xing et al.[Gao X,Ji W,Li Y,et al.User Identification with Spatio-TemporalAwareness across Social Networks[C] / / the 27th ACM InternationalConference.

[0005] [ACM, 2018.] proposed the UIDwST algorithm (a spatiotemporally aware user identification method across social networks). The advantage of this method is that it couples spatiotemporal information. However, its disadvantages are: 1. Poor adaptability: This type of method is only applicable to social networks with high similarity. The trajectories of user networks are often difficult to make symmetrical in terms of data, and the imbalance in data volume makes it difficult for this type of method to achieve good results. 2. High computational complexity: This type of method is difficult to apply to large-scale social networks.

[0006] Meng Junqi et al. [QI MJ, WANG ZY, HE Z, et al. User identification across asynchronous mobility traijectories[J]. Sensors, 2019, 19(9): 2020.] proposed an identification and analysis method based on the TOP-N (N regions with the most frequent user trajectory distribution) regions. The advantage of this method is that it abandons the calculation of coordinates with low distribution frequency, thus reducing complexity. The disadvantage is that it requires dense user trajectory coordinate points.

[0007] Han Xiaohui et al. [HAN XH, WANG LH, XU SJ, et al. Linking social network accounts by modeling user spatiotemporal habits[C] / / IEEE International Conference on Intelligence and Security Informatics.[Sl]:IEEE,2017:19-24.] constructed a topic model that transforms location into semantic words, textifies user trajectories, uses the LDA model to obtain the topic distribution of users, and finally uses KL divergence to obtain the similarity between user trajectories. The disadvantages are: 1. Poor noise resistance; it does not effectively identify and remove noisy check-in records in user trajectories, significantly affecting the calculation results. 2. High dependence on data quality; semantic extraction of trajectories requires good data support, and it cannot effectively textify user trajectories in the case of sparse data. Summary of the Invention

[0008] The purpose of this invention is to overcome the shortcomings of the prior art and provide a social network user matching method based on grid clustering and spatiotemporal features, which can effectively achieve user matching when faced with imbalances in the number of check-ins and asymmetry in check-in time.

[0009] To achieve the above-mentioned objectives, the social network user matching method based on grid clustering and spatiotemporal features of this invention includes the following steps:

[0010] S1: When it is necessary to manage two users belonging to two different social networks A and B. When performing user matching, record the user pair as Several pairs of users known to be the same user are obtained from two social networks as seed user pairs, with a matching score of 1. Then, a user belonging to social network A is randomly paired with another user belonging to social network B from the seed user pairs to obtain negative example user pairs, with a matching score of 0. Both the seed user pairs and the negative example user pairs are used as sample user pairs, and the number of sample user pairs is denoted as M. The m′-th sample user pair... Users belonging to social network A are In the m′-th sample user pair, the users belonging to social network B are:

[0011] For each user Retrieve the set of check-in records posted by this user on their respective social networks. Each sign-in record in the sign-in record collection is recorded as follows: in Indicates user The coordinates of longitude and latitude in the j-th check-in record, t i,j Indicates user The timestamp in the j-th check-in record Indicates user check-in record collection The number of check-in records in the system;

[0012] S2: Obtain the qualified grid clusters for each user based on grid clustering. The specific method includes the following steps:

[0013] S2.1: [User] check-in record collection The results are obtained by merging the records into set S0. The minimum longitude (lon) is then obtained from all check-in records in set S0. min Maximum longitude (lon) max and latitude minimum value lat min Maximum latitude lat max Then longitude lon min -▽ lon to lon max +▽ lon latitude min -▽ lat to lat max +▽ lat The area is designated as a public area, where ▽ lon Indicates the preset longitude deviation, ▽ lat This indicates the preset latitude deviation;

[0014] S2.2: Divide the latitude and longitude of the common area obtained in step S2.1 into K equal intervals to obtain a result containing K. 2 A grid array of grids, then for each set of check-in records Determine the set of sign-in records The number of check-in records in each grid is used as the user's score. The check-in density of the corresponding grid is used; grids with a check-in density greater than 0 are considered valid grids. For each user, valid grids are selected to construct a grid set, and the user is recorded. The effective number of grids is The resulting mesh set is in Indicates user The coordinates of the d-th valid grid in the grid array.

[0015] Indicates user The sign-in density of the d-th valid grid;

[0016] S2.3: For each user Based on coordinates, the grid set Cluster all grids in the array, and denote the number of grid clusters obtained from the clustering as . Let the set of grid clusters be . in Indicates user The q-th grid cluster,

[0017] S2.4: For each user The corresponding set of grid clusters Each grid cluster was calculated Chinese users The average sign-in density is used as the grid cluster. Sign-in density Determine the check-in density If so, then determine the mesh cluster. If it is a qualified grid cluster, otherwise record it with the user. Belonging to the same user users Its grid set is For users Each grid cluster Computational grid clusters Each grid and grid set The coordinate distance between each grid cell in the grid array is used to determine if any pair of grid cells is less than a preset threshold, thus identifying the grid cluster. If it is a qualified mesh cluster, otherwise it is considered a mesh cluster. Not a qualified grid cluster;

[0018] User records The corresponding set of qualified grid clusters is in Indicates user The v-th qualified grid cluster, Indicates the number of qualified grid clusters;

[0019] S3: Extract spatiotemporal features from user check-in records, including user check-in stability, user check-in preference time, and user trajectory anchor points. The extraction method for each spatiotemporal feature is as follows:

[0020] 1) User check-in stability: For each user From all its check-in records Extract timestamp sequence Calculate the time difference between two adjacent timestamps. Obtain the time difference sequence Calculate time difference series coefficient of variation As a user The stability of the sign-in process;

[0021] 2) User check-in preference time: Divide each day into H time intervals, and for each user... Based on its timestamp sequence Get the number of check-ins for each time interval. h = 1, 2, ..., H, sort the time intervals by the number of check-ins from largest to smallest, and select the Z time intervals with the most check-ins as users. The check-in preference time is denoted as follows: z = 1, 2, ..., Z;

[0022] 3) User trajectory anchor points: For users and users Record its timestamp sequence and For any two timestamps and in If satisfied Δt represents a preset time difference threshold; if so, the timestamp is determined. and For a valid timestamp pair, use this timestamp pair. Stored as trajectory anchor points in timestamp pair set T m,pair If the condition is met, no action will be taken; otherwise, no action will be taken.

[0023] S4: Calculate the multi-attribute similarity of user pairs, including user qualified grid cluster similarity, user check-in stability similarity, user check-in preference time similarity, and user trajectory anchor point similarity. The specific calculation method for each attribute similarity is as follows:

[0024] 1) User-qualified grid cluster similarity: For users Obtain its qualified grid cluster set Number of grids contained in when Allow users user Number of grids Otherwise, it will make users user Number of grids Calculate users qualified grid clusters Each grid to the user The shortest distance to each qualified grid cluster (i.e., the minimum distance between the cluster and each individual grid cell in the grid array) is denoted as ω. m,y y = 1, 2, ..., Y m The deviation vector is obtained.

[0025] Then, the user is calculated using the following formula. The similarity between qualified mesh clusters, Sim_G m :

[0026]

[0027] Where e represents the natural constant, Dis_G m Indicates user The distance between qualified grid clusters is calculated using the following formula:

[0028]

[0029] ε m,y Represents the deviation component ω m,y The weight of is calculated using the following formula:

[0030]

[0031] in, Indicates a qualified grid cluster The check-in density of the y-th grid in the middle, Indicates a qualified grid cluster The sign-in density of the qualified grid cluster to which the y-th grid belongs;

[0032] 2) User check-in stability similarity: For users Its check-in stationarity similarity Sim_CV m The calculation formula is as follows:

[0033]

[0034] 3) User check-in time similarity: For users The similarity of their check-in preferences is Sim_t m The calculation formula is as follows:

[0035]

[0036] in:

[0037]

[0038] 3) User trajectory anchor point similarity: For users Its user trajectory anchor point similarity Sim_anc m The calculation formula is as follows:

[0039]

[0040] Among them, |T m,pair | Represents a set of timestamp pairs T m,pair The number of timestamp pairs in the data. Represents the set T of timestamp pairs m,pair The first in A timestamp pair Indicates the first When two timestamps are in a timestamp pair, the user The distance between the coordinates is The preset distance function;

[0041] S5: Construct a user matching model according to actual needs. Its input is the similarity of the user's four attributes, and its output is the user's matching score.

[0042] S6: Assign each sample user pair The similarity of the four attributes is used as the input of the user matching model, and the corresponding matching score is used as the expected output of the user matching model. The user matching model is trained to obtain the trained user matching model.

[0043] S7: Matching users The four attribute similarity inputs are used in step S6 to train the user matching model and obtain the user's similarity. The matching score is used to determine the user's match score. If the matching score is greater than a preset threshold, the user... Match successful, belongs to the same user; otherwise, user. Match failed.

[0044] This invention presents a social network user matching method based on grid clustering and spatiotemporal features. First, several pairs of users known to be the same user are obtained from the two social networks of the user pairs to be matched, serving as seed user pairs. Negative user pairs are then obtained from the seed user pairs and used as sample user pairs. Next, the check-in records of each user are obtained, and qualified grid clusters for each user are acquired based on grid clustering. Then, spatiotemporal features are extracted from the user's check-in records, including user check-in stability, user check-in preference time, and user trajectory anchor points. Multi-attribute similarity of the user pairs is calculated, including similarity of qualified grid clusters, similarity of user check-in stability, similarity of user check-in preference time, and similarity of user trajectory anchor points. A user matching model is constructed and trained using data from the sample user pairs. The data of the user pairs to be matched is then input into the trained user matching model to obtain the matching results.

[0045] This invention can effectively handle situations where the number of sign-ins is unbalanced or the sign-in time is asymmetrical, thus effectively achieving user matching. Attached Figure Description

[0046] Figure 1 This is a flowchart illustrating a specific implementation of the social network user matching method based on grid clustering and spatiotemporal features of the present invention.

[0047] Figure 2 This is a flowchart of obtaining qualified grid clusters based on grid clustering in this invention.

[0048] Figure 3 This is a flowchart of grid clustering in this embodiment;

[0049] Figure 4 This is a comparison chart of the accuracy of the present invention and the comparison method on three datasets;

[0050] Figure 5 This is a comparison chart of the F1-scores of the present invention and the comparison method on three datasets. Detailed Implementation

[0051] The specific embodiments of the present invention will now be described with reference to the accompanying drawings to enable those skilled in the art to better understand the invention. It should be particularly noted that in the following description, detailed descriptions of known functions and designs that might obscure the main content of the invention will be omitted here.

[0052] Example

[0053] Figure 1 This is a flowchart illustrating a specific implementation of the social network user matching method based on grid clustering and spatiotemporal features of the present invention. Figure 1As shown, the specific steps of the social network user matching method based on grid clustering and spatiotemporal features of this invention include:

[0054] S101: Retrieve check-in data:

[0055] When it is necessary to manage two users belonging to two different social networks A and B. When performing user matching, several pairs of users known to belong to the same user are obtained from the two social networks as seed user pairs, and their matching score is set to 1. Then, a user belonging to social network A is randomly paired with another user belonging to social network B from the seed user pairs to obtain negative example user pairs, and their matching score is set to 0. Both the seed user pairs and the negative example user pairs are used as sample user pairs, and the number of sample user pairs is denoted as M. The user belonging to social network A in the m′-th sample user pair is denoted as . In the m′-th sample user pair, the users belonging to social network B are:

[0056] For each user Retrieve the set of check-in records posted by this user on their respective social networks. Each sign-in record in the sign-in record collection is recorded as follows: in Indicates user The coordinates of longitude and latitude in the j-th check-in record. Indicates user The timestamp in the j-th check-in record Indicates user check-in record collection The number of check-in records.

[0057] S102: Obtaining qualified grid clusters based on grid clustering:

[0058] To reflect user characteristics, this invention extracts qualified grid clusters from the user's check-in coordinate data. Figure 2 This is a flowchart illustrating the process of obtaining qualified grid clusters based on grid clustering in this invention. For example... Figure 2 As shown, the specific steps for obtaining qualified grid clusters based on grid clustering in this invention include:

[0059] S201: Constructing Public Areas:

[0060] User check-in record collection The results are obtained by merging the records into set S0. The minimum longitude (lon) is then obtained from all check-in records in set S0. min Maximum longitude (lon) max and latitude minimum value lat min Maximum latitude latmax Then longitude lon min -▽ lon to lon max +▽ lon latitude min -▽ lat to lat max +▽ lat The area is designated as a public area, where ▽ lon Indicates the preset longitude deviation, ▽ lat This represents the preset latitude deviation. It is calculated using the following formulas:

[0061]

[0062] S202: Mesh Mapping

[0063] The latitude and longitude of the public area obtained in step S201 are divided into K equal intervals to obtain a region containing K. 2 A grid array of grids, then for each set of check-in records This collection of check-in records The number of check-in records falling into each grid is used as the user's score. The check-in density is determined by the corresponding grid. Grids with a check-in density greater than 0 are considered valid grids. For each user, valid grids are selected to construct a grid set. The user is then denoted as... The effective number of grids is The resulting mesh set is in Indicates user The coordinates of the d-th valid grid in the grid array. Indicates user The sign-in density of the d-th valid grid.

[0064] S203: Obtaining grid clusters using grid clustering:

[0065] For each user Based on coordinates, the grid set Cluster all grids in the array, and denote the number of grid clusters obtained from the clustering as . Let the set of grid clusters be . in Indicates user The q-th grid cluster,

[0066] Figure 3 This is a flowchart of the grid clustering process in this embodiment. For example... Figure 3 As shown, the specific steps of grid clustering in this invention include:

[0067] S301: Initialization parameters:

[0068] Initialize the mesh set Mesh Cluster Set Temporary mesh clusters Add the grid flag Update=1.

[0069] S302: Determine if it is the current grid set If not, proceed to step S303; otherwise, grid clustering ends.

[0070] S303: Determine if it is a temporary mesh cluster If yes, proceed to step S304; otherwise, proceed to step S306.

[0071] S304: Randomly add grid:

[0072] From the current grid set Randomly select a grid and add it to the temporary grid cluster. And remove the grid from the temporary grid cluster Delete it and proceed to step S305.

[0073] S305: Determine if it is a grid set If not, proceed to step S306; otherwise, proceed to step S308.

[0074] S306: Add grid based on coordinates:

[0075] For the current grid set Each grid in Calculate its relationship with temporary mesh clusters The coordinate distance of each grid in the grid array, if the grid With temporary grid clusters The coordinate distance of each grid in the grid array is less than a preset threshold (in this embodiment, it is...). ), then the grid Add temporary mesh cluster Otherwise, no action will be taken.

[0076] Temporary mesh clusters during this round of mesh addition If a new grid needs to be added, set the grid addition flag Update=1; otherwise, set the grid addition flag Update=0.

[0077] S307: Determine whether the grid has added the flag Update=1. If yes, return to step S305; otherwise, proceed to step S308.

[0078] S308: Add a mesh cluster:

[0079] Temporary grid clusters Added as a mesh cluster to the mesh cluster collection Then clear the temporary mesh cluster. Return to step S302.

[0080] S204: Screening for qualified grid clusters:

[0081] For each user The corresponding set of grid clusters Each grid cluster was calculated Chinese users The average sign-in density is used as the grid cluster. Sign-in density Determine the check-in density If so, then determine the mesh cluster. If it is a qualified grid cluster, otherwise record it with the user. Belonging to the same user users Its grid set is For users Each grid cluster Computational grid clusters Each grid and grid set The coordinate distance between each grid cell in the grid array is used to determine if any pair of grid cells is less than a preset threshold, thus identifying the grid cluster. If it is a qualified mesh cluster, otherwise it is considered a mesh cluster. Not a qualified grid cluster.

[0082] User records The corresponding set of qualified grid clusters is in Indicates user The v-th qualified grid cluster, This indicates the number of qualified grid clusters.

[0083] In this invention, by clustering and filtering the grid, coarse-grained calculations of user check-in coordinates can be performed, thereby reducing computational complexity. At the same time, check-in coordinates with a high degree of dispersion are deleted, reducing interference from noisy coordinates, and retaining coordinates with strong potential correlation.

[0084] S103: Extracting spatiotemporal features:

[0085] To more accurately obtain user characteristics, this invention also needs to extract spatiotemporal features from user check-in records. In this invention, spatiotemporal features include user check-in stability, user check-in preference time, and user trajectory anchor points. The extraction methods for these three spatiotemporal features will be described in detail below.

[0086] • Stability of user check-in

[0087] For each user From all its check-in records Extract timestamp sequence Calculate the time difference between two adjacent timestamps.

[0088] Obtain the time difference sequence Calculate time difference series coefficient of variation As a user The stability of the sign-in process.

[0089] User check-in preference time

[0090] Divide each day into H time intervals, for each user Based on its timestamp sequence Get the number of check-ins for each time interval. Sort the time intervals by the number of check-ins from largest to smallest, and select the Z time intervals with the most check-ins as users. The check-in preference time is denoted as follows:

[0091] • User trajectory anchor points

[0092] For users and users Record its timestamp sequence and For any two timestamps and in

[0093] If satisfied Δt represents a preset time difference threshold; if so, the timestamp is determined. and For a valid timestamp pair, use this timestamp pair. Stored as trajectory anchor points in timestamp pair set T m,pair If yes, then no action will be taken; otherwise, no action will be taken.

[0094] S104: Calculate user similarity across multiple attributes:

[0095] Based on the qualified grid clusters and spatiotemporal features obtained in the two steps above S102, the multi-attribute similarity of user pairs is calculated, including the similarity of qualified grid clusters, the similarity of check-in stability, the similarity of check-in preference time, and the similarity of user trajectory anchor points. The specific calculation method for each attribute similarity is as follows:

[0096] • User-qualified grid cluster similarity

[0097] For users Obtain its qualified grid cluster set Number of grids contained in when Allow users user Number of grids Otherwise, it will make users user Number of grids Calculate users qualified grid clusters Each grid to the user The shortest distance to each qualified grid cluster (i.e., the minimum distance between the cluster and each individual grid cell in the grid array) is denoted as ω. m,y y = 1, 2, ..., Y m The deviation vector is obtained.

[0098] Then, the user is calculated using the following formula. The similarity between qualified mesh clusters, Sim_G m :

[0099]

[0100] Where e represents the natural constant, Dis_G m Indicates user The distance between qualified grid clusters is calculated using the following formula:

[0101]

[0102] ε m,y Represents the deviation component ω m,y The weight of is calculated using the following formula:

[0103]

[0104] in, Indicates a qualified grid cluster The check-in density of the y-th grid in the middle, Indicates a qualified grid cluster The sign-in density of the qualified grid cluster to which the y-th grid belongs.

[0105] • User check-in stability similarity

[0106] For users Its check-in stationarity similarity Sim_CV mThe calculation formula is as follows:

[0107]

[0108] • User check-in preference time similarity

[0109] For users The similarity of their check-in preference times (Sim_t) m The calculation formula is as follows:

[0110]

[0111] in:

[0112]

[0113] Obviously, Δh m,z Indicates two time intervals The number of intervals between them. The remainder is calculated using %H to ensure that the interval between the first and Hth time intervals is 1.

[0114] • User trajectory anchor point similarity

[0115] For users Its user trajectory anchor point similarity Sim_anc m The calculation formula is as follows:

[0116]

[0117] Among them, |T m,pair | Represents a set of timestamp pairs T m,pair The number of timestamp pairs in the data. Represents the set T of timestamp pairs m,pair The first in A timestamp pair Indicates the first When two timestamps are in a timestamp pair, the user The distance between the coordinates is The distance function is a preset distance function; in this embodiment, the distance function is... The calculation formula is as follows:

[0118]

[0119] Wherein, γ represents the preset tolerance coefficient. In this embodiment, the tolerance coefficient γ is determined by the maximum value of the ratio of the distance between adjacent nodes of the user trajectory to time, i.e., the calculation formula is as follows:

[0120]

[0121] in, Indicates user Time difference The two corresponding timestamps and The distance between the coordinates at the time.

[0122] S105: Constructing a user matching model:

[0123] A user matching model is constructed based on actual needs. Its input is the similarity of four user attributes, and its output is the user's matching score.

[0124] In this embodiment, the user matching model adopts the following formula model:

[0125] score m =Sim_anc m [α1·Sim_G m +α2·Sim_t m +α3·Sim_CV m ]

[0126] Where α1, α2, and α3 are the weight parameters to be learned.

[0127] S106: User Matching Model Training:

[0128] Each sample user pair The similarity of the four attributes is used as the input to the user matching model, and the corresponding matching score is used as the expected output of the user matching model. The user matching model is trained to obtain the trained user matching model.

[0129] In this embodiment, the loss function is the mean squared error cost function, and the required parameters are obtained by training using the gradient descent method.

[0130] S107: User Matching

[0131] Users to be matched The four attribute similarity inputs are used to train the user matching model in step S106 to obtain the user. The matching score is used to determine the user's match score. If the matching score is greater than a preset threshold (0.5 in this embodiment), then the user... Match successful, belongs to the same user; otherwise, user. Match failed.

[0132] To better illustrate the technical effects of this invention, a specific example is used to conduct experimental verification. The data used in this experiment comes from the SNAP dataset, a social network analysis website from Stanford University. This website includes data from large social network platforms such as Facebook and Twitter, as well as datasets of various types of networks, including road networks, collaborative networks, and communication networks. Different users in the dataset have different user IDs for their check-in data, allowing users to be linked to users on different websites based on their user IDs. This experiment uses three social network datasets: Facebook-Gplus, Facebook-Twitter, and GPlus-Twitter. User similarity is calculated based on check-in records to output whether users on different social networks come from the same real-world entity. Table 1 is a statistical table of the datasets used in this experimental verification.

[0133] Dataset Number of users Minimum number of check-ins Maximum number of check-ins Average number of sign-ins Facebook-Gplus 17007 1 1388 97.113 Facebook-Twitter 55117 1 1353 34.366 GPlus-Twitter 34968 1 933 19.777

[0134] Table 1

[0135] Statistical analysis revealed that, regarding the imbalance in check-in quantity, the Facebook-Gplus dataset exhibited the largest proportion of users with both low and high bias. The GPlus-Twitter dataset showed a higher proportion of users with check-in quantity biases ranging from 20% to 80%, while the Facebook-Twitter dataset fell somewhere in between. Regarding the imbalance in check-in time, the distribution of check-in time bias across the three datasets was similar overall. Approximately 25% of users had a check-in time bias within 10% across different social networking sites, while 40% had a bias exceeding 80%, and over 60% of users had a bias exceeding 50%. Therefore, all three datasets demonstrated imbalances in check-in quantity and asymmetry in check-in time across different social networks, with a significant portion of users exhibiting extremely high bias (over 80%), posing a considerable challenge to user matching based on check-in records.

[0136] To compare the technical effects, this experiment used the UIDwST algorithm (see the literature "Gao X, JiW, Li Y, et al. User Identification with Spatio-Temporal Awareness across SocialNetworks[C] / / the 27th ACM International Conference.ACM,2018.") as the comparison method, and used accuracy and F1-scores as performance evaluation indicators.

[0137] Figure 4 This is a comparison chart of the accuracy of the present invention and the comparison method on three datasets. Figure 5 This is a comparison chart of the F1-scores of the present invention and the comparison method on three datasets. For example... Figure 4 and Figure 5 As shown, the accuracy of this invention is about 5% higher on average than the UIDwST algorithm, and the F1-scores are about 5% higher on average. The above indicators show the greatest difference in the GPlus-Twitter dataset. This is because the proportion of users with high bias is relatively high in this dataset, and the overall user check-in data is more biased. Therefore, the difference between this invention and the UIDwST algorithm is more evident in this dataset.

[0138] The test results show that the UIDwST algorithm's F1-score is lower than that of this invention on all three datasets, with the most significant difference observed on the GPlus-Twitter dataset. The reason for this is that the inherent bias in the check-in data negatively impacts the algorithm's judgment. This is because a certain proportion of user check-ins exhibit significant bias in each dataset. In such cases, this invention effectively resists imbalances in the number of check-ins and asymmetries in check-in time, effectively identifying positive examples with higher bias. However, the UIDwST algorithm fails to work well on biased data, causing some positive examples with significant bias to fail the algorithm and be incorrectly identified as negative examples. Only positive examples with less bias are correctly identified, leading to a decrease in the algorithm's recall. Since F1-scores are a combination of precision and recall, the algorithm's F1-score also decreases, and this effect is more pronounced the stronger the bias in the user check-in data. Therefore, the UIDwST algorithm has the lowest precision and F1-scores on the GPlus-Twitter dataset. Based on the two metrics mentioned above, the present invention outperforms the comparison algorithm on all three datasets, and its resistance to data bias is superior to that of the comparison algorithm.

[0139] Although the illustrative specific embodiments of the present invention have been described above to enable those skilled in the art to understand the invention, it should be understood that the invention is not limited to the scope of the specific embodiments. For those skilled in the art, various changes are obvious as long as they are within the spirit and scope of the invention as defined and determined by the appended claims, and all inventions utilizing the concept of the present invention are protected.

Claims

1. A social network user matching method based on grid clustering and spatiotemporal features, characterized in that... Includes the following steps: S1: When it is necessary to manage two users belonging to two different social networks A and B. When performing user matching, record the user pair as Several pairs of users known to be the same user are obtained from two social networks as seed user pairs, with a matching score of 1. Then, a user belonging to social network A is randomly paired with another user belonging to social network B from the seed user pairs to obtain negative example user pairs, with a matching score of 0. Both the seed user pairs and the negative example user pairs are used as sample user pairs, and the number of sample user pairs is denoted as M. The m′-th sample user pair... Users belonging to social network A are In the m′-th sample user pair, the users belonging to social network B are: For each user Retrieve the set of check-in records posted by this user on their respective social networks. Each sign-in record in the sign-in record collection is recorded as follows: in Indicates user The coordinates of longitude and latitude in the j-th check-in record. Indicates user The timestamp in the j-th check-in record Indicates user check-in record collection The number of check-in records in the system; S2: Obtain the qualified grid clusters for each user based on grid clustering. The specific method includes the following steps: S2.1: [User] check-in record collection The results are obtained by merging the records into set S0. The minimum longitude value lon is then obtained from all the check-in records in set S0. min Maximum longitude (lon) max and latitude minimum value lat min Maximum latitude lat max Then longitude lon min -▽ lon to lon max +▽ lon latitude min -▽ lat to lat max +▽ lat The area is designated as a public area, where ▽ lon Indicates the preset longitude deviation, ▽ lat This indicates the preset latitude deviation; S2.2: Divide the latitude and longitude of the common area obtained in step S2.1 into K equal intervals to obtain a result containing K. 2 A grid array of grids, then for each set of check-in records Determine the set of sign-in records The number of check-in records in each grid is used as the user's score. The check-in density is determined for each grid; grids with a check-in density greater than 0 are considered valid grids. For each user, valid grids are selected to construct a grid set, and the user is recorded. The effective number of grids is The resulting mesh set is in Indicates user The coordinates of the d-th valid grid in the grid array. Indicates user The sign-in density of the d-th valid grid; S2.3: For each user Based on coordinates, the grid set Cluster all grids in the array, and denote the number of grid clusters obtained from the clustering as . Let the set of grid clusters be . in Indicates user The q-th grid cluster, S2.4: For each user The corresponding set of grid clusters Each grid cluster was calculated Chinese users The average sign-in density is used as the grid cluster. Sign-in density Determine the check-in density If so, then determine the mesh cluster. If it is a qualified grid cluster, otherwise record it with the user. Belonging to the same user users Its grid set is For users Each grid cluster Computational grid clusters Each grid and grid set The coordinate distance between each grid cell in the grid array is used to determine if any pair of grid cells is less than a preset threshold, thus identifying the grid cluster. If it is a qualified mesh cluster, otherwise it is considered a mesh cluster. Not a qualified grid cluster; User records The corresponding set of qualified grid clusters is in Indicates user The v-th qualified grid cluster, Indicates the number of qualified grid clusters; S3: Extract spatiotemporal features from user check-in records, including user check-in stability, user check-in preference time, and user trajectory anchor points. The extraction method for each spatiotemporal feature is as follows: 1) User check-in stability: For each user From all its check-in records Extract timestamp sequence Calculate the time difference between two adjacent timestamps. Obtain the time difference sequence Calculate time difference series coefficient of variation As a user The stability of the sign-in process; 2) User check-in preference time: Divide each day into H time intervals, and for each user... Based on its timestamp sequence Get the number of check-ins for each time interval. Sort the time intervals by the number of check-ins from largest to smallest, and select the Z time intervals with the most check-ins as users. The check-in preference time is denoted as follows: 3) User trajectory anchor points: For users and users Record its timestamp sequence and For any two timestamps and in If satisfied Δt represents a preset time difference threshold; if so, the timestamp is determined. and For a valid timestamp pair, use this timestamp pair. Stored as trajectory anchor points in timestamp pair set T m,pair If the condition is met, no action will be taken; otherwise, no action will be taken. S4: Calculate the multi-attribute similarity of user pairs, including user qualified grid cluster similarity, user check-in stability similarity, user check-in preference time similarity, and user trajectory anchor point similarity. The specific calculation method for each attribute similarity is as follows: 1) User-qualified grid cluster similarity: For users Obtain its qualified grid cluster set Number of grids contained in when Allow users user Number of grids Otherwise, it will make users user Number of grids Calculate users qualified grid clusters Each grid to the user The shortest distance for each qualified grid cluster is denoted as ω. m,y y = 1, 2, ..., Y m The deviation vector is obtained. Then, the user is calculated using the following formula. The similarity between qualified mesh clusters, Sim_G m : Where e represents the natural constant, Dis_G m Indicates user The distance between qualified grid clusters is calculated using the following formula: ε m,y Represents the deviation component ω m,y The weight of is calculated using the following formula: in, Indicates a qualified grid cluster The check-in density of the y-th grid is Indicates a qualified grid cluster The sign-in density of the qualified grid cluster to which the y-th grid belongs; 2) User check-in stability similarity: For users Its check-in stationarity similarity Sim_CV m The calculation formula is as follows: 3) User check-in time similarity: For users The similarity of their check-in preference times (Sim_t) m The calculation formula is as follows: in: 3) User trajectory anchor point similarity: For users Its user trajectory anchor point similarity Sim_anc m The calculation formula is as follows: Among them, |T m,pair | Represents a set of timestamp pairs T m,pair The number of timestamp pairs in the data. Represents the set T of timestamp pairs m,pair The first in A timestamp pair Indicates the first When two timestamps are in a timestamp pair, the user The distance between the coordinates is The preset distance function; S5: Construct a user matching model according to actual needs. Its input is the similarity of the user's four attributes, and its output is the user's matching score. S6: Assign each sample user pair The similarity of the four attributes is used as the input of the user matching model, and the corresponding matching score is used as the expected output of the user matching model. The user matching model is trained to obtain the trained user matching model. S7: Matching users The four attribute similarity inputs are used in step S6 to train the user matching model and obtain the user's similarity. The matching score is used to determine the user's match score. If the matching score is greater than a preset threshold, the user... Match successful, belongs to the same user; otherwise, user. Match failed.

2. The social network user matching method according to claim 1, characterized in that, In step S2.1, the longitude deviation ▽ lon Latitude deviation ▽ lat Calculate using the following formulas respectively:

3. The social network user matching method according to claim 1, characterized in that, The specific steps of grid clustering in step S2.3 include: S3.1: Initialize the mesh set Mesh Cluster Set Temporary mesh clusters Add the flag Update=1 to the grid; S3.2: Determine if it is the current mesh set If not, proceed to step S3.3; otherwise, the grid clustering process ends. S3.3: Determine if it is a temporary mesh cluster If yes, proceed to step S3.4; otherwise, proceed to step S3.

6. S3.4: From the current grid set Randomly select a grid and add it to the temporary grid cluster. And remove the grid from the temporary grid cluster Delete it and proceed to step S3.5; S3.5: Determine if it is a mesh set If not, proceed to step S3.6; otherwise, proceed to step S3.

8. S3.6: For the current mesh set Each grid in Calculate its relationship with temporary mesh clusters The coordinate distance of each grid cell in the grid array, if relative to the grid... With temporary grid clusters If the coordinate distance of each grid cell in the grid array is less than a preset threshold, then the grid cell will be... Add temporary mesh cluster Otherwise, no action will be taken; Temporary mesh clusters during this round of mesh addition If a new grid needs to be added, set the grid addition flag Update = 1; otherwise, set the grid addition flag Update = 0. S3.7: Determine whether the grid has been added with the flag Update=1. If yes, return to step S3.5; otherwise, proceed to step S3.

8. S3.8: Temporary mesh cluster Added as a mesh cluster to the mesh cluster collection Then clear the temporary mesh cluster. Return to step S3.

2.

4. The social network user matching method according to claim 1, characterized in that, The distance function in step S4 The calculation formula is as follows: Where γ represents the preset tolerance coefficient.

5. The social network user matching method according to claim 4, characterized in that, The formula for calculating the tolerance coefficient γ is as follows: in, Indicates user Time difference The two corresponding timestamps and The distance between the coordinates at the time.

6. The social network user matching method according to claim 1, characterized in that, The user matching model in step S5 adopts the following formula model: score m =Sim_anc m [α1·Sim_G m +α2·Sim_t m +α3·Sim_CV m Where α1, α2, and α3 are the weight parameters to be learned.

Citation Information

Patent Citations

  • User behavior similarity mining method based on space-time mode

    CN103942310A

  • Social network user position feature extraction method and device based on Mean shift and K-means clustering

    CN112287247A