DOI QR코드

DOI QR Code

Design of Knowledge-based Spatial Querying System Using Labeled Property Graph and GraphQL

속성 그래프 및 GraphQL을 활용한 지식기반 공간 쿼리 시스템 설계

  • Jang, Hanme (Dept. of Civil and Envionmental Engineering, Seoul National University) ;
  • Kim, Dong Hyeon (Dept. of Civil and Envionmental Engineering, Seoul National University) ;
  • Yu, Kiyun (Dept. of Civil and Envionmental Engineering, Seoul National University)
  • Received : 2022.09.26
  • Accepted : 2022.10.30
  • Published : 2022.10.31

Abstract

Recently, the demand for a QA (Question Answering) system for human-machine communication has increased. Among the QA systems, a closed domain QA system that can handle spatial-related questions is called GeoQA. In this study, a new type of graph database, LPG (Labeled Property Graph) was used to overcome the limitations of the RDF (Resource Description Framework) based database, which was mainly used in the GeoQA field. In addition, GraphQL (Graph Query Language), an API-type query language, is introduced to address the fact that the LPG query language is not standardized and the GeoQA system may depend on specific products. In this study, database was built so that answers could be retrieved when spatial-related questions were entered. Each data was obtained from the national spatial information portal and local data open service. The spatial relationships between each spatial objects were calculated in advance and stored in edge form. The user's questions were first converted to GraphQL through FOL (First Order Logic) format and delivered to the database through the GraphQL server. The LPG used in the experiment is Neo4j, the graph database that currently has the highest market share, and some of the built-in functions and QGIS were used for spatial calculations. As a result of building the system, it was confirmed that the user's question could be transformed, processed through the Apollo GraphQL server, and an appropriate answer could be obtained from the database.

최근 사람과 기계의 소통을 위해 QA (Question Answering) 시스템에 대한 요구가 증가하였다. QA 시스템 중 공간에 관련된 질문을 처리할 수 있는 폐쇄 도메인 QA 시스템을 GeoQA라 하는데 본 연구는 GeoQA 분야에서 주로 사용되던 RDF (Resource Description Framework)기반의 데이터베이스가 데이터 입출력 및 변형에 한계를 보인다는 점을 극복하기 위해 최근 주목받고 있는 새로운 형태의 그래프 데이터베이스인 LPG (Labeled Property Graph)를 사용하였다. 또한, LPG 쿼리(query)언어가 표준화되지 않아 GeoQA 시스템이 특정 제품에 의존할 수 있다는 점 때문에 API 형태의 쿼리 언어인 GraphQL (Graph Query Language)을 도입하여 다양한 LPG를 사용할 방안을 제시하였다. 본 연구에서는 공간 관련 질문이 입력되었을 때 답변을 검색할 수 있도록 대한민국 중심의 별도 데이터베이스를 구축하였는데 각 데이터는 국가공간정보포털 및 지방행정 인허가데이터개방 서비스에서 취득하였으며 각 공간 객체 간 공간적 관계는 미리 계산되어 그래프의 엣지(edge) 형태로 입력되었다. 사용자의 질문은 먼저 FOL (First Order Logic)형태를 거쳐 최종적으로 GraphQL로 변환되며 GraphQL 서버를 통해 데이터베이스에 전달되었다. 실험에 사용한 LPG로는 현재 가장 높은 점유율을 보이는 그래프 데이터베이스인 Neo4j를 선택하였고 내장 함수와 QGIS 일부가 공간 연산에 사용되었다. 시스템 구축 결과 사용자의 질문을 변환, Apollo GraphQL 서버를 통해 처리하고 데이터베이스로부터 적합한 답변을 얻을 수 있음을 확인하였다.

Keywords

Acknowledgement

본 연구는 국토교통부/국토교통과학기술진흥원의 지원으로 수행되었음(과제번호 RS-2022-00143336 ).

References

  1. Chen, X., Jia, S., and Xiang, Y. (2020), A review: Knowledge reasoning over knowledge graph, Expert Systems with Applications, Vol. 141. https://doi.org/10.1016/j.eswa.2019.112948
  2. Hamzei, E., Li, H., Vasardani, M., Baldwin, T., Winter, S., and Tomko, M. (2019), Place questions and human-generated answers: A data analysis approach, International Conference on Geographic Information Science, pp. 3-19. Springer, Cham. https://doi.org/10.1007/978-3-030-14745-7_1
  3. Hamzei, E., Tomko, M., and Winter, S. (2022), Translating place-related questions to GEOSPARQL queries. In Proceedings of the ACM Web Conference, pp. 902-911. https://doi.org/10.1145/3485447.3511933
  4. KRR&A TEAM (2018), Athens, Department of Informatics and Telecommunications, National and Kapodistrian University of Athens, Athens 157 72 Greece, http://pyravlos-vm5.di.uoa.gr/geoqa-old/benchmarkquestions.html (last date accessed: 10 September 2022).
  5. Lan, Y., He, G., Jiang, J., Jiang, J., Zhao, W. X., and Wen, J. R. (2021), Complex knowledge base question answering: A survey. Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, pp. 4483-4491. https://doi.org/10.48550/arXiv.2108.06688
  6. Lee J., Joo Y., and Park, S. (2012), Design and implementation of context awareness inference system based on ontology - focusing on tour information guidance smartPhone application, Journal of the Korean Society for Geospatial Information System, Vol.20, No.4, pp. 67-75. (in Korean with English abstract) https://doi.org/10.7319/kogsis.2012.20.4.067
  7. Liu, J., Liu, H., Chen, X., Guo, X., Zhao, Q., Li, J., and Liu, J. (2021), A heterogeneous geospatial data retrieval method using knowledge graph, Sustainability, Vol. 13, No. 4, pp. 1-21. https://doi.org/10.3390/su13042005
  8. Mai, G., Janowicz, K., Zhu, R., Cai, L., and Lao, N. (2021), Geographic question answering: challenges, uniqueness, classification, and future directions, AGILE: GIScience Series, Vol. 2, pp. 1-21. https://doi.org/10.5194/agile-giss-2-8-2021
  9. Nam, Sangha and Kim, Incheol. (2015). Design and implementation of a hybrid spatial reasoning algorithm, Journal of KIISE, Vol.42, No.5, pp. 601-608. (in Korean with English abstract) https://doi.org/10.5626/JOK.2015.42.5.601
  10. Neo4j (2017), Neo4j, San Mateo, CA 94401, USA, https://neo4j.com/developer/graph-database/ (last date accessed: 10 September 2022).
  11. Oh, S. (2006), Infra 21 seminar-Korea POI Construction Status and Future Direction, Report 291, Korea Research Institute for Human Settlements, Sejong, pp. 152-157
  12. Punjani, D., Singh, K., Both, A., Koubarakis, M., Angelidis, I., Bereta, K., and Stamoulis, G. (2018), Template-based question answering over linked geospatial data, Proceedings of the 12th Workshop on Geographic Information Retrieval, pp. 1-10. https://doi.org/10.1145/3281354.3281362
  13. Regalia, B., Janowicz, K., and McKenzie, G. (2019). Computing and querying strict, approximate, and metrically refined topological relations in linked geographic data. Transactions in GIS, Vol. 23, No. 3, pp. 601-619. https://doi.org/10.1111/tgis.12548
  14. Wang, S., Zhang, X., Ye, P., Du, M., Lu, Y., and Xue, H. (2019). Geographic knowledge graph (GeoKG): a formalized geographic knowledge representation, ISPRS International Journal of Geo-Information, Vol. 8, No. 4, pp.184-207. https://doi.org/10.3390/ijgi8040184