1 Introduction

Nowadays, most people are too busy to be engaged in health-related physical activities. Therefore, it is important to extract healthy benefits from brief physical activities as much as possible [1]. Walking is one of most common physical activity in the world; hence, controlling this activity according to scientific methods and health standards seems to effectively enhance the general health level. This is very important particularly for those whose daily activities include walking. To achieve this aim, a ubiquitous mobile computing device is needed to ensure that walking is compatible with health standards and scientific methods. In this regard, a smart mobile phone equipped with the required sensors can play a major role, since people who have their smart phones in hand can utilize it in any outdoor situation while walking, in contrast to other methods like treadmills, which can be used just for indoor activities. Nevertheless, the effect of smart phone apps to improve fitness and increase physical activity has been studied for a decade [2, 3], and implementing state of the art methods in mobile platform, seems to be reliable.

Apart from determining the computing device, specifying appropriate measures for health monitory during physical activity is also important. The most important part of the human body involved in every physical activity is the heart. Therefore, heart performance during physical activity is a valuable measure for evaluating the efficiency of physical activity [4]. In fact, there are specific limits for human heart rate at different strength level of physical activity according to health standards.

It is important to note that people should not be involved in excessive-exercise because it may lead to health damages, and on the other hand, not having adequate exercise depends on the goal of walking may not be useful. For example, people who want to engage in fat burning require a higher target heart rate range than when they walk just to stay healthy. Therefore, knowing heart rates and its limits are very important. Therefore, by monitoring heart rate and aiming to stay within the target range, one will achieve the most out of any physical activity without worrying about any health damages. However, in any individual, the heart rate and appropriate level of strength during exercise can be affected by various factors such as; physiological features, environmental conditions and fitness level of the person [5]. To achieve the suitable target heart rate, all of those factors need to be analyzed with regards to the goal of walking.

In this study, a pervasive computing approach, based on mobile applications is presented which enables the control of human heart rate during walking activity in relation to health standards. By so doing, the efficiency of the activity will be improved. For this reason, a set of environmental [6] and physiological features were utilized to obtain an accurate target heart rate range related to the goal of walking, which will be chosen by the user at the beginning of the activity. This goal can be fat burning or just staying healthy. During the activity, the user’s heart rate is sensed and compared with the computed target heart rate range. Thereafter, a control message will be delivered to the user to make him/her adjust the walking speed; in so doing, his or her heart rate will correspond to the computed target range. In fact, by using this method, users will know how fast they need to walk in order to achieve the best results based on their goal of walking. In addition to increasing health efficiency, this method reduces the probability of different health damages. These damages might be due to the incompatibility between the intensity level of the activity, environmental conditions and the user’s fitness level. For instance, the length of walking is a function of environmental conditions [7], so this method specifies the length of walking by analyzing environmental conditions. Moreover, by computing the target heart rate boundaries according to the user’s fitness level and physiological features; this method reduces the probability of heart damages during the activity [8].

The remaining part of this paper is organized as follows; Section 2 reviews works related to the present study. Section 3 introduces the proposed method. The experiment and evaluation of the method are covered in section 4 while conclusions and future works for extending the proposed method are presented in Section 4.

2 Literature review

The development of mobile applications in the area of health and fitness has attracted a lot of attention in recent years [9]. This section aims to survey related works in this area. Based on this, a variety of popular mobile applications in the area of health and fitness along with a set of academic research in this domain were analyzed. Fiala et al. [10] presented a computer model of human thermoregulation for a wide range of environmental conditions; in fact, the focus is on a passive system by which they analyze environmental conditions on the human thermoregulation. Freedson and Miller [5] focused on the objective monitoring of physical activity via motion sensors and heart rate, with different methods of data assessment for both types of instruments. In the aspect of heart rates, they presented some suitable methods which deals with the relationship between the heart rate and the rate of oxygen consumption during the activity in order to assess the intensity of the physical activity. Though, these methods are more efficient in monitoring rather than controlling the activity. Furthermore, these methods focus on assessing heart rate data without considering other factors that affect the heart rate such as; environmental and physiological data along with the level of user’s fitness. Direito et al. [2] studied the effect of utilizing smart phone apps to enhance fitness and increase physical activity particularly among young people. Harrison et al. [3] also shed light on the usability of mobile applications. Boulos et al.

To analyze the efficacy of the current health apps in the global market, a set of popular health apps related to motion activities such as walking were chosen. In Table 1, some of those applications with their abilities are introduced. Applications such as “Run Keeper” and “Sporty Pal” measure the amount of burned calories based on the elapsed time and speed of walking [11, 12]. “Cardio Trainer” adds some additional features such as recording of past activities apart from measuring the amount of burned calories [13]. “Run keeper”, “Google Fit” and “Map My Walk” provide a set of health and fitness plans in addition to all typical features such as measuring the amount of burned calories and heart rate monitoring [1417]. “S-Health” brought all past routine features together in addition to a set of health-related plans and schedules to improve the level of fitness for users. In fact, S-Health acts as an activity tracker that benefits heart rate monitoring during physical activity [18]. “ Runtastic” came along with all the mentioned features with few additions such as; target pace and challenge an activity which gives audio feedback on how much one need to speed up or slowdown in order to hit the targeted pace which he/she has set before walking [19]. This idea is close to our idea but the pace which is set as a target in “Runtastic” has nothing to do with the target heart rate for the user in a way to get most benefits out of the physical activity and also those physiological and environmental parameters which affect that target heart rate; in fact, the given pace is a number chosen by desire of the user. Further analysis showed that the best applications are used as monitoring devices which present information in two categories; first, information related to the walking activity analysis such as speed of walking, elapsed time, distance traveled etc. and secondly, information related to the user analysis such as the amount of burned calories, heart rate etc. Moreover, in some cases, they might provide a record of past activities [5, 10, 2022].

Table 1 Related applications

Nevertheless, in contrast to other applications used as monitoring device or an activity tracker, the core goal of our application is to ensure that user’s heart rate is in line with the computed target heart rate range during the activity. Based on this, the application uses an alarm system to adjust speed of walking by delivering control messages to the user during the activity. In our method, effects of environmental features such as temperature, humidity, air pressure on the user’s heart rate and the strength of the activity were considered as well as effects of physiological features and fitness level of the user. In addition, the fitness level of user will be computed by carrying out a training test which is designed in the application.

Even though there are varieties of electronic devices related to health applications, which might even be programmable ranging from complicated treadmills, and elaborated wearable equipment to simple devices such as i-Watch or Fit-bit, our aim is to address the pervasiveness and potential of smart phones which has great ability to increase the health level in public, since their presence are more powerful than any other devices nowadays.

3 The proposed method

In this section, our method is presented and also for clarification; we showed working pages of android application, which has been designed based on the proposed method. In the first step, user enters physiological information such as age, weight and sex (Fig. 1a).

Fig. 1
figure 1

The working pages of the application

The application computes the maximum heart rate with regards to the user’s physiology and amount of air pressure through the following process:

Upon ascent to high altitudes, the level of work capacity reduces [23]. After acclimatization at moderate altitudes which is below 3000 m, most of the loss in exercise performance was regained [24]; though, at higher altitudes (3000 to 8000 m), regardless of the acclimatization period, full recovery of aerobic function is never achieved [23]. Therefore, we only focus on moderate altitudes and try to quantify its effect on heart rate in a discontinuous manner. This implies to those people who have not acclimatized.

The increase in heart rate is related to an increased sympathetic activity and vagal withdrawal [25]. For a given level of exercise, heart rate is greater at altitude [26], although the heart rate that can be achieved at maximum exercise is reduced when compared with that at sea level and in parallel with maximum oxygen consumption. Cardiac contractility increases acutely, and submaximal cardiac output for a given oxygen uptake is increased during the first few days at altitude, although maximum cardiac output is unchanged [26, 27] and maximum oxygen consumption (Vo2 max) declines by ≈ 1 % per 100 m above 1500 m [28, 29]. This acute increase in cardiac output at submaximal workloads, largely explained by the increased heart rate, may be offset by reduced stroke volume [28]. During more chronic altitude exposure, maximum cardiac output falls, and the maximum rate of oxygen consumption remains reduced [30].

In harmony with heart rate variation based on the amount of air pressure (which is sensed by the pressure sensor on the mobile device), we define parameter P by the following relations:

$$ \begin{array}{ccc}\hfill \mathrm{If}\hfill & \hfill \mathrm{pressure} > 900\mathrm{h}\mathrm{p}\mathrm{a}\hfill & \hfill \mathrm{then}\ \mathrm{P}=0\hfill \\ {}\hfill \mathrm{Else}\ \mathrm{if}\hfill & \hfill \mathrm{pressure} > 830\mathrm{h}\mathrm{p}\mathrm{a}\hfill & \hfill \mathrm{then}\ \mathrm{P}=4\hfill \\ {}\hfill \mathrm{Else}\ \mathrm{if}\hfill & \hfill \mathrm{pressure} > 780\mathrm{h}\mathrm{p}\mathrm{a}\hfill & \hfill \mathrm{then}\ \mathrm{P}=8\hfill \\ {}\hfill \mathrm{Else}\hfill & \hfill \left(\mathrm{up}\ \mathrm{t}\mathrm{o}\ 3000\mathrm{m}\right)\hfill & \hfill \mathrm{P}=12\hfill \end{array} $$

After defining P, we can compute maximum heart rate known as HRmax. By involving the physiological data of the user, HRmax is defined by the following relations [31, 32]:

$$ \begin{array}{cccc}\hfill \mathrm{If}\hfill & \hfill \mathrm{user}\ \mathrm{is}\ \mathrm{male}\hfill & \hfill \mathrm{then}\hfill & \hfill \mathrm{HRmax} = 210\ \hbox{--}\ 0.5\mathrm{age}\ \hbox{--}\ 0.05\mathrm{weight} + 4\ \hbox{--}\ \mathrm{P}\hfill \\ {}\hfill \mathrm{Else}\hfill & \hfill \hfill & \hfill \hfill & \hfill \mathrm{HRmax} = 210\ \hbox{--}\ 0.5\mathrm{age}\ \hbox{--}\ 0.05\mathrm{weight}\ \hbox{--}\ \mathrm{P}\hfill \end{array} $$

In the second step, the application asks the user to determine if he/she wants to train or take a walk (Fig. 1b). The reason for the training section is to find the user’s fitness level. There are varieties of fitness tests results from reliable data. However, in our method, we aim to reduce all requisites the user needs to act with them in order to ensure that the pervasiveness is guaranteed. Hence, we use those fitness tests which are easy to perform and do not require special equipment or conditions. The proposed fitness test in our method belongs to the family of orthostatic fitness tests which possess the mentioned features [3337]. In this test, the user will be asked to lie down for 2 min and then by touching the heart rate sensor on the mobile device, the user’s heart rate will be captured. Next, the user will be asked to stand up immediately and again the heart rate will be captured (Fig. 1d).

The difference between captured heart rates for the lie down mood and stand up mood is recorded as a test result. After running five tests using the same method, the user’s fitness level will be computed as follows:

$$ \begin{array}{cccc}\hfill \mathrm{If}\hfill & \hfill \mathrm{the}\ \mathrm{average}\ \mathrm{of}\ \mathrm{five}\ \mathrm{test}\ \mathrm{results}\ \mathrm{is} < 10\hfill & \hfill \mathrm{the}\mathrm{n}\hfill & \hfill \mathrm{fitness}\ \mathrm{level} = 1\ \left(\mathrm{good}\right)\hfill \\ {}\hfill \mathrm{Else}\ \mathrm{if}\hfill & \hfill \mathrm{the}\ \mathrm{average}\ \mathrm{of}\ \mathrm{five}\ \mathrm{test}\ \mathrm{results}\ \mathrm{is} < 20\hfill & \hfill \mathrm{the}\mathrm{n}\hfill & \hfill \mathrm{fitness}\ \mathrm{level} = 2\ \left(\mathrm{medium}\right)\hfill \\ {}\hfill \mathrm{Else}\hfill & \hfill \mathrm{the}\mathrm{n}\hfill & \hfill \hfill & \hfill \mathrm{fitness}\ \mathrm{level} = 3\ \left(\mathrm{week}\right)\hfill \end{array} $$

By computing the average of the last five training test results, the user’s fitness level will be updated after taking any new training test.

The user, whose fitness level is already computed, can start the walking process by choosing “make a walk” option. In the following, the user will be asked to choose the goal of walking (Fig. 1c). This goal can be “to stay healthy” which is designed to control the activity for maintaining general health, or “to burn fat” which is designed to control the activity for burning fat as much as possible.

After choosing the goal, the application starts to compute the target heart rate range by considering the chosen goal and the computed user’s fitness level with regards to different target heart rate zones [38, 39], according to the following relations:

  • If fitness level = 1 then

  • Case “to keep healthy” → Min = %60.HRmax and Max = %65.HRmax

  • Case “to burn fat” → Min = %65.HRmax and Max = %75.HRmax

  • If fitness level = 2 then

  • Case “to keep healthy” → Min = %55.HRmax and Max = %60.HRmax

  • Case “to burn fat” → Min = %60.HRmax and Max = %70.HRmax

  • If fitness level = 3 then

  • Case “to keep healthy” → Min = %50.HRmax and Max = %55.HRmax

  • Case “to burn fat” → Min = %55.HRmax and Max = %60.HRmax

The parameters, Min and Max point to minimum and maximum of target heart rate range respectively.

Moreover, by analyzing environmental conditions, the appropriate distance for walking based on the number of steps will be computed. In fact the human body works in harmony with nature and not only has it been a subject of inspiration for other applications [40], but a lot of studies have been carried out to analyze its performance under different conditions. Based on different levels of intensity for walking [41, 42], three levels were set in terms of the number of steps known as active, somewhat active and low active. High heat and humidity increases the risk of dangerous heat illness, including heat stroke. Performing physical activities in cold weather can also lead to cold injuries. With regards to the amount of temperature and humidity effects [4348], the appropriate level to reduce the risk of health issues will be proposed. Initially, the amount of temperature and humidity will be sensed by related sensors on the mobile device. Then using the following relations, the distance is computed in terms of the number of steps.

$$ \begin{array}{cccc}\hfill \mathrm{If}\hfill & \hfill \hbox{-} 15<\mathrm{T}<\hbox{-} 10\hfill & \hfill \mathrm{then}\hfill & \hfill \mathrm{S}=5000\ \left(\mathrm{low}\ \mathrm{active}\right)\hfill \\ {}\hfill \mathrm{Else}\ \mathrm{If}\hfill & \hfill \hbox{-} 10<\mathrm{T}<0\hfill & \hfill \mathrm{then}\hfill & \hfill \mathrm{S}=7500\ \left(\mathrm{somewhat}\ \mathrm{active}\right)\hfill \\ {}\hfill \mathrm{Else}\ \mathrm{if}\hfill & \hfill 0<\mathrm{T}<25\ \mathrm{and}\ \mathrm{H}<\%50\hfill & \hfill \mathrm{then}\hfill & \hfill \mathrm{S}=10000\ \left(\mathrm{active}\right)\hfill \\ {}\hfill \mathrm{Else}\ \mathrm{if}\hfill & \hfill 25<\mathrm{T}<35\ \mathrm{and}\ \mathrm{H}<\%50\hfill & \hfill \mathrm{then}\hfill & \hfill \mathrm{S}=7500\ \left(\mathrm{somewhat}\ \mathrm{active}\right)\hfill \\ {}\hfill \mathrm{Else}\ \mathrm{if}\hfill & \hfill 25<\mathrm{T}<35\ \mathrm{and}\ \mathrm{H}<\%80\hfill & \hfill \mathrm{then}\hfill & \hfill \mathrm{S}=5000\ \left(\mathrm{low}\ \mathrm{active}\right)\hfill \\ {}\hfill \mathrm{Else}\hfill & \hfill \mathrm{T}>35\ \mathrm{or}\ \mathrm{H}>\%80\ \mathrm{or}\ \mathrm{T}<\hbox{-} 15\hfill & \hfill \mathrm{then}\hfill & \hfill \mathrm{S}=0\hfill \end{array} $$

Where T defines the perceived temperature in Celsius degree, H defines the perceived humidity in percentage, and S defines the proposed number of steps for walking. After performing all computations, the application is ready (Fig. 1e) and user starts to walk by touching “let’s go” button (Fig. 1f). While walking, the user will be notified if the walking is compatible with the chosen goal or not., In fact, whenever the user touches the “how’s my walking button”, his/her heart rate is sensed and compared with the computed target heart rate range. Finally, by using the following relations, the appropriate control message will be delivered to the user to adjust his or her speed of walking.

$$ \begin{array}{cccc}\kern1em \mathrm{If}\kern1em & \kern1em \mathrm{M}\mathrm{i}\mathrm{n}<\mathrm{H}\mathrm{R}<\mathrm{Max}\kern1em & \kern1em \mathrm{t}\mathrm{hen}\kern1em & \kern1em \mathrm{Control}\kern0.17em \mathrm{M}\mathrm{essage}="\mathrm{That}\ \mathrm{i}\mathrm{s}\ \mathrm{o}\mathrm{k}"\kern1em \\ {}\kern1em \mathrm{Else}\ \mathrm{If}\kern1em & \kern1em \mathrm{H}\mathrm{R}\le \mathrm{M}\mathrm{i}\mathrm{n}\kern1em & \kern1em \mathrm{t}\mathrm{hen}\kern1em & \kern1em \mathrm{Control}\kern0.17em \mathrm{M}\mathrm{essage}="\mathrm{You}\ \mathrm{n}\mathrm{eed}\ \mathrm{t}\mathrm{o}\kern0.17em \mathrm{go}\kern0.17em \mathrm{faster}"\kern1em \\ {}\kern1em \mathrm{Else}\kern1.25em & \kern1em \mathrm{H}\mathrm{R}\ge \mathrm{M}\mathrm{ax}\kern1em & \kern1em \mathrm{t}\mathrm{hen}\kern1em & \kern1em \mathrm{Control}\kern0.17em \mathrm{M}\mathrm{essage}="\mathrm{You}\ \mathrm{n}\mathrm{eed}\ \mathrm{t}\mathrm{o}\kern0.17em \mathrm{s}\mathrm{low}\kern0.17em \mathrm{down}"\kern1em \end{array} $$

Where, HR defines the current sensed heart rate and the Min and Max refers to minimum and maximum boundaries of the computed target heart rate range. While the user’s heart rate is in the target heart rate range, the message of “that’s ok” is delivered to the user indicating that the speed of walking is ok and there is no need to change it. When the user’s heart rate is below the minimum boundary of the target heart range, the message of “you need to go faster” is delivered to the user indicating that the user needs to go faster in order to increase the heart rate. When the user’s heart rate is higher than the maximum boundary of the target heart range, the message of “you need to slow down” is delivered to the user indicating that the user needs to slow down the speed of walking to reduce the heart rate. The mentioned process ensures that the user heart rate is in the target heart rate during the walking process.

4 Experimental evaluation

The designed android application was implemented on Samsung Galaxy S5 mobile phone. The experiment was carried out in a gym club in Hamedan city, Iran. The environmental conditions of the place were 25° Celsius for temperature, 831 Hectopascal for air pressure and 35 % for humidity. In this experiment, 25 men within the average age of 26.84 years were involved.

Each person had been carrying out the training process (at least five times) before the day of the experiment so their fitness level had been captured. Then on the day of the experiment, with the aim of fat burning in mind, they were asked to walk 5000 steps on a standard treadmill which was located in the gym club. Then the amount of calories each person had burned was recorded based on the number of treadmill showed for each walking test. Three days later, they were asked to repeat the process but this time, using the designed application during walking. With the aim of fat burning, they walked 5000 steps on the treadmill but during the activity they pushed the “How’s my walking” button for every minute. By so doing, they adjusted their speed of walking according to control messages from the application. After ending the walk, the amount of calories each person had burned was recorded based on the number of treadmill showed for each walking test.

Table 2 shows the results of the experiment. The results show that using this method boosts the amount of burned calories up to 31.92 % on the average.

Table 2 Results of experiment

An important aspect worth considering is the time intervals for sensing heart rate during the activity. In the experiment, one sense of heart rate per minute was performed. It probably gives better results if we shorten the time intervals for performing the test process during the activity.

In addition to improvement of walking efficiency with the aim of fat burning, this application can also be very effective in the mood of “stay healthy”. Besides the issue of keeping heart rate in the computed target heart rate range during the activity, the length of walking is another important matter, which needs to be considered accurately. This application by analyzing environmental conditions determines the appropriate length of walking to avoid the probability of the actually occurring health damage during the activity.

One of the key factors in evaluating the health apps is whether users continue to use the app and if there is any health improvement over the course of time and not just for one test after making the app. To answer this question for the proposed app, after about 4 months of taking the experiment, the participants were asked if they still use the app, even though three of them were out of reach, among those 22 participants, 20 of them claimed they still used the app and also by analyzing their weights; it turned out that the average weight for those 20 participants which was 67.09 kg at the time of the experiment, became 65.73 kg which indicate about 2 % reduction in general.

5 Conclusion and future work

In this paper, a novel pervasive computing method based on mobile devices was presented which is able to improve the efficiency of walking activity. In the proposed method, a set of environmental and physiological features were sensed and analyzed, to determine the target heart rate range specialized for the user. During the walking process, by analyzing user’s heart rate and comparing it to the computed target heart rate range, control messages would be delivered to the user to adjust the walking speed by which user’s heart rate can be in the target range. The evaluation results proved the efficiency of this method.

One of the issues considered in all the processes is to keep the app user friendly by which all the unnecessary data would not appear for the user. For example, if we aim to keep the user heart rate in the target heart rate range during the activity to achieve the best efficiency in burning calories, the only data the user needs to know is that if the walking pace is appropriate for his or her goal or not (he/she needs to go faster or needs to slow down), and data such as the amount of burned calories and the speed of walking or trace on the map, are not required to be presented and since those features are prevalent in other apps, they cannot add any novelty to our method.

The proposed method which is based on pervasive computing on smart phones requires a set of different sensors, even though all the required sensor for this method can be found in almost all the current modern mobile phones but to meet pervasiveness of the model on smart phones, we had to face the challenge associated with the limitations of smart phones particularly those related to available sensors on smart phones and their performance, operating systems and developing codes, speed of processors and data storing issues. Nevertheless, it is possible to expand the model by working on new technologies such as wearable technologies and can bring new abilities to our method. Therefore, extending the proposed method on different platforms and analyzing other features such as blood pressure alongside heart rate can be studied in future works.