Social friend recommendation method based on spatio-temporal evolution
By using space-time evolution methods in dynamic social networks, combining graph convolutional neural networks and gray prediction models, three-dimensional data feature sequences are generated, which solves the problem of insufficient analysis of hidden spatial variables in the existing technology, and improves the accuracy of link prediction and Computational efficiency, suitable for dynamic graph embedding and conceptual representation.
Patent Information
- Application Number
- CN202411152668.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-17
AI Technical Summary
The prior art fails to fully analyze hidden spatial variables in dynamic social networks, resulting in insufficient feature information in link prediction tasks, complex model structure and low prediction accuracy.
Using the social friend recommendation method based on space-time evolution, the social network graph of historical moments is obtained, the adjacency matrix and user feature matrix are extracted, and the input graph convolution neural network is used for processing. Combining the multi-dimensional cloud model and gray prediction model, a three-dimensional data feature sequence is generated. , predict the development trend of user relationships and form a higher granularity hidden space concept distribution.
By introducing mutual mapping of the superentropy concept and cloud concept space, more graph structure data features are obtained, the loss problem during the training process is avoided, the prediction accuracy is improved, and there is good application prospect.
Smart Images

Figure CN119149987A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data mining, and in particular relates to a social friend recommendation method based on spatiotemporal evolution. Background Art
[0002] Generally speaking, real-world networks are often dynamic, with nodes and edges disappearing or appearing at different time points. For example, the number of people (nodes) and relationships (edges) in real-life social networks will increase or decrease over time, while in graph-structured networks, new nodes and edges will appear or disappear. Assume that at time t0, there is a relationship between B and C, and at time t1, the relationship between B and C is dissolved, and at time t2, A and D establish a new relationship. This shows that real networks are very complex. General static graph variational autoencoders only analyze the network at a certain snapshot (i.e., at a certain time). To know the network status at future moments, historical snapshots need to be included in the learning, not a single moment. The most commonly used method is to represent the dynamic network as a sequence of static network snapshots, calculate the embedding representation for each network snapshot, and then align the embeddings of all snapshots and map them to the same vector space. To achieve this, it is necessary to design a connection function that can find the final common embedding vector.
[0003] With the idea of decomposing a dynamic network into multiple static networks for embedding representation and finally integrating the vector space, a variety of dynamic network embedding methods have been developed based on this idea. The typical one is to combine the time series model with the graph convolutional neural network, such as the combination of LSTM, RNN and graph convolutional neural network. Most of these methods use the time series model to update the parameters of the graph convolutional neural network in order to obtain spatiotemporal feature information, but these methods usually do not conduct in-depth analysis of the variables in the latent space, and the model structure is relatively complex, resulting in insufficient latent variable feature information used in the downstream link prediction task, resulting in low prediction accuracy. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention proposes a social friend recommendation method based on spatiotemporal evolution, which includes:
[0005] S1: Obtain the social network graph at multiple historical moments and extract the adjacency matrix and user feature matrix;
[0006] S2: Input the adjacency matrix and user feature matrix into the graph convolutional neural network for processing to obtain the social space features of multiple snapshots;
[0007] S3: The social space features of multiple snapshots are processed using a multidimensional cloud model to obtain three digital feature sequences; the three digital feature sequences are represented as Ex, En and He respectively.
[0008] S4: The three digital feature sequences are processed using the grey prediction model to obtain the first development matrix and the second development matrix;
[0009] S5: predicting three digital feature sequences according to the first development matrix and the second development matrix to obtain three predicted digital features;
[0010] S6: Input the three predicted digital features into the decoder to obtain the predicted adjacency matrix, i.e., the friend recommendation result.
[0011] Preferably, the process of extracting the adjacency matrix and the user feature matrix includes: if there is interaction between users, it is determined that there is an edge between users, and an adjacency matrix is generated according to the interaction relationship between users; multiple feature attributes of users are obtained, and a user feature matrix is generated according to the multiple feature attributes of users.
[0012] Preferably, the graph convolutional neural network processes the adjacency matrix and the user feature matrix as follows:
[0013]
[0014] Among them, GCN (X l+1 ,A) represents the output of the network layer l, σ represents the activation function, X l represents the input of the network layer l, W l represents the weight parameter of the network layer l, A represents the adjacency matrix, represents the degree matrix.
[0015] Preferably, the process of processing the three digital feature sequences using the grey prediction model includes:
[0016] The single-dimensional grey prediction algorithm is used to process Ex and obtain the first development matrix;
[0017] The multi-dimensional grey prediction algorithm is used to process En and He to obtain the second development matrix.
[0018] Furthermore, the one-dimensional grey prediction algorithm is used to process Ex as follows:
[0019]
[0020] in, represents the first development matrix, B represents the sequence after modeling by the first-order differential method model GM(1,1), and Y represents the sequence Ex.
[0021] Furthermore, the multidimensional grey prediction algorithm is used to process En and He as follows:
[0022]
[0023] in, represents the second development matrix, P represents the sequence after being modeled by MGM(1,n), Represents the sequences En and He.
[0024] Preferably, the process of predicting the three digital feature sequences according to the first development matrix and the second development matrix includes:
[0025] According to the first development matrix, the sequence Ex is predicted as follows:
[0026]
[0027] in, represents the predicted expectation at the next moment, represents the snapshot sequence prediction expectation at the previous k+1 moments, represents the snapshot sequence prediction expectation of the previous k moments, express The ratio of the maximum value to the minimum value, n represents the number of snapshots;
[0028] According to the second development matrix, the sequence En and He are predicted as follows:
[0029]
[0030] in, represents the prediction variance at the next moment, represents the predicted super entropy at the next moment, represents the snapshot sequence variance at the previous k+1 moments, represents the snapshot sequence variance of the previous k moments, TEn k express The ratio of the maximum value to the minimum value, represents the super entropy of the snapshot sequence at the previous k+1 moments, represents the super entropy of the snapshot sequence at the previous k moments, THe k express The ratio of the maximum value to the minimum value, k Indicates the number of snapshots.
[0031] The beneficial effects of the present invention are as follows: the present invention expands the latent variable characteristics from two dimensions to three-dimensional data through a multidimensional cloud model, introduces the concept of super entropy, forms a mutual mapping between latent space and cloud concept space, obtains higher-granularity latent space concept distribution, obtains more graph structure data features, and is more in line with the requirements of real-life scenarios; the present invention predicts the three major cloud concept data features through a grayscale prediction algorithm, analyzes and predicts the data from a mathematical perspective, avoids the loss problem caused by the model during the training process, and proposes a new method for the combination of time series models and graph convolutional neural networks. The present invention can predict the development trend of user relationships by analyzing the interaction frequency and pattern between users, and can evaluate the influence of information in social networks by analyzing the propagation path and speed of information, and has good application prospects. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 This is the overall framework diagram of the variational autoencoder in the present invention;
[0033] Figure 2 A diagram of the multi-dimensional time-varying cloud modeling process in the present invention;
[0034] Figure 3 It is a flow chart for constructing the first development matrix in the present invention;
[0035] Figure 4 It is a flow chart for constructing the second development matrix in the present invention;
[0036] Figure 5 A forward propagation comparison diagram of the present invention and the comparative method;
[0037] Figure 6 It is a back propagation comparison diagram of the present invention and the comparative method. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] The present invention proposes a social friend recommendation method based on spatiotemporal evolution, the method comprising:
[0040] S1: Obtain the social network graph at multiple historical moments and extract the adjacency matrix and user feature matrix.
[0041] The social network graphs at multiple historical moments are obtained, each moment is a snapshot, and the character relationships between users (nodes) in the social network graph are abstracted as an adjacency matrix. If there is interaction between users, it is considered that there is an edge between the users. The user feature matrix is generated according to the attributes of the users (nodes).
[0042] S2: Input the adjacency matrix and user feature matrix into the graph convolutional neural network for processing to obtain the social space features of multiple snapshots.
[0043] The present invention designs a graph variational autoencoder based on spatiotemporal evolution, such as Figure 1 As shown in the figure, the adjacency matrix and the user feature matrix are processed by the graph variational autoencoder to predict the latent variable features at the final moment, and the prediction results are used for subsequent prediction tasks. The graph variational autoencoder includes a graph convolutional neural network and a time-varying cloud model.
[0044] The graph convolutional neural network consists of two layers, and the processing formula of each layer is expressed as:
[0045]
[0046] Among them, GCN (X l+1 ,A) represents the output of the network layer l, σ represents the activation function, X l Represents the input of the first layer of the network. The first layer network input is the user feature matrix, W l represents the weight parameter of the lth layer of the network, and A represents the adjacency matrix; represents the degree matrix,
[0047] The adjacency matrix and user feature matrix under each snapshot are respectively input into the graph convolutional neural network to obtain spatial structure information, that is, the three types of information of topological structure information, node attribute information and edge timing information of social space features in multiple snapshots are processed to obtain the social space features of multiple snapshots.
[0048] S3: The social space features of multiple snapshots are processed using a multidimensional cloud model to obtain three digital feature sequences; the three digital feature sequences are represented as Ex, En and He respectively.
[0049] The present invention uses a time-varying cloud model to process social space features. The time-varying cloud model includes a multidimensional cloud model and a gray prediction model. The time-varying cloud model predicts horizontal (spatial dimension) and vertical (time dimension) latent variables by integrating these two types of models. This ensures that the generated latent variable distribution is consistent with the graph network in the real world, thereby obtaining more accurate prediction results. Figure 2 As shown, taking the Ex sequence as an example, the development matrix is obtained through the one-dimensional grey prediction algorithm GM, and then Ex is obtained through the development matrix K+1 .
[0050] The multidimensional cloud model is responsible for the conceptual representation of each snapshot, expanding the original two-dimensional data features into three-dimensional data features in order to obtain more spatial data features. The multidimensional cloud model is responsible for using historical information to predict and dynamically represent each historical snapshot, and extract the final potential layer distribution from it, which includes both the structural information of the graph and reflects the dynamic changes of the graph.
[0051] The multidimensional cloud model expands the social space features of multiple snapshots from two-dimensional features to three-dimensional features, constructs the multidimensional normal cloud distribution of the social space at the historical snapshot moments, establishes the mapping relationship between the internal latent space and the conceptual space, and obtains three digital feature sequences Ex, En and He.
[0052] The overall form of the multidimensional cloud model in time includes:
[0053]
[0054] Among them, Encoder t Represents encoder, GCN Ex (X,A t ) represents the output expectation of the network layer l, GCN En (X,A t ) represents the output variance of the network layer l, GCN He (X,A t ) indicates that the output of the network layer l is facing upward, C t Represents the digital features at time t, latent space t Indicates that Ex t represents the expectation at time t, En t represents the variance at time t, He t represents the super entropy at time t.
[0055] The social space features are processed by the multidimensional cloud model to obtain three digital feature sequences, which are represented as Ex, En and He respectively.
[0056] S4: The three digital feature sequences are processed using a grey prediction model to obtain a first development matrix and a second development matrix.
[0057] The gray prediction model is responsible for connecting the spatial features of each snapshot in series. The process of processing the three digital feature sequences using the gray prediction model includes:
[0058] like Figure 3 As shown, the single-dimensional grey prediction algorithm GM is used to process Ex to obtain the first development matrix Specific:
[0059] (1) If Ex is a monotonic sequence, use GM(1,1) to calculate With the original sequence Ex (0) =Ex (0) (1),Ex (0) (2),...,Ex (0) (n)}, modeled by GM(1,1):
[0060]
[0061]
[0062] First Development Matrix
[0063]
[0064] in, represents the first development matrix, B represents the sequence after modeling by the first-order differential method model GM(1,1), and Y represents the sequence Ex.
[0065] It can be obtained by least squares estimation, Y and B are as follows:
[0066]
[0067] (2) If Ex is an oscillating sequence, GM(1,1) based on the oscillating sequence is used to calculate First, for Ex (0) = {Ex (0) (1),Ex (0) (2),…,Ex (0) (n)} to transform the acceleration exponential to make the oscillation sequence into a monotonically increasing sequence, denoted as The details are as follows:
[0068]
[0069] Afterwards Apply the geometric mean transformation to maintain the monotonicity of the original sequence, and the resulting sequence is recorded as Y (0) :
[0070] Y (0) ={y (0) (1),y (0) (2),...,y (0) (n)}
[0071] calculate:
[0072]
[0073] Where, Τ is Ex (0) Finally, take Y (0) Modeling GM(1,1) as a non-negative raw sequence yields the following equation:
[0074]
[0075]
[0076] Obtained by least squares estimation, where Y and B are as follows:
[0077]
[0078] like Figure 4 As shown, the multidimensional grey prediction algorithm is used to process En and He to obtain the second development matrix Specific:
[0079] (1) If En and He are both monotonic sequences, use MGM(1,1) to calculate The original data matrix is as follows:
[0080]
[0081] Model the original data matrix according to MGM(1,m):
[0082]
[0083] It can be obtained by least squares estimation:
[0084]
[0085] in,
[0086]
[0087] (2) If En and He are both oscillatory sequences, MGM(1,m) based on the oscillatory sequence is used to calculate First, the acceleration exponential transformation is performed to transform the oscillation sequence into a monotonically increasing sequence, which is recorded as and Then, the geometric mean generation transformation is performed to maintain the monotonicity of the original sequence, denoted as Y1 (0) and The details are as follows:
[0088]
[0089] Where T En and T He Yes(0) and He (0) The ratio of the maximum value to the minimum value in
[0090] Modeling as a raw data matrix:
[0091]
[0092] Obtained by least squares estimation, where:
[0093]
[0094] Parameter Matrix and parameter vector It is determined that:
[0095] S5: Predict the three digital feature sequences according to the first development matrix and the second development matrix to obtain three predicted digital features.
[0096] According to the first development matrix, the sequence Ex is predicted, specifically:
[0097] (1) If Ex is a monotone sequence, then the prediction formula of the matrix is.
[0098]
[0099] (2) If Ex is an oscillating sequence, then the prediction formula of the matrix is.
[0100]
[0101] final, Simplifying the two steps, we get the following equation:
[0102]
[0103] in, represents the predicted expectation at the next moment, represents the snapshot sequence prediction expectation at the previous k+1 moments, represents the snapshot sequence prediction expectation of the previous k moments, express The ratio of the maximum value to the minimum value, k Indicates the number of snapshots.
[0104] According to the second development matrix, the sequences En and He are predicted, specifically:
[0105] (1) If En and He are monotone sequences, then the matrix X(0) ={En (0) ,He (0)} T The prediction formula is:
[0106]
[0107] Among them, X (1) (1) = {En (1) (1),He (1) (1)} T .
[0108] (2) If En and He are oscillating sequences, then the matrix X (0) ={En (0) ,He (0)} T The prediction formula is:
[0109]
[0110] final, Two further simplification steps yield:
[0111]
[0112] in, represents the prediction variance at the next moment, represents the predicted super entropy at the next moment, represents the snapshot sequence variance at the previous k+1 moments, represents the snapshot sequence variance at the previous k moments, T En k express The ratio of the maximum value to the minimum value, represents the super entropy of the snapshot sequence at the previous k+1 moments, represents the super entropy of the snapshot sequence at the previous k moments, T He k express The ratio of the maximum value to the minimum value in the graph, and k represents the number of snapshots.
[0113] S6: Input the three predicted digital features into the decoder to obtain the predicted adjacency matrix, i.e., the friend recommendation result.
[0114] The decoder processes the three predicted digital features and outputs a predicted adjacency matrix and a predicted user feature matrix; the user's friend recommendation results can be obtained from the predicted adjacency matrix.
[0115] Evaluation of the present invention:
[0116] The present invention conducts experiments on the open source dataset Facebook (FB), which contains the interactive behaviors of users in online social networks. The nodes in the network are users, and the edges are the message relationships between users. The present invention is compared with the benchmark models DynAE, DynRNN, DynAERNN, EGCN-O, EGCN-H, VGAE, VGRNN, and SI-VGRNN, and the effectiveness of the method of the present invention is indirectly verified through the link prediction downstream task; secondly, through the model hyperparameters, it is verified that the method of the present invention has a faster training speed than ordinary time series models and graph convolutional neural networks.
[0117] The link prediction experiment is a typical graph embedding task. This paper uses AUC and AP as evaluation indicators, and uses their mean and standard error as experimental results. The hyperparameter setting refers to the baseline model. The sizes of the two-layer graph convolutional neural network used to extract the topological structure are d in_1 =128,d in_2 =64. The prior distribution is Ex pr =0,En pr =1,He pr =0.1. In other training parameter settings of the model of the present invention, the learning rate is set to 0.01, and the number of training rounds is 300. The loss function adopts KL divergence, and the experimental results are shown in Table 1.
[0118] Table 1 Experimental results of link prediction based on FB dataset
[0119]
[0120] The experimental results clearly reveal the performance differences of different methods on dynamic graph embedding and concept representation tasks. First, traditional deep learning techniques such as DynAE, DynRNN and DynAERNN have relatively low performance in extracting dynamic graph features. This is because these models fail to effectively capture the dynamic changes of temporal dependencies and graph structures when processing dynamic graph data. In contrast, the EGCN-O and EGCN-H models that introduce GCN show higher performance. This verifies that GCN is effective as the encoder part of the graph variational autoencoder, especially in capturing graph structure information. However, it is worth noting that the EGCN-O and EGCN-H models only consider the GCN parameters at each snapshot when processing dynamic graph data, without fully learning the temporal information. This may lead to limitations in the model in capturing the evolution of dynamic graph data, thus affecting its overall performance. Therefore, although EGCN-O and EGCN-H outperform traditional deep learning techniques in performance, they still fail to fully utilize the temporal information in dynamic graph data.
[0121] Among all the methods, the method of the present invention (VGAE-ST) has the highest AUC and AP scores. This result not only verifies the effectiveness of the present invention in processing dynamic graph data, but also demonstrates its universality on various types of graph datasets. The success of the model of the present invention lies in that it combines the advantages of graph variational autoencoders and temporal information, which can not only capture the static information of the graph structure and realize the conceptual representation of the graph, but also learn temporal dependencies and enhance the graph embedding ability.
[0122] In order to verify the acceleration effect of the model of the present invention, a hyperparameter experiment was conducted on the LANL dataset, such as Figure 5 , Figure 6 As shown, from the forward propagation and backward propagation results in the experiment, the model of the present invention exhibits a faster propagation speed than other benchmark models. This advantage shows that when processing dynamic graph data, the model of the present invention can not only perform well in capturing temporal dependencies and graph structure information, but also has significantly better computational efficiency than the model combining the GCN series and the RNN series. In addition, the rapid propagation of the model of the present invention also means that it can converge to the optimal solution faster during the training process, thereby saving a lot of computing resources and time costs. This advantage enables the model of the present invention to have broader application prospects in the fields of dynamic graph embedding and concept representation, and provides powerful tools and methods for research and practice in related fields.
[0123] The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A social friend recommendation method based on spatiotemporal evolution, characterized in that: include: S1: Obtain the social network graph at multiple historical moments and extract the adjacency matrix and user feature matrix; S2: Input the adjacency matrix and user feature matrix into the graph convolutional neural network for processing to obtain the social space features of multiple snapshots; S3: The social space features of multiple snapshots are processed using a multidimensional cloud model to obtain three digital feature sequences; the three digital feature sequences are represented as Ex, En and He respectively. S4: The three digital feature sequences are processed using the grey prediction model to obtain the first development matrix and the second development matrix; S5: predicting three digital feature sequences according to the first development matrix and the second development matrix to obtain three predicted digital features; S6: Input the three predicted digital features into the decoder to obtain the predicted adjacency matrix, i.e., the friend recommendation result.
2. The social friend recommendation method based on spatiotemporal evolution according to claim 1, characterized in that: The process of extracting the adjacency matrix and the user feature matrix includes: if there is interaction between users, it is determined that there is an edge between users, and an adjacency matrix is generated according to the interaction relationship between users; multiple feature attributes of users are obtained, and a user feature matrix is generated according to the multiple feature attributes of users.
3. The social friend recommendation method based on spatiotemporal evolution according to claim 1, characterized in that: The graph convolutional neural network processes the adjacency matrix and user feature matrix as follows: Among them, GCN (X l+1 ,A) represents the output of the network layer l, σ represents the activation function, X l represents the input of the network layer l, W l represents the weight parameter of the network layer l, A represents the adjacency matrix, represents the degree matrix.
4. The social friend recommendation method based on spatiotemporal evolution according to claim 1, characterized in that: The process of processing three digital feature sequences using the grey prediction model includes: The single-dimensional grey prediction algorithm is used to process Ex and obtain the first development matrix; The multi-dimensional grey prediction algorithm is used to process En and He to obtain the second development matrix.
5. The social friend recommendation method based on spatiotemporal evolution according to claim 4, characterized in that: The single-dimensional grey prediction algorithm is used to process Ex as follows: in, represents the first development matrix, B represents the sequence after modeling by the first-order differential method model GM(1,1), and Y represents the sequence Ex.
6. The social friend recommendation method based on spatiotemporal evolution according to claim 4, characterized in that: The multidimensional grey prediction algorithm is used to process En and He as follows: in, represents the second development matrix, P represents the sequence after being modeled by MGM(1,n), Represents the sequences En and He.
7. The social friend recommendation method based on spatiotemporal evolution according to claim 1, characterized in that: The process of predicting three digital feature sequences according to the first development matrix and the second development matrix includes: predicting the sequence Ex according to the first development matrix, the formula is: in, represents the predicted expectation at the next moment, represents the snapshot sequence prediction expectation at the previous k+1 moments, represents the snapshot sequence prediction expectation of the previous k moments, express The ratio of the maximum value to the minimum value, n represents the number of snapshots; According to the second development matrix, the sequence En and He are predicted as follows: in, represents the prediction variance at the next moment, represents the predicted super entropy at the next moment, represents the snapshot sequence variance at the previous k+1 moments, represents the snapshot sequence variance of the previous k moments, TEn k express The ratio of the maximum value to the minimum value, represents the super entropy of the snapshot sequence at the previous k+1 moments, represents the super entropy of the snapshot sequence at the previous k moments, THe k express The ratio of the maximum value to the minimum value, k Indicates the number of snapshots.
