Keywords

1 Introduction

At present, the aging problem has become an important social problem facing and concerned by the whole world. With the rapid increase of the elderly population, how to provide sufficient resources and high-quality care services for the elderly has become a big burden for the government and society. The World Health Organization advocates concepts such as ageing in place [1] and active ageing [2], to encourage the elderly to spend their retirement in their growing environment, such as family, rather than in nursing homes. However, if the elderly choose to live alone at home, they are often unable to take good care of themselves, especially for the severely disabled elderly. By deploying a set of intelligent monitoring and care system in the home of the elderly living alone, the health status of the elderly can be monitored and analyzed. When an emergency or abnormal health event occurs, it is particularly important to give an alarm or early warning timely and accurately.

In order to provide intelligent monitoring and care services for the elderly, researchers in many countries have done a lot of exploring. Acousto-optic sensing devices connected to the medical center were installed in the home to solve the problem of the elderly falling in Singapore [3]. In the European Union, MobiHealth technology has been implemented in member countries, to collect the physiological parameters of the elderly by wireless sensors and actuators [4]. Japan launched the Sukoyaka Family 21 plan to measure the blood pressure and electrocardiogram of the elderly by wireless sensor devices [5]. Although the above schemes have achieved the comprehensive physical signs monitoring, they either ignore the position information or just record the position as auxiliary information. Further, the position information can be utilized to take care of the elderly, such as indoor positioning prediction, which contributes to identifying daily activities, discovering living habits and diagnosing the chronic diseases.

In this paper, we focus on the aforementioned problems, investigate the issues of accurate indoor positioning prediction, and manage to introduce new ideas, methods and solutions to locate and predict actual positions of the objective indoors, and to ultimately apply them to smart elderly-caring applications, helping to discover and reveal irregular life routines or abnormal behavior patterns of the elderly living at home alone, with the aim of anticipating and preventing the occurrence of emergency or health risks. The work and main contributions of this paper are summarized as follows:

  • We propose an improved indoor positioning prediction model for IoT sensing data based on the LSTM and Grey model (LSTM-GM), and apply it to smart elderly-caring application scenarios. In order to enhance the prediction ability of nonlinear samples in IoT sensing data and improve the prediction accuracy of the model, we propose to fully incorporate into and utilize the advantages of LSTM model in dealing with nonlinear time series data of different spans, and the ability of GM model in dealing with incomplete information and eliminating residual errors generated by LSTM.

  • We setup experiments to demonstrate the effectiveness and performance of the LSTM-GM model by the real-world indoor trajectory dataset. The results show that our model outperforms the conventional LSTM model, producing an arresting increase of the positioning prediction accuracy, with the RSME for the next day and the next week being 63.39% and 54.86% lower than that of the conventional LSTM model, respectively.

The remainder of the paper is organized as follows. We review related work in Sect. 2, and then present in detail the problem formulation in Sect. 3, the model design in Sect. 4, respectively. We describe experimental setup and report the results and analysis in Sect. 5, followed by the conclusion and future work of this paper in the last section.

2 Related Work

In recent years, many researchers have proposed effective prediction models based on various positioning technologies. These models can be broadly divided into two categories: (i) Individual-based prediction models; (ii) Population-based prediction models.

Individual-based prediction models consider that the activities of each individual are independent from each other, and the user’s next position only depends on himself or herself. Therefore, such models try to mine the periodic behaviors of individual users by using their own migration data records. For instance, Wang et al. [6] proposed a hybrid Markov model for positioning prediction that integrates a long short-term memory model (LSTM). Li et al. [7] discussed the impact of the granularity and duration of stay of target positions, as well as different behavioral features on the prediction accuracy. Yang et al. [8] proposed a novel approach DestPD for destination prediction, which first predicted the most probable future position and then reported the destination based on that. Kong et al. [9] proposed a Spatial-Temporal Long-Short Term Memory (ST-LSTM) model which combines spatial-temporal influence into LSTM and employ a hierarchical extension of the proposed ST-LSTM (HST-LSTM) in an encoder-decoder manner which models the contextual historic visit information. Although these models perform well in the prediction of mobility with dense data records, they have high requirements on data quality, requiring long-term movement trajectory of users, which is difficult to obtain in practical applications. The sparsity of data often leads to the occurrence of cold startup problems, or even the failure of prediction.

To overcome the difficulty of individual movement prediction caused by the sparsity of moving records, some scholars proposed population-based prediction models, which consider that the behavior pattern of users has certain commonness, and the behavior of users can be predicted by the correlation pattern among users. The basic idea is to use the history of other users to predict their next position. For example, Jie Feng et al. [10] propose DeepMove to capture the multiple factors that govern the transition regularities of human movements. Mou et al. [11] proposed a new R-FP-growth (tuple-relation frequent pattern growth) algorithm for mining association rules. Zhao et al. [12] proposed a new Spatio-Temporal Gated Network (STGN) by enhancing LSTM network, where Spatio-temporal gates are introduced to capture the Spatio-temporal relationships between successive check-ins. Liu et al. [13] extended RNN and proposed a new method called spatial time recurrent neural network, which can model the local temporal and spatial context in each layer with time-specific transition matrices for different time intervals and distance-specific transition matrices for different geographic distances. Ying et al. [14] proposed a novel mining-based positioning prediction approach called Geographic-Temporal-Semantic-based Location Prediction (GTS-LP). While using other users’ historical movement data can help improve the accuracy of the predictions, it requires a large number of user trajectories. What’s more, they are faced with significant privacy issues as users are reluctant to share their position data.

However, these models focus on positioning prediction in outdoor environment or relatively open indoor environment, with few studies on smaller environments such as family quarters. Besides, most of these models are used in business, with little applied to elder care. Therefore, in this paper, we propose the LSTM-GM model which combines the advantage of LSTM and Grey Model methods to predict the position of elderly people at home.

3 Problem Formulation

The purpose of this paper is to locate and predict the position of the elderly, helping to detect the abnormal behaviors or irregular life routines of the elderly who live at home alone. In this section, we formally describe the related definitions and formulate the objective positioning prediction tasks in this paper:

Definition 1

(Position): Position p is defined as a connected area, representing the position of the elderly at a certain moment. Each position is identified by a unique digital ID.

Definition 2

(Sensor Records): A sensor record r is described as a triple \(\{ID_i,V_i,X_i\}\), where \(ID_i\) is the number of the sensor, \(V_i \in \{0,1 \}\) indicates whether the sensor is in the fired status or not, and \(X_i\) is the sensor position. The position triggered indicates the position of the old man at that moment.

Definition 3

(Trajectory): The trajectory \(traj = \{ p_{t_i}\}^{n}_{i=1} \) represents the position of elderly at time \(t_i\).

Definition 4

(Positioning Prediction Problem): When the set of trajectories at the past n moments \( ~traj_{past} = \{ p_1, p_2, \cdots , p_n \}\) of the elderly is given, the positioning prediction task is to predict the set of trajectories \( ~traj_{future} = \{ p_{n+1}, p_{n+2}, \cdots , p_m \}\) in the next m moments. Thus the problem that we focus on is to find a function f to improve the accuracy of the predictions \(traj_{future}\) as much as possible. The positioning prediction problem is as follows:

$$\begin{aligned} traj_{future} = f (traj_{past})\,. \end{aligned}$$
(1)

4 Model Design

In this section, we propose to transform the indoor positioning data collected by various sensors into an effective time series [15], and to apply the LSTM model to predict the elderly indoor positions in smart elderly-caring application scenarios. We also propose to correct the residuals of the LSTM model by grey model to improve the accuracy of the prediction model.

4.1 Long Short-Term Memory Network

Long short-term memory network (LSTM) is a special type of recurrent neural networks (RNN) [16]. Its core idea is the setting of input gate, output gate and forgotten gate. Figure 1 respectively shows the structure of the LSTM model [17]. In the figure, \(\sigma \) is the Sigmoid function. Tanh is the activation function that processes the data on the state and output. LSTM realizes the function of forgetting and memory through a structure composed of a sigmoid function and a dot product operation. The output value of the sigmoid function is in the interval [0, 1], with 0 indicating that it is not allowed to pass at all and 1 indicating that it is allowed to pass at all.

Fig. 1.
figure 1

LSTM Model

4.2 Grey Model

The grey model is to establish a grey differential prediction model with a small amount of incomplete information and make a long-term description of the ambiguity of the development of things. The grey model is usually represented as GM(nm), where n denotes the order of the differential function and m is the number of parameters. In this paper, we adapt GM(1, 1), for position p is the only variable and the law of prediction is not very complicated.

GM(1, 1) prediction model is used to generate a set of new data sequences with obvious trend by means of accumulation of data sequences, so as to strengthen the influence of known factors and weaken the influence of unknown factors. The relevant parametric equations are constructed and the values of the parameters are determined by means of mathematical solution, so as to realize the prediction of the model. When the set of original sample data \(x^{(0)} = \{x^{(0)}_1, x^{(0)}_2,\cdots , x^{(0)}_n \}\) is given, the same kind of data are accumulated in original sequence to form a new sequence \( x^{(1)} = \{x^{(1)}_1, x^{(1)}_2,\cdots , x^{(1)}_n \}\). For each variable \(x_i^{(1)}\) in the sequence, it is represented as follow:

$$\begin{aligned} x^{(1)}_{i}=\sum _{k=1}^{i}x^{(0)}_{k} . \end{aligned}$$
(2)

According to the grey theory, the differential equation of \(x^{(1)}\) with respect to t is established as follow:

$$\begin{aligned} \frac{dx^{(1)}(t)}{dt}+ax^{(1)}(t)=u \ , \end{aligned}$$
(3)

where a is called development coefficient, and u is called grey action.

4.3 LSTM-GM

Although the LSTM model could learn the regularity and periodicity of the time series and the results perform well, the residuals are still present in the predicted results. The residual discussed in this paper are mathematically defined as the difference between the measured value and the predicted value. And the residual analysis is the analysis of the reliability, periodicity or other interference of the data by the residual. When the residual is large, it will affect the accuracy of the prediction, so it is necessary to correct the residual so as to improve the accuracy of the prediction results.

Indoor positioning prediction based on LSTM-GM model is mainly composed of the conventional LSTM model and grey model, correcting the residual of the LSTM model by setting up grey model. The grey forecast model is a prediction method that builds a mathematical model and makes predictions through a small amount of incomplete information. Using grey mathematics to process uncertainties and quantify them, the internal laws can be discovered in disorderly phenomena. In the LSTM-GM model, the data in the training set is trained by LSTM to obtain a training model to predict the position. The residual corresponding to each predicted value is calculated, and each residual is added to the residual sequence. Then the grey model analyzes the residual sequence at the time t to obtain the residual at the time \(t+1\), in turn, the residual of the predicted value is corrected. According to the problem defined in Sect. 2, the problem can be further formalized as follow:

$$\begin{aligned} traj_{future} = LSTM (traj_{past})\,. \end{aligned}$$
(4)

And the correction formula for the predicted value is:

$$\begin{aligned} {x_t}^{'} = {x_t} - {e_t} \ , \end{aligned}$$
(5)

where \(x_t\) is the LSTM prediction at t period, \(e_t\) is the correction of the grey prediction model and \({x_t}^{'}\) is the final prediction.

Fig. 2.
figure 2

The flow chart of the LSTM-GM model

figure a

The flow chart of the LSTM-GM model is shown in the Fig. 2. And the specific steps of the LSTM-GM model are as follows, and the more details are shown in Algorithm 1:

  • Data set acquisition: Clean and pre-process the data set, and filter out invalid null data.

  • LSTM-GM model training: Firstly, the data is trained and preliminary predicted by LSTM model, and the parameters of the LSTM are optimized for the overall effect of the new model. After getting the results of the preliminary predictions, they are compared with the measured values in the dataset and the residuals generated in the preliminary prediction are also calculated. Then the residual is corrected by the grey model to get the final predicted value.

5 Experimentation and Evaluation

In this section, we setup experiments to compare the accuracy and fitting of the LSTM model prediction results with the conventional LSTM model prediction results. And according to the time length of the input data set, the experiment is divided into daily prediction and weekly prediction, where the input data set of the daily prediction is generated in one day, and the input data set of the weekly prediction is generated in one week.

5.1 Experimental Setup

The data set used in the experiments is an open data set from [18], which was collected from the sensors in a two-room apartment. The sensors are located in 14 different positions, and the numbers of sensor at different position are different. Table 1 shows the corresponding relationship between the sensors and the numbers. And the data is then divided into the ratio of 2:1 and 67% of the data is used to train the model. We unify the sensor position into a time series, and the time series will be normalized in pre-processing to eliminate the effects of different orders of magnitude.

Table 1. Number of position sensors.

We use the root-mean-square error (RMSE) to represent the accuracy of the prediction results of the two models, that is, the square root of the ratio of the differences between the predicted value p and the measured value m and the number of observations n. The calculation formula is as follows:

$$\begin{aligned} RMSE = \sqrt{\frac{1}{n}\sum _{i = 1}^n(p_i-m_i)^2} \end{aligned}$$
(6)

In the conventional LSTM model and the LSTM-GM model, the parameters of the LSTM part will be set to the same. In this experiment, the number of hidden neurons in each layer of \(num\_units\) is set as 128. Table 2 lists the RMSEs for different hidden meta numbers. In the experiments, we compare the RMSE of the predicted value of the LSTM model when the number of hidden elements is 4, 16, 32, 64, 128, 256. It can be seen that the root mean square error is minimal when the number of hidden neurons is 128.

Table 2. RMSE of different hidden neurons

5.2 Positioning Prediction by Conventional LSTM

Figure 3 shows the results of training and predicting for one day’s data, and Fig. 4 shows the results of training and predicting for one week’s data. We can observe that the prediction effect of the LSTM model on the daily prediction is better than the weekly prediction. The reason should be that the variability of activities in a week is greater than that in a day. In addition, there is a large gap between the predicted curve and the actual curve in the figure. We can find that although the LSTM model has good time series trend learning ability, it is still not enough to cope with the positioning prediction problem.

Fig. 3.
figure 3

Daily prediction results of the LSTM model

Fig. 4.
figure 4

Weekly prediction results of the LSTM model

5.3 Positioning Prediction by LSTM-GM

The experiments are also divided into two parts. Figure 5 shows the results of training and predicting for one day’s data. Figure 6 shows the results of training and predicting for one week’s data. In this experiment, like the LSTM model, the daily prediction effect of the LSTM-GM model is better than the weekly prediction. It can be seen from the figure that its predicted curve for the position of the elderly is more fitted to the measured curve, which means that the LSTM-GM model works better than the LSTM model in the experiment. This will be described in detail in the comparison of LSTM and LSTM-GM.

Fig. 5.
figure 5

Daily prediction results of the LSTM-GM model

Fig. 6.
figure 6

Weekly prediction results of the LSTM-GM model

5.4 Comparisons of LSTM and LSTM-GM

According to above experiments, it is obvious that the prediction effect of the LSTM-GM model proposed in this paper is better than the conventional LSTM model under the same parameters. It can be seen from Fig. 7 that, in the same dimension, the RMSE value of the daily prediction value predicted by LSTM-GM model is 63.39% lower than that of the LSTM model, and the RMSE value of the weekly prediction value predicted by LSTM-GM model is 54.86% lower than that of the LSTM model.

Fig. 7.
figure 7

RMSE of the LSTM and LSTM-GM model

It can be seen from Fig. 8 and Fig. 9 that the predicted value of the LSTM-GM model is closer to the measured value by the residual correction than the predicted value of the conventional LSTM model, and the predicted trend is not weakened. The reason is that although the LSTM model has mastered the regularity and periodicity of the time series, there are still residuals in the prediction. When the residual is large, it will affect the accuracy of prediction. In our model, the residual corresponding to each predicted value is calculated by introducing the GM model, and adds every residual to the residual sequence to correct the residual value of the predicted value, which makes the prediction results perform well in predicting trends and greatly improve the accuracy of the prediction.

Fig. 8.
figure 8

Comparisons of the LSTM and the LSTM-GM Model for Daily Prediction

Fig. 9.
figure 9

Comparisons of the LSTM and the LSTM-GM Model for Weekly Prediction

6 Conclusions and Future Work

In this paper, we propose to utilize the LSTM model to predict the elderly indoor positions in smart elderly-caring application scenarios, helping to discover and reveal irregular life routines or abnormal behavior patterns of the elderly living at home alone, with the aim to anticipate and prevent the occurrence of emergency or health risks. Considering that indoor positioning data grows exponentially over time, it is transformed into an effective time series for further analysis. However, the conventional LSTM model has achieved the desired effect in the prediction trend, but the existence of the residual greatly affects the accuracy of the prediction. Therefore, the LSTM-GM model is proposed to correct the residual which improves accuracy of the predicted value. To demonstrate the effectiveness and performance gains of the model, we setup experiments based on the indoor trajectory dataset collected by real deployed sensors. And the experiment results show that the RMSE value of the daily predicted value of the LSTM-GM model is 63.39% lower than that of the LSTM model, and the RMSE value of the weekly predicted value is 54.86% lower than that of the LSTM model. With the model, one can have a more accurate and comprehensive understanding of the regularity and periodicity of the positioning time series for the elderly living alone.

In the future, we plan to carry out our research work in the following two directions: (i) further refine our prediction model, with the aim of enhancing the prediction ability and improving the prediction accuracy of the model, and (ii) consider applying the model to the real-world application scenarios with a large number of sensors deployed in a much more complex indoor environment, to verify the actual performance of the model.