Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

An Introduc+on to Ontology

Engineering
Dr. Yongxin Liao
Research Experience
2010 Master Internship

2010-2013 Production and System


Engineering (Ph. D)

2008-2010
Enterprise Computing( M.E.) 2004-2008 Software Engineering (B.E.)
2008-2010 Software Engineering (M.E.)

2004-2008 Software Engineering (B.E.)


2008-2009 Software Engineering (M.E.)

2014-now PPGEPS (PNPD)

2010-2013 Production and System


Engineering (Ph. D)

2010 Master Internship

2009-2010
2014-now PPGEPS (PNPD) Enterprise Computing( M.E.)
Ontology
(in informa;on science domain,
since 1980s)
The Famous Applica;ons of Ontology

• Medical Science
– E.g. Vocabulary Unifica;on

Gene Ontology Project [1]

• Intelligence Personal Assistants


– E.g. Seman;c Matching and Disambigua;on

Siri [2]
Siri - Weather
• Three Ques;ons in the video
– “What is the weather like today?”
– “What is the hourly forecast?”
– “Do I need a raincoat today?”
• How is Siri capable of understanding the meanings of the concept
“weather”, “forecast” and “raincoat”?
• How is Siri capable of understanding the rela;onships between
them?
“raincoat”

? “forecast”
“weather”
Siri - Book a Restaurant
• One ques;on in the Video
– “Find me a great Greek restaurant in Palo Alto.”

• How is Siri capable of understanding the “Palo Alto”


is a Loca;on, and “great” is related to ra;ng?

?
“Palo Alto” “Loca;on”

?
“great” “Ra;ng”
Agent (Intelligent Personal Assistant)

Related Technologies Domain Models


- Speech Recogni;on Short Term Personal
Memory
- NL Understanding Vocabulary

Long Term Personal


- NL Genera;on Language Pabern Memory
Recognizers
- Text-to-Speech Synthesis
Siri [2]
- etc. Ac;ve Ontology
Mobile Devices (Knowledge Base)

Q: Get me a table for the best Italian food.

Answers “Get me a table” “Italian food”


Ques;ons “Italian food” “best Italian food”
(audible and visual)
Task Iden5fica5on

Task: Booking a Restaurant Criteria: Quality


Criteria: Type
has has
Class: Restaurant
Restaurant Request
has has
Criteria: Hours
Criteria: Loca;on
Restaurant Lis5ng
Time: real ;me
Loca;on: GPS [default]
Human A: Availability of the best …
[default]
Main Objec;ve of This Course

How to formally represent?

How to Inference and Query?


Real World Informa;on Ontology
Outlines of this Lecture
• What is an Ontology?
– The Defini;on of Ontology
– How Mankind and Machine Abstracts the World?

• Ontology in a PLC Context


– A Simple Example and Issues in a PLC Context
– Exis;ng Ontologies for Different Stages in a PLC

• What Can You Learn From This Course?


• Schedule
• Protégé Prac;ces
What is an Ontology?
• Defini;ons (Informa;on Science)
– “An ontology is an explicit specifica;on of a conceptualiza;on”
Tom Gruber [3].
(1) What is an explicit specifica;on?
Explicit: Stated clearly and in detail (leaving no room for confusion or doubt).
Specifica+on: A detailed descrip;on of how to make something.

(2) What is a conceptualiza;on?


Conceptualiza+on: A conceptualiza;on is an abstract, simplified view of
the world that we wish to represent for some purposes.

descrip;on ofofhow
A clear and detailed specifica;on a to make
Ontology conceptualiza;on
an abstract, simplified view of the world.
How Mankind Abstracts and Simplifies the
World?
• The Seman;c Triangle
Pizza consists of a flat round base of dough
baked with a topping of tomatoes and cheese,
typically with added meat, fish, or vegetables.

Knowledge in mankind’s mind


Meanings

stands for
Referents Symbols
Things in the Real World Signs that mankind gives

“Pizza” (wri5ngs) (drawings)



By Ogden and Richards (1923) , in The Meaning of Meaning.
How This Abstracted and Simplified View
Looks Like?
Pizza
stands stands
for stands for
for

stands stands stands stands


for for for for

Hamburger Hot Dog


How This Abstracted and Simplified View
Looks Like? Fish
stands
for

Pizza stands
stands for is a
for stands stands Tuna
Vegetable for stands for
for
contains contains
Sausage Pizza Tuna Pizza
Vegetable Pizza stands
stands contains stands
Sausage for for
for
stands
for is a
stands stands
stands
stands for for
for
for Meat
Vegetarian Pizza Non Vegetarian Pizza

is different from
I want a Pizza, and I
don’t want to eat
How this abstracted and simplified view looks like:
Fish or Meat today.
(1) Using Concepts to classify things in the world;
(2) Describing the rela;onships between Concepts;
(3) Use (1) and (2) to do Logical Inference . We have Vegetable
Waitress Pizzas Customer

Pizza consists of a flat round base of dough baked with a topping of


tomatoes and cheese, typically with added meat, fish, or vegetables.
What is an Ontology?
conceptualiza5on

This abstract and simplified view of the world is represented as “a set of


Concepts and Rela+onships that can exist for an agent or a community of
agents” by Tom Gruber [3]

Ontology is a clear and detailed descrip;on of how to make this


conceptualiza;on, which
(1) introduces the Concepts relevant to a domain of interest
• e.g. “Pizza”, “Hot Dog”, “Hamburger”, “Meat”, “Fish”, “Vegetable”, “Sausage”,
“Tuna”, “Vegetable Pizza”, “Sausage Pizza”, “Tuna Pizza”, “Vegetarian Pizza”, “Non
Vegetarian Pizza”, and so on.

(2) and specifies the Rela+onships between those Concepts


• e.g. “Vegetarian Pizza” is different from “Non Vegetarian Pizza”
“Vegetable Pizza” contains “Vegetable”
“Vegetable Pizza” does not contain “Meat” or “Fish”
“Sausage Pizza” contains “Sausage”
“Tuna Pizza” contains “Tuna”
What is an Ontology?
This abstract and simplified view of the world is represented as “a set of
Concepts and Rela+onships that can exist for an agent or a community of
agents” by Tom Gruber [3]
The one who commits to this conceptualiza5on

“Model“

Engineering Fashion
Domain Domain

Produc;on Engineers Fashion Designers


From Mankind to Machine
Real World
Waitress Customer Machine 2
Machine 1

Exchanging
Vegetarian Pizza Informa;on

agreement
Seman;cs of Exchanged Seman;cs of Exchanged
Meanings of Meanings of Informa;on Informa;on
Vegetarian Pizza Vegetarian Pizza Formalize Ontology Exchanging
agreement Meanings
(Seman;cs)
Knowledge Base

ot ot
It is n It is n Real World
A Simple Example of using a concept
without or with agreement

Bright= giving
Bright= giving out much light
out much light Yes!
Noooo…

We need lamps, which We need lamps, which


can give out much light! can give out much light!

Analysts
Customers Analysts
Customers Agreement

Bright= giving
out much light

Bright lamps Bright lamps


Smart lamps Lamps give
with remote out much
control light

Bright= giving
Bright= Intelligent out much light
and quick-wibed
Designers Designers

Without an agreement in the concept “Bright” With an agreement in the concept “Bright”

Oxford Dic;onary=> Bright: (1) giving out much light


(2) Intelligent and quick-wibed
Agreement in a Product Life Cycle
(PLC)Context
√ √
√! ! !

√!
Documents Product Design Models Process Models
Data Models

Document Process System Product Design System Enterprise architecture


and governance Tool

Customers Analysts Designers Engineers Planners


ERP System

Agreement Ontology
(Knowledge Base)
√!

Produc;on Data
Transporters Quality Managers Experienced Operators

MES
Delivery Management System
Quality Control System Manufacture System
√ Formal and Explicit Concepts and Rela;onships
√! !√
√!
Delivery Data
Machine State Data
Quality Control Data ! Implicit Meanings
Different Stages in a Product Life Cycle (PLC)

prepares all the resources that are models, realizes and tests mass produc;on of products and
need by Development Period a prototype product aper-sell services

Pre-development Development Post-development


PLC
Requirement Defini;on Design Implementa;on Produc;on Maintenance Re;rement

analyses realizes and produces repairs recycles


generates creates
examines

Pizza Cuber 1, xxxxxxx


2, xxxxxxx
3,…………..
Customer List of Needs
Requirement Product Model Prototype Products Broken Products
List of Resources
Ontology Applica;on Examples
in a Product Life Cycle (PLC)

PLC Periods PLC Phases Ontology Applica+on Examples

Requirement E.g. For iden;fying the inconsistencies


Pre-development among requirements
Defini;on

Design E.g. For Integra;ng mul;-domain


Development knowledge to assist product design
Implementa;on

Produc;on
E.g. For Suppor;ng System
Post-development Maintenance Interoperability and Knowledge Sharing

Re;rement
Ontology Applica;on – During the Product
Design Phase
• Keyword Explana;on

Inconsistency: The fact or state of being inconsistent (Oxford Dic5onary)

In other words, It is the conflict among two or more descrip;ons about one common
object.

An example:
This pizza is a vegetarian pizza.
Inconsistent Consistent

This pizza contains meats. This pizza contains vegetable.


Ontology Applica;on – During the Pre-
Development Period
• One of the Research Ques;ons
– How to iden;fy the inconsistencies among the product
requirements?
• A Brief Introduc;on of One Proposed Solu;on [4]

Reasoning Engine

Requirements Requirement
Knowledge
Base (1) Inconsistencies in Requirements
(2) Reasons of the Inconsistencies

Domain Knowledge
Ontology Applica;on – During the Pre-
Development Period
• An Example (Straightorward Explana;on)
Requirement Examples:
1. The system supports Photo Upload
2. Photos must not exceed 3Mb in size
3. Photos must support bitmaps of at most 1280 * 960 pixels

Domain Knowledge Example:


1. Bitmaps can require a color-depth of up to 24 bits per pixel (1,4,8,16,24 bits)
2. The size of a bitmap approximately equal to its pixels mul;plied by its bits
and divided by 8388608
(1 Mb= 1024 Kb= 1024*1024 bytes= 8*1024*1024bits=8388608bits)

Bitmap
Examples
(1bits/pixel) (8bits/pixel) (24bits/pixel)
In case of
1280*960 pixels ≈0.14Mb ≈1.17Mb ≈3.51Mb
=> Requirement 2 and Requirement 3 are inconsistent with each other.
Ontology Applica;on – During the Pre-
Development Period
• An Example (Technical Explana;on)
Step 1 Domain Knowledge => OWL Expression
Domain Knowledge Example:
1. Bitmaps can require a color-depth of up to 24 bits per pixel (1,4,8,16,24 bits)
2. The size of a bitmap approximately equal to its pixels mul;plied by its bits
and divided by 8388608
(1 Mb= 1024 Kb= 1024*1024 bytes= 8*1024*1024bits=8388608bits)

Web Ontology Language (OWL) Expression of Domain Knowledge


Classes: Bitmap
Proper+es: hasSizeInMb, hasLengthPixels, hasWidthPixels, hasBits
Axioms: Bitmap hasBits exactly 1 {1,4,8,16,24}
Bitmap hasLengthPixels exactly 1 integer
Bitmap hasWidthPixels exactly 1 integer
Rules: Bitmap(?x), hasBits(?x, ?b), hasLengthPixels(?x, ?l), hasWidthPixels(?x, ?w),
mul;ply(?lw, ?l, ?w), mul;ply(?lwb, ?lw, ?b), divide(?mb, ?lwb, 8388608)
-> hasSizeInMb(?x, ?mb)
Ontology Applica;on – During the Pre-
Development Period
• An Example (Technical Explana;on)
Step 2 Requirements => OWL Expression
Requirement Examples:
1. The system supports Photo Upload
2. Photos must not exceed 3Mb in size
3. Photos must support bitmaps of at most 1280 * 960 pixels

Web Ontology Language (OWL) Expression of Requirement


Classes: System, Photo, Bitmap, PhotoUpload, BitmapAtMost1280x960
Proper+es: hasSizeInMb, hasLengthPixels, hasWidthPixels, supportFeature
Axioms: System supportFeature PhotoUpload
Photo hasSizeInMb exactly 1 decimal[<= "3.0"^^decimal]
Bipmap subClassOf Photo
BitmapAtMost1280x960 subClassOf Bitmap
BitmapAtMost1280x960 hasLengthPixels exactly 1 integer[<= 1280]
BitmapAtMost1280x960 hasWidthPixels exactly 1 integer[<= 960]
Ontology Applica;on – During the Pre-
Development Period
• An Example (Technical Explana;on)
Step 3 Reasoning
Web Ontology Language (OWL) Expression of Requirement and Domain Knowledge
Classes: System, Photo, Bitmap, PhotoUpload, BitmapAtMost1280x960,
Proper+es: hasSizeInMb, hasLengthPixels, hasWidthPixels, supportFeature, hasBits
Axioms: System supportFeature PhotoUpload
Photo hasSizeInMb exactly 1 decimal[<= "3.0"^^decimal]
Bipmap subClassOf Photo
BitmapAtMost1280x960 hasLengthPixels exactly 1 integer[<= 1280]
BitmapAtMost1280x960 hasWidthPixels exactly 1 integer[<= 960]
BitmapAtMost1280x960 subClassOf Bitmap
Bitmap hasBits exactly 1 {1,4,8,16,24}
Bitmap hasLengthPixels exactly 1 integer
Bitmap hasWidthPixels exactly 1 integer
Rules: Bitmap(?x), hasBits(?x, ?b), hasLengthPixels(?x, ?l), hasWidthPixels(?x, ?w),
mul;ply(?lw, ?l, ?w), mul;ply(?lwb, ?lw, ?b), divide(?mb, ?lwb, 8388608)
-> hasSizeInMb(?x, ?mb)

Individuals: photo001 type BitmapAtMost1280x960


photo001 hasBits 24
photo001 hasLengthPixels 1280
photo001 hasWidthPixels 960

Inference: photo001 hasSizeInMb “3.515625”^^decimal


Ontology Applica;on Examples
in a Product Life Cycle (PLC)

PLC Periods PLC Phases Ontology Applica+on Examples

Requirement E.g. For iden;fying the inconsistencies


Pre-development among requirements
Defini;on

Design E.g. For Integra;ng mul;-domain


Development knowledge to assist product design
Implementa;on

Produc;on
E.g. For Suppor;ng System
Post-development Maintenance Interoperability and Knowledge Sharing

Re;rement
Ontology Applica;on – During the
Development Period
• One of the Research Ques;ons
– How to represent, share and reuse of exis;ng knowledge to assist
Product Design?
• A Brief Introduc;on of One Proposed Solu;on [5]

ISO 10303
(Product Technical
Data Standard)

Formaliza;on
User Interface

Domain Knowledge
about Cost Es;ma;on
(e.g. Labor Cost, Mar;al Cost,
Tooling Cost.)
Engineering Constrains
Verifica;on of Engineering Constraints

Real-;me query of Cost Data

Specific Terms in
Cost Modeling Tool
(SEER-DFMTM)
and CAD System
(CATIA)
Ontology Applica;on – During the
Development Period
• An Example (Straightorward Explana;on)
Domain Knowledge
A CAD Model
(1) Duc;le cast iron is a material. This raw material costs $0.6325 per Kg.
(Based on the real ;me query of Cost Es;ma;on System: SEER-DFMTM)

SEER Cost Es;ma;on System

Material: Duc5le Cast Iron

Data automa;cally populated


from CAD model

Weight: 1.98 kilograms

Cost: $1.25
Ontology Applica;on – During the
Development Period
• An Example (Straightorward Explana;on)
Domain Knowledge
A CAD Model
(1) Duc;le cast irons is a material. This raw material costs $0.6325 per Kg.
(Based on the real ;me query of Cost Modelling System: SEER-DFMTM)

(2) Sand Cas;ng Process is a manufacturing process. The size range for
manufacturing process of sand cas;ng can be applied from 200 grams to 100
kilograms in weight.

Define the Manufacturing Process:


Sand Cas5ng

Material: Duc5le Cast Iron

Data automa;cally populated


from CAD model

Weight:
Weight:1.98
150 kilograms
grams

Cost: $1.25
Ontology Applica;on Examples
in a Product Life Cycle (PLC)

PLC Periods PLC Phases Ontology Applica+on Examples

Requirement E.g. For iden;fying the inconsistencies


Pre-development among requirements
Defini;on

Design E.g. For Integra;ng mul;-domain


Development knowledge to assist product design
Implementa;on

Produc;on
E.g. For Suppor;ng System
Post-development Maintenance Interoperability and Knowledge Sharing

Re;rement
Ontology Applica;on – During the
Produc;on Phase
• Keyword Explana;on (1/2)

Interoperability: The ability of two or more systems or components to


exchange informa;on and to use the informa;on that has been exchanged
(IEEE standard computer glossaries)
Not able to display correct text messages
Exchange text messages
An Example:

“中午吃披萨?”

A B
Interoperability
Ontology Applica;on – During the
Produc;on Phase
• Keyword Explana;on (1/2)

Interoperability: The ability of two or more systems or components to


exchange informa;on and to use the informa;on that has been exchanged
(IEEE standard computer glossaries)
Display correct text messages
Exchange text messages
An Example:

“中午吃披萨?”

“好” B
A
Syntac;c Interoperability: E.g. Two systems exchange and display “中午吃披萨?” and “好”
Ontology
Seman;c Interoperability: E.g. Two systems share the meanings of “中午吃披萨?” (Pizza for lunch?)
and “好” (Ok).
Ontology Applica;on – During the
Produc;on Phase
• Keyword Explana;on (2/2)

Data Structure: A logical rela;onship among data elements, designed to


support specific data manipula;on func;ons. (IEEE standard computer
glossaries)

In other words, a par;cular way of organizing data in a computer so that it can be used
efficiently.

An Example:
Curi;ba C0799
C0739

C0778 Ochakovo
Brahma

Harbin Beer
Harbin Moscow

Data Data Model


Ontology Applica;on – During the
Produc;on Phase
• Keyword Explana;on (2/2)

Data Structure: A logical rela;onship among data elements, designed to


support specific data manipula;on func;ons. (IEEE standard computer
glossaries)

In other words, a par;cular way of organizing data in a computer so that it can be used
efficiently.

An Example:
Curi;ba C0799
Product Company City
C0739
ID Name Name

C0778 Ochakovo
Brahma

Harbin Beer
Harbin Moscow

Data Data Model


Ontology Applica;on – During the
Produc;on Phase
• One of the Research Ques;ons
– Each enterprise applica;on within a factory has its own data
structure, how to enable the interoperability among different
applica;ons?
• A Brief Introduc;on of One Proposed Solu;on [6]

ERP System CAD System MES PDM System


(Enterprise Resource (Computer Aided (Manufacturing (Product Data
Planning) Design) Execu;on System) Management)

ISO 10303 IEC 62264


(Product Technical (ERP/MES
Data Standard) data Standard)

Product Informa;on Model Product Ontology (ONTO-PDM)

Step 1 Conceptualising Exis;ng Standards Step 2 Formalizing Informa;on Model into Product Ontology
Ontology Applica;on – During the Product
Design Phase
Domain Knowledge:
• Tradi;onal Data Exchange Scenario A City is located in a Country
Brazil, China, Russia are countries
Curi;ba is a city in Brazil
Harbin is a city in China
Moscow is a city in Russia

Product Company City Product Industry Country


ID Name Name ID Name Name
C0739 Brahma Curi;ba C0739 Brahma Brazil

C0778 Harbin Beer Harbin C0778 Harbin Beer China

C0799 Ochakovo Moscow C0799 Ochakovo Russia

An example of data model in System One An example of data model in System Two
System One

System Three
System Two

System Five
System Four
Ontology Applica;on – During the Product
Design Phase
• Domain Knowledge => Domain Ontology
isLocatedIn
Domain Knowledge: Country City
A City is located in a Country
Brazil, China, Russia are countries
Curi;ba is a city in Brazil
Harbin is a city in China Brazil Curi;ba
Moscow is a city in Russia isLocatedIn

Russia Moscow

China Harbin
isLocatedIn
Domain Ontology:
Class: City, Country
Proper+es: isLocatedIn
isLocatedIn exactly 1
Individuals: Brazil, China, Russia, Curi;ba, Harbin, Moscow
Axioms: City isLocatedIn exactly 1 Country
Brazil type Country Graphical Explana;on
China type Country
Russia type Country
Curi;ba type City
Herbin type City
Moscow type City
Curi;ba isLocatedIn Brazil
Harbin isLocatedIn China
Moscow isLocatedIn Russia
Ontology Applica;on – During the Product
Design Phase
• Proposed Solu;on: Data Exchange based on Ontology
Domain Ontology:
Class: City, Country
Proper+es: isLocatedIn
Individuals: Brazil, China, Russia,
Curi;ba, Harbin, Moscow
Product Company City Axioms: City isLocatedIn exactly 1 Country Product Industry Country
ID Name Name Brazil type Country ID Name Name
China type Country
C0739 Brahma Curi;ba C0739 Brahma Brazil
Russia type Country
Curi;ba type City
C0778 Harbin Beer Harbin C0778 Harbin Beer
Herbin type City
Moscow type City C0799 Ochakovo
C0799 Ochakovo Moscow
Curi;ba isLocatedIn Brazil
Harbin isLocatedIn China
An example of data model in System One Moscow isLocatedIn Russia An example of data model in System Two

System One

System Three
System Two Domain Ontology

System Five
System Four
The Conclusion of An Ontology in the PLC?

• Ontology can :
– Formally Represent Knowledge
– Support the Reuse and Sharing of that Knowledge
– Assist the Iden;fica;on of Inconsistencies
– Support the Interoperability
– Discover New Knowledge
What Can You Learn From This Course?
• For students who want to have a research career.
– A Method to Formally Represent Knowledge
– A Solu;on to Share and Reuse Knowledge
– The Basis Principles to Support Them: Such as OWL 2 Syntax

• For students who want to have a engineering career.


– An Approach to Support Interoperability
– The New Skill to Formalize Knowledge.
– A Tutorial of Protégé Ontology Editor
• How to build an ontology through Protégé ?
• How to use a reasoning engine to perform reasoning and querying?
Course Outlines
• What is an Ontology? (1 Lecture)
• Important Terms in Ontology (7 Lectures)
– Axioms
– Concepts
– Rela;onships
– Complex Class Expressions
– Data Ranges
– Reasoning Rules
– Knowledge Base (T-box and A-box)
– SPARQL Query
A Ontology Handbook

Title: HANDBOOK ON ONTOLOGIES


Editors: Staab, Steffen, Studer, Rudi (Eds.)
Publisher: Springer
ISBN: 978-3-540-92673-3
Contact
• Office Address
– PPGEPS, Room 15 (Blue building, Second floor)
• Schedule
– Each Wednesday 9:00-11:00
– Or By appointment
• Contact
– yongxin.liao@pucpr.br
Protégé Prac;ces
• What is Protégé?
– It is a knowledge-modeling environment
– It is a free, open-source sopware
– It is developed at Stanford University
– It has a large user community (more than
240,000 registered users)
Protégé Prac;ces
• Installa;on and Browse
– Installing the Protégé Ontology Editor
• hbp://protege.stanford.edu/
– Downloading One Ontology from Ontology Library
• hbp://protegewiki.stanford.edu/wiki/Protege_Ontology_Library
– Loading the Ontology into Protégé
• Open Protégé Desktop
• Clicking “File”-> “Open”-> The Ontology of interest
– Using Protégé to browse the contents in the Ontology
References
[1] Gene Ontology: hbp://geneontology.org/
[2] Siri Technical Report (2011):
hbp://www.unwiredview.com/wp-content/uploads/2011/10/iPhone-Siri.pdf
[3] T. R. Gruber. A transla;on approach to portable ontologies. Knowledge Acquisi;on,
5(2):199-220, 1993.
[4] T. H. Nguyen, B. Q. Vo, M. Lumpe, and J. Grundy, “KBRE: A framework for
knowledge-based requirements engineering,” SoSw. Qual. J., vol. 22, no. 1, pp. 87–
119, 2014
[5] Li, C.: Ontology-Driven Seman;c Annota;ons for Mul;ple Engineering Viewpoints in
Computer Aided Design, PhD Thesis (2012).
[6] H. Panebo, M. Dassis;, and A. Tursi, “ONTO-PDM: Product-driven ONTOlogy for
Product Data Management interoperability within manufacturing process
environment,” Adv. Eng. Informa;cs, vol. 26, no. 2, pp. 334–348, 2012.
Thank you
for your aben;on!

Any Ques;ons?

You might also like