Performing time-traversal queries on RDF datasets remains unsupported in the most extensive knowledge graphs. Existing solutions either require offline ingestion, which prevents concurrent querying and updating, or operate live but with limited query coverage or triplestore dependency. This article presents the Time Agnostic Library, a Python library for performing temporal SPARQL queries live on any SPARQL-compliant triplestore, supporting all six temporal retrieval needs identified in the literature and concurrent updates. The methodology builds on the OpenCitations Data Model (OCDM), which records provenance using the Provenance Ontology (PROV-O) and SPARQL UPDATE operations. The library supports version materialization, single-version and cross-version structured queries, delta materialization, and single-delta and cross-delta structured queries over multi-triple patterns. Evaluation on the BEAR-B benchmark shows sub-linear scaling in both execution time and memory consumption as the number of versions increases. While preprocessing-based systems such as OSTRICH achieve faster query times, they require offline ingestion and cannot handle concurrent data updates. Against R43ples, the closest live system in architecture, the Time Agnostic Library is faster across all query types.
翻译:对RDF数据集进行时间遍历查询的功能,在现有的大多数知识图谱中仍未得到支持。现有方案要么需要离线导入(这会阻止并发查询与更新),要么支持实时操作但存在查询覆盖范围有限或依赖三元组存储的问题。本文提出Time Agnostic Library——一个用于在任意兼容SPARQL的三元组存储上实时执行时间性SPARQL查询的Python库,支持文献中归纳的全部六种时间检索需求及并发更新。该方法基于OpenCitations数据模型(OCDM),该模型使用溯源本体(PROV-O)和SPARQL UPDATE操作记录来源信息。该库支持版本物化、单版本及跨版本结构化查询、增量物化,以及基于多三元组模式的单增量与跨增量结构化查询。在BEAR-B基准测试上的评估表明,随着版本数量增加,执行时间和内存消耗均呈亚线性扩展。虽然基于预处理的系统(如OSTRICH)能实现更快的查询速度,但它们需要离线导入且无法处理并发数据更新。在架构最接近的实时系统R43ples的对比中,Time Agnostic Library在所有查询类型上均表现出更优性能。