Keywords

1 Introduction

The Resource Description Framework (RDF) is a standard model for describing resources and exchanging data on the Web [1], which has a feature that facilitates data integration in different schemas. These features make RDF widely developed and accumulated a large number of knowledge graphs like DBpedia, YAGO, and WikiData [2]. SPARQL has emerged as the standard RDF query language by the World Wide Web Consortium. SPARQL is a SQL-like query language able to retrieve and manipulate data stored in RDF. With this language, users can pull values from structured and semi-structured data and explore data by querying unknown relations [3]. However, it is unrealistic to ask end-users to learn SPARQL to query the information they need, which reduces the availability of knowledge graphs for most users. For example, we want to find people born in London with the given name “Jack” before 1900. To issue this query, we have a SPARQL and the corresponding results as shown in Fig. 1.

Fig. 1.
figure 1

SPARQL statements and the corresponding results.

In the example, we can find the following problems: First, the SPARQL query is difficult for end users to learn to express their query demands. Second, SPARQL WHERE clauses, abbreviations with prefixes, and full URIs are verbose in the statements. Third, users are supposed to know what relations a specific entity has before the query. The tool should prompt a list of possible relations before the input. Last, most of the visualization tools present results in 2-dimension. Due to space constraints, entities and relations in large number have a high probability of overlapping, which may affect visualization effects. Thus, there is a massive gap between end users and understanding RDF data.

Our research focuses on the design and implementation of a new interactive method of visualization and query for the RDF knowledge graphs. Named KG3D, our demo prototype overcomes the deficiencies above.Footnote 1 Our tools can view the knowledge graph in 3-dimensional space by changing the angle of view from overview to details. So the vast spatial and physical force settings ensure that overlap does not occur. The query can automatically convert to SPARQL and full URI to the endpoints, with a heuristic relation prompt function.

2 Demonstration

The data shown in this demo are collected from the SPARQL endpoint of DBpedia. We demonstrate the tool by the following use cases based on the European politics dataset, which contains European cities, the political parties in their local governments, and their ideologies.

Use Case 1: Entity Visual Query. This tool can be used as DBpedia that users are allowed to search for an entity and get its neighbors. When it comes to multiple types of relations, a query can become complicated. This tool as well provides a function that queries a node’s neighboring entities by its relation types. For example, “How many cities in France?” To find an answer, we first need to find France, then find those cities in connection with it. We can input the name in the search box and click the search button. The entity returns as the query result. To find neighbor nodes, user can click on the entity’s circular menu and select the explore button, and a pop-up window shows all possible relation types. Select the types by the checkboxes, then execute the query. As shown in Fig. 2, linked nodes and directed edges are shown as user selected. We can repeat this operation to all nodes on the screen.

Fig. 2.
figure 2

Querying entity and its neighbours.

Use Case 2: Connection Query. An important aspect of exploratory search over graph data is to understand what paths connect a given pair of nodes. For example, we want to know how Greece and Germany have parties that share the same ideology. This question can be converted to a problem that determines whether there exists a path between two countries via parties and ideologies. A user starts from a click on one entity’s circular menu and selects the path query button on the upper left. We should fill the detail conditions in the text box. The node clicked is automatically set as the object of the first clause. Another entity’s name can be input as the second clause, which is the terminal of the path. The query results are shown as Fig. 3.

Fig. 3.
figure 3

Finding a path from France to Greece.

Use Case 3: Pattern Exploration. If there exists only one type of “Father-Son” relation, we can find someone’s grandfather by his father’s father. That is a set of conditional clauses or a pattern. This function provides a method to help users complete a set of conditional clauses to query all qualified entities and relations. For example, if we want to know which country share the same ideology with the city Altenbuch’s governing party, then the query pattern should be the party that runs the city, party’s ideologies, other parties with the same ideology, those parties’ governing cities, and corresponding countries. Thus, open the pattern design box. First, drag and drop a city node from the left panel of the screen as the object of the first clause. Then we can click the node to add a relation, which should point to a party node. These operations should be repeated to add more condition clauses until we finish building the pattern, as shown in Fig. 4. We can apply the pattern to the city node named Altenbuch to get the query results. Users can also change the view of the results from a graph to the table if they do not want to see a complex graph with too many nodes.

Fig. 4.
figure 4

The process of the complete pattern query.

3 Conclusion

We proposed an interactive visualization tool for presenting RDF data in 3-dimensional space. This tool can help users better retrieve information from RDF data and explore the knowledge graphs without being trained to use SPARQL or knowing the relation types. To enhance usability, we also introduced advanced functions including connection query and pattern matching.