26
Building the Environment for the Things as a Service Semantics in BETaaS GWS 2014 – Aalborg Belén Martínez (TECNALIA)

Building the Environment for the Things as a Service

  • Upload
    vadin

  • View
    16

  • Download
    0

Embed Size (px)

DESCRIPTION

Building the Environment for the Things as a Service. Semantics in BETaaS GWS 2014 – Aalborg Belén Martínez (TECNALIA). Context Manager. Semantic in BETaaS is implemented by the Context Manager: OSGi component. Goal : - PowerPoint PPT Presentation

Citation preview

Page 1: Building the Environment for the Things as a Service

Building the Environment forthe Things as a Service

Semantics in BETaaSGWS 2014 – Aalborg

Belén Martínez (TECNALIA)

Page 2: Building the Environment for the Things as a Service

Context Manager• Semantic in BETaaS is implemented by the Context Manager: OSGi

component.

• Goal:– Unify the information that comes from heterogeneous resources and

applications.

– Infer knowledge from raw data in a context-aware fashion.

• How:– Build a network of ontologies based on existing ontologies that fit our

requirements: BETaaS Ontology.

– Create the network of ontologies reusing ontologies that:• are relevant in their domains.• model the 2 BETaaS scenarios: Home Automation and Smart City.

– Ontology development Apache Jena, an Open Source Semantic Web framework for Java

Page 3: Building the Environment for the Things as a Service

Context Manager• To promote standardization, the BETaaS ontology is populated with WordNet

synsets whenever possible:

– WordNet offers an Open Source online service for linguistic applications

– WordNet groups English words into Synsets (sets of synonyms)

– BETaaS uses synsets to:• Define the requirements of manifest files of applications• To add contextual information to the new things connected to BETaaS

– Synsets are identified by their WordNet identifier

– Disambiguation:

• In the case of words with different meanings represented by different

WordNet synsets

Page 4: Building the Environment for the Things as a Service

Context Manager• A GUI is shown to the user with the definitions of all the WordNet synsets of

the term• Disambiguation example:

– park#1- a large area of land preserved in its natural state as public property– park#6- a gear position that acts as a parking brake

– WordNet organization is based on semantic relationships among synsets

(hypernymy, hyponymy, holonymy and meronymy).

– All synsets inserted in the BETaaS ontology are stored following these

relationships: SKOS

• A common data model to organize clasifications in a hierarchical way.

• Based on RDF

Page 5: Building the Environment for the Things as a Service

Context Manager

• skos:concept - <http://www.betaas.com#room>

• skos:notation – 04112987• skos:prefLabel - “room”@EN• skos:definition – an area within a

building enclosed by walls, floor and ceiling

• skos:conceptScheme - <http://www.betaas.com#area>

• skos:inScheme - <http://www.betaas.com#area>

• skos:narrower - <http://www.betaas.com#kitchen>

• <http://www.betaas.com#bathroom>

Page 6: Building the Environment for the Things as a Service

BETaaS ontology

Page 7: Building the Environment for the Things as a Service

BETaaS things ontology & BETaaS context ontology

Page 8: Building the Environment for the Things as a Service

BETaaS things ontology

• IoT-A Domain Model: common

vocabulary

• SSN: to model sensors and actuators

• OWL-Time: to model temporal concepts

• CF: for the representation of climatic and

forecast data

• MUO: to model the units of the

measurements taken

• Populated with instances of UCUM

ontology

Page 9: Building the Environment for the Things as a Service

BETaaS things ontology• Phenonet: representation of sensor and actuator types

• Populated with SKOS collections containing instances of the ontology, which are

represented by Wordnet synsets.

– SKOS collection: representation of a thing by different words of the same family.

– e.g. moistness, humidity and wetness, have different synsets (moistness: 14559507,

humidity: 14559245, wetness: 14558298) but belong to the same WordNet cluster or

family they can be stored together in a SKOS collection

• When a new thing is connected and its type is defined, how is it added to

Phenonet?:

– Disambiguation by the user, in case it is needed.

– If the term is not found in the ontology, its WordNet family is analyzed.

– If the family exists, the term is added to the SKOS collection.

– If the family doesn´t exist, a new SKOS collection is added to the ontology.

Page 10: Building the Environment for the Things as a Service

Context definition• Context in BETaaS: the circumstances of the things that can affect their

behaviour

– Battery level

– Available computing capacity

– Communication protocol used

– Location: four parameters are possible

• Geographical coordinates: for outdoor scenarios only.

• City name: automatically calculated from GPS coordinates, by GeoNames.

• A keyword (a WordNet synset) describing the location generally (e.g. street).

• A descriptive text (e.g. the name of the street).

• BETaaS is able to adapt to the changing context of the Things by means of the

Trust Manager and the Context Manager

Page 11: Building the Environment for the Things as a Service

BETaaS context ontology

• IoT-A Domain Model: common vocabulary

• FIPA: to model the capabilities of the things

• GeoSPARQL: to model geographical

coordinates.

• GeoNames: to model city names.

• SSN:

– To model keywords and descriptive texts

about locations

– To model the battery level

Page 12: Building the Environment for the Things as a Service

Context: location keywords• Wordnet synsets classified in SKOS hierarchies aligned with the SSN ontology

(dul:hasLocation)

• If keyword for a location of a thing is created, how is it added to SSN?:

• Disambiguation by the user, in case it is needed.

• If the term is not found in the ontology, WordNet is used to analyze the semantic

relationships of this new term.

– Determine if the term is represented by a broader term of a SKOS hierarchy

» Hypernyms and holonyms of the term are analyzed

» e.g. Kitchen has room as hypernym and home as holonym

– If a related term is found: it is inserted in the SKOS hierarchy

– If not, it is inserted in a new SKOS hierarchy formed by the term and its hypernyms and

holonyms, if any.

• To ease the implementation, the 2 scenarios have been pre-charged in SKOS

Page 13: Building the Environment for the Things as a Service

Semantic implementation• Every gateway has its own Context Manager

• There is one BETaaS ontology and one semantic parser per gateway

• There is a direct communication between Context managers in order to infer

information when needed

Page 14: Building the Environment for the Things as a Service

How to unify information

• Resources in the Physical Layer expose their data in

different formats (e.g. XML, raw data).

• The Adaptation Layer takes this data that may include

some contextual information.

• More contextual information is introduced by the user

by GUI means.

• A set of parameters is created per thing.

• The set of parameters is translated into JSON format

• The semantic parser translates the JSON file to an

appropriate semantic format (RDF) and inserts the

data into the ontology.

Context Manager

Semantic parser

INSERT CONTEXT UAL INFORMATION

JSON

RDF

Physical layer

Services Layer

Adaptation layer

BETaaS ontology

Page 15: Building the Environment for the Things as a Service

JSON parameters• Output: true (sensor), false (actuator).• Digital: true (digital device), false (analogic device).• MaximumResponseTime: maximum response time (milliseconds).• MemoryStatus: available memory (percentage).• BatteryLevel: battery level (percentage).• Measurement: measurement taken by the thing.• Protocol: the values considered are modelled by instances of the FIPA Device ontology.• DeviceID : identifier of a device, each identifier is unique within a gateway. A device can be composed by more

than one thing.• ThingID: identifier of a thing, each identifier is unique within a gateway.• Type: type of the thing (a keyword). The possible values are classified in families (SKOS collections)

e.g. moistness, humidity, wetness are not synonyms but belong to the same WordNet family. • Unit: units of the measurement taken. Possible values are modelled by instances of the MUO ontology.• Environment: type of scenario where the thing is used: public/private.• Latitude: outdoor location of the thing . Only relevant when environment=public.• Longitude: idem.• Altitude: idem.• Floor: indoor location of the thing (e.g. 1). Only relevant when environment=private.• LocationKeyword: relevant information about the location of a thing (a keyword) e.g. street, park, car…

Possible values are disambiguated by means of WordNet synsets (sets of cognitive synonyms) Keywords are classified in generic classifications (SKOS hierarchies )

• LocationIdentifier: identifier of the location of the thing. Not mandatory. Free text e.g. Oxford, Regency, John1…

Page 16: Building the Environment for the Things as a Service

Thing Services• Paradigm defined to represent the functionalities exposed by the different devices:

– One Thing Service is created for each of the things that are connected to a gateway.

• For devices formed by N things: N Thing Services are created per device.

• Applications interact with Thing Services: there is no direct interaction between

applications and things.

• Thing Services are useful for application developers, in order to deduce what type of

functionalities are available in a gateway.

• When a thing is connected, its associated Thing Service is promoted to upper layers.

Page 17: Building the Environment for the Things as a Service

Thing Services• A naming convention has been defined to represent the Thing Services within a BETaaS

gateway.

• The following parameters are used:

– Output: true(sensorget), false(actuatorset)

– LocationIdentifier

– LocationKeyword

– Type

– DeviceID

– GWID

setLocationidentifierLocationkeywordType_DeviceID_GWID

getLocationidentifierLocationkeywordType_DeviceID_GWID

Page 18: Building the Environment for the Things as a Service

• A presence sensor is installed in the main bathroom of a house, which is located in the first floor. The presence sensor is part of an alarm system, but it is also connected to a gateway (GWID=0002) that belongs to a private BETaaS instance. The sensor is identified by DeviceID=0001 within this gateway.– Output=true (it is a sensor)– Measurement=true/false– DeviceID=0001– Type=Presence– Unit=-– Environment=Private– Latitude=-– Longitude=-– Altitude=-– Floor=1– LocationKeyword=Bathroom– LocationIdentifier=Main

– Thing service createdgetMainBathroomPresence_0001_0002

Examples

Page 19: Building the Environment for the Things as a Service

• A GPS receptor is installed in a public bus. The bus number is 15. When the GPS receptor is turned on, it starts sending the position to a preinstalled BETaaS GW (GWID=0003) that belongs to a public BETaaS instance. The GPS receptor is identified by DeviceID=0054 within this gateway.– Output= true (it is a sensor)– Measurement=-– DeviceID=0054– Type=Location– Unit=Degrees– Environment=Public– Latitude=X– Longitude=Y– Altitude=Z– Floor=-– LocationKeyword=Bus– LocationIdentifier=15 – Thing service createdget15BusLocation_0054_0003

Examples

Page 20: Building the Environment for the Things as a Service

• A traffic sensor provided by a 3rd party is installed in Via del Brennero street in the city of Pisa. As the traffic sensor supports public and private systems, it is also connected to a GW (GWID=0004) that belongs to a public BETaaS instance. The traffic sensor is identified by DeviceID=0100 within this gateway.– Output= true (it is a sensor)– Measurement=intensity (e.g. 506)– DeviceID=0100– Type=Traffic– Unit=cars/hour– Environment=Public– Latitude=X– Longitude=Y– Altitude=Z– Floor=-– LocationKeyword=Street– LocationIdentifier=Via del Brennero – Thing service createdgetViaDelBrenneroStreetTraffic_0100_0004

Examples

Page 21: Building the Environment for the Things as a Service

• One temperature sensor and one humidity sensor offered by the same device are installed in the kitchen of a house, the kitchen located in the first floor. Both sensors are connected to a gateway (GWID=0002) that belongs to a private BETaaS instance. The device is identified by DeviceID=0005 within this gateway.

• Output=true (it is a sensor)• Measurement=degrees (e.g.20)• DeviceID=0005• ThinID=0001• Type=Temperature• Unit=Celsius• Environment=Private• Latitude=-• Longitude=-• Altitude=-• Floor=1• LocationKeyword=Kitchen• LocationIdentifier=-

Thing services createdgetKitchenTemperature_0005_0002 getKitchenHumidity_0005_0002

Examples

• Output=true (it is a sensor)• Measurement=humidity (e.g.60)• DeviceID=0005• ThingID=0002• Type=Humidity• Unit=-• Environment=Private• Latitude=-• Longitude=-• Altitude=-• Floor=1• LocationKeyword=Kitchen• LocationIdentifier=-

Page 22: Building the Environment for the Things as a Service

• Different moments: – When analyzing the features of a new thing connected to BETaaS– When analyzing the requirements of the manifest file of an application – At the time of execution of applications

• The CM uses mechanisms based both on WordNet and on semantic rules, to infer knowldege.

• Recapitulation of mechanisms based on WordNet to infer knowledge:

– Disambiguation of terms with different meanings:

• A GUI showing the definitions of all the WordNet synsets of the term

• Useful to disambiguate:– the metadata that describes a thing connected to BETaaS– the resources needed by an application

Knowledge inference by the CM

Page 23: Building the Environment for the Things as a Service

– Families of types of things:• A family of synsets is classified in the same SKOS collection.

• CM uses WordNet in order to infer if synsets with different meanings belong to the same family.

• Useful to:– Classify the type of a new thing connected to BETaaS:

» e.g. if there is a collection formed by moistness and humidity, the CM would infer that a thing that measures humidity belongs to the family although all the terms have different synsets.

– Determine the type of things that an application is demanding:» e.g. if an application demands moistness, things classified as humidity

sensors are valid.

– Relationships among locations:• The CM uses relationships among WordNet synsets, expressed by means of

SKOS classifications, to deduce relationships among locations.

Knowledge inference by the CM

Page 24: Building the Environment for the Things as a Service

• Useful to:– Classify the location of a new thing connected to BETaaS:

» Hypernyms and holonyms are analyzed to determine if the term is represented by a broader concept present in the ontology

» e.g. kitchen has room as hypernym, and home as holonym

– Determine which locations are valid for an application demanding information» Hyponyms and meronyms are analyzed to determine if the term is

represented by any narrower concept present in the ontology» e.g. The term home has condominium as hyponym and kitchen as meronym .

If an application needs the temperature at home, a temperature sensor installed in the kitchen is valid.

Knowledge inference by the CM

Page 25: Building the Environment for the Things as a Service

• Mechanisms based on semantic rules to infer knowledge:– The scenarios have been analyzed to detect the rules to be applied

– Semantic rules have been defined in the CM to detect:• Equivalent Thing Services (associated to things of the same type in the same

location)– e.g. two temperature sensors in the garden of a house would offer Equivalent

Thing Services

• The operator to be applied when different Thing Services have to be combined– e.g. If an application demands the presence at home, BETaaS would combine info

from presence sensors installed in the kitchen, the bedroom and the toilet.

– Rules are executed by a semantic reasoner (Jena Rule Reasoner)

Knowledge inference by the CM

Page 26: Building the Environment for the Things as a Service

Thank you