## 1 Introduction
For example, Heterogeneous Graph Neural Network (Heter-GCN) [20] and Walk2 Friends [21] mainly use simple heterogeneous graphs with limited connection types to model relationships in LBSNs, There is no modeling of edge attribute information, neglecting geographical and temporal information. Therefore, they fail to represent the complexity and diversity of relationships in the real world. Multi-View Matching Network (MVMN) [22] distinguishes between social networks and user trajectories, ignoring the importance of spatiotemporal information in user trajectories for predicting friend links. Additionally, many graph models, such as Graph SAmple and aggregate (GraphSAGE) [23], focus on extracting node-level features while overlooking edge features closely related to link prediction tasks. Graph Attention Network (GAT) [24] introduces an attention mechanism based on GNN to effectively capture node dependencies and performs well in multitask settings but is not suitable for heterogeneous graphs. Heterogeneous Graph Attention Network (HAN) [25], although introducing both node-level and semantic-level attention mechanisms to learn node importance and metapaths, still faces challenges in fully capturing the rich semantic information in heterogeneous graphs. Motif-Based Heterogeneous Graph Attention Network (MBHAN) [26] incorporates a motivational-level attention mechanism to learn global node information in heterogeneous graphs and the impact of node types on downstream tasks, but such methods still struggle to distinguish the semantic differences between edges and nodes when handling heterogeneous graphs in LBSNs. As a result, they are susceptible to irrelevant information, which negatively impacts their performance in tasks like friend link prediction. For LBSNs, which contain rich spatiotemporal and semantic information in heterogeneous graphs, existing methods often fail to simultaneously consider time, location, and social relationships, making it difficult to efficiently extract valuable information. To overcome the limitations of these methods, this paper proposes the Heterogeneous Graph Attention Network model based on Lite-GRU embedding and VAE enhancement. The model aims to combine graph embedding and deep learning techniques to optimize data processing and friend link prediction in LBSNs. The main contributions of this paper are as follows:  
* **Heterogeneous Graph Construction:** In response to the difficulty of processing rich heterogeneous data in LBSNs and the challenge that traditional graph models face in balancing complexity and information extraction, this paper proposes a heterogeneous graph model consisting of two types of nodes and three types of edges. This model can extract topological and semantic information from the network, enabling a better understanding and utilization of the complex structure in LBSNs. * **Node Feature Embedding Learning Module:** To address the difficulty of extracting precise and effective node features from the complex spatiotemporal data in Location-Based Social Networks (LBSNs), a strategy combining Skip-Gram and Lite-GRU is employed. Skip-Gram effectively captures the contextual relationships between POIs. In this paper, user trajectories are divided by day. Considering that sub-trajectory nodes are relatively few and contain dependencies, Lite-GRU, with its simplified gating mechanism, offers superior computational efficiency compared with LSTM and Transformer models. Unlike the bidirectional structure of BiLSTM, Lite-GRU uses unidirectional information flow, avoiding redundant information, and is more suited to the non-sequential nature of check-in behavior. While Transformer has advantages in modeling long sequences, its dense positional encoding mechanism can lead to overfitting under sparse data and cold start problems. In contrast, Lite-GRU handles temporal dependencies more effectively through a dynamic gating mechanism.