Query-Based Industrial Analytics over Knowledge Graphs with Ontology Reshaping

Zhuoxun Zheng, Baifan Zhou, Dongzhuoran Zhou, Gong Cheng, Ernesto Jiménez-Ruiz, Ahmet Soylu, Evgeny Kharlamov

Introduction

In the era of Industry 4.0, industrial analytics—such as diagnosing equipment failure or detecting manufacturing anomalies—requires the integration of massive amounts of heterogeneous data. Knowledge Graphs (KGs) have emerged as a powerful solution, providing a standardized framework to link diverse data sources using formal ontologies.

However, a significant "mismatch" problem often arises. Ontologies are typically designed by domain experts to represent general knowledge, resulting in deep, hierarchical structures filled with "blank nodes" (placeholders for unknown entities). When these general ontologies are applied to flat industrial sensor data, the resulting KG becomes sparse and overly complex. For engineers, this complexity translates into long, counterintuitive SPARQL queries that are difficult to maintain and slow to execute. This paper introduces "Ontology Reshaping" (OR) to bridge this gap by transforming general-purpose ontologies into compact, data-oriented schemata.

Methodology

The proposed approach follows a five-step workflow designed to streamline the transition from raw data to actionable industrial insights. The core innovation is the Ontology Reshaping algorithm, which creates a flatter, more direct schema by selecting only the necessary nodes and edges used by the actual data.

The five-step workflow for industrial analytics using Ontology Reshaping, from schema generation to diagnostics.
  1. KG Schemata Generation: Experts define a high-quality domain ontology reflecting general knowledge.
  2. Data Annotation: Raw relational tables and attributes are mapped to the ontology's classes and properties.
  3. Ontology Reshaping: The OR algorithm uses the ontology, raw data, and mappings to generate a compact version. It employs expert-defined heuristics to "reconnect" fragments, creating a more efficient schema.
  4. KG Generation: The reshaped schema is populated with data via an ETL (Extract, Transform, Load) process.
  5. Industrial Analytics: Users execute SPARQL queries for data inspection, summaries, and diagnostics on the streamlined KG.

Evaluation and Results

The approach was evaluated using a real-world dataset from a Bosch factory in Germany, involving 4.315 million records from 27 automated resistance spot welding machines. To test scalability, researchers created six sub-datasets (Set 1 to Set 6) with increasing complexity, ranging from 20 to 120 attributes.

The "Onto-Reshape" approach was compared against a baseline that utilized the original domain ontology directly. The results demonstrated significant improvements across several metrics:

  • Query Simplicity: As shown in the table below, the average and maximum query depth (the number of edges needed to connect nodes) were reduced by approximately 2 levels, making queries significantly more intuitive for human engineers.
  • Efficiency: KG generation was 7 to 8 times faster than the baseline.
  • Storage and Complexity: The number of entities was reduced to between 1/2 and 1/6 of the baseline, and storage requirements dropped to 2/3 of the original size. Notably, blank nodes were completely eliminated.
Comparison of query depth between the baseline and the Ontology Reshaping approach across six experimental sets.

Conclusion and Future Work

Ontology Reshaping effectively addresses the mismatch between knowledge-oriented ontologies and data-oriented analytics. By flattening graph hierarchies and eliminating blank nodes, the technique enables faster KG generation and simpler, more maintainable queries. Future research will explore automated query transformation across different schemata and methods to reduce the dependency on manually provided heuristics during the reshaping process.

Summary updated

BibTeX
@inproceedings{zheng2022query,
  author = {Zhuoxun Zheng and Baifan Zhou and Dongzhuoran Zhou and Gong Cheng and Ernesto Jiménez-Ruiz and Ahmet Soylu and Evgeny Kharlamov},
  title = {{Query-Based Industrial Analytics over Knowledge Graphs with Ontology Reshaping}},
  booktitle = {ESWC (Satellite Events)},
  year = {2022},
  doi = {10.1007/978-3-031-11609-4\_23},
}
Figure