1 Logic-based Markup and Logic-based Markup and Query Language - - PDF document

1
SMART_READER_LITE
LIVE PREVIEW

1 Logic-based Markup and Logic-based Markup and Query Language - - PDF document

Overview Semantic Streams: a Framework for Composable Motivation Semantic Interpretation of Sensor What are Semantic Streams? Data Logic-based Markup and Query Language Kamin Whitehouse, Feng Zhao, and Jie Liu Query Processing


slide-1
SLIDE 1

1

Semantic Streams: a Framework for Composable Semantic Interpretation of Sensor Data

Kamin Whitehouse, Feng Zhao, and Jie Liu

Presented by Zhen Dai

Overview

Motivation What are Semantic Streams? Logic-based Markup and Query

Language

Query Processing Implementation Summary Critique

Motivation

Fixed sensor infrastructure may be

more common than ad-hoc sensor deployment

These sensors networks do not have

the same technical challenges as multi-hop ones

Non-technical user should not have to

interpret raw sensor data.

Semantic Streams

Allow users to easily query over sensor data For example: “I want the ratio of cars to

trucks in the parking garage”

Build upon the work of previous users Utilize inference units to address new

queries

Allow users to place constraints

  • Confidence level
  • Objective function, e.g. minimize energy

consumption

Semantic Streams Programming Model

Semantic Streams programming model uses two

elements:

Event streams Inference units Event streams – flow of asynchronous events Events can be object or person detection with

properties like time or location

Inference units – processes that operate on event

streams

They infer information from events and may generate

new event streams or add information to existing events

Semantic Streams Programming Model

Inference Unit example Desire new, legal interpretation of

data using existing inference units

Composable Inference

slide-2
SLIDE 2

2 Logic-based Markup and Query Language

Semantic Streams markup and query

language

Based upon SICStus Prolog with constraint

logic programming (real)

Logically governs the inference units Inference units must specify the stream

  • bjects that are needed and produced

It is declarative, unlike imperative

programming

Logic-based Markup and Query Language

Eight predicates are used in Semantic

Streams:

– sensor( <sensor type>, <region> ) – inference( <inference type>, <needs>,

<creates> )

– needs( <stream1>, <stream2>, ... ) – creates( <stream1>, <stream2>, ... ) – stream( <identifier> ) – isa( <identifier>, <event type> ) – property( <identifier>, <value>, <property

name> )

Logic-based Markup and Query Language

Some examples: sensor(magnetometer, [[60,0,0],[70,10,10]]). inference( magVehicleDetectionUnit,

needs( sensor(magnetometer, R) ), creates( stream(X), isa(X,vehicle), property(X,T,time), property(X,R,region) ) )

Queries

Query – logic description of event streams

and properties

Examples: stream(X), isa(X,vehicle) stream (Y ), isa (Y , histogram),

property (Y , X, stream), property (Y , time, property), stream (X), isa (X, vehicle), property (X, [[10,0,0],[32,12,02]], region)

Query Processing

Inference Composition Engine Similar to backward chaining – given a list of

predicates, working backwards, proves each

  • f the predicates with rules from a rule-base
  • r facts

Also uses a virtual representation for each

inference unit to preserve legality

  • Variables are scoped across streams
  • Streams are acyclic

Query Processing

Additional benefits of using inference

composition

Efficient – proof results and inference

units can be reused

  • Resource sharing, e.g. processing cycles

and bandwidth

Mutual dependence – two inference

units can declare each other as a pre- condition

slide-3
SLIDE 3

3 Adding Constraints

Quality of service (QoS) information can be selected

upon, like total latency, energy consumption, confidence level

For example – an inference unit using 10ms to compute

the speed of an object

inference( speedDetectorUnit,

needs( stream(X), isa(X,object), property(X,LS, latency), {L=LS+10} ), creates( stream(X), property(X, S, speed), property(X, L, latency) ) )

Adding Constraints

Multiple constraints can be set if

needed

A range of values can be set for

constraints

Execution monitoring or replanning

  • ccurs at runtime

Error detection occurs at runtime Allows for sensor failure detection

Implementation

Sensor network deployed on second floor of

a parking deck on the Microsoft corporate campus over a 4x5 meter area in front of an elevator

Three different types of sensors used: a web

camera, a magnetometer, infrared break beam sensors

micaZ motes used to control the break beam

and magnetometer sensors

Upont Cappuccino TX-3 Mini PC acts as

microserver

Implementation Implementation

User Interface

Implementation

Consider three hypothetical users: – Police Officer Pat wants a photograph of all vehicles

moving faster than 15mph.

– Employee Alex wants to know what time to arrive at

work in order to get a parking space on the first floor

  • f the parking deck.

– Safety Engineer Kim wants to know the speeds of

cars near the elevator to determine whether or not to place a speed bump for pedestrian safety.

All applications are to run simultaneously Demonstrates automatic resource sharing Reuses inference units

slide-4
SLIDE 4

4 Implementation

Pat

stream(X), property(X,H, histogram), property(X,Y, plottedStream), property(X,time,plottedProperty), stream(Y ), isa(Y ,vehicle),

Implementation

Alex stream(X), property(X,P, photo), property(X,Y, triggerStream), property(X,speed, triggerProperty), stream(Y ), isa(Y ,vehicle),

Implementation

Kim stream(X), property(X,H, histogram), property(X,Y, plottedStream), property(X,speed, plottedProperty), stream(Y ), isa(Y ,vehicle),

Summary

Declarative programming allows non-

technical users to easily extract semantic information

Semantic Streams allows for

inference composition

Users can set the constraints and

  • bjective functions

Comparisons with EnviroSuite

The two programming frameworks are

similar in idea, i.e. managing behavior of the entire network

They both allow confidence level constraints They do both use the idea of abstractions

like logical objects and predicates

EnivroSuite follows the object-based

programming system, however

Critique

Physical simulation of the presented ideas seems

convincing and lends credibility

The paper argues repeatedly for ease of use for non-

technical users, but even given its declarative nature, Semantic Streams may prove formidable in usage for those without a background in logic

One of the arguments for this framework revolves

around allowing for multiple applications running on the same sensor network. How realistic is this scenario in real deployment?

slide-5
SLIDE 5

5 Critique

Given the logical nature of the programming

scheme, it seems that more robust error handling can be easily implemented with regards to setting constraints.

It would be nice to see some concrete

figures, i.e. processing time relative to other frameworks, from the result of the simulation

Minor editing errors

Questions

?