GUO Xuan, ZHANG Jinxue, WEI Yibing, YU Shutong, LIU Junnan, LIU Haiyan, XU Daozhu, XU Mingliang
[Objectives] The trajectory knowledge graph effectively captures the deep semantic relationships between trajectories and geospatial entities, offering significant advantages in revealing complex associated information. However, traditional methods for constructing knowledge graphs from domain-specific data sources rely heavily on expert knowledge, involve extensive data preprocessing and entity-relationship extraction, and require high levels of professional expertise. [Methods] To address these challenges, this paper proposes a trajectory knowledge graph construction method that supports natural language-driven task execution through prompt learning with large language models. First, a prompt strategy for the preprocessing task is designed to guide large language models in automatically generating data processing code for cleaning abnormal trajectories. Second, a two-level system prompt strategy is developed to enable tool invocation by matching and calling the trajectory knowledge extraction tool. This strategy allows non-expert users to complete the graph construction process using simple natural language instructions, significantly reducing reliance on programming skills and deep semantic understanding. [Results] To evaluate the feasibility and effectiveness of the proposed prompt strategies, a set of test sentences was created for trajectory preprocessing and entity-relation extraction tasks. Real-world ship and vehicle trajectory datasets were used to support knowledge graph construction. Experiments conducted on two representative large language models, Tongyi Qianwen and Baidu Qianfan, achieved average accuracy rates exceeding 75% and 80%, respectively, demonstrating strong generalization ability and practical value. [Conclusions] This study verifies the effectiveness of combining large language models with prompt learning in constructing trajectory knowledge graphs with low technical barriers, demonstrating the strong generalization and application value of the proposed prompt strategy.