Algorithm 1 Solution to daily activity analytics |
Input: Continuous signal data S from the wearable devices.
Output: Daily activity analytic results AR.
-
1:
▹ Firstly, according to the user-controlled policy, try DnD-applicable analysis and also accumulate the raw data.
-
2:
▹D represents the raw data set.
-
3:
for eachdo
-
4:
▹ Decompose each signal s into a tuple of meaningful information pieces .
-
5:
-
6:
if DnD-applicable then
-
7:
▹ Applying DnD analytic methods (cf. Section 3.1) and continuously updating the analytic results AR.
-
8:
DnD()
-
9:
end if
-
10:
▹ Optional raw data accumulation (also depending on the predefined policy).
-
11:
-
12:
end for
-
13:
▹ Secondly, if the user-controlled policy does not indicate any DnD-applicable scenario, then the analytic results AR will be empty, which means the offline analytics will be expected based on the accumulated raw data D.
-
14:
ifAR is NULL then ▹ Not in DnD-applicable scenarios.
-
15:
OfflineAnalytics(D)
-
16:
end if
-
17:
▹ Thirdly, the post-analysis activities will be triggered according to the predefined policy.
-
18:
switchpolicydo ▹ Given predefined policies.
-
19:
case Store nothing and transmit analytic result
-
20:
▹ Erase raw data locally.
-
21:
send(AR)
-
22:
case Store analytic result and transmit nothing
-
23:
▹ Erase raw data locally.
-
24:
save(AR)
-
25:
case Store raw data and transmit analytic result
-
26:
save(D)
-
27:
send(AR)
-
28:
case Store nothing and transmit raw data
-
29:
send(D)
-
30:
▹ Erase raw data locally.
-
31:
case Others
-
32:
▹ More cases can be involved according to different policies.
-
33:
returnAR
|