Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Activity Recognition Through Complex
Event Processing: First Findings
Sylvain Hallé, Sébastien Gaboury
and Bruno Bouchard
...
IMPOSTOR WARNING
1. ...
2. ...
3. ...
1. ...
2. ...
3. ...
X
1. ...
2. ...
3. ...
X
. . .
. . .
Time
Power
Peak
Plateau
0
200
400
600
800
1000
1200
8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754
S.WL2
S.WL1
T.x
Example: Blender
SS-PL3>-393
| FFT-L2-6<=-3
| | SS-PL2<=1071: ToasterON
| | SS-PL2>1071: ElectricKettleON
| FFT-L2-6>-3
| | FFT-L2-6<=9
| |...
SS-PL3>-393
| FFT-L2-6<=-3
| | SS-PL2<=1071: ToasterON
| | SS-PL2>1071: ElectricKettleON
| FFT-L2-6>-3
| | FFT-L2-6<=9
| |...
Alan Perlis
(1922-1990)
Beware of of the
Turing tar-pit in
which everything is
possible but nothing
of interest is easy. ,...
OI I . . .
BREAKFAST
Signal processing
Finite-state machines
?
C
E
P
omplex
vent
rocessing
A declarative event stream
query engine
Booleans
B
Numbers
R
2
3
4
π
Strings
S
abc
Functions
X Y→
Sets
X
2
A processor is a function that takes 0 or more
event traces as input, and returns 0 or 1
event trace as output
. . . . . .
Processors can be composed: the output of
a processor can be given as the input of
another ("piping")
BeepBeep is an event stream query engine
that provides...
A set of basic processors (independent from
any event type)
A co...
abc. . . a . . .
n c
Ψ
abc. . . b . . .
n c
EVERY nTH OF (T)
TRIM n FROM (T)
WHERE2 1 5 0 2 0
C
C2 1 5 0
(T) WHERE condition
COMBINE (T) WITH f
Σ+2 1 5 0 2 3 8
f
f
8
2 1 5 0 2 1 5 0
f1 5 0 1 5 0
f5 0 5 0
++
+
a . . .b
a . . .b
FILE "filename"
SAVE (T) TO "filename"
On every fifth trading day starting today,
calculate the average closing price of MSFT
for the five most recent trading da...
On every fifth trading day starting today,
calculate the average closing price of MSFT
for the five most recent trading da...
On every fifth trading day starting today,
calculate the average closing price of MSFT
for the five most recent trading da...
On every fifth trading day starting today,
calculate the average closing price of MSFT
for the five most recent trading da...
*
10*
100
>
10*
100
>
0
10*
100
>
0
0
>
0
10
10*
10
100 10
WL1
700
200
200
I
*
*
O
700
*200
*
OI I
It works
1500 Hz performance
Rapid prototyping -400 LOC3
What vs. how
https://liflab.github.io/
beepbeep-3
Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings
Activity Recognition Through Complex Event Processing: First Findings
Upcoming SlideShare
Loading in …5
×

Activity Recognition Through Complex Event Processing: First Findings

282 views

Published on

The activities of daily living of a patient in a smart home environment can be detected to a large extent by the real-time analysis of characteristics of the habitat's electrical consumption. However, reasoning over the conduct of these activities occurs at a much higher level of abstraction than what the sensors generally produce. In this paper, we leverage the concept of Complex Event Processing (CEP), in which low-level data streams are progressively transformed into higher-level ones, to the task of activity recognition. We show how the use of an appropriate representation for each level of abstraction can greatly simplify the process. We also report on the use of an existing event stream processor to successfully implement the complete chain, from low-level sensor data up to a sequence of discrete and high-level actions.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Activity Recognition Through Complex Event Processing: First Findings

  1. 1. Activity Recognition Through Complex Event Processing: First Findings Sylvain Hallé, Sébastien Gaboury and Bruno Bouchard Université du Québec à Chicoutimi, Canada February 12th, 2016
  2. 2. IMPOSTOR WARNING
  3. 3. 1. ... 2. ... 3. ...
  4. 4. 1. ... 2. ... 3. ... X
  5. 5. 1. ... 2. ... 3. ... X
  6. 6. . . .
  7. 7. . . .
  8. 8. Time Power Peak Plateau
  9. 9. 0 200 400 600 800 1000 1200 8744 8745 8746 8747 8748 8749 8750 8751 8752 8753 8754 S.WL2 S.WL1 T.x Example: Blender
  10. 10. SS-PL3>-393 | FFT-L2-6<=-3 | | SS-PL2<=1071: ToasterON | | SS-PL2>1071: ElectricKettleON | FFT-L2-6>-3 | | FFT-L2-6<=9 | | | SS-PL1 <=148 | | | | SS-QL1<=-169: RangeHoodFanOFF | | | | SS-QL1>-169 | | | | | SS-QL1<=135 | | | | | | SS-PL1<=-788: CoffeeMakerOff | | | | | | | | | | | | SS-PL1>-788 | | | | | | | FFT-L1-1<=-788: | | | | | | | CoffeeMakerOFF | | | | | | | FFT-L1-1>-408 | | | | | | | | FFT-L1-5 <=153:MixerOff | | | | | | | | FFT-L1-5->153 ... (Maitre et al. 2013)
  11. 11. SS-PL3>-393 | FFT-L2-6<=-3 | | SS-PL2<=1071: ToasterON | | SS-PL2>1071: ElectricKettleON | FFT-L2-6>-3 | | FFT-L2-6<=9 | | | SS-PL1 <=148 | | | | SS-QL1<=-169: RangeHoodFanOFF | | | | SS-QL1>-169 | | | | | SS-QL1<=135 | | | | | | SS-PL1<=-788: CoffeeMakerOff | | | | | | | | | | | | SS-PL1>-788 | | | | | | | FFT-L1-1<=-788: | | | | | | | CoffeeMakerOFF | | | | | | | FFT-L1-1>-408 | | | | | | | | FFT-L1-5 <=153:MixerOff | | | | | | | | FFT-L1-5->153 ... (Maitre et al. 2013) How do you isolate a single device? How do you add a new device? How do you adjust noise thresholds? How do you reuse that output?
  12. 12. Alan Perlis (1922-1990) Beware of of the Turing tar-pit in which everything is possible but nothing of interest is easy. ,, ,,
  13. 13. OI I . . . BREAKFAST Signal processing Finite-state machines ?
  14. 14. C E P omplex vent rocessing
  15. 15. A declarative event stream query engine
  16. 16. Booleans B Numbers R 2 3 4 π Strings S abc Functions X Y→ Sets X 2
  17. 17. A processor is a function that takes 0 or more event traces as input, and returns 0 or 1 event trace as output . . . . . .
  18. 18. Processors can be composed: the output of a processor can be given as the input of another ("piping")
  19. 19. BeepBeep is an event stream query engine that provides... A set of basic processors (independent from any event type) A core grammar and interpreter to compose ("pipe") processors Mechanisms to extend the grammar with user-defined events, processors, etc.
  20. 20. abc. . . a . . . n c Ψ abc. . . b . . . n c EVERY nTH OF (T) TRIM n FROM (T)
  21. 21. WHERE2 1 5 0 2 0 C C2 1 5 0 (T) WHERE condition
  22. 22. COMBINE (T) WITH f Σ+2 1 5 0 2 3 8 f f 8 2 1 5 0 2 1 5 0 f1 5 0 1 5 0 f5 0 5 0 ++ +
  23. 23. a . . .b a . . .b FILE "filename" SAVE (T) TO "filename"
  24. 24. On every fifth trading day starting today, calculate the average closing price of MSFT for the five most recent trading days, and keep the query standing for fifty trading days. timestamp stockSymbol closingPrice 0 APPL 1039.3 0 MSFT 950.0 0 GOGL 433.3 1 MSFT 951.2 1 APPL 1038.3 ... ... ...
  25. 25. On every fifth trading day starting today, calculate the average closing price of MSFT for the five most recent trading days, and keep the query standing for fifty trading days. String line = br.readLine().trim(); if (!line.isEmpty()) { String[] parts = line.split(","); if (parts[0].compareTo("ABC") != 0) { value_index++; sum += Double.parseDouble(parts[1]); if (value_index == 5) { double average = sum / 5; value_index = 0; sum = 0; return average; }}}
  26. 26. On every fifth trading day starting today, calculate the average closing price of MSFT for the five most recent trading days, and keep the query standing for fifty trading days. SELECT afd FROM ( SELECT S1.timestamp AS ts, AVG(S2.closingPrice) AS afd FROM (SELECT * FROM stocks WHERE stockSymbol = "MSFT") AS S1, (SELECT * FROM stocks WHERE stockSymbol = "MSFT") AS S2 WHERE (S2.timestamp - S1.timestamp) < 5 GROUP BY S1.timestamp) AS S3 WHERE MOD(ts, 5) = 0;
  27. 27. On every fifth trading day starting today, calculate the average closing price of MSFT for the five most recent trading days, and keep the query standing for fifty trading days. EVERY 5TH OF ( APPLY (THE AVERAGE OF (*)) TO ( SELECT closingPrice FROM stocks) WHERE (stockSymbol) = ("MSFT")))) ON A WINDOW OF 5).
  28. 28. *
  29. 29. 10*
  30. 30. 100 > 10*
  31. 31. 100 > 0 10*
  32. 32. 100 > 0 0 > 0 10 10*
  33. 33. 10 100 10 WL1
  34. 34. 700 200 200 I * * O 700 *200 *
  35. 35. OI I
  36. 36. It works 1500 Hz performance Rapid prototyping -400 LOC3 What vs. how https://liflab.github.io/ beepbeep-3

×