1 Introduction

Motivated by the quality of life and less expensive healthcare systems, a change in existing healthcare system should be focused to a home centred setting including dealing with illness to preserving wellness. Innovative user-centred preventive healthcare model can be regraded as a promising solution for this transformation. It doesn’t substitute traditional healthcare, but rather directed towards this technology.

The technology used in the pervasive healthcare could be considered from two aspects: i) as pervasive computing tools for healthcare, and ii) as enabling it anywhere, anytime and to anyone. It has progressed on biomedical engineering (BE), medical informatics (MI), and pervasive computing. Biomedical engineering is the integration of both engineering and medical science that helps in the improvement of the equipments used in the hospitals.

Most of the technologies enhances current health delivery model but pervasive healthcare regards a healthcare delivery model as “from doctor-based to patient-centric, from important reaction to constant prevention, from sampling to monitoring” [2]. Commonly, this plays a major role in in-home healthcare service that gives a belief to every patient who is suffering from constant illness by monitoring those patients at regular basis. This could reduce the cost of travelling and also promotes the livelihood of those people. The targeted achievement of this healthcare system makes the researchers and scientist to get motivated that leads in the innovation of new software and technologies [12]. To design intelligent software for this healthcare, there are three vital domains in progress: 1) Analysis of daily living activity 2) context-aware Reasoning 3) remote monitoring. Since the main focus is to provide the real-time data, then several progresses have to be made into consideration such as varied contextual information, real-time intelligent analysis of time critical data and the delivery of those data from the service [7]. Hence, with in a home environment the experts could generate the case studies regarding the activity production and abnormality detection. Two main activities are involved in the pervasive healthcare that focuses on the remote monitoring regarding the condition of the patients and the generation of information from the patients with the help of the wireless sensor networks (WSN).

In this paper, we have anticipated a system to report the progress of the elderly in an appropriate manner with the help of the Information and Communication technology (ICT) used in the healthcare system and integrate the report of progress to the remote caretakers [13]. Through this advanced method we could able to identify the abnormalities at early stages so that the doctors could cure it without any difficulty. This could increase the physical and mental health of the patients. The system incorporated in this method requires certain sensors which are of very low in cost, certain electronic devices and smart phone for the communication purpose and WSN.

Cloud computing comprises of resources and services produced through the Internet. The buzzword Cloud computing is considered as a new computing paradigm which can provide customized, flexible, consistent, QoS guaranteed dynamic computing environments and its underlying capability to provide adjustable dynamic ICT infrastructures and configurable software services. Grid computing has been replaced by cloud computing because of its system virtualization. System virtualization is the backbone of Cloud computing, has been liberalizing its services to distributed data-intensive platforms such as MapReduce and Hadoop. Cloud computing empowers consumers to access online resources using the internet, from anywhere at any time without considering the underlying hardware, technical management and maintenance problems of the original resources. Cloud services are obtained from data centres which are distributed throughout the world. Virtual resources are provided to clients through internet in cloud computing such as Gmail, provided by Google. The rapid growth in cloud computing has led to numerous advantages but at the same time it possess lack of security concerns which has been a major challenge. Cloud computing suffers from security issues like securing confidential data, cloud storage and examining the utilization of cloud by the cloud computing vendors and key questions arises like how safe is data in cloud?. Besides, cloud computing has numerous advantages like scalable and dynamic. Cloud computing is independent computing and varies from utility computing and grid computing. Technologies involved in Cloud computing are still developing and evolving for example, Service Oriented Computing. The main drawback of Cloud computing environment is their lack in security features.

2 Related work

Through pervasive healthcare system, the aged people could monitor themselves at regular basis which enhances the financial and social benefit of those people [6]. Moreover, this could also improve the ambience of the caretakers by taking care of their family members and clinicians by monitoring the patients from their home and requirement will be needed only if it’s necessary. The system employed in this procedure could give rapid warning when the patient is suffering from illness. This procedure is a hand-on method where each and every patient could know their body conditions at a real-time and this is said to be more efficient [15].

This particular system could increase the healthcare of anyone at anytime in anyplace thereby decreasing the time and other constrains with the increase in the coverage and the quality [8]. The major problem to be faced in this particular system needs the deployment of the systems. This particular needs the work of several researchers and developers. There are certain flourishing institutions with the co-operation of the information and technology institutes. Few small scale institutes also work in the deployment of these services such as certain small scale industries and certain research laboratories [11]. Wireless sensor networks (WSN) leads to the pathway of the pervasive healthcare system making it more successful. This could help in tracking the location of the patient, fall and detecting the movements of the sick ones and regularly monitoring the pulse rate of the elder people.

Remote consultation commonly known as teleconsultation has been stated in [14]. This procedure uses a bidirectional control technology in the remote area that meets certain necessities with the high resolution images in a particular bandwidth network. This is said to be digital imaging technology in picture archiving and communication systems (PACS) clinical environment. The semantic image based on the fuzzy logic that mines the image database is stated in [9]. In order to eradicate the problems faced due to the transportation of ill and handicapped people [3], proposes a platform in Taiwan that depends on a hybrid fibre coaxial (HFC) network to make the in-home telecare system possible. They targeted the combination of the biomedical data such as Electro-cardiogram data and the blood pressure data in the form of an audio and video that transmits from a patient to a doctor through National Television Standard Committee (NTSC). The collection of those secured data is stored in cloud. The process of Cloud computing is the latest technology that serves the data integrity, security, sharing and organization. The consequences and possibilities of cloud computing environment in the pervasive healthcare are explained in [5]. The paper [10] says about the security system at cloud storage provided by Homomorphic encryption and Location-based decryption technique.

In [1] proposed a theoretical prototype system, in which cloud computing system is combined with trusted platform support service based on [4]. Since Cloud computing is latest mainstream, prevalence of cloud established services in the market and the varieties for consumers proliferate daily. Nevertheless, associating the service contributions between cloud service providers is not a forthright implementation. In order to solicit the cloud services, requirements of the clients must be vivid, as well as generating service level agreements (SLA) which replicate these requirements and must be assessable in order to authenticate the distribution of these services along with their efficiency.

3 Proposed architecture

Since the proposed architecture follows pervasive healthcare system, the system employs certain procedures like sensing of data, process the data, analyse the data and finally deliver the data. The four main components of the system include:

  1. 1)

    Wireless Sensor Network (WSN): the activity of the patient will be examined from the home atmosphere at the regular basis indicating the vital signals of the victim.

  1. 2)

    Reasoning and decision support: interpretation of data provided by the sensor in a wide background and reckoning it with existing intelligence then compared with the aforementioned assessed situation and finally taking actions based on the generated result.

  1. 3)

    Remote monitoring service: the monitoring of the physiological condition of the patient is necessary which could be provided in a remote environment and any changes in the ambience could be reported at a real-time basis. The information are stored in the server.

  1. 4)

    Cloud server: this enables storage of large data in the cloud environment as well as the cloud data analytics could be implemented with the help of machine learning algorithms.

The environmental sensor-based procedure has paid a lot of attention in the recent years and acknowledged as a promising method for recognizing activities and sensors such as door contact sensors, pressure sensors, RFID cards and certain camera are employed in collection of data related to the activity. However, it needs the installing many lot of equipment, and sometimes it is used in laboratory settings. Furthermore body sensors become troublesome to wear for constant monitoring in everyday living environment [16]. Smartphones can be considered as an alternative method for activity recognition since it possesses benefits of unobtrusiveness and does not need any extra device for gathering and processing data. The sensor data connected through communication protocols such as Bluetooth will be governed by the system and the smartphone to create low level activity contexts, namely, walking, sitting, lying and standing. The contexts which also include sensor readings should be transferred into background information from obtained person and surroundings. The context-aware reasoning system is vital component which provides medical condition valuation and anomaly detection. The data analysis and reasoning services are connected to the remote server and the local client. Furthermore, a live video stream produces real time sensor data to the server during monitoring session.

3.1 Context-aware healthcare decision support

When a context provides appropriate information depending on a task is termed as context aware system. The proposed system achieves active context awareness, through adaptive learning which improves the conclusion made from the patient’s medical analysis and health as shown in Fig. 1.

Fig. 1
figure 1

Workflow of context processing

Raw sensor data are collected and construed into contexts for reasoning. Context-aware healthcare decision support delivers patients with a reasoning mechanism to enhance health services. The content- aware framework is built on fuzzy based knowledge as presented in Fig. 2.

Fig. 2
figure 2

Workflow of reasoning framework

3.2 Data collection

The primary step is collecting sensor data for activity recognition. The capability of smartphones to gather sensor data, processing and communications makes them to handle the data with the low preservation and lesser cost. We also combine a Zephyr Bio Harness sensor which is a wearable activvity monitoring device which can detect as well as analyses user’s actions and movements. This highly advanced device is used to track trunk movement worn on chest. The sensors such as tri-axial accelerometer and gyroscope, implanted with the smartphone determine the orientation of the phone and 3D-acceleration. Thus, the direction of the phone yield x-axis which is parallel to width, y-axis which is the length and z-axis which is perpendicular as shown in Fig. 3. The sensor incorporated into the mobile device is simple to use.

Fig. 3
figure 3

Body area network for sensor data collection in smartphone 3D-acceleration

With the help of the Bluetooth connection, the Bio Harness data of the sensors are communicated to the mobile phone. The 3 Dimensional acceleration and orientation of the thigh and the trunk (t, Ax, Ay, Az, Gx, Gy, Gz, Tx, Ty, Tz) were gathered with the association of the timestamp of the sensor readings, for the evaluation of the activity classification algorithms.

Inorder to enhance quality and lessen the magnitude of readings after sensor data collection as shown in Fig. 4, we employ feature extraction from the sensor data by splitting constant data into windows of fixed duration and length of a time window which is touched by one half of the window length which makes a single instance created for every window, however more than one instances are created given any data point. The 10-s time window consists of largest lag; hence 1-s time window is employed in feature extraction. The extracted feature produces a pattern for a particular activity, which in turn it can be employed to create machine learning classification models. Inorder to classify static and dynamic activities, the standard deviation is set for each 1-s window of gathered data, therefore low variability signifies static action and high variability leads to dynamic action.

Fig. 4
figure 4

Sensor data of the phone

By employing, arc cosine conversion (Eq. 1) the mean variation over the per second window

$$ {\alpha}_{degrees}=\frac{180}{\pi}\mathit{\operatorname{arccos}}\frac{\beta }{f} $$
(1)

where, is the y-axis mean acceleration, f is the earth gravity and ádegrees is the angle of inclination.

The reasoning framework plays a vital role with the interpretation of data derived from the sensor in a wide range, and the output results are made with the information received from validating the condition. The key role is played by the fuzzy rules and set itself to interpret valuable information which builds the fuzzy rule-based reasoning framework. We have defined membership function for a fuzzy group S on the universe of discourse P is described as a curve which acts on every point of element of D in the space of input is diagrammed to a membership value amongst 0 and 1. The universe of disclosure is denoted as,

$$ \upmu s:D\to \left[0,1\right] $$
(2)

Where value ?s, is value of membership which states the membership grade of the element D in fuzzy set S. The various types of memberships are trapezoidal MF, Gaussian MF. We employ triangular MF because it is widely used in real-time implementations and effective computation.

The need for suitable metrics and important analysis of reasoning outcome satisfies clarity and transparency. Inorder to achieve this, we employed provenance-based result tracing approach. This method makes the system reasoning result more understandable for the users.

The sensor data gathered from sensors are interpret and integrated with the fuzzy loader which consists of fuzzy rules, and the presumption rule database and employs those rules to produce sophisticated level contexts (medical conditions) and additionally to detect the present condition of the patient in-terms of emergency and normal as shown in Fig. 5. Fuzzy sets and relations are combined into fuzzy rules which are defined in the reasoning process. Linguistic rules relate varies fuzzy numbers and sets which constitutes these rules as shown in Table 1. The syntax of this rule is: “if x is A then y is B,” where x and y are fuzzy numbers in the fuzzy sets A and B correspondingly.

Fig. 5
figure 5

Structure of context aware framework

Table 1 Rules for generating high level contexts

The fuzzy sets and rules management are presented in GUI mode as shown in Fig. 6. We designed static approach which checks for irregularity when a new rule is created so that unsuited rules in the fuzzy rule base are ignored. This approach also lessens redundancy as well as enhances time efficiency of the rule engine.

Fig. 6
figure 6

Fuzzy sets and rules management (GUI mode)

The conflicting rules are defined as:

Provided a rule consisting of M fuzzy rules:

Sk : if (Dkthen(Bk) 1 <  = k <  = M

Sk and Sp rules are irregular if Bk and Bp conflicts each other, then Hk ^ Hp are not satisfied.

L1: if Hk then Sk L2: if Hp then Sk where Hp =: Hk. Therefore, either Hk or Hp will be true, Sk is always true.

As soon as an irregularity or conflict is detected, the fuzzy rule engine notifies the user and therefore this gives the freedom to the user whether to add new rules.

In our reasoning framework, we created a query sensitive technique integrated with the context awareness. In order to adjust the weights of features, the query that acts as an input is used with the fuzzy rules and crisp the value of the output. The query sensitive similarity measure equation is defined as:

$$ {Q}_i\left(P,T\right)=\frac{\sum_{p=1}^nE\ast Q\left(P,T\right)}{\sum_{p=1}^nE} $$
(3)

Qi denotes global resemblance of Q query and T is determined depending on E. If N denotes the query feature, then weighted that denotes the mapping of binary set (0:1) is employed. Now we define this function employing fuzzy logic.

$$ {D}_{Q,L\ rules}(b)=\Big\{{\displaystyle \begin{array}{ccc}\mathit{\operatorname{MAX}}\ l\left(b,w\right),& & \forall w,w\in L\ rules,\\ {} Default\ & & otherwise\end{array}} $$
(4)

Where l(b; w) is the degree of fuzzy output of rule L with feature b. The weight of feature b is calculated by the full value of l(b; w).

3.3 Cloud assisted pervasive healthcare

Cloud computing enables better data storage and processing solutions and less cost. Since cloud infrastructure is fault tolerant and distributed, we can deploy a cloud based reasoning framework on multiple pools of servers, networking and storage which can scale up or down. Thereby the proposed approach could be modulated based on the necessity to utilize the hardware exclusive of conceding act. We incorporated cloud based data analytics as a service including distribution of data and it is stored after the analysis, thereby enhancing value and availability of healthcare data.

Figure 7 shows the framework of the analysis of data by the cloud. As a part of activity recognition, we evaluated several varieties of machine learning algorithms to develop the classification models. These are capable of gathering contemporary activity based on the input. The technique of cross-validation is employed to find the best model which performs better for an input dataset. Since constant huge amounts of data are collected, we need to incorporate cloud storage services too. When many clients are involved, some users may keep huge amount of raw data for future use in healthcare monitoring. The cloud also gives hands-on analysis of the real-time data that provides a warehousing of different data collected from various users. We evaluated the activity monitoring system employed for examining the framework of analysis of data by the cloud. Numerous machine learning nodes are arranged on a private cloud server sharing blob storage. Every node grasps an occurrence certain machine learning technique for the allocation of received input data.

Fig. 7
figure 7

Cloud-based data analysis framework

4 Implementation and evaluation

It is required to use the remote server and the Wireless sensor network (WSN), in order to estimate the accuracy of the context-aware reasoning framework. As primary stage, the patient important signs are gathered from Bio Harness sensor. The following parameters are considered as biomedical parameters: heart rate, oxygen level, blood pressure, body temperature. These parameters are noted with the time duration, ambience and movement of the patient.

The wireless connection between the sensor network and user application is created employing Bluetooth, and the application associated to the home gateway which communicates data to the remote healthcare server. The implementation of the fuzzy-based reasoning engine is executed to provide reliable prediction.

In order to compare the proposed reasoning engine, we employed a case base which consists of 262 cases where 70 are abnormal and 192 are normal. We compared the anticipated reasoning approach in-terms of accuracy with straightforward CBR approach and developing Case Based Reasoning approach employing dynamic weights in case retrieval.

As shown in the Fig. 8, the proposed approach achieves better performance of 97 in specificity, 91% in precision and 92 and 92% in accuracy whereas normal CBR approach yields 93% in specificity, 81% in precision and 88% in accuracy.

Fig. 8
figure 8

Comparison of three approaches

To find accuracy for anomaly detection, two class prediction, namely, abnormal or normal labelled as negative or positive as outcomes were considered with the true and false value. TP (True Positive) represents real condition is abnormal and the prediction is also abnormal, while TN (True Negative) represents when prediction and real conditions are normal. The false alarm rate (FP), indicates if real condition is normal while FN prediction is normal and real condition is abnormal.

The case of abnormality could be determined with the help of true positive and true negative value which could be represented as,

$$ CA= TP+ TN/ TP+ TN+ FP+ FN\times 100\% $$
(5)
  • Detection rate: This uses a method of confusion matrix which is represented as,

$$ Detection\ rate=\mathrm{TP}/\mathrm{TP}+ FN\times 100\% $$
(6)
  • False alarm rate: the false indication of the normal condition which is represented as,

$$ \mathrm{False}\ \mathrm{alarm}\ \mathrm{rate}=\mathrm{FP}/\mathrm{FP}+ TN\times 100\% $$
(7)

We employed Receiver Operating Characteristic (ROC) from signal detection theory by determining the TP and FP rate. As a result the ROC curve has been obtained as shown in Fig. 9. It is evident that our proposed approach achieves better prediction method at upper left at coordinate (0, 1) which is considered as perfect classification.

Fig. 9
figure 9

Receiver operating characteristic

We tested the working of the activity recognition by gathering specific user activity data (instances), which was necessary to train the machine learning classifier.

A consistent classification accuracy rate of 90% can be observed. The key reason for achieving accuracy rate of 90% is that we removed all miscellaneous data which yields relatively clean data sample. The Decision Tree classifier achieved the best accuracy. As shown in the Table 2 the universal model is considered as an average accuracy of 80%, the personalized model of 80.3% whereas personalized model yields 99% and the adapted model provides 93% accuracy.

Table 2 Classification accuracy

5 Conclusion

Innovative user-centred preventive healthcare model can be regraded as a promising solution for this transformation. It doesn’t substitute traditional healthcare, but rather directed towards cloud-computing and machine learning technology. Still the pervasive health care system is under the development stage. This proposed framework could be improved in the future with certain beneficial resources in the health care services that could enhance this healthcare system.