A Knowledge Graph-Enhanced Hidden Markov Model for Personalized Travel Routing: Integrating Spatial and Semantic Data in Urban Environments
Abstract
:Highlights:
- We introduced a novel knowledge graph-based Hidden Markov Model (KHMM) that significantly enhances personalized route recommendations by effectively integrating spatial and semantic data from POIs.
- By leveraging knowledge graphs, the KHMM expands the traditional Hidden Markov Model’s state space to capture multi-dimensional and higher-order relationships between POIs.
- Improving adaptability to fluctuating user preferences and real-time travel conditions is crucial for developing intelligent transportation systems that can respond to the evolving needs of urban travelers, thereby fostering smarter cities.
- Providing insights into factors influencing travel behavior deepens the understanding of how spatial and semantic relationships shape route selection, having far-reaching implications for transportation planners and urban policymakers implementing tailored solutions to enhance urban mobility and efficiency.
Abstract
1. Introduction
- We propose the KHMM, a personalized route recommendation method that combines knowledge graphs with an enhanced Hidden Markov Model to incorporate spatial and semantic relationships between POIs into a unified decision-making framework.
- We constructed a POI-KG that captures the multi-dimensional attribute features of POIs, enhancing entity information, improving entity connectivity, and addressing the path-finding challenge through an enhanced correlation between spatial and non-spatial attributes.
- We introduce a POI popularity index that accounts for public attention volumes across different time periods. This index integrates bidirectional weights within the KG, combining static and dynamic data while considering the impact of environmental interactions on travel patterns. This integration yields more accurate and context-aware route recommendations.
2. Methodology
2.1. Problem Statement
2.2. Definition of Foundations in Route Planning
2.3. Construction of Knowledge Graph
2.3.1. The Fundamentals of KGs
2.3.2. Building POI-KG
2.3.3. Calculation of Edge Weight
- Popularity index of a POI: Users exhibited varying levels of interest and search activity for different POIs, leading to the generation of a POI popularity index. In this study, we utilized the 360 Trends Index [54] to calculate the popularity index of POIs. To ensure comparability across datasets, each theme was treated as a separate dataset, and the data were standardized using z-scores, enabling cross-dataset comparison and analysis. Additionally, considering the spatial autocorrelation of the area and the spatial correlations among POIs within a region, we employed the Kriging interpolation method to estimate values for POIs lacking index data. Finally, a constant related to the data range was added to all values to ensure they remained positive. The formula for calculating the POI popularity index is defined as follows:
- The rank of a POI. The rank of a POI typically represents its attraction level, signifying the overall quality of the location. Users often consider this rank when visiting a site. We calculated the weight of POI rankings based on the analysis of data from the collected questionnaires. The formula for calculating the rank of a POI is defined as follows:
- Construction time. Each POI has a corresponding time of construction. Different POIs may share the same construction time, establishing a correlation between them. Based on the analysis of data from the questionnaire, the weight of the construction time was calculated to be 0.24.
- Opening hours. POIs and scenic spots have specific operating hours. Some are open all day, while others operate within fixed periods. For instance, museums generally close on Mondays and have established daily opening and closing times. POIs with different themes may share the same opening hours, suggesting a correlation between them. Based on the results of the questionnaire survey, the weight of the opening hours in the POI KG was 0.18.
- Surrounding POIs. Users often want to learn about other nearby POIs when visiting a particular one. Therefore, POIs that feature a wide range of nearby attractions are more likely to capture users’ interest. In the POI-KG, the correlation between POIs was strengthened by introducing the consideration of attribute relationships among nearby POIs. This attribute was calculated by considering a POI as the center of a circle, setting a reasonable radius as the threshold for buffer analysis, and taking into account the spatial location relationship of the POI. The edge weights of surrounding POIs were calculated using the POI popularity index as the weight value.
- Related POIs. When individuals search for a POI online, related POIs will appear. These POIs may be thematically relevant or geographically related to the target location, reflecting specific needs or interests at a given geographical point. The edge weights of these relevant POIs were calculated using the POI popularity index as the weight value.
2.3.4. Knowledge Graph Path Planning Based on A*
2.4. Two-Layer Hidden Markov Model
2.4.1. Construction of KHMM
- Observations. The observation state space comprises several POI subjects. Users choose a sequence of POI subjects to visit based on their preferences. This sequence is a set of observation sequences () where each observable state, , represents a subject.
- Hidden States. The hidden state space of this model is a structure with two layers. The first layer comprises the POI nodes output from the KG, forming a POI set. These POIs are treated as candidate points, denoted as . The second layer is made up of the projection points of the candidate points, denoted as .
- Emission Probabilities. The emission probability is generated between the hidden and observed states, representing the probability distribution in this system state. In a real road network, each POI, , generates an emission probability, , in the adjacent road segment . The projection point is expressed as . The distance between the POI and the projection is calculated using the great circle distance, denoted as . The emission probability is defined by the following formula [50]:
- Transition Probabilities. The transition probability matrix indicates the chances of a state changing from one to another. It is represented as the probability of projected points in a hidden state undergoing a state transfer at different times. Specifically, the projection point of a POI, , on a road segment is indicated as . The projection point of the next POI is denoted by . The “route distance” is defined as , which is the shortest path between the two projection positions. The distance between two candidate points is determined using the great circle distance, indicated as . The route distance between the projected points is compared to the great circle distance between POIs. In our experiments, a shorter road path distance between a pair of matched projected points closely aligned with the distance between the POIs [56]. The trend in the absolute value of the difference between the POI’s great circle distance and the path distance of the projection points was calculated, conforming to the exponential probability distribution given by Equation (6).The parameter accounts for the difference between the route distance and the great circle distance. The is generally obtained using the ratio of the route distance to the standard speed limit of urban roads, . A vehicle speed of 40km/h was used as the reference value to perform the calculation. The parameters are explained in detail in the Experimental Section.
2.4.2. Generation of Recommended Routes
3. Experiments
3.1. Experimental Data
3.2. Parameter Settings
3.3. Validity Analysis
3.4. Comparative Experimental Analysis
- HMM: A raw HMM relies on an initial state probability, a transition probability matrix, and an observation probability matrix. It uses POIs’ geographic locations to model data features, mapping positions to road segments to estimate POI states and predict sequences.
- A* Algorithm: A* is a widely used path-finding and graph traversal algorithm that identifies the optimal path from a start node to a goal node in a graph or network. It minimizes the total cost for paths with multiple nodes.
- Top POI Popularity: This method selects POIs with the highest popularity index within a subject area, using these as the basis for route planning.
- POI Popularity: The sum of popularity indices for POIs along the recommended route.
- Number of POI Similarities: The number of POIs consistent with the highest-ranked POIs in terms of popularity.
- Route Distance: The total distance traveled for the recommended itinerary.
- POI Recommendation Number: The total number of POIs recommended to the user during the itinerary.
4. Discussion and Conclusions
4.1. Embedding the Popularity Index Enhances Route Recommendations
4.2. Context-Aware Route Recommendations
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Kumar, P.; Hariharan, K.; Manikandan, M. Hybrid long short-term memory deep learning model and Dijkstra’s Algorithm for fastest travel route recommendation considering eco-routing factors. Transp. Lett. 2023, 15, 926. [Google Scholar]
- Luo, J.; Duan, X. Intelligent recommendation of personalised tourist routes based on improved discrete particle swarm. Int. J. Comput. Sci. Eng. 2022, 25, 598–606. [Google Scholar]
- Bin, C.; Gu, T.; Sun, Y.; Chang, L. A personalized POI route recommendation system based on heterogeneous tourism data and sequential pattern mining. Multimed. Tools Appl. 2019, 78, 35135–35156. [Google Scholar] [CrossRef]
- Lu, Y.S.; Shih, W.Y.; Gau, H.Y.; Chung, K.C.; Huang, J.L. On successive point-of-interest recommendation. World Wide Web 2019, 22, 1151–1173. [Google Scholar] [CrossRef]
- Liu, Y.; Yang, Z.; Li, T.; Wu, D. A novel POI recommendation model based on joint spatiotemporal effects and four-way interaction. Appl. Intell. 2022, 52, 5310–5324. [Google Scholar] [CrossRef]
- He, X.; He, W.; Liu, Y.; Lu, X.; Xiao, Y.; Liu, Y. ImNext: Irregular Interval Attention and Multi-task Learning for Next POI Recommendation. Knowl.-Based Syst. 2024, 293, 111674. [Google Scholar] [CrossRef]
- Yao, Y.; Guo, Z.; Dou, C.; Jia, M.; Hong, Y.; Guan, Q.; Luo, P. Predicting mobile users’ next location using the semantically enriched geo-embedding model and the multilayer attention mechanism. Comput. Environ. Urban Syst. 2023, 104, 102009. [Google Scholar] [CrossRef]
- Yao, L.; Wang, J.; Wang, X.; Chen, A.; Wang, Y. V2X routing in a VANET based on the hidden Markov model. IEEE Trans. Intell. Transp. Syst. 2017, 19, 889–899. [Google Scholar] [CrossRef]
- Lassoued, Y.; Monteil, J.; Gu, Y.; Russo, G.; Shorten, R.; Mevissen, M. A hidden Markov model for route and destination prediction. In Proceedings of the 2017 IEEE 20th International Conference on Intelligent Transportation Systems (ITSC), Yokohama, Japan, 16–19 October 2017; pp. 1–6. [Google Scholar]
- Liu, S.; Wang, L. A self-adaptive point-of-interest recommendation algorithm based on a multi-order Markov model. Future Gener. Comput. Syst. 2018, 89, 506–514. [Google Scholar] [CrossRef]
- Chen, C.; Zhang, S.; Yu, Q.; Ye, Z.; Ye, Z.; Hu, F. Personalized travel route recommendation algorithm based on improved genetic algorithm. J. Intell. Fuzzy Syst. 2021, 40, 4407–4423. [Google Scholar] [CrossRef]
- Xu, Y.; Hu, T.; Li, Y. A travel route recommendation algorithm with personal preference. In Proceedings of the 2016 12th International Conference on Natural Computation, Fuzzy Systems and Knowledge Discovery (Icnc-Fskd), Changsha, China, 13–15 August 2016; pp. 390–396. [Google Scholar]
- Huang, J.; Liu, Y.; Chen, Y.; Jia, C. Dynamic recommendation of POI sequence responding to historical trajectory. ISPRS Int. J. Geo-Inf. 2019, 8, 433. [Google Scholar] [CrossRef]
- Halder, S.; Lim, K.H.; Chan, J.; Zhang, X. Deep learning of dynamic POI generation and optimisation for itinerary recommendation. In ACM Transactions on Recommender Systems; Association for Computing Machinery: New York, NY, USA, 2023. [Google Scholar]
- Noorian, A.; Harounabadi, A.; Ravanmehr, R. A novel Sequence-Aware personalized recommendation system based on multidimensional information. Expert Syst. Appl. 2022, 202, 117079. [Google Scholar] [CrossRef]
- Bin, C.; Gu, T.; Sun, Y.; Chang, L.; Sun, W.; Sun, L. Personalized POIs travel route recommendation system based on tourism big data. In PRICAI 2018: Trends in Artificial Intelligence: 15th Pacific Rim International Conference on Artificial Intelligence, Nanjing, China, 28–31 August 2018; Springer International Publishing: Berlin/Heidelberg, Germany, 2018; pp. 290–299. [Google Scholar]
- Lim, K.H.; Chan, J.; Karunasekera, S.; Leckie, C. Personalized itinerary recommendation with queuing time awareness. In Proceedings of the 40th international ACM SIGIR Conference on Research and Development in Information Retrieval, Tokyo, Japan, 7–11 August 2017; pp. 325–334. [Google Scholar]
- Fang, J.; Meng, X. URPI-GRU: An approach of next POI recommendation based on user relationship and preference information. Knowl.-Based Syst. 2022, 256, 109848. [Google Scholar] [CrossRef]
- Chen, J.; Ye, W.; Kang, S. Learning user preferences from Multi-Contextual Sequence influences for next POI recommendation. Electron. Res. Arch. 2024, 32, 486–504. [Google Scholar] [CrossRef]
- Ren, J.; Gan, M. Mining dynamic preferences from geographical and interactive correlations for next POI recommendation. Knowl. Inf. Syst. 2023, 65, 183–206. [Google Scholar] [CrossRef]
- Wang, J.; Huang, Z.; Liu, Z. SQPMF: Successive point of interest recommendation system based on probability matrix factorization. Appl. Intell. 2024, 54, 680–700. [Google Scholar] [CrossRef]
- Xu, X.; Wang, L.; Zhang, S.; Li, W.; Jiang, Q. Modelling and Optimization of Personalized Scenic Tourism Routes Based on Urgency. Appl. Sci. 2023, 13, 2030. [Google Scholar] [CrossRef]
- Zhao, G.; Lou, P.; Qian, X.; Hou, X. Personalized location recommendation by fusing sentimental and spatial context. Knowl.-Based Syst. 2020, 196, 105849. [Google Scholar] [CrossRef]
- Yochum, P.; Chang, L.; Gu, T.; Zhu, M. An adaptive genetic algorithm for personalized itinerary planning. IEEE Access 2020, 8, 88147–88157. [Google Scholar] [CrossRef]
- Wang, X.; Liu, Y.; Zhou, X.; Wang, X.; Leng, Z. A point-of-interest recommendation method exploiting sequential, category and geographical influence. ISPRS Int. J. Geo-Inf. 2022, 11, 80. [Google Scholar] [CrossRef]
- Fan, J.; Pan, C.; Geng, Y.; Li, S. A privacy-preserving time-aware method for next poi recommendation. Electronics 2023, 12, 3208. [Google Scholar] [CrossRef]
- An, J.; Li, G.; Jiang, W. NRDL: Decentralized user preference learning for privacy-preserving next POI recommendation. Expert Syst. Appl. 2024, 239, 122421. [Google Scholar] [CrossRef]
- Thaipisutikul, T.; Chen, Y.N. An improved deep sequential model for context-aware POI recommendation. Multimed. Tools Appl. 2024, 83, 1643–1668. [Google Scholar] [CrossRef]
- Zhao, P.; Luo, A.; Liu, Y.; Xu, J.; Li, Z.; Zhuang, F.; Sheng, V.S.; Zhou, X. Where to go next: A spatio-temporal gated network for next poi recommendation. IEEE Trans. Knowl. Data Eng. 2020, 34, 2512–2524. [Google Scholar] [CrossRef]
- Mou, N.; Jiang, Q.; Zhang, L.; Niu, J.; Zheng, Y.; Wang, Y.; Yang, T. Personalized tourist route recommendation model with a trajectory understanding via neural networks. Int. J. Digit. Earth 2022, 15, 1738–1759. [Google Scholar] [CrossRef]
- Kuang, L.; Tu, S.; Zhang, Y.; Yang, X. Providing privacy preserving in next POI recommendation for Mobile edge computing. J. Cloud Comput. 2020, 9, 10. [Google Scholar] [CrossRef]
- Halder, S.; Lim, K.H.; Chan, J.; Zhang, X. A survey on personalized itinerary recommendation: From optimisation to deep learning. Appl. Soft Comput. 2024, 152, 111200. [Google Scholar] [CrossRef]
- He, W. Application of light sensor localization based on deep learning algorithm in tourist path recommendation in cultural scenic spots. Opt. Quantum Electron. 2024, 56, 238. [Google Scholar] [CrossRef]
- Huang, X. Personalized travel route recommendation model of intelligent service robot using deep learning in big data environment. J. Robot. 2022, 2022(1), 7778592. [Google Scholar] [CrossRef]
- Han, B.; Zheng, X.; Guan, M.; Sun, L.; Zhang, Y. Personalized Route Recommendation with Hybrid Tabu Search algorithm Based on Crowdsensing. Int. J. Intell. Syst. 2023, 2023, 3054888. [Google Scholar] [CrossRef]
- Paulavičius, R.; Stripinis, L.; Sutavičiūtė, S.; Kočegarov, D.; Filatovas, E. A novel greedy genetic algorithm-based personalized travel recommendation system. Expert Syst. Appl. 2023, 230, 120580. [Google Scholar] [CrossRef]
- Zheng, X.; Han, B.; Ni, Z. Tourism Route Recommendation Based on A Multi-Objective Evolutionary algorithm Using Two-Stage Decomposition and Pareto Layering. IEEE/CAA J. Autom. Sin. 2023, 10, 486–500. [Google Scholar] [CrossRef]
- Song, W.; Duan, Z.; Yang, Z.; Zhu, H.; Zhang, M.; Tang, J. Explainable knowledge graph-based recommendation via deep reinforcement learning. arXiv 2019, arXiv:1906.09506. [Google Scholar]
- Chen, W.; Wan, H.; Guo, S.; Huang, H.; Zheng, S.; Li, J.; Lin, S.; Lin, Y. Building and exploiting spatial–temporal knowledge graph for next POI recommendation. Knowl.-Based Syst. 2022, 258, 109951. [Google Scholar] [CrossRef]
- Qian, T.; Liu, B.; Nguyen, Q.V.H.; Yin, H. Spatiotemporal representation learning for translation-based POI recommendation. ACM Trans. Inf. Syst. (TOIS) 2019, 37, 1–24. [Google Scholar] [CrossRef]
- Su, X.; He, J.; Ren, J.; Peng, J. Personalized Chinese Tourism Recommendation algorithm Based on Knowledge Graph. Appl. Sci. 2022, 12, 10226. [Google Scholar] [CrossRef]
- Hu, B.; Ye, Y.; Zhong, Y.; Pan, J.; Hu, M. Transmkr: Translation-based knowledge graph enhanced multi-task point-of-interest recommendation. Neurocomputing 2022, 474, 107–114. [Google Scholar] [CrossRef]
- Liu, Z.; Zhang, D.; Zhang, C.; Bian, J.; Deng, J.; Shen, G.; Kong, X. KDRank: Knowledge-driven user-aware POI recommendation. Knowl.-Based Syst. 2023, 278, 110884. [Google Scholar] [CrossRef]
- Cui, Y.; Sun, H.; Zhao, Y.; Yin, H.; Zheng, K. Sequential-knowledge-aware next POI recommendation: A meta-learning approach. ACM Trans. Inf. Syst. (TOIS) 2021, 40, 1–22. [Google Scholar] [CrossRef]
- Guo, Q.; Sun, Z.; Zhang, J.; Theng, Y.L. An attentional recurrent neural network for personalized next location recommendation. In Proceedings of the AAAI Conference on Artificial Intelligence, New York, NY, USA, 7–12 February 2020; Volume 34, pp. 83–90. [Google Scholar]
- Sun, T.; Xu, J.; Hu, C. An efficient algorithm of star subgraph queries on urban traffic knowledge graph. Data Sci. Eng. 2022, 7, 383–401. [Google Scholar] [CrossRef]
- Li, C.; He, W.; Yao, H.; Mai, T.; Wang, J.; Guo, S. Knowledge graph aided network representation and routing algorithm for LEO satellite networks. IEEE Trans. Veh. Technol. 2022, 72, 5195–5207. [Google Scholar] [CrossRef]
- Fang, H.; Chen, C.; Long, Y.; Xu, G.; Xiao, Y. DTCRSKG: A Deep Travel Conversational Recommender System Incorporating Knowledge Graph. Mathematics 2022, 10, 1402. [Google Scholar] [CrossRef]
- Gao, J.; Peng, P.; Lu, F.; Claramunt, C.; Xu, Y. Towards travel recommendation interpretability: Disentangling tourist decision-making process via knowledge graph. Inf. Process. Manag. 2023, 60, 103369. [Google Scholar] [CrossRef]
- Wu, T.; Zeng, Z.; Qin, J.; Xiang, L.; Wan, Y. An Improved HMM-Based Approach for Planning Individual Routes Using Crowd Sourcing Spatiotemporal Data. Sensors 2020, 20, 6938. [Google Scholar] [CrossRef]
- Tao, W.; Longgang, X.; Jianya, G. Updating Road Networks by Local Renewal from GPS Trajectories. ISPRS Int. J. Geo-Inf. 2016, 5, 163. [Google Scholar] [CrossRef]
- Xu, Z.; Sheng, Y.; He, L.; Wang, Y. Review on Knowledge Graph Techniques. Dianzi Keji Daxue Xuebao/J. Univ. Electron. Sci. Technol. China 2016, 18, 589–606. [Google Scholar]
- Arentze, T.; Kemperman, A.; Aksenov, P. Estimating a latent-class user model for travel recommender systems. Inf. Technol. Tour. 2018, 19, 61–82. [Google Scholar] [CrossRef]
- Qihoo360. 360 Trend Index. 2019. Available online: https://trends.so.com/ (accessed on 10 September 2022).
- Shen, H.; Zhang, Y.; Wang, J.; Cao, J.; Rutkowski, L. Observer-based control for discrete-time hidden semi-Markov jump systems. IEEE Trans. Autom. Control 2022, 68, 6255–6261. [Google Scholar] [CrossRef]
- Newson, P.; Krumm, J. Hidden Markov map matching through noise and sparseness. In Proceedings of the 17th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, Seattle, WA, USA, 4–6 November 2009; pp. 336–343. [Google Scholar]
- Viterbi, A.J. Error bounds for convolutional codes and an asymptotically optimum decoding algorithm. IEEE Trans. Informat. Theory 1967, 13, 260–269. [Google Scholar] [CrossRef]
- Miller, J.J. Graph database applications and concepts with Neo4j. In Proceedings of the Southern Association for Information Systems Conference, Atlanta, GA, USA, 8–9 March 2013; Volume 2324. [Google Scholar]
POI Properties | |||
---|---|---|---|
Name | Category | Address | Recommended Duration of Visit |
Ticket | Characteristic | Opening Hours | Collection of Cultural Relics |
Relevant People | Famous Landmarks | Attraction Level | Suitable Season for Visiting |
Relevant POIs | Surrounding POIs | Construction Time | Surrounding Transportation Facilities |
Name | Jan | Feb | Mar | Apr | May | June | July | Aug | Sep | Oct | Nov | Dec |
---|---|---|---|---|---|---|---|---|---|---|---|---|
Hunan Provincial Museum | 171 | 1469 | 1435 | 362 | 366 | 446 | 586 | 433 | 348 | 217 | 140 | 113 |
Changsha Museum | 25 | 37 | 38 | 30 | 32 | 39 | 99 | 84 | 48 | 26 | 19 | 9 |
Orange Island | 80 | 74 | 123 | 123 | 178 | 184 | 305 | 299 | 302 | 186 | 122 | 112 |
Yuelu Mountain | 81 | 87 | 130 | 120 | 236 | 217 | 732 | 323 | 295 | 242 | 202 | 160 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zeng, Z.; Qin, J.; Wu, T. A Knowledge Graph-Enhanced Hidden Markov Model for Personalized Travel Routing: Integrating Spatial and Semantic Data in Urban Environments. Smart Cities 2025, 8, 75. https://doi.org/10.3390/smartcities8030075
Zeng Z, Qin J, Wu T. A Knowledge Graph-Enhanced Hidden Markov Model for Personalized Travel Routing: Integrating Spatial and Semantic Data in Urban Environments. Smart Cities. 2025; 8(3):75. https://doi.org/10.3390/smartcities8030075
Chicago/Turabian StyleZeng, Zhixuan, Jianxin Qin, and Tao Wu. 2025. "A Knowledge Graph-Enhanced Hidden Markov Model for Personalized Travel Routing: Integrating Spatial and Semantic Data in Urban Environments" Smart Cities 8, no. 3: 75. https://doi.org/10.3390/smartcities8030075
APA StyleZeng, Z., Qin, J., & Wu, T. (2025). A Knowledge Graph-Enhanced Hidden Markov Model for Personalized Travel Routing: Integrating Spatial and Semantic Data in Urban Environments. Smart Cities, 8(3), 75. https://doi.org/10.3390/smartcities8030075