contour map matching for event detection in sensor networks wenwei xue joint work with qiong luo,...
TRANSCRIPT
Contour Map Matching for Event Detection in Sensor Networks
Wenwei XueJoint Work with Qiong Luo, Lei Chen
and Yunhao Liu
Department of Computer Science and EngineeringHong Kong University of Science and Technology
SIGMOD 2006 2
Surveillance Applications of WSNs
• Monitor physical-world events of interest Examples: gas leakage, object appearance
• A case study: coal mine surveillance Hundreds of sensor nodes deployed in a coal mine
Measure the density of gas, dust and oxygen Measure temperature, humidity and structural integrity
Two common classes of event detection tasks: Gas, dust and water leakage detection Oxygen density monitoring
SIGMOD 2006 3
Threshold-Based Event Detection
• Typical in recent work on sensor databases
• Set thresholds in query predicates An event is regarded as occurred when:
Sensor readings exceed a threshold value
Example query: SELECT nodeid FROM sensors WHERE gas_density > 20%
• Defects Unable to fully express many events Difficult to specify suitable threshold values
SIGMOD 2006 4
• Pattern-based event detection Based on a main observation obtained from:
Various field studies Analysis of real-world datasets collected
Integrated with distributed sensor query processing
Our Proposal
a spatio-temporalpattern
an event
Pattern MatchingEvent Detection
SIGMOD 2006 5
Contour Map
• Topographic map over the whole sensor network
• Display value distribution of an attribute E.g., temp, gas_density, oxy_density
• Partition of geometric space occupied by the network Consist of disjoint contour regions A contour region:
Contain adjacent nodes of similar readings Bounded by contour line or contour
• Map Snapshot Instance of the contour map at a specific time
SIGMOD 2006 6
Contour Mapping on a 2x2 Grid
contours in a map snapshotSpatial pattern
evolution of contours along timeTemporal pattern
contour mapsSpatio-Temporal pattern
Partial map
Map snapshot
Contour region unit
SIGMOD 2006 7
Pattern-Based Event Specification
• Definition of general events A time series with equal time interval between elements
Each element is a user-specified partial map
• Definition of three common types of events Derived from the coal mine surveillance application
Gas leakage Water leakage Place with dense oxygen
SIGMOD 2006 8
Event-Driven Queries
• Extension of SQL-based sensor query language Adopted in TinyDB, Cougar
• Encapsulate events as Boolean methods Query predicates in the WHERE clause
• Encapsulate contour mapping as table-valued functions Virtual tables in the FROM clause
• Example:
SELECT alarm() FROM contour_map(gas_density, 0.3, 0.5) c WHERE pyramid(c.snapshot, “gas_leakage.xml”) SAMPLE PERIOD 2 min
SIGMOD 2006 9
Event-Oriented Query Processing
Server
Query
Contour mapping
Contour map matching
SIGMOD 2006 10
In-Network Map Construction
• Motivation Communication dominates power consumption Centralized data collection is energy-inefficient
• Assumptions: [Hellerstein et al. 2003] Static sensor network with known node locations
A rectangular m*n grid with cell length l At most one node inside each cell
• A special kind of data aggregation Data aggregated on a node: partial map
Contour map of the sub-network rooted at the node Multi-path, ring-based routing
SIGMOD 2006 11
Partial Map Aggregation
0
2 3
1
temp = 40 C
temp = 30 C
temp = 30 C
temp = 30 C 4
5 7
6
temp = 40 C
temp = 30 C
temp = 40 C
temp = 40 C
SIGMOD 2006 12
Contour Region Merging
• Core of partial map aggregation
• Previous criterion: equi-width bucket
• Our criterion: Combine attribute value with region area
Mapping accuracy vs. communication cost Involve two user-specified parameters:
Error bound: (0, 1) Merging limit: p (0, 1]
Associate two variables to each region Ri
Error bound: i
Linear regression model: fi(x, y) = w0 + w1 * x + w2 * y Merge regions that result in a merging error smaller than
According to a kind of regression-based error estimation
SIGMOD 2006 13
• On each non-leaf node: The error bound ij of merging a pair of adjacent or
overlapping regions (Ri, Rj) is computed as:
Estimation of Merging Error Bound
)1(*)"'( ijijijij
Ri Rj
ji
Rj
jij
Ri
iij
ij
dσyxfdσyxf
dσyxfyxfdσyxfyxf
),(),(
)),(),(()),(),((
'
Ri Rj
ji
Ri Rj
jjii
ij
dσyxfdσyxf
dσyxfdσyxf
),(),(
),(),("
**
)*
*),min(,0max(
grid
gridjiij
σp
σpσσ
Region area
Regression function
Error bound
Penalty factor
SIGMOD 2006 14
Algorithm for Contour Region Merging
ij
Ri Rj Rk
fk(x,y): incremental recomputation
k ij
RlRm
Rn
lm / lm > ln / ln
Merge (Rl, Rm) first
Two non-mergeable, overlapping regions
Remove Rw from Ru
Ru
Rv
sizeof(Ru – Rw) + sizeof(Rv) <
sizeof(Rv – Rw) + sizeof(Ru)
Rw
SIGMOD 2006 15
Schemes for Communication Saving
• Contour compression Eliminate inner region boundaries Store vertices on each outer boundary interleavingly
• Optimization of map transmission Based on packet snooping Suppress the transmission of redundant regions
• Incremental map update Cache old maps used in previous sample period Construct new map based on cached and delta data
SIGMOD 2006 16
Experimental Setup
• Homegrown sensor network simulator Simulated application scenario: coal mine surveillance
• Data generation: synthetic datasets Three attributes: gas_density, oxy_density, humidity Preserve characteristics of a real-world dataset
• Query workload Four classes of queries: QC1-QC4 Represent the four types of events we define
• Approach compared INLR (In-Network Linear Regression) INEB (In-Network Equi-width Bucket) SSLR (Server-Side Linear Regression)
SIGMOD 2006 17
Efficiency of Our Approach
• Network traffic saving achieved by individual schemes: CCS: 25%, SNP: 55%-70%, IUS: 65%-70%
• Total saving of network traffic by combining all three: INLR: 90%
0
10
20
30
40
QC1 QC2 QC3 QC4Query Class
Net
wo
rk T
raff
ic (M
B)
ORI
CCS
SNP
IUS
INLR
SIGMOD 2006 18
Accuracy of Three Approaches
• All approaches achieve 100% precision consistently
• INLR achieves comparable accuracy to SSLR and outperforms INEB
0%
20%
40%
60%
80%
100%
0% 10% 20% 30% 40%
Link Loss Rate
Re
ca
ll INLR
INEB
SSLR
SIGMOD 2006 19
Network Traffic of Three Approaches
0
2
4
6
8
10
0% 10% 20% 30%
Event Frequency
Ne
two
rk T
raff
ic (
MB
)
INLR
INEB
SSLR
0
2
4
6
8
0% 10% 20% 30% 40%
Link Loss Rate
Net
wor
k Tr
affic
(MB
)
INLR
INEB
SSLR
(a) (b)
(c) (d)
0
4
8
12
16
0 10 20 30 40
Transmission Range (meter)
Net
wo
rk T
raff
ic (M
B)
INLR
INEB
SSLR
0
20
40
60
80
100
0 100 200 300
Network Diameter (meter)
Ne
two
rk T
raff
ic (
MB
)
INLR
INEB
SSLR
SIGMOD 2006 20
Conclusion
• Pattern-based event detection for WSNs Matching user-specified patterns with contour maps Energy-efficient in-network contour mapping Pattern-based definitions to events Integration with distributed sensor query processing
• Future work Real prototype implementation and evaluation Revision of pattern-based event specification Evaluation with patterns generated by real-world events