Dynamic link prediction method and device for graph data modeling

By combining GAT, Transformer, and fully connected layer models, the problems of high computational complexity and vanishing gradients in existing methods are solved, achieving efficient and accurate link prediction in dynamic networks.

CN121786231APending Publication Date: 2026-04-03HENAN NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing static and dynamic graph link prediction methods suffer from high computational complexity and severe gradient vanishing problems when dealing with complex networks. They are unable to effectively capture the dynamic changes of nodes and edges, and cannot make full use of historical information for accurate prediction.

Method used

A combined model of GAT, Transformer, and fully connected layers is adopted. The self-attention mechanism is used to capture graph structure information, Transformer is used for time series modeling, and dynamic link prediction is performed by combining node centrality features and topological similarity.

Benefits of technology

It improves the accuracy and stability of link prediction, reduces computational complexity, enhances model training efficiency and applicability, and enables accurate prediction in dynamic networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121786231A_ABST
    Figure CN121786231A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of dynamic network link prediction, and particularly relates to a dynamic link prediction method and device for graph data modeling. The method comprises the following steps: firstly, acquiring a dynamic graph containing a plurality of nodes, and generating a feature matrix of each node in the dynamic graph; inputting the feature matrix of each node into a trained link prediction model, and predicting to obtain potential edges in the dynamic graph; the link prediction model comprises a GAT, a Transform and a full connection layer, and the GAT is used for processing input of the link prediction model by using a self-attention mechanism to adaptively learn node neighborhood features so as to capture local features in a dynamic graph; the Transform is used for processing the characteristics output by the GAT by utilizing an attention mechanism to carry out time sequence modeling so as to capture the long-time dependency relationship of the node along with the time change, and the full connection layer is used for mapping the output of the GAT and the Transform to a link prediction result. According to the method, graph structure information and time sequence features can be integrated, the training efficiency of the model is greatly improved, and the accuracy and stability of link prediction are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of dynamic network link prediction technology, specifically relating to a dynamic link prediction method and apparatus based on graph data modeling. Background Technology

[0002] With the rapid development of network science and information technology, the analysis of graph-structured data has become a core task in many fields, including social networks, transportation networks, and financial transaction networks. Among these tasks, link prediction is a key problem in graph analysis. Link prediction refers to predicting whether a connection will be formed between two nodes in a network, predicting whether there are potential connections between pairs of nodes in the graph, or predicting unobserved edges.

[0003] Most current link prediction methods still rely on static networks, assuming that the network structure remains unchanged during the prediction process. However, many real-world networks exhibit significant dynamic evolution, and the static network assumption limits the applicability of link prediction. Static methods typically depend on global similarity or local neighborhood relationships for prediction, ignoring node importance, dynamic structural changes, and multi-scale topological relationships. They fail to capture the temporal evolution patterns of nodes, resulting in limited prediction performance, especially when dealing with complex network evolution, and struggle to effectively capture long-term trends and sudden events. In short, static models are ill-suited to rapidly changing network environments, such as the sudden spread of hotspots in social networks, market fluctuations in financial networks, and sudden congestion in transportation networks.

[0004] Furthermore, existing dynamic graph link prediction methods typically rely on gated recurrent units (GRUs) or long short-term memory (LSTM) neural networks for temporal modeling. However, these recurrent neural network (RNN) structures suffer from the vanishing gradient problem, making it difficult to retain long-term dependency information. Many dynamic graph methods rely on time snapshots for modeling, but this method can only roughly model temporal information and cannot fully utilize historical information to predict future links. It is also difficult to accurately capture the dynamic changes of nodes and edges, especially in terms of changes in node activity, attribute changes, and the dynamic evolution of edge relationships.

[0005] Furthermore, traditional dynamic graph modeling methods suffer from high computational complexity and gradient vanishing / exploding problems, especially when dealing with large-scale network data, i.e., when the number of nodes is huge, the training difficulty and computational cost increase significantly, making it difficult to effectively train and maintain high accuracy. Existing RNN-based methods (such as GRU), due to their sequential processing method, cannot fully utilize the parallel computing capabilities of modern Graphics Processing Units (GPUs), resulting in long training times. Moreover, they only focus on topological structure, ignoring the interactions between node attributes, centrality features, and temporal dependencies, often failing to effectively integrate long-term temporal information, leading to unstable prediction results. Summary of the Invention

[0006] The purpose of this invention is to provide a dynamic link prediction method and apparatus for graph data modeling, so as to solve the problems of high computational complexity and difficulty in maintaining high computational accuracy caused by traditional dynamic graph modeling methods.

[0007] To address the aforementioned technical problems, this invention provides a dynamic link prediction method for graph data modeling, comprising the following steps:

[0008] 1) Obtain a dynamic graph containing multiple nodes and generate a node feature matrix for each timestamp of the dynamic graph;

[0009] 2) Input the node feature matrix under each timestamp into the trained link prediction model to predict the potential edges in the dynamic graph;

[0010] The link prediction model includes GAT, Transformer, and a fully connected layer. GAT is used to process the input of the link prediction model using a self-attention mechanism to adaptively learn the neighborhood features of nodes and thus capture local features in the dynamic graph. Transformer is used to process the features output by GAT using an attention mechanism to perform time series modeling and thus capture the long-term dependencies of nodes over time. The fully connected layer is used to map the outputs of GAT and Transformer to the link prediction results.

[0011] Furthermore, the feature matrix of each node is obtained by aggregating the centrality features of each node and the strength of the relationship between node pairs.

[0012] Furthermore, the centrality feature of each node is obtained by comprehensively considering at least two of the following features: degree centrality, proximity centrality, betweenness centrality, and eigenvector centrality.

[0013] Furthermore, the comprehensive consideration method is as follows: the various features of a node are weighted and summed, and the summation result is the centrality feature of that node.

[0014] Furthermore, the aggregation method is as follows: an N×1 centrality feature matrix is ​​obtained based on the centrality feature of each node, where N is the number of nodes; an N×N similarity feature matrix is ​​obtained based on the strength of the relationship between node pairs; the similarity feature matrix and the centrality feature matrix are multiplied to achieve aggregation, thereby obtaining the node feature matrix.

[0015] Furthermore, the strength of the relationship between node pairs is obtained using the RA algorithm.

[0016] Furthermore, the fully connected layer has a five-layer structure. The first layer is used for feature dimensionality reduction and feature extraction, the second and fourth layers are non-linear activation function layers, the third layer is used for feature dimensionality reduction, and the fifth layer is used for output results.

[0017] To address the aforementioned technical problems, the present invention also provides a dynamic link prediction device for graph data modeling, comprising a processor for executing a computer program to implement the steps of the dynamic link prediction method for graph data modeling described above.

[0018] Its beneficial effects are as follows: This invention is an improved invention. It improves the link prediction model, which includes GAT, Transformer, and fully connected layers. It combines GAT and Transformer to model node features and temporal data, enabling more effective modeling of temporal dependencies in dynamic networks and improving the applicability of link prediction. Specifically, it dynamically weights neighbor information through the attention mechanism of GAT, and uses Transformer to replace traditional recurrent neural networks such as GRU and LSTM for temporal modeling. By utilizing the global self-attention mechanism of Transformer to capture long-term dependencies, it can more effectively model dynamic graph data, support parallel computing, improve temporal modeling capabilities, significantly improve model training efficiency, reduce computational overhead, and improve the accuracy and stability of link prediction. Finally, it uses fully connected layers to map to the final link prediction result, improving the model's expressive power and enabling it to simultaneously integrate graph structure information and temporal features to make accurate predictions. Attached Figure Description

[0019] Figure 1 This is a diagram illustrating the overall technical framework of the dynamic link prediction method for graph data modeling of the present invention.

[0020] Figure 2 This is a flowchart of the dataset partitioning process of this invention;

[0021] Figure 3 This is a schematic diagram of node feature aggregation according to the present invention;

[0022] Figure 4 This is a schematic diagram of the feature aggregation process of the present invention;

[0023] Figure 5 This is a model optimization framework diagram of the present invention;

[0024] Figure 6 This is a schematic diagram of the model evaluation of the present invention. Detailed Implementation

[0025] This invention improves the link prediction model used for link prediction by adopting a framework of "graph attention mechanism + attention-based deep learning model + fully-connected layer". The graph attention network (GAT) is used to process the input of the link prediction model using a self-attention mechanism to adaptively learn the neighborhood features of nodes, thereby capturing local features in the dynamic graph. The attention-based deep learning model (specifically, a Transformer) is used to process the features output by the GAT using the attention mechanism to perform time series modeling, thereby capturing the long-term dependencies of nodes changing over time. The fully-connected layer (FCL) is used to map the outputs of the GAT and Transformer to the link prediction results. The GAT efficiently captures graph structure information (such as node paths and relationships) and dynamically adjusts the influence weights of neighboring nodes; the Transformer is used for time series modeling, enabling the model to learn more comprehensively the dynamic features of network changes; and the fully-connected layer enhances the model's expressive power, allowing it to simultaneously integrate graph structure information and time series features to make accurate predictions.

[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings.

[0027] This invention proposes a dynamic link prediction method based on graph data modeling. This method replaces the traditional GRU with a Transformer structure for temporal modeling and integrates the self-attention mechanism of GAT, the nonlinear feature mapping capability of fully connected layers, and network features such as weighted centrality and topological similarity. This allows the model to comprehensively consider multi-dimensional information such as network structure, node importance, topological similarity, and temporal evolution, thereby improving the accuracy and robustness of link prediction in dynamic networks. The following section introduces some abbreviations and key terms used in this implementation.

[0028] GAT is a graph neural network that uses a self-attention mechanism to weight neighbor nodes. Unlike graph convolutional networks (GCNs) which use equal weighting, GAT aggregates information by learning the weights (attention coefficients) of its neighbors.

[0029] Transformer: Transformer is a very powerful method in time series modeling. It uses a self-attention mechanism to model the information of each time step in the sequence, overcoming the limitations of traditional RNN models in long sequence learning.

[0030] Fully connected layer: This is a type of layer in a neural network, usually referring to a fully connected layer. In a fully connected layer, each input node is connected to every output node.

[0031] Resource Allocation Index (RA): Resource allocation is a method in link prediction based on the idea that the strength of the relationship between two nodes depends on the number of their common neighbors.

[0032] The overall technical framework diagram of the dynamic link prediction method for data modeling in this figure is as follows: Figure 1 As shown below, the entire process will be described in detail.

[0033] Step 1: Data loading and processing.

[0034] Obtain the dynamic graph dataset and divide it into three columns. The first two columns represent two nodes and edges, and the third column represents the snapshot timestamp.

[0035] Step two involves splitting the node features and labels into training and testing sets based on time. The data is then divided into training samples and corresponding labels according to the time series sequence, as follows: Figure 2 As shown.

[0036] Step 3: Calculate the node feature matrix for each timestamp.

[0037] Specifically, the node feature matrix is ​​obtained by aggregating the centrality features of each node and the strength of the relationships between node pairs. For example... Figure 4 As shown, the specific process is as follows:

[0038] 1) Calculate the centrality feature of each node at different timestamps.

[0039] The centrality of each node is obtained by considering at least two of the following features: degree centrality, closeness centrality, betweenness centrality, and eigenvector centrality.

[0040] To enhance the model's characterization of node importance and improve link prediction accuracy, such as Figure 3As shown, this embodiment considers all four features to obtain the centrality feature of each node. The specific calculation method for each feature is as follows:

[0041] ① Degree centrality measures the number of connections between nodes:

[0042]

[0043] In the formula, Represents a node Degree centrality, Represents a node The degree, It represents the total number of nodes in the graph.

[0044] ② Proximity centrality is a measure of the average distance of a node to all other nodes:

[0045] ,

[0046] In the formula, Represents a node Proximity centrality; This represents the total number of nodes in the graph; It is a node To the node The shortest path length; i≠j.

[0047] ③ Betweenness centrality measures the degree to which a node acts as a mediator between other pairs of nodes:

[0048]

[0049] In the formula, Represents a node betweenness centrality, It is a node and nodes The number of shortest paths between them Represents a node To the node The shortest path passes through the nodes The quantity.

[0050] ④ Eigenvector centrality measures the influence of nodes using the eigenvectors of a graph:

[0051]

[0052] In the formula, Represents a node eigenvector centrality; It is the adjacency matrix of the graph The element, if the node and nodes If connected, then ,otherwise ; It is a node eigenvectors; It is an adjacency matrix The largest eigenvalue.

[0053] Furthermore, the specific comprehensive consideration method involves weighted summation of the four features, and the specific calculation formula is as follows:

[0054]

[0055] In the formula, Represents a node The centrality feature of is one-dimensional; , , and All represent weights.

[0056] Then, a centrality feature matrix is ​​formed based on the centrality features of each node. The dimension is (N,1), where N represents the number of nodes and the centrality feature matrix. A single row in the table represents the centrality feature of a node.

[0057] 2) Calculate the strength of the relationship between node pairs.

[0058] This implementation uses topological similarity to represent the strength of the relationship between node pairs. Specifically, the Raman Array (RA) algorithm is used to capture the edge features of the network to obtain the similarity feature matrix S. The focus is on studying the shortest paths between nodes, as longer paths provide less meaningful information. The specific expression for the RA algorithm is:

[0059]

[0060] In the formula, Represents a node and nodes The RA index, Represents a node and nodes The set of common neighbors, Indicates the degree of common neighbors.

[0061] Then, based on the relationship strength between the above node pairs, a similarity feature matrix can be obtained. Each element in the similarity feature matrix is ​​the relationship strength between any two node pairs, and its size is N×N.

[0062] 3) Aggregate the centrality features of each node and the strength of the relationship between node pairs to obtain the node feature matrix.

[0063] The polymerization process is as follows Figure 4 As shown, the similarity feature matrix (N×N) and the node centrality feature matrix (N×1) are directly multiplied to achieve aggregation. The aggregation result is an N×1 matrix, which is the node feature matrix.

[0064] By calculating the node centrality and the strength of relationships between node pairs in the graph, including direct connections and indirect connections through common neighbors, an aggregated node feature matrix is ​​extracted. Each timestamp of the graph is processed, and a feature matrix integrating multiple centrality measures and node relationship strengths is generated for each node. The node features at each timestamp are aggregated into a single feature matrix, and a node pair matrix is ​​generated by calculating the similarity of the adjacency matrix to capture the relationship features between different nodes. The aggregated feature matrix combines the temporal evolution information of the nodes and the graph structure information. The centrality features of nodes and the strength of node pair relationships are aggregated, and for each timestamp's feature matrix, normalization techniques are used to standardize the features, ensuring that the eigenvalues ​​are within the same range.

[0065] Calculate the adjacency matrix between nodes, and use the elements of the matrix to indicate whether there are edges between nodes. Finally, return the node feature matrix for each timestamp, which can be used for subsequent graph analysis or model training.

[0066] Step four: Combine GAT, Transformer, and fully connected layers to build a link prediction model, and use the data obtained in step three to train and test the model.

[0067] The constructed link prediction model comprises GAT, Transformer, and fully connected layers. GAT captures the structural information of the graph, Transformer models the temporal data, obtaining the temporal dependencies of the feature vectors at each time step, and the fully connected layers map the Transformer's output to the final link prediction result. Combining node features and edge relationship information, a model architecture based on GAT and Transformer is designed to capture the temporal evolution patterns of dynamic graphs and predict future changes in edge relationships. A relative temporal encoding mechanism is employed to enable Transformer to effectively model at different time steps, improving prediction accuracy.

[0068] The following example illustrates the specific processing procedure using a node count N (total_nodes in the code below) of 128:

[0069] First, we define the central feature of the node after the center vector fusion Z represents the central feature of the node. At this time, the feature dimension is (total_nodes, 1).

[0070] Secondly, it is input into the model:

[0071] self.GAT1 = Conv(in_feats=1, hidden_size=128, k=3), that is

[0072] # Output shape: (total_nodes, 128)

[0073] # The 1D feature of each node is mapped to 128 dimensions.

[0074] #The dimensions remain unchanged after passing through the transformer layer, then enter the MLP layer.

[0075] self.MLP = torch.nn.Sequential(

[0076] torch.nn.Linear(128, 64),# (total_nodes, 128) → (total_nodes,64)

[0077] torch.nn.ReLU(),

[0078] torch.nn.Linear(64, 32),# (total_nodes, 64) → (total_nodes, 32)

[0079] torch.nn.ReLU(),

[0080] torch.nn.Linear(32, out_feats)# (total_nodes, 32) → (total_nodes, total_nodes)

[0081] The fully connected layer can be composed of several stacked linear transformation layers (usually with activation functions such as ReLU or Sigmoid) to process the high-dimensional features of the graph and output the probability of edge existence. For each pair of nodes (i, j), the feature vectors at T time steps are processed through the linear transformation layer to obtain the link prediction output, which typically outputs a probability value representing the likelihood of the pair of nodes forming an edge in a future time step. Based on the temporal evolution of its node features, the model uses a Multi-Layer Perceptron (MLP) to generate prediction values, outputting whether the node pair will form an edge in the future (i.e., whether a link will occur). The prediction result is converted into a probability value through a Sigmoid activation function, and then a threshold function is used to convert the probability value into a binary label. The complete structure of a fully connected layer is usually composed of multiple linear transformation layers stacked together to form a multilayer perceptron. Each layer is followed by an activation function (such as ReLU, LeakyReLU) to introduce nonlinearity, thereby enhancing expressive power. Dropout is added after the hidden layer to randomly mask neurons to improve generalization and L2 regularization to prevent overfitting. Finally, the output layer uses Sigmoid to compress the result into probability values ​​(1 for values ​​greater than 0.5 and 0 for values ​​less than 0.5).

[0082] In this embodiment, the fully connected layer consists of five layers: the first layer performs feature dimensionality reduction and feature extraction; the second and fourth layers perform nonlinear activation; the third layer performs feature dimensionality reduction; and the fifth layer is the output layer, used to output the results. Linear transformation is performed using the Linear function, and the ReLU function introduces nonlinearity. Finally, the sigmoid function is used for normalization, and the output value of 0-1 represents the probability; a value greater than 0.5 is considered a future link, and a value less than 0.5 is considered a non-existent link.

[0083] like Figure 5 As shown, during training, mean squared error (MSE) is used as the loss function for forward propagation. AUC (area under the ROC curve) and precision are also calculated. The model updates parameters through gradient descent (backpropagation + Adam optimizer). During performance testing, the loss, AUC, and precision are calculated for each round, and the error rate is output. The model evaluation process is as follows: Figure 6 As shown. Of course, in addition to MSE, other loss functions can be added or other loss functions can be used directly, such as Mean Absolute Error (MAE), Cross Entropy, etc. Moreover, in addition to AUC and accuracy, other evaluation metrics can be added or other evaluation metrics can be used directly, such as Accuracy, F1 Score, etc.

[0084] Step 5: Obtain a dynamic graph containing multiple nodes, and generate a node feature matrix for each timestamp in the dynamic graph in the same way as in Step 3; then input the node feature matrix for each timestamp into the trained link prediction model obtained in Step 4 to predict the potential edges in the dynamic graph.

[0085] Thus, the dynamic link prediction method for graph data modeling of this invention is realized. In the specific processing, the graph data storage format can be optimized by using sparse matrix storage to reduce computational complexity, or distributed computing frameworks (such as PyTorch Distributed, DGL) can be used to support distributed training of large-scale dynamic graphs, further optimizing computational efficiency.

[0086] An implementation of a dynamic link prediction device for graph data modeling:

[0087] This invention discloses a dynamic link prediction device for graph data modeling, comprising a memory, a processor, an internal bus, and a computer program stored in the memory. The processor and the memory communicate and interact with each other via the internal bus. The processor executes the computer program to implement the steps of the method described in an embodiment of the dynamic link prediction method for graph data modeling of this invention. The processor can be a microprocessor (MCU), a field-programmable gate array (FPGA), or other processing devices. The memory can be various types of memory that store information using electrical energy, such as random access memory (RAM), read-only memory (ROM), or other types of memory.

[0088] In summary, the present invention has the following characteristics:

[0089] 1) This invention possesses highly efficient graph structure learning capabilities. Employing Gaussian Attention (GAT), this invention efficiently captures graph structure information (such as node relationships and paths) and dynamically adjusts the influence weights of neighboring nodes, effectively capturing the dynamic evolutionary relationships of complex networks. Compared to traditional Gaussian Convolutional Networks (GCNs), GAT adaptively allocates the importance of different neighbors through a self-attention mechanism, enabling link prediction tasks to deeply explore the potential connections and dependencies between nodes. Furthermore, GAT is suitable for handling dynamic network topologies that change over time; its attention mechanism enhances the model's learning ability in dynamic graphs, and GAT reduces graph computational complexity.

[0090] 2) This invention possesses more efficient time series modeling capabilities. It employs Transformer for time series modeling, utilizing a multi-head self-attention mechanism to capture long-term dependencies, enabling the model to more comprehensively learn the dynamic characteristics of network changes. Unlike traditional RNN or GRU structures, Transformer has stronger parallel computing capabilities, enabling it to handle dynamic changes over long time spans more efficiently, significantly optimizing the computational efficiency of dynamic graph modeling, and improving the accuracy and stability of link prediction.

[0091] 3) This invention possesses sophisticated feature fusion capabilities. It combines fully connected layers to enhance the model's expressive power, enabling it to simultaneously integrate graph structure information and temporal features for accurate predictions. The fully connected layers are primarily used in the model's output, leveraging non-linear activation functions to enhance the model's expressive power and performing more refined feature fusion from features extracted from GAT and Transformer.

[0092] 4) This invention enhances feature interaction capabilities. At different network layers, fully connected layers combined with the Transformer's multi-head attention mechanism can effectively capture complex interactions between different features, thereby enhancing the model's predictive ability. This interaction considers not only static topological features but also temporal dynamic features, making the model more expressive.

[0093] 5) This invention possesses accurate link prediction capabilities. This invention combines weighted centrality and topological similarity for link prediction, enabling the model to more accurately capture potential connections in dynamic networks. Weighted centrality measures the global and local influence of nodes at different time steps, improving the model's ability to identify node importance, increasing the accuracy of node feature extraction and the stability of edge relationship prediction, thus improving prediction accuracy. Topological similarity measures the degree of similarity between nodes in the network structure; combined with weighted centrality, this allows the model to discover potential "unconnected" node pairs, thereby improving the accuracy of link prediction.

[0094] 6) This invention can make full use of temporal information. The connection and node states in dynamic networks change over time. This invention uses Transformer for temporal modeling and combines it with GAT to capture the dynamic characteristics of the network topology, enabling the model to simultaneously focus on the static structural information of the graph and temporal evolution information, thereby making more accurate link predictions.

[0095] 7) This invention possesses stronger generalization capabilities. Combining graph structure and temporal features, this invention can adapt to topological changes in different networks, exhibiting strong generalization capabilities in various dynamic scenarios such as social networks, transportation networks, and financial transaction networks. Furthermore, it can further enhance generalization capabilities to adapt to different network topologies, and can be applied to different types of dynamic graphs such as scale-free networks and small-world networks, ensuring the model's adaptability to various network structures. It can also be optimized for different temporal variation patterns, such as periodic changes (seasonal trends) and sudden changes (social hotspot propagation), improving the model's predictive ability in complex temporally dynamic networks. It can also explore cross-domain applications, such as protein-protein interaction prediction in biomolecular networks and anomaly detection in financial transaction networks, expanding the model's application scope.

[0096] Specific implementation methods have been given above, but the present invention is not limited to the described implementation methods. The basic idea of ​​the present invention lies in the above basic scheme. For those skilled in the art, designing various modified models, formulas, and parameters based on the teachings of the present invention does not require creative effort. Changes, modifications, substitutions, and variations made to the implementation methods without departing from the principles and spirit of the present invention still fall within the protection scope of the present invention.

Claims

1. A dynamic link prediction method for graph data modeling, characterized in that, Includes the following steps: 1) Obtain a dynamic graph containing multiple nodes and generate a node feature matrix for each timestamp of the dynamic graph; 2) Input the node feature matrix under each timestamp into the trained link prediction model to predict the potential edges in the dynamic graph; The link prediction model includes GAT, Transformer, and a fully connected layer. GAT is used to process the input of the link prediction model using a self-attention mechanism to adaptively learn the neighborhood features of nodes and thus capture local features in the dynamic graph. Transformer is used to process the features output by GAT using an attention mechanism to perform time series modeling and thus capture the long-term dependencies of nodes over time. The fully connected layer is used to map the outputs of GAT and Transformer to the link prediction results.

2. The dynamic link prediction method for graph data modeling according to claim 1, characterized in that, The node feature matrix is ​​obtained by aggregating the centrality features of each node and the strength of the relationship between node pairs.

3. The dynamic link prediction method for graph data modeling according to claim 2, characterized in that, The centrality feature of each node is obtained by comprehensively considering at least two of the following features: degree centrality, proximity centrality, betweenness centrality, and eigenvector centrality.

4. The dynamic link prediction method for graph data modeling according to claim 3, characterized in that, The comprehensive consideration method is as follows: the various features of a node are weighted and summed, and the sum is the centrality feature of that node.

5. The dynamic link prediction method for graph data modeling according to claim 4, characterized in that, The aggregation method is as follows: an N×1 centrality feature matrix is ​​obtained based on the centrality feature of each node, where N is the number of nodes; an N×N similarity feature matrix is ​​obtained based on the strength of the relationship between node pairs. The similarity feature matrix and the centrality feature matrix are multiplied to achieve aggregation, thereby obtaining the node feature matrix.

6. The dynamic link prediction method for graph data modeling according to claim 2, characterized in that, The strength of the relationship between node pairs is obtained using the RA algorithm.

7. The dynamic link prediction method for graph data modeling according to claim 1, characterized in that, The fully connected layer has a five-layer structure. The first layer is used for feature dimensionality reduction and feature extraction, the second and fourth layers are non-linear activation function layers, the third layer is used for feature dimensionality reduction, and the fifth layer is used for output results.

8. A dynamic link prediction device for graph data modeling, comprising a processor, characterized in that, The processor is used to execute a computer program to implement the steps of the method as described in any one of claims 1 to 7.