Trajectory data may suffer from missing locations due to environmental and equipment constraints, which impact the performance of downstream tasks. Trajectory recovery aims to enhance the utility of mobility data by reconstructing high-quality trajectories. However, existing methods face two significant limitations. First, most existing methods rely on individual historical trajectories, making it difficult to exploit global spatial dependencies across the population. Second, current approaches ignore the role of local multi-factor semantics in personalized trajectory recovery. To address the above challenges, we propose a joint trajectory recovery method named GLTrajRec, which integrates global spatial dependencies and local multi-factor semantics. Specifically, global trajectory flow graph modeling is proposed to capture shared mobility patterns from all users’ trajectories, which can provide effective spatial transition constraints even when individual historical data is insufficient. Then, multi-factor local semantics embedding is designed to comprehensively encode multi-dimensional personalized mobility information from multiple aspects, enabling more accurate personalized recovery results. In addition, a Transformer-based encoder–decoder framework is developed to bidirectionally encode the embedded global dependencies and local semantics and to decode multi-class information. Finally, we construct a transition matrix based on the global trajectory flow graph to improve the accuracy of the recovery output. Extensive experiments conducted on two real-world datasets demonstrate that the proposed method achieves mean average precision (MAP) scores of 0.7181 and 0.7345, respectively, representing an improvement of approximately 5% to 7% over traditional trajectory recovery methods.
Recognizing functionally cohesive building groups is crucial for urban analysis, geospatial intelligence, and smart city applications. Traditional methods rely heavily on geometric information and often overlook the functional and semantic coherence of buildings, leading to their incorrect recognition. To overcome these challenges, this study introduces a flow-based community search approach, which models morphological, functional, and spatial relationships with a graph-based representation. The approach consists of graph representation learning, flow-based community generation, and community quality assessment, enabling adaptive building group recognition based on both structural coherence and functional similarity. Experimental results on commercial complex recognition demonstrate that our approach consistently outperforms traditional methods, achieving an improvement of over 5.4% in F1 score compared to the second-best method. Furthermore, its strong performance on limited training datasets highlights its robustness. These findings establish the proposed approach as an effective and reliable tool for recognizing functionally cohesive building groups, with practical viability in urban planning and policy formulation.