Method and system for generating physical activity recommendations and non-transitory computer readable storage medium
A method of generating physical activity recommendations comprising: calculating an active time and a moderate time based on user historical data comprising data of physical activities of a user, the active time representing an amount of time of physical activities with any intensity that the user performed in a period of analysis and the moderate time representing an the amount of time of physical activities with an intensity higher than a predetermined threshold performed by the user during the period of analysis. The method includes calculating a user state representing a current amount of physical activities performed by the user in the period of analysis; and determining a goal recommendation for a subsequent period and a target amount of physical activity, wherein the goal recommendation comprises a goal for the active time and a goal for the moderate time to increase, decrease or maintain the amount of physical activities.
1 . A computer implemented method of generating physical activity recommendations, the computer comprising a processor and a memory, the computer implemented method comprising:
calculating, by the processor, an active time and a moderate time based on user historical data which includes user historical movement and/or physiological data collected by means of movement and/or physiological sensors of a wearable device, wherein the user historical data comprises data of physical activities of a user, the active time representing an amount of time of physical activities with any intensity that the user performed in a period of analysis and the moderate time representing an amount of time of physical activities with an intensity higher than a predetermined threshold performed by the user during the period of analysis;
calculating, by the processor, a user state representing a current amount of physical activities performed by the user in the period of analysis with basis on the active time and the moderate time; and
determining, by the processor, a goal recommendation for a subsequent period based on the user state and a target amount of physical activity, wherein the goal recommendation comprises a goal for the active time and a goal for the moderate time to increase, decrease or maintain the amount of physical activities;
wherein the period of analysis is defined by n weeks of the user historical data, wherein n is an integer number;
wherein the subsequent period is a week and the goal recommendation comprises a weekly goal for the subsequent period, and the method further comprises dividing the weekly goal into daily goals distributed along the subsequent period;
the method further comprising:
determining, by the processor, whether the user increased the amount of physical activities according to the weekly goal with an inequation H i ≤(H j +ε diff )
wherein H i is a physical activities value recorded on week i in a primary goal, ε diff is a tolerance value, wherein a failure is detected when, for every value i∈A, we have that H i ≤(H j +ε diff ) for every value j<i and j∈A, for A={1, 2, . . . , m}.
2 . The computer implemented method according to claim 1 , wherein the user historical data comprises physical activity data obtained from a sensor monitoring the user during physical activities sessions, the physical activity data comprising heart rate and movement data obtained by a wearable device.
3 . The computer implemented method according to claim 2 , further comprising:
classifying, by the processor, the user with basis on the active time and the moderate time with respect to a moderate time threshold value T 1 and an active time threshold value T 2 ;
wherein the user is classified as a sedentary exerciser based on the user state being at least T 1 of moderate time per week and less than T 2 of active time per day;
wherein the user is classified as a light mover based on the user state being less than T 1 of moderate time per week and at least T 2 of active time per day;
wherein the user is classified as a busy bee based on the user state being at least T 1 of moderate time per week and at least T 2 of active time per day; or
wherein the user is classified as a couch potato based on the user state being less than T 1 of moderate time per week and less than T 2 of active time per day.
4 . The computer implemented method according to claim 3 , wherein in case the user is classified as couch potato, the method comprises further classifying the user with respect to a threshold active time T 3 and a threshold moderate time T 4 , and
wherein the user is classified as a severe couch potato based on user state is less than T 3 of moderate time per week and less than T 4 of active time per day;
wherein the user is classified as a mild sedentary exerciser based on the user state is between T 3 and T 1 of moderate time per week and less than T 4 of active time per day;
wherein the user is classified as a mild light mover based on the user state is less than T 3 of moderate time per week and between T 4 and T 2 of active time per day; or
wherein the user is classified as a mild busy bee based on the user state is between T 3 and T 1 of moderate time per week and between T 4 and T 2 of active time per day.
5 . The computer implemented method according to claim 1 , wherein calculating the user state further comprises:
determining, by the processor, the active time and the moderate time by analyzing an associated physical activity and comparing physical activities registered in a period before the period of analysis with the physical activities in the period of analysis;
wherein based on the physical activity in a last week being higher than the physical activity in the period of analysis, the user state is defined as the amount of physical activities from the last week and a weekly goal is computed considering the physical activities of the last week; and
based on the physical activity in the last week being less than the physical activities in the period of analysis, the user state is determined as a summary statistic of the physical activities performed during the period of analysis.
6 . The computer implemented method according to claim 1 , wherein determining the user state further comprises:
calculating, by the processor, the amount of physical activity that is considered to be safely performable by the user, U i , wherein:
U
i
=
min
(
Act
sup
,
max
(
H
i
-
1
,
f
stat
(
H
i
-
1
,
H
i
-
2
,
...
,
H
i
-
n
)
)
)
,
wherein Act sup is a predetermined value corresponding to a safe limit of progression between consecutive weeks determined by health recommendations, f stat (•) is a summary statistic and H i is the physical activities performed by the user on a week i for the period of analysis.
7 . The computer implemented method according to claim 6 , wherein a weekly goal is determined as the current amount of physical activity that is considered to be safely performable by the user U i in addition to an increment C i based on the user historical data stored in a database, wherein C i is determined as
C
i
=
min
(
Inc
sup
,
max
(
Inc
inf
,
inc
per
)
)
,
wherein Inc sup and Inc inf are predetermined values based on health guidelines defining a safe and beneficial range of physical activity increments between consecutive weeks, and inc per is a regression model coefficient obtained by fitting the user historical data with a regression model.
8 . The computer implemented method according to claim 7 , wherein the regression model is one of a linear regression model or an artificial neural network.
9 . The computer implemented method according to claim 8 , wherein a weekly goal increment is estimated by a linear regression model defined by:
H
model
(
w
0
,
w
1
,
i
)
=
w
1
i
+
w
0
,
where i represents a week index to the user historical data; and, a personalized increment is defined as a slope coefficient inc per =w 1 after fitting the linear regression model.
10 . The computer implemented method according to claim 9 , further comprising clipping, by the processor, the personalized increment by:
inc
safe
=
max
(
min
(
inc
per
,
inc
inf
)
,
inc
sup
)
in
a
safe
range
;
and
determining a clipped increment as an increment of a goal recommender.
11 . The computer implemented method according to claim 10 , further comprising defining, by the processor, the weekly goal as a sum of components of the user state related to a primary goal and the increment (inc safe ).
12 . The computer implemented method according to claim 1 , wherein a daily goal is determined by:
D
i
,
j
=
min
(
max
(
0
,
(
W
i
-
P
i
,
j
)
/
(
8
-
j
)
)
,
day
sup
)
,
where W i is the weekly goal, P i,j is an accumulated amount of physical activity the user performed until day j, j is a value between 1 and 7, and day sup is a predetermined safe or beneficial threshold of daily activities, based on health guidelines.
13 . The computer implemented method according to claim 12 , further comprising:
comparing, by the processor, the amount of physical activities of a current day with a daily goal; and,
in case the amount of physical activity of the current day is less than the daily goal, redistributing a remaining physical activity time by calculating the weekly goal and the amount of physical activities performed in a present week until the current day and equally distributing a difference throughout remaining days of the week.
14 . The computer implemented method according to claim 1 , wherein the method further comprises:
selecting, by the processor, a progression strategy with basis on a user classification; and
determining, by the processor, a primary goal and a secondary weekly goal with basis on the progression strategy, wherein the primary goal is a numeric goal of active time or moderate time defined with basis on the user historical data, and a secondary goal a numeric goal of active or moderate time with a same value as a corresponding active time or moderate time of the user state.
15 . The computer implemented method according to claim 1 , wherein variables that define which is the primary goal and a secondary goal are inverted in case the user fails to follow a primary recommendation.
16 . The computer implemented method according to claim 1 , further comprising generating, by the processor, a message to send the goal recommendation to the user.
17 . The computer implemented method according to claim 16 , wherein the message is one of:
a recommendation informing the goal and suggestions of physical activity for a day or a week;
a reminder informing that part of the goal needs to be completed;
a modification providing feedback regarding a failure to follow the recommendation; and
a reward providing feedback regarding a success to follow the recommendation.
18 . The computer implemented method according to claim 16 or 17 , further comprising:
determining, by the processor, the time for creating and sending the message to the user based on user information, wherein the user information comprises a user wake up time, a user bedtime, an active time and a moderate time of the user historical data, the goal recommendation, and a current time and date; and
selecting a message template for creating the message with basis on message templates stored in a database of message templates.
19 . The computer implemented method according to claim 1 , further comprising:
determining, by the processor, maintenance goals recommendations comprising a maintenance goal for active time, AT m , and a maintenance goal for moderate time, MT m , wherein maintenance goals for the active time and for the moderate time are respectively defined as the active time and the moderate time of the user state calculated at a beginning of a week;
wherein recommended goals are limited to values of the maintenance goals for the active time and for the moderate time;
wherein
based on the active time and the moderate time of the user state being below the maintenance goals for active time and for moderate time, the user is guided to achieve, progressively, the maintenance goals using normal rules of the method; and
based on a current primary goal being equal to or greater than a corresponding maintenance goal and a secondary goal is lower than a corresponding maintenance goal, a change of strategy is applied to a current user type.
20 . A system of generating physical activity recommendations characterized by comprising:
a processor; and
a memory storing therein computer readable instructions that, when executed by the processor, cause the processor to perform the method as defined in claim 1 .
21 . A non-transitory computer-readable storage medium comprising computer-readable instructions, when executed by a processor, cause a computer to perform the method of claim 1 .