Wikidata Graph Pattern Benchmark (WGPB) for RDF/SPARQL
收藏资源简介:
The Wikidata Graph Pattern Benchmark (WGPB) is a benchmark consisting of 50 instances of 17 different abstract query patterns giving a total of 850 SPARQL queries. The goal of the benchmark is to test the performance of query engines for more complex basic graph patterns. The benchmark was designed for evaluating worst-case optimal join algorithms but also serves as a general-purpose benchmark for evaluating (basic) graph patterns. The queries are provided in SPARQL syntax and all return at least one solution. We limit the number of results returned to a maximum of 1,000. <strong>Queries</strong> We provide an example of a "square" basic graph pattern (comments are added here for readability): <pre><code class="language-sql">SELECT * WHERE { ?x1 <http://www.wikidata.org/prop/direct/P149> ?x2 . # architectural style ?x2 <http://www.wikidata.org/prop/direct/P1269> ?x3 . # facet of ?x3 <http://www.wikidata.org/prop/direct/P156> ?x4 . # followed by ?x1 <http://www.wikidata.org/prop/direct/P135> ?x4 . # movement } LIMIT 1000</code></pre> There are 49 other queries similar to this one in the dataset (replacing the predicates with other predicates), and 50 queries for 16 other abstract query patterns. For more details on these patterns, we refer to the publication mentioned below. Note that you can try the queries on the public Wikidata Query Service, though some might give a timeout. <strong>Generation</strong> The queries were generated over a reduced version of the Wikidata truthy dump from November 15, 2018 that we call the Wikidata Core Graph (WCG). Specifically, in order to reduce the data volume, multilingual labels, comments, etc., were removed as they have limited use for evaluating joins (English labels were kept under <em>schema:name</em>). Thereafter, in order to facilitate the generation of the queries, triples with rare predicates appearing in fewer than 1,000 triples, and very common predicates appearing in more than 1,000,000 triples, were removed. The queries provided will generate the same results over both graphs. <strong>Files</strong> In this dataset, we then include three files: <strong>wgpb-queries.zip </strong>The list of 850 queries <strong>wikidata-wcg.nt.gz </strong>Wikidata truthy graph with English labels <strong>wikidata-wcg-filtered.nt.bz2 </strong>Wikidata truthy graph with English labels filtering triples with rare (<1000 triples) and very common (>1000000) predicates <strong>Code</strong> We provide the code for generating the datasets, queries, etc., along with scripts and instructions on how to run these queries in a variety of SPARQL engines (Blazegraph, Jena, Virtuoso and our worst-case optimal variant of Jena), . <strong>Publication</strong> The benchmark is proposed, described and used in the following paper. You can find more details about how it was generated, the 17 abstract patterns that were used, as well as results for prominent SPARQL engines. Aidan Hogan, Cristian Riveros, Carlos Rojas and Adrián Soto. "<em>A Worst-Case Optimal Join Algorithm for SPARQL</em>". In the Proceedings of the 18th International Semantic Web Conference (ISWC), Auckland, New Zealand, October 26–30, 2019.
Wikidata 图模式基准测试集(Wikidata Graph Pattern Benchmark, WGPB)是一款基准测试集,包含17种不同的抽象查询模式的50个实例,总计850条SPARQL查询。本基准测试集的目标是测试查询引擎针对更复杂的基础图模式的性能。该基准测试集最初设计用于评估最坏情况最优连接算法,同时也可作为通用基准测试集,用于评估(基础)图模式。所有查询均采用SPARQL语法编写,且至少返回一条结果。我们将返回结果的数量限制为最多1000条。 <strong>查询样例</strong> 我们提供一个“正方形”基础图模式的样例(此处添加注释以提升可读性): <pre><code class="language-sql">SELECT * WHERE { ?x1 <http://www.wikidata.org/prop/direct/P149> ?x2 . # 建筑风格 ?x2 <http://www.wikidata.org/prop/direct/P1269> ?x3 . # 所属分面 ?x3 <http://www.wikidata.org/prop/direct/P156> ?x4 . # 后续关联 ?x1 <http://www.wikidata.org/prop/direct/P135> ?x4 . # 运动流派 } LIMIT 1000</code></pre> 本数据集中共包含49条与此类似的查询(将谓词替换为其他谓词),另有16种抽象查询模式各对应50条查询。如需了解这些模式的更多细节,请参阅下文提及的发表论文。请注意,您可以在公开的Wikidata查询服务中尝试这些查询,但部分查询可能会触发超时。 <strong>数据集生成</strong> 本次查询基于2018年11月15日发布的精简版Wikidata真值转储数据生成,我们将其命名为Wikidata核心图(Wikidata Core Graph, WCG)。具体而言,为缩减数据体量,我们移除了多语言标签、注释等信息——这类信息对于连接评估的实用价值有限,不过保留了以<em>schema:name</em>为键的英文标签。随后,为便于查询生成,我们移除了出现次数少于1000条的稀有谓词,以及出现次数超过100万条的极常见谓词。本数据集提供的查询在上述两种图结构上均可生成一致的结果。 <strong>数据集文件</strong> 本数据集包含以下三个文件: <strong>wgpb-queries.zip</strong>:包含850条查询的列表 <strong>wikidata-wcg.nt.gz</strong>:仅保留英文标签的Wikidata真值图 <strong>wikidata-wcg-filtered.nt.bz2</strong>:仅保留英文标签,且已过滤稀有(<1000条三元组)与极常见(>1000000条三元组)谓词的Wikidata真值图 <strong>配套代码</strong> 我们提供了用于生成数据集、查询等的代码,同时附带了在多种SPARQL引擎(Blazegraph、Jena、Virtuoso以及我们自研的Jena最坏情况最优连接变种)中运行这些查询的脚本与操作说明。 <strong>相关论文</strong> 该基准测试集的提出、细节说明与应用均见于以下论文。您可以从中了解其生成方式、所用的17种抽象查询模式,以及主流SPARQL引擎的测试结果。 Aidan Hogan、Cristian Riveros、Carlos Rojas与Adrián Soto:《<em>A Worst-Case Optimal Join Algorithm for SPARQL</em>》,发表于2019年10月26日至30日于新西兰奥克兰举办的第18届国际语义网大会(International Semantic Web Conference, ISWC)论文集。



