C2.7 Building intelligent cargo solutions using semantic web technology

49
www.i- cargo.eu Intelligent Cargo in Efficient and Sustainable Global Logistics Operations Building intelligent cargo solutions using Semantic Web Technology --- iCargo Training Series 29.01.2015

Transcript of C2.7 Building intelligent cargo solutions using semantic web technology

www.i-cargo.eu

Intelligent Cargo in Efficient and SustainableGlobal Logistics Operations

Building intelligent cargo solutions using

Semantic Web Technology---

iCargo Training Series29.01.2015

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Building Intelligent Cargo Solutions using

Semantic Web Technology

Matthijs PunterLaura Daniele

Maarten Steen

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 3

1. IntroductionChallenges when building iCargo solutionsThe concept of an Access Point

2. Logistics core ontology to create semantic models for Access Points3. Setting up a Semantic Web Access Point

The Truckers United caseCreating a Semantic Model and URI SchemeTechnical Architecture for a Semantic Web APConnecting a Legacy SystemManage the Access PointExpose the data

4. Conclusions5. Q&A

Agenda

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Introduction

Matthijs Punter

4

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

• New logistic services in the business ecosystemSynchronize vehicle movements, dynamic planning, adapt to changing conditions, combine services, monitor emissions, …

• Intelligent cargo solutionsMonitoring your logistic services, chain planning module, CO2 calculation tool, …

• IT architectureFacilitating data exchange and collaboration in the business ecosystem

iCargo

5

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

• “Truckers United”• Context

– Container terminal– Collective of 150 independent truck operators

• Objective– Reduce turnaround time at the terminal– Assist truck operators to plan their operation – Assist terminal planners to optimize their operations

• Goal: build a tool that supports this type of dynamic planning

Example of an iCargo solution

6

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Truckers United – data requirements

7

Vehicle movement data of 150 trucks

Terminal operation data

Real-time data on traffic conditions

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Challenges

8

Connect a large number of organizationsDeal with different technologies used

Deal with differences in semantics between these organizations

Speed-up development, lower costs Future proof: provide a foundation for further

intelligent cargo solutions

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

iCargo Access Point

9

AP

AP

AP

AP

AP

AP

Organization

OrganizationOrganization

OrganizationOrganization

Organization

• Software component or cloud service

• Deploy once• Provides connectivity with

every other access point in your business community

• Secure and controlled data sharing

• Provides the required data for your iCargo solution

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

1. eFreight Access Point• Based on traditional XML-message exchange and webservices.

2. iCargo Access Point/REST-API• Based on new iCargo REST-API• Implemented in iCargo pilots

3. iCargo Access Point based on semantic web technology• Technological demonstrator• Based on next-generation semantic web technology and linked

data• Focus of this webinar

Access Point Technologies

10

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Configuring your Access Point

11

Organization APSet-up connections with existing (legacy) databasesor mobile Access Points

Organization APConfigure your Access Point with a semantic model, specifying the semantics of your data

supported by a logistics core ontology

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 12

1. IntroductionChallenges when building iCargo solutionsThe concept of an Access Point

2. Logistics core ontology to create semantic models for Access Points3. Setting up a Semantic Web Access Point

The Truckers United caseCreating a Semantic Model and URI SchemeTechnical Architecture for a Semantic Web APConnecting a Legacy SystemManage the Access PointExpose the data

4. Conclusions5. Q&A

Agenda

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Logistics core ontologyto create semantic models for Access Points

Laura Daniele

13

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

• We regard logistics as the set of activities that take place among several actors in order to deliver certain products at the right time, right place and under the right conditions, by using suitable resources.

• The Logistics Core Ontology (LogiCO) specifies the main concepts adopted in the logistics domain (such as Activity, Actor, Product, Time, Place, Condition, Resource, etc.)

– NO one single common ontology for all possible applications in logistics– YES a network of ontologies based on some common agreed concepts (defined in

LogiCO)– Extendible and adaptable for specific uses

• The Logistics Service ontology (LogiServ) is an extension of LogiCO to model business activities (such as Transport, Transhipment, Load, Discharge, Storage, Consolidation, Deconsolidation, etc.) and their properties as the basis for specifying logistic services

Logistics Core Ontology (LogiCO)

14

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Core concepts

15

activity

conditions

actor

placeresource

product

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

• Use case 1: create instances of LogiCO– a moveable equipment of type “container” with ID “123” and size “20feet” contains

“perishable” products of type “fresh agricultural product” that is packaged in “10 boxes”. This container is moved by a transport means of type “truck” with licence plate “xy-987-z”

• Use case 2: extend LogiCO with new concepts– LogiServ extends LogiCO with new concepts necessary to model logistic services (see

logiserv)

• Use case 3: derive a new Semantic Model from LogiCO– (a subset of concepts of) LogiCO can be used to create Semantic Models for Access

Points (see slide 21)

• Use case 4: map existing Semantic Models using LogiCO– Through its core concepts that are commonly used by organizations in the logistics

domain, LogiCO can be used as adaptor to translate between different Semantic Models used by different Access Point (see slide 21)

LogiCO use cases

16

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 17

CargoFresh agricultural products

SM1 SM2

Semantic interoperability without LogiCO

LOGISTICS SERVICE CLIENT (LSC) Consignee of ”fresh

agricultural products”

FREIGHT SERVICE INTEGRATOR (FSI) Company arranging cargo

transportation on behalf of the LSC

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Semantic interoperability without LogiCO

18

AP

AP

AP

AP

AP

AP

Organization

Organization

Organization

Organization

Organization

SM1

SM2

SM6

SM5

SM4

SM3

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Semantic interoperability with LogiCO

19

LogiCO

CargoFresh agricultural products

SM1 SM2

LOGISTICS SERVICE CLIENT (LSC) Consignee of ”fresh

agricultural products”

FREIGHT SERVICE INTEGRATOR (FSI) Company arranging cargo

transportation on behalf of the LSC

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 20

AP

AP

AP

AP

AP

AP

Organization

Organization

Organization

Organization

Organization

SM1

SM2

SM6

SM5

SM4

SM3

Semantic interoperability with LogiCO

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Semantic interoperability with LogiCO

21

AP

AP

AP

AP

AP

AP

Organization

Organization

Organization

Organization

Organization

LogiCO

SM1

SM2

SM6

SM5

SM4

SM3Logistics network of ontologies

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Download• http://ontology.tno.nl/logico.ttl• http://ontology.tno.nl/logiserv.ttl

Documentation• http://ontology.tno.nl/logico• http://ontology.tno.nl/logiserv

Logistics ontologies URL

22

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Setting up a Semantic Web Access Point

Maarten Steen

23

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 24

• We leverage Semantic Web standards, such as RDF, URI, OWL, R2RML and SPARQL

What is a Semantic Web AP?

Acronym Standard Purpose

RDF Resource Description Framework The Semantic Web’s data model

URI Uniform Resource Identifier Uniform way of identifying and locating data entities on the Web

OWL Web Ontology Language Language for semantic modelling

R2RML RDB to RDF Mapping Language Language for expressing mappings from relational databases to RDF

SPARQL SPARQL Protocol and RDF Query Language

Query language for the Semantic Web

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 25

A. The Truckers United caseB. Creating a Semantic Model and URI SchemeC. Technical Architecture for a Semantic Web

Access PointD. Connecting a Legacy SystemE. Manage the Access PointF. Expose the Data

Setting up a Semantic Web AP

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

• Truckers United is a collective of road transport companies.

• Truckers United currently has a database-backed system with planning and trip data.

• Truckers United wants to establish an iCargo Access Point for managing and sharing data with the iCargo Ecosystem. – For example, the Truckers United Access Point should

interact with the Access Point of Combined Containers, a large European container terminal.

The Truckers United Case

26

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Example Truckers United monitoring tool

27

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 28

• Various tables with data about drivers, trucks and activities.

• For example, the TruckInfo table:

The Truckers United Database

username truckid owner longitude latitudefuel-level

current-activity

Edvin van der Zee 96-BEO-3 OVERSLAG 4.595692 52.147803 89Driving

Jurg Bruijn 10-BSY-2 OVERSLAG 5.277961 52.012664 54Load

Nikolaas Vis 50-BOS-7 OVERSLAG 4.693067 51.604979 36Startup

Chuck Uil 35-BLC-5 OVERSLAG 4.936114 52.388030 46Pick up

Emmelie Roozendaal 74-BBY-2 OVERSLAG 5.892955 51.134758 23Unload

Currently data is maintained in PostgreSQL

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 29

Create a Semantic Model in OWL

Maarten Steen, TNOiCargo Semantic ToolingWe used TopBraid Composer to create the ontology

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 30

Map to LogiCO for Interoperability

Truckers Ontology

Logistics Core Ontology

Relationships also specified in OWL with TopBraid Composer

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 31

• Schema: http://{domain}/{accesspoint}/id/{type}/{identifier}• Example: http://www.icargo.eu/example/id/Container/123

• Concepts: http://{domain}/def/{ontology}#{type}

• Truckers Ontology: – to: http://interop.sensorlab.tno.nl/def/truckers

• TruckersUnited AP: – tu: http://interop.sensorlab.tno.nl/TruckersUnited

• CombinedContainers AP: – cc: http://interop.sensorlab.tno.nl/CombinedContainers

URI scheme for identifying entities

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 32

Data Storage

Reasoning

Data Publication

Data MngtOntowiki

RDBMS

Ontowiki API

Virt

uoso

Technical Architecture

SPARQL-endpoint

Inference Engine

RDF Store

Data Usage

Other Access Point

Client App

Ontop Quest

OpenRDF Sesame

OpenRDF Workbench

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

• Define mappings between ontology and database schema

Connecting a Legacy System

33

Class Property

Truck URI

driver

licensenumber

owner

fuellevel

status

position

GeoPosition latitude

longitude

Column Table

username truckinfo

truckid

licensenumber

owner

driver

fuellevel

currentactivity

longitude

latitude

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 34

Formalize Mappings in R2RML

SQL Target triples

SELECT truckid, licensenumber, fuellevel, currentactivity FROM truckinfo

tu:id/Truck/{truckid} a to:Truck ; to:licensenumber {licensenumber} ; to:fuellevel {fuellevel} ; to:status {currentactivity} .

SELECT truckid, latitude, longitude FROM truckinfo

tu:id/GeoPosition/{truckid} a to:GeoPosition ; to:latitude {latitude} ; to:longitude {longitude} .

SELECT truckid, owner, username FROM truckinfo

tu:id/Truck/{truckid} to:owner tu:id/Organization/{owner} ; to:driver tu:id/Driver/{username} ; to:position tu:id/GeoPosition/{truckid} .

We defined mappings using ontopPro plugin for Protégé

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 35

• This results in a large collection of RDF triples• Below some examples in shorthand turtle

formattu:/id/Truck/10-BSY-4 to:fuellevel 99 .tu:/id/Truck/10-BSY-4 to:owner tu:/id/Organization/SNELS .tu:/id/Truck/10-BSY-4 to:status "Driving" .tu:/id/Truck/10-BSY-4 to:position tu:/id/GeoPosition/10-BSY-4 .tu:/id/Truck/10-BSY-4 to:activities tu:/id/Activity/BPA_105367 , tu:/id/Activity/BPA_105367 .tu:/id/Truck/10-BSY-4 to:driver tu:/id/Driver/Gijs .tu:/id/Truck/10-BSY-4 to:licensenumber “10-BSY-4" .tu:/id/Truck/10-BSY-4 a to:Truck .

Extract and Convert Data to RDF

We materialized RDF using ontop Quest for Sesame

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 36

Upload the data to an RDF Store

We used Virtuoso Opensource through OntoWiki

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Manage the Access Point

37

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

• SPARQL-Query interface offered out of the Virtuoso box

• Simple REST-style API offered out of the OntoWiki box

Expose the data

38

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 39

• Goto: http://interop.sensorlab.tno.nl:8890/sparql

• Example query for drivers of all trucks:PREFIX to: <http://interop.sensorlab.tno.nl/def/truckers#>PREFIX cc: <http://interop.sensorlab.tno.nl/CombinedContainers/>PREFIX tu: <http://interop.sensorlab.tno.nl/TruckersUnited/>PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>PREFIX owl: <http://www.w3.org/2002/07/owl#>PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT DISTINCT ?truck, ( CONCAT(?firstname, " ", ?lastname) AS ?driver ) WHERE { ?s a to:Truck ; to:driver ?d ; to:licensenumber ?truck. ?d to:firstname ?firstname ; to:lastname ?lastname .}

SPARQL-Query Interface

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu 40

• You can look up information about each entity using its URI. E.g., – http://

interop.sensorlab.tno.nl/TruckersUnited/id/Organization/SNELS • Through content-negotiation the server returns something

human-readable or machine-readable.– HTML: Accept: text/html– RDF: Accept: application/rdf+xml

• Other REST operations:model/info/?m=<model name>view/?r=<entity name>resource/properties/?r=<entity name>

REST-style API

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

1. Create a semantic model and URI scheme2. Map the database schema to the semantic

model3. Convert the data to RDF (using ontop)4. Store the data in an RDF Store (Virtuoso)5. Manage the AP and data with OntoWiki6. Expose the data via SPARQL and API

Summary

41

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Technology Purpose

JDBC Connect to legacy databases

TopBraid Composer Create, edit and relate ontologies

Protégé with ontopPro plugin Create and test DB to ontology mappings

Sesame with ontop Quest Convert relational data to RDF

Virtuoso Opensource Store RDF data; provide SPARQL-endpoint

OntoWiki Entity management; REST API

CIMtool Derive semantic model from core ontology

Summary of used Technology

42

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Conclusions

43

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

1. Access Points can facilitate the development of intelligent cargo solutions– Connect once – use many times– Controlled data sharing in a business community

2. Three types of Access Point– eFreight Access Point (message based)– iCargo REST-style Access Point– Semantic Web Access Point

Conclusions

44

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

3. Logistics core ontology can be used to configure the semantics of an Access Point

4. Access Points can be integrated with your existing systems and databases

5. Semantic Web Access Point brings the new world of the semantic web and linked data to intelligent cargo

Conclusions

45

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

• Please visit our website www.i-cargo.eu

• Demo available on Github– https://

github.com/m-steen/icargo-semantic-tooling/tree/master/demos

• Logistics core ontology available for download– http://ontology.tno.nl/logico– http://ontology.tno.nl/logiserv

More information

46

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Establishing Access Points with Semantic Web Technology

Q & A

Matthijs PunterLaura Daniele

Maarten Steen

Intelligent Cargo in Efficient and Sustainable Global Logistics Operationswww.i-cargo.eu

Thank you

Matthijs PunterLaura Daniele

Maarten Steen

48

www.i-cargo.eu

Intelligent Cargo in Efficient and SustainableGlobal Logistics Operations

Credits:

Presented by: Matthijs Punter (TNO), [email protected] Daniele (TNO), [email protected] Maarten Steen (TNO), [email protected]

Material: Matthijs Punter, Laura Daniele, Maarten Steen