670 likes | 873 Views
Spatial query processing in wireless sensor networks. 任琦 2012-10-24. Outline. Introduction Spatial query processing stages State of the art Duty cycle aware spatial query processing in wireless sensor networks. Outline. Introduction Spatial query processing stages State of the art
E N D
Spatial query processingin wireless sensor networks 任琦 2012-10-24
Outline Introduction Spatial query processing stages State of the art Duty cycle aware spatial query processing in wireless sensor networks
Outline Introduction Spatial query processing stages State of the art Duty cycle aware spatial query processing in wireless sensor networks
Introduction Wireless sensor networks (WSN) are particularly useful for obtaining data concerning events limited to a well-defined geographic region. Such applications typically use spatial queries. In spatial queries the users’ interests are expressed by geographical predicates.
Introduction • Spatial queries VS. traditional queries • incorporate geometry data types eg. points, polygons • consider the spatial relationship between the defined geometries eg. a point inside a polygon or a polygon that overlaps another.
Outline Introduction Spatial query processing stages State of the art Duty cycle aware spatial query processing in wireless sensor networks
Outline Introduction Spatial query processing stages State of the art Duty cycle aware spatial query processing in wireless sensor networks
Spatial query processing stages divide spatial query processing in six stages:
Pre-Processing stage queries are transformed into a sequence of bytes in order to be transmitted by the sensor nodes the parameters of the spatial query
Forwarding stage Originator Coordinator queries are forwarded from the Originator to the region of interest Spatial query processing mechanisms assume that nodes know their location need to choose the routing protocol that better adapts to the target network
Dissemination stage the query is disseminated to all nodes within the region of interest
Dissemination stage window query: defines a region of interest (called window, RoI), asks for data collected by the sensor nodes inside this region k-nearest Neighbor query (KNN): retrieve data from the K nodes closest to query point two types of spatial queries:
Sensing stage the nodes within RoI collect the data required by the query three high level tasks: raw data collection, local information fusion, compression
Aggregation stage • Transmit collected data from the nodes in the RoI to the Aggregator • Perform information fusion in the collected data • two information fusion strategies: • naive • in-network processing
Return stage the Aggregator sends the query result back to the Originator
Outline Introduction Spatial query processing stages State of the art Duty cycle aware spatial query processing in wireless sensor networks
Outline Introduction Spatial query processing stages State of the art Duty cycle aware spatial query processing in wireless sensor networks
Pre-Processing stage • define regions for data collection using • Rectangular • circular • irregular shapes
Forwarding stage • Choose the routing protocols • location-based routing protocols: • use the nodes’ location to create routes • Greedy, GPSR and SQR • Flooding
Flooding in WSN • all nodes receive the query, but just those within the region of interest process it • Advantage • Disadvantage
Greedy protocol Region of Interest Found a Hole Originator Nodes forward the packet to the neighbor closest to the destination depends on a neighbor table hole in the network
GPSR – Greedy Perimeter Stateless Routing Region of Interest Face Originator constructs a planar graph with neighborhood information Packets near a hole are transmitted over the contour of the faces of the planar graph
SQR – Spatial Query Routing • searches for a volunteer among its neighbor • sends the query to this volunteer Broadcasting Receive ACK_Forwarder message Select the first node as next hop Node A: Receive the message Wait for a time period Sending ACK_Forwarder message Candidate: mobile nodes, sleep mode two tasks:
Dissemination stage • Four protocols: • Restricted Flooding • WinDeph • Itinerary-based protocols • SPA
Restricted Flooding • When a node A receives a query, it verifies if it is inside the region of interest. • If true, it will broadcast the query to its neighbors, which saves A as its parent node • routing tree inside RoI • energy consumption
WinDepth Adds identifier Select neighbor: not receive query Send query Receive query result Return query result disseminates the query node by node until all have received the query
Itinerary-based protocols Sense its own data Transmit query and result to next node on Itineray ask neighbor: Sense data Receive information Itinerary: a sequence of nodes within the region of interest that forms a path over which the queries are forwarded Node receives a query follow steps:
Itinerary-based protocols Window Itinerary Path followed by the query Sink IWQE ((Itinerary-base Window Query Execution)
Itinerary-based protocols DIKNN&PCIKNN : divides the RoI into cone-shapes areas centralized at the query point IKNN : Spiral Itinerary& Parallel Itinerary. DIKNN KNN query processing : PCIKNN
SPA – Spatial Propagation and Aggregation divides the region of interest in sub-regions, disseminates the query SPA considers mobile nodes and nodes that turn off their radios to save energy.
Aggregation stage Region of Interest In-network: Naive: 18 Region of Interest 4 4 10 Coordinator 10 Coordinator 4/80 1 1 20 20 1/20 1/25 4 1/15 4 2 2 3 25 3 15 20 25 20 15 • five aggregation operators: • avg, count, sum, max and min • The choice of the aggregation strategy depends on the algorithm used to disseminate the query
Return stage GPSR the opposite route used in the Forwarding stage SQR
Distributed spatial indexes • In WSN, queries are processed in a distributed manner. • Some works defined location-based distributed spatial indexes for spatial query processing • reduce the number of nodes that process spatial queries
GRT – Georouting Tree Transmitted the query Did notTransmitted the query Region of Interest each node saves its parent as well as a bounding box that covers itself and all its descendents
SPIX – Spatial IndeX • each node stores a two-dimensional minimum bounding area (MBA). • MBA: a region that that covers the node and the MBAs of its descendents in the routing tree • two models for creating the MBA: i. rectangular: the minimum bounding rectangle (MBR) that covers the node and all nodes below it in the routing tree ii. angular: the minimum bounding pie represented by a start/end radius and start/end angles
SPIX – Spatial IndeX This node is in another node’s MBA New MBAs after parent-switching “energy optimization phase”
Cluster and index a semi-distributed spatial index divides the WSN in square sub-regions. uses an algorithm based on MBR to disseminate queries from the sink to the cluster-heads
Back Forwarding method the Forwarding stage uses MBR, but in the Aggregation stage a node chooses a different parent for each query Nodes have a list of parent candidates. They prefer a parent that is within the region of interest
Spatial query processing mechanisms • Unstructured: do not create structures, nodes know only the location of their neighbors • IWQE, SWIP,PCIKNN…… • Structured: create a global structure such as index or cluster to process queries. • distributed indexes are created in WSN in order to help processing queries • Georouting Tree , SPIX……
Outline Introduction Spatial query processing stages State of the art Duty cycle aware spatial query processing in wireless sensor networks
Outline Introduction Spatial query processing stages State of the art Duty cycle aware spatial query processing in wireless sensor networks
Motivation In general, the works about spatial query processing in WSN consider that the sensor nodes are always on. Nodes can enter in sleep mode (turn off their radio) in order to avoid idle listening
Motivation • a new energy-efficient mechanism for in-network spatial query processing in WSN that works properly with different types of duty cycle algorithms • Assume : i. the user can start a query processing in any node of the WSN ii. the nodes know nothing about its vicinity • Forward&Return stage: a location-based routing protocol called ABF (Ask Before Forwarding) • Dissemination and aggregation stages: Classic, DRF, Itinerary • RoI:Irregular shapes
ABF – Ask Before Forwarding Protocol The last node in the Forwarding stage and the first node in the Return stage depend on the dissemination algorithm Reference point Restricted Flooding Itinerary
ABF – Ask Before Forwarding Protocol Send the Announce-packet Request-Packet transmission Announce-packet’s transmission delayed Forward the query Sender • ABF strategy • ask for a candidate: look for an active neighbor able to receive and forward packets • forward the query or the query result to this candidate • cope failures caused by interference or node damage
ABF – Ask Before Forwarding Protocol Send query-packet Send request-packet Receice announce-packet Holding query Waiting Announces Sending Query Time out Send the last request-packet Idle a forwarder node:
ABF – Ask Before Forwarding Protocol Send announce-packet Receive request-packet Idle Waiting Twait Waiting Query Receive the first query-packet directed to another node Receive the first query-packet directed to another node Receive the first query-packet directed to it Time out Time out Sleeping Receiving Query Receive query-packet Receive the last query-packet Holding Query a node that received a request-packet:
ABF – Ask Before Forwarding Protocol • Forwarding failure • Each node maintains two lists of nodes: • i. Nodes to whom it sent the query • ii. nodes from whom it received the query