# Multilevel Privacy Controlling Scheme to Protect Behavior Pattern in Smart IoT Environment

Authors: Asad Khan; Muhammad Mehran Arshad Khan; Muhammad Awais Javeed; Muhammad Umar Farooq; Adeel Akram; Chengliang Wang
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

Traditional approaches generally focus on the privacy of user’s identity in a smart IoT environment. Privacy of user’s behavior pattern is an important research issue to address smart technology towards improving user’s life. User’s behavior pattern consists of daily living activities in smart IoT environment. Sensor nodes directly interact with activities of user and forward sensing data to service provider server (SPS). While availing the services provided by a server, users may lose privacy since the untrusted devices have information about user’s behavior pattern and it may share data with adversary. In order to resolve this problem, we propose a multilevel privacy controlling scheme (MPCS) which is different from traditional approaches. MPCS is divided into two parts: (i) behavior pattern privacy degree (BehaviorPrivacyDeg), which works as follows: firstly, frequent pattern mining-based time-duration algorithm (FPMTA) finds the normal pattern of activity by adopting unsupervised learning. Secondly, patterns compact algorithm (PCA) is proposed to store and compact the mined pattern in each sensor device. Then, abnormal activity detection time-duration algorithm (AADTA) is used by current triggered sensors, in order to compare the current activity with normal activity by computing similarity among them; (ii) multilevel privacy design model: we have divided privacy of users into four levels in smart IoT environment, and by using these levels, the server can configure privacy level for users according to their concern. Multilevel privacy design model consists of privacy-level configuration protocol (PLCP) and activity design model. PLCP provides fine privacy controls to users while enabling users to set privacy level. In PLCP, we introduce level concern privacy algorithm (LCPA) and location privacy algorithm (LPA), so that adversary could not damage the data of user’s behavior pattern. Experiments are performed to evaluate the accuracy and feasibility of MPCS in both simulation and real-case studies. Results show that our proposed scheme can significantly protect the user’s behavior pattern by detecting abnormality in real time.


---

## Body

## 1. Introduction

With the rapid advancement of sensor technology and mobile social networks, privacy of user’s behavior pattern is becoming an essential part of smart IoT environment. Smart IoT environment typically consists of low power, resource restraint devices, and sensor nodes which are installed over the target region [1]. Sensor technology is associated to user’s behavior pattern and human cognitive capture, which have been promoted in almost every smart IoT environment. Smart IoT environment typically consists of variety of embedded sensor nodes, actuators nodes, smart home local gateway, service provider sever (SPS), and users as shown in Figure 1. Personal smart home, business (sales track), healthcare (cognitive behavior), and safety (military security and traffic management) are few fields with diverse applications. Furthermore, location-aware services, environmental monitoring, and architectural control are other appliances of smart IoT environment technology. During daily living activities, users interact with smart phones or tablets and can easily download many kinds of location-based server (LBS) applications and data from Google play store or Apple store by submitting their real location and related information to various LBS servers [2, 3]. Basically, if users want to avail the services of smart IoT environment, then they have to share some of their personal data to the service provider server (SPS) through local gateway sensor nodes and actuator devices. Although this kind of services makes daily life of users more comfortable, however, users enjoy these facilities in the smart IoT environment at the cost of their behavior pattern privacy [3]. For instance, users can easily search the location of any room or office by sending message with their location and query data to server through resource-restrained local home gateway [4]. Therefore, the server and low capacity smart IoT environment nodes (SHNs) can continuously access sensitive and personal data from users’ requests and observe their personal information, such as their daily behavior pattern including what they do at certain time of a day [5]. More seriously, it can send private information to adversary which could then exploit privacy [6], such as user identity, user office’s timing, occupation, home address, and user daily behavior activities. In smart IoT environment, once sensitive data are transmitted over the network, then it will be out of the user’s control. All these appalling possibilities conflict with the privacy concerns of users’ daily behavior pattern; therefore, we have to focus on users’ behavior pattern privacy in a smart IoT environment.Figure 1
Layout of single and multigateway smart environment.
(a)
Single gateway smart environment layout(b)
Multigateway smart environment layoutThere are two kinds of approaches, for collection of data, to detect abnormal activity: (i) video based and (ii) sensor based. Video-based approaches generally use technology of image processing; however, there are limitations in these approaches:(i)
Identifying the type of user’s activity with small scope and small short time duration(ii)
Covering very small area and high cost(iii)
Violating user’s privacySensor-based approach is an emerging research area which has been adopted in smart IoT environment in order to tackle abovementioned pitfalls [7]. To some extent, it has been successfully used in smart IoT environment; however, they only process simple trajectory data and occasionally implement centralized data processing [8, 9]. Therefore, many of them have the following disadvantages.(i)
Lack of Behavior Pattern Privacy. They only focus on sequence information of activity and ignore important problem of preserving protection of user’s behavior pattern privacy.(ii)
Ignoring Time Duration in Location Privacy. They ignore the use of time duration in order to detect duration abnormality. Furthermore, it did not consider combining location privacy and user’s activity privacy in single approach.(iii)
Computational Cost. It consumes large bandwidth and uses centralized approach with long response time.We focus to cover the abovementioned pitfalls and on protecting the user’s behavior pattern privacy in smart IoT environment. The current study does not cover privacy edification of the whole system, and this research is an extension of privacy model. Our work is aimed at solving two main challenges in smart IoT environment, (i) ensuring privacy of user’s behavior pattern, e.g., if a user is in a particular building from 9 : 00 to 14 : 00 and adversary can access this information, however, adversary cannot know where he/she was at 10 : 00 a.m. within the building and in which room he/she is/was at particular time; (ii) the long response time and using large bandwidth during computational process are inappropriate for real-time detection. We proposed multilevel privacy controlling scheme (MPCS) to deal with them. (1)BehaviorPrivacyDeg is proposed, in order to (i) keep record of user’s activity variation and storing these compact patterns into each sensor with the patterns compact algorithm (PCA) and (ii) detecting whether the present activity is abnormal or normal based on the abnormal activity detection time-duration algorithm (AADTA). (2) Protecting user’s behavior pattern privacy by using multilevel privacy model, server utilizes PLCP to set privacy level according to concern of user. LPA is used to hide the features of user’s real location from adversary or untrusted nodes by generating a number of fake locations. The main research contributions of this paper are as follows:(i)
BehaviorPrivacyDeg, a novel technique detecting abnormal activity and compact pattern algorithms, is proposed to cache learned parameters using mining training into every sensor node and to sense abnormal activity at real time based on limited resource restrained of sensors(ii)
The multilevel privacy model has been designed to protect users’ behavior pattern privacy. Our model not only utilizes PLCP for optimal configuration of privacy levels but also secures user’s data from untrusted nodes caused by unpredictable interference in smart IoT environment(iii)
Activity design model, which consists of activity variation, trajectory variation, and duration variation, to define a small difference between two the same activities because the same pattern of activities cannot be repeated exactly in the same way(iv)
Real data-based simulation and experiments have been conducted which showed that our new approach can efficiently protect users’ activity and sensitive data in smart IoT environmentThe rest of the paper is organized into the following four sections. We thoroughly overview related previous literature in Section2. We present our new scheme in Section 3. Simulation and experiments are presented in Section 4. Conclusions are discussed in Section 5.


## 2. Related Work

A number of research studies have been conducted on protecting privacy of users in smart IoT environment. We hereby briefly discuss and compare their findings. Many privacy protection schemes are introduced as means to protect query privacy and users’ location privacy for various situations (e.g., snapshot scenario and continuous scenario in navigation apps.). In [8, 10, 11], authors proposed location perturbation, obfuscation techniques, and temporal cloaking techniques, respectively. Generally, all these techniques are deployed to achieve the privacy goal. These proposed techniques can be gained based on trusted third party such as location anonymizes in [12]. In [10, 13, 14], authors have proposed mobile device-based solutions. In some early works, Chow et al. introduced a solution based on location anonymizer to collect the queries of users and forwarding anonymous data set to location-based server (LBS) to protect users’ privacy. However, later it is noticed that location anonymizer resulted in the blockage of entire system. In [15], authors proposed two algorithms, named GridDummy and GirDummy that generate dummy location to achieve k-anonymity for user, considering the location’s privacy. These two algorithms generated virtual circle and virtual grid which were carefully constructed for privacy area of users. However, Lu et al. ignored the background information and query privacy of the users. Although in some recent research studies [16], authors have paid attention to solve the abovementioned issues thoroughly; however, they introduced heavy system to achieve k-anonymity. In [17], authors proposed a device free localize (DFL) technique which identifies user’s location and their activities simultaneously. The wireless signals have the ability to become a sensor itself that can perceive the context information. In near future, this technique may turn the traditional wireless network into intelligent networks. However, the mechanism of this approach is not efficiently working on limited resource-restrained devices. In [18], Liu proposed a scheme for activity recognition using 2D and 3D cameras. However, video-based techniques and approaches can compromise on privacy issues. Moreover, high cost is required for video equipment. In [19], authors have discussed that users’ activity in home such as bathing, cooking, and reading can be accessed by unauthorized entities on the wireless network, even all communications are encrypted. In this approach, authors used fingerprints and time-based snooping (FATS) attacks. However, chances of privacy leakage of users’ activity are very high due to limitation of this approach in [20–22]; temporal cloaking and spatial assessed time-location are directed to the main server instead of the accurate value. The main focus of these approaches is to prevent exact identification of user’s location and thus improving privacy. These techniques harm the timeliness and accuracy of the responses from server, and more seriously, there are some upfront attacks that could still break user privacy. In [23], authors have proposed k-pattern clustering algorithm that classifies complex and varied user activities. This approach also used Allen’s temporal relation to predict and recognize users’ activities inside home. However, this method did not focus on privacy of users’ activities as well as location-based privacy of users. If we observe carefully, most of the recent techniques have some pitfalls such as usage or trust on the third party or server and time-consuming huge processing overhead. In [24], authors provide new system for security institutes to monitor abnormal events. With the help of deep learning, authors attained high performance of human behavior recognition by using model tests and training but his scheme does not enable user to define privacy level according to user wish. In [25], authors proposed novel idea based on genetic algorithm to resolve classification problems based on sensor data but they also ignore privacy of user based on sensor data.Our proposed scheme is different from traditional approaches because our research emphasizes on the user’s behavior pattern privacy, including behavior pattern privacy degree, multilevel privacy model, location protection mechanism, and detection algorithm.


## 3. Multilevel Privacy Controlling Scheme (MPCS)

In this section, we present behavior pattern privacy degree (BehaviorPrivacyDeg) and multilevel privacy model of proposed multilevel privacy controlling scheme in detail.


### 3.1. Behavior Pattern Privacy Degree

Behavior pattern privacy degree (BehaviorPrivacyDeg) is aimed at protecting privacy of user’s activity variation in smart IoT environment which is as follows: (i) first, it extracts normal behavior pattern from the genuine data and then presents an activity pattern algorithm based on time duration that compresses and reduces the quantity of mined behavior pattern of user’s activity; (ii) secondly, it records mined pattern in each device according to record keeping mechanism, and it also detects abnormal activity to protect user’s behavior and pattern privacy. BehaviorPrivacyDeg uses three algorithms to protect the privacy of user’s behavior pattern which are (i) frequent pattern mining-based time-duration algorithm (FPMTA), (ii) patterns compact algorithm (PCA), and (iii) abnormal activity detection time-duration algorithm (AADTA). Sensors: we divided sensors into REGULAR sensors and FUNCTIONAL sensors as per requirement of deployment to sense the data of user’s locations and activities as shown in Figure 2. Firstly, set of all the deployed motion sensor devices across the smart IoT environment is represented asD=s1,s2,s3,sl,⋯,sn. User’s position is represented by sing location of sensor device sl which detects the movement of user’s position/location P. Sensor devices are defined by N. As we know, all users probably have different velocity of doing activities. Therefore, the time between these sensors during user’s activity is different and longer as compared to specific time segment. Activity is produced that is composed of atomic users’ activities. Atomic activitiesalai=sla,tlai define the trigger of sensor device sl wheresla∈D, and tlaiis trigger time of sla in ith sampling period. Number of sampling periods is defined by Ns which represents the conditions when a person passes bysla. Basic activity is defined as βla=αla1,αla2,αla3,⋯,αlaNs=sla,tla1,⋯,sia,tlaNs which shows basic activity, where time duration isdla=tlaNs,tla1.Figure 2
Basic layout of sensor deployment in smart environment. Sensors are classified into REGULAR sensors and FUNCTIONAL sensors. Time duration between sensors and sensors’ ID is represented by tuples in lines. These lines also represent activity of trajectories.


### 3.2. Frequent Pattern Storage, Compression, and Mining

To store, compress, and detect the abnormal activity, top priority ofBehaviorPrivacyDeg is mining the user’s normal activity pattern to protect behavior pattern.Definition 1.
Normal activity is defined as if frequency of an activityAu which we assigned as fu exceeds a particular threshold during appearing in the storage data; then, activity Au is called a normal activity.Algorithm 1: FPMTA.
Input:sl,dl,ci,cl,si,diOutput:r-activity-patterns, frequent pattern tree (FP-tree) assigned as ft(1) Whiledi,sido(2) ifcl=REGULARthen treeinsertsl,dl,di,si;(3) else ifci=REGULARthentreeinsertsl,dl;(4) Tree_insertsl,dl,sl,dl;else(5) Tree_insertsl,dl;(6) Tree_insertsl,dl,di,si; end(7) ifsl,dl=di,si; nest item will be assigned in server to di,si(8) end while(9) ifdi,si last item at end of dataset then(10) For every activityAl in FP-tree do(11) ifft≥λthen(12) addAlintor-activity-patterns;(13) end if(14) end for(15) end if(16) returnr-activity-patterns and ftFP−treeDefinition 2.
Abnormal activity can be defined as activity that deviates from normal activities in the collected data. In activity recognition, the temporal relationship is foundation of sequence determination [26], and it leads to error of activity recognition. We determine abnormal activity as follows, if there is any kind of activity pattern Au which apparently seems normal but actually has deviation from normal activity, i.e.,Avary≤γ,Au, is determined as abnormal activity. Mostly, supervised learning algorithms for sensor data require several labeled data; therefore, learning algorithms unsupervised that saved labor and accelerate the learning speed [27].


### 3.3. Frequent Pattern Mining

Keeping in mind the Definition1, we prefer to use frequent pattern mining approach [7] for user’ behavior pattern privacy by mining normal activity patterns. Based on frequent pattern mining approach [7], if frequency of an element set exceeds minimum threshold λ within specific time duration, then it is considered as a normal activity. Each path from leaf node to root node and root node to leaf node is defined as pattern Ap, and the frequency is calculated as fp which represents minimum support count in a path. We use frequent pattern tree (FP-tree) to store quantitative and crucial information about FP-tree and time duration. FP-tree is proposed to achieve the privacy level of data in smart IoT environment. In FPMTA, line 3 and line 5 represent the insert-tree function. The function of insert-tree set si,di,sl,dl is inserted in two steps; in first step, node si,di is inserted into FP-tree as a child node sl,dl, and in second step, si,diinsert-tree is to insert a node si,di into FP-tree as a child node of root node. If there sl,dl is a child node sp,dp or root node which sp−di≤λ and sp=si, then counting of sp,dp is incremental by value 1. Suppose it is not the same, then node si,di is inserted into FP-tree as fresh child node’s root node sl,dl. Variables of Algorithms 1, 2, and 3 are used in Table 1.Algorithm 2: Patterns Compact Algorithm (PCA).
Input:r-activity-patterns, g-activity-patterns, γOutput:c-activity-patterns: to compact the real normal activity pattern(1) Sortingg-activity-patterns in order of descending dAu;//dAu it represents the quantity of activity in data set dA;(2) Whileg-activity-patterns’ size=0 do(3) Attain first activity patternAu in g-activity-patterns(4) for activity patternAl∈dAudo(5) DeleteAl in r-activity-patterns and g-activity-patterns;(6) for every activity patternAnin g-activity-patterns do(7) DeleteAl in dAn;(8) end for(9) end for(10) deleteAuin g-activity-patterns;(11) sortingg-activity-patterns in descending order dAu;(12) end while;c−activity−patterns=r−activity−patterns(13) returnc-activity-patternsTable 1
Variable detail used in Algorithms1, 2, and 3.
VariablesDetailλIt represents time duration threshold.γIt represents variation threshold.r-activity-patternsThis variable used to store real mined patterns.g-activity-patternsIt represent the setA1,rAu,⋯,Ai,rAu,⋯,AN,rAN and where Ai∈r−act−patterns. And դ is number of activities that stored in r-activity-patterns.rAuThis variable stores the activities that are the same toAu.di,ti, cidi is for current triggered sensor device/node, and ti represents the time duration probability. ci is category of sensor device di (REGULAR sensor device or FUNCTIONAL sensor device).dl, tl,cldl represents last triggered sensor, and tl represents corresponding time duration probability. cl is for corresponding type/category.c-activity-patternsThis variable is used to store the compacted patterns from the real.Ac,dc,tcAc represents current user’ activity, dc represents current sensor device, tc is current time duration probability of sensor device.DAl,TAlThese represent their mining from latest change of state-message.To compress and compact the mined frequent activity pattern of user’s behavior, we introduced a PCA. Furthermore,BehaviorPrivacyDeg of MPCS introduced abnormal activity detection-based time-duration algorithm (AADTA) to protect the privacy of user’s behavior pattern by detecting abnormal activity. AADTA contains sensor device ID di and sensor category and table of activity detection that is named as table-activity-dect. Activity table of sensor device S16 as shown in Figure 3 is described in Table 2. Mined patterns are stored in relevant room sensor devices separately as per proposed storage method. Previous sensors stored the ID in normal pattern field before triggering sensor S16. Time-duration probability is stored by previous time-duration probability corresponding with previous sensors S16.Algorithm 3: AADTA.
Input: table-activity-dect,dc,tc, DAl,TAl, γ(1)minu=1(2)adddcintoTAl;(3)addtcintoDAl;(4) reorganizeAlwithDAlandTAl;(5) fori⟵1to table-activity-dect do(6) if dissimilarAu,Al<minuthen(7)minu=dissmilarAc,Al;(8) end if(9) end for(10) ifminu>γthen(11) labelAlabnormal;(12) return c-activity-patterns;Figure 3
Basic difference between two kinds of frequent pattern tree (FP-tree). (a) The trajectory FP-tree and (b) the time duration-based FP-tree.
(a)(b)Table 2
Detects abnormal activity table of sensor deviceS16.
Previous device (dl)Previous time-duration probability (tl)Particular time-duration probabilitytoS20(1,0,0)(0.8, 0.2, 0)S15,S11,S12(1,0,0), (0,1,0), (0,1,0)(1,0,0)


### 3.4. Multilevel Privacy Design Model

The term privacy conveys various concepts such as privacy of activities, location, time duration, and decisional privacy. The form of privacy discussed in this section is user’s behavior pattern privacy based on activities. We divided user’s behavior pattern privacy into four levels termed as privacy level-1PL1, privacy level-2 PL2, and so on as discussed in Table 3 and Figure 4. Let PM=PL1,PL2,PL3,PL4 be the set of privacy model, including four privacy levels. The ability of multilevel privacy model is to deal privacy of user’s behavior pattern in smart IoT environment. Multilevel privacy model is comprised of (i) privacy level configuration protocol (PLCP) and (ii) activity design model.Table 3
Several levels for protecting privacy of users.
Privacy levelTypeDescriptionPL1Zone/regionIn this level, user just shares that he is in university but does not allow to share where exactly he is (e.g., in which building and apartment).PL2Building/office/roomIn this level, user shares his room/office/building but does not share the exact time (e.g., in which office at what time he is/was).PL3Time durationIn this level, either he shares approximate time (09.00 to 14.00) about his activity/location or accurate time, day, week, and month etc.PL4Activity/actionThis level includes the activity/action of the user (e.g., exercise, work, taking class, and watching TV).Figure 4
All privacy level that queries to the server. Work flow of PLCP.


### 3.5. Privacy-Level Configuration Protocol (PLCP)

PLCP is designed to manage privacy of users by controlling privacy levels and transmit data among sensors. In order to avail any service from server, users have to share some information of their privacy level with the server through limited resource sensors as shown in Figure2. Privacy of user will be changed with the selection of privacy level. Term ui is for user, and term ρi is used for privacy-level concern. At the level PLi, the average number of hidden data for all user is defined as PLρi=∑j=1k∂jPrρi,∂j,δj where term δj is used as how sensitive the data is perceived by user and ∂j is used as weight for the data. ThePr=ρi,∂j,δjbt the value of user’s privacy concern. We defined this measure for privacy rating at privacy configuration levelPLρi. For the user ui, the actual weighted number of hidden data ∑j=1k∂jsij is privacy rating at level of PLρi. PLCP uses level concern algorithm and privacy level index mechanism.(1)∑j=1k∂jsij=∑j=1k∂jPrρi,∂j,δj.(1)
Level Concern Privacy Algorithm (LCPA). LCPA provides a way for finding the optimal privacy configuration for a desired level of privacy concern. A new user can stipulate his/her level of privacy concern ρi based on the relative value in the range (1 to 4). LCPA assumes the data item models Pr=ρi,∂j,δj,j=1⋯..k. Also, privacy configuration for each user has been calculated as ρi, i=1,2,3,4. LCPA first calculates the privacy level PLρi for user level of privacy concern ρi with the data item model and then searches whether the user has the similar level of privacy concern ρ−ρi<∈, where ∈>0 is very small value according to LCPA.(2)
Privacy Level Index Mechanism. We introduced a new privacy level index mechanism which is used to assign index for each level. Let us assume that privacy level has been PL1-assigned index 0.1, PL2 has been assigned 0.2, PL3 has been assigned 0.3, and PL4 has been assigned index 0.4. User can use these indices to set their privacy level according to their concern in our smart IoT environment. At the same time, different user has different privacy levels and these levels are used by our proposed MPCS to protect the user’s behavior pattern privacy.Algorithm 4: Level concern privacy algorithm (LCPA).
1. Input.ρ: the desired level of privacy, ρi: the level of privacy for user in the data, ∂j,δj: the value for the data model, sij: learned data2.PLρi⟵∑j=1k∂jPrρi,∂j,δj3.T⟵ search the set of ρi, so that ρ−ρi<∈;4.Copt⟵∑j=1k∂j;5.Optconf⟵∅;6.foreveryuseruihavingρi∈Tdo7.PL1⟵∑j=1k∂jsij;8.ifCopt>ρi−PL1<∈then9.Copt>ρi−PL1;10.Optconf⟵ui′s privacy configuration;11.endif12. Return OptconfEach privacy level has data set as discussed above. Sometimes the user is more conscious about information of his location and sometimes about information of his time duration etc. Figure4 illustrates how PLCP works. Assuming that one user follows the PL1 in Figure 4 when sensor is triggered, it first executes the LCPA to control and manage privacy of user’s behavior pattern. The target of adversary is to access sensitive information of a user. We focused on two types of adversaries: (i) active adversary, any entity is an active adversary if he can access the untrusted sensor nodes. (ii) A passive adversary, which can eavesdrop on a communication channel between compromised nodes to track other user’s sensitive data. We consider gateway and sensor nodes as active adversaries.


### 3.6. Location-Based Privacy Algorithm (LPA)

Privacy levels 1 and 2 include user’s location, and in order to protect user’s location, we used concept of entropy. Entropy is used to measure the degree ofk-anonymity. To calculate entropy, each location has probability of being queried qi and probability donated by bi is 1. To identify the individual’s entropy E in users, set is defined as(2)E=−∑i=1kbi·log2bi.Our goal is to attain the maximum entropy, which can be achieved when all possible positions/locationsP have the same probability 1/P where the maximum entropy will beEmax=log2P. Server can assume real location with high probability as 1/P−Pd, where Pd represents the number of fake locations and server will calculate it based on probabilities of their low query. The query probability is higher than others in locations 1 to 3 and on the basis of information.It means thatP−Pd=3,and entropy will drop considerably from log2P to log2P−Pd. We enhance privacy of users in two phases: (i) first, we try to select fake locations of users with the same query probabilities; (ii) second, if there are more than one user, the fake location spread is as far as possible. Suppose the user’s location map is segregated into equal size cells n×n as shown in Figure 5. Each cell of the map has its own enquiry probability that is based on previous query history as follows:(3)qi=numberofenqueriesineachcellinumberofenqueriesinfullmap,i=1,2,3,⋯⋯⋯.n2,where(4)∑i=1n2qi=1.Figure 5
Layout of our basic approach in smart environment.
(a)
Real and fake users’ location(b)
Fake location with bigger and smaller cloaking region (CR)To provide a degree ofk-anonymity, in addition to real locations, we need to conclude the other k−1 cells to assign the fake locations. The user selects the P cells right before and P cells right after real location from sorted list as 2P users. Therefore, user make N set of cells, and in every set, one cell belongs to real user’s location and the others are randomly selected from 2P users. The mthm∈1,n set is represented as Rj=rj1,rj2,⋯,rji,⋯,rjk. The normalized query probability of the involved cells which is based on real query probabilities of the selected cells can be presented as sj1,sj2,⋯,sji,⋯,sjk and calculated by summing it to 1.(5)sj1=qbi∑l=1kqbl,i=1,2,⋯⋯,k.Algorithm 5: Location-based privacy algorithm
Input: real locationLreal, sets of N and P, probabilities of query in qi.Output: set of fake-locations1. All cells sort on based probabilities of their query2. Select fake2P of users among which P user is right before Lreal and P user right after Lrealin stored list.3. for (m=1; j≤N; m++) do4. develop a setRj which consist of Lrealand P−1, additional cells are randomly chosen from users 2P;5. Calculates the normalized probabilitysji for every cell rji in the set.6.Ej⟵−∑i=1kbji·log2bji;7. End8. Output maxEj;To effectively achievek-anonymity of P location, we need to create an optimal set. The level of privacy is guaranteed by using the entropy metric that is extensively used to measure privacy of users. We compute entropy for specifically selected set Rj as follows:(6)Ej=−∑i=1krji..log2rji.Finally, the LPA achieved the set with effective and highest degree of entropy.(7)R=argmaxEj.To measure the cloak region (CR), distances between pair of fake locations are calculated and the sum of distances can be utilized to measure the CR which is∑i=jdri,rj where dri,rj represents the distance between rows/cells ri and rj. In Figure 6, l1 represents real location of user and d1 is selected as a fake location of the user, since it is considered farthest location from l1. Furthermore, suppose there are two choices for assigning third fake locations d2 and d3. We select it based on the sum of distance between pairs of fake user’s locations. We have to select either of them because d2l1+d2d1=d3l1+d3d1. In this scenario,d2l1.d2d1=d3l1.d3d1; hence, we select d2 as a fake location. Let R=r1,r2,⋯,rk represents the set of fake and real user’s location. Multiobjective optimization problem (MOP) is described as(8)max−∑i=1kbi·log2bi,∏i≠jdri,rj,where ri,rj∈R,ki, and kj represent the query probabilities of the ri and rj, respectively. Our first priority is to confuse the adversary so that adversary cannot target the specific location of user. This objective can be represented as follows:(9)R=argmax−∑i=1kbi·log2bi,Figure 6
The scenario of user’s locations inside smart environment.That is basic condition to achieve the higher entropy by using a set of fake locations. Optimal combination ofP locations is as follows:(10)R=argmax∏i≠jdri,rj.Time Duration. The time duration Td is divided into three parts: small, medium, and big; thus, fuzzy logic [28] is used to calculate the time duration, and fuzzy inference system (FIS) [29] is adopted to measure the probability of Td being small Pᶊ−Td, medium Pᶬ−Td, and big Pƅ−Td. Basic activity is defined as βla, and sensor device is defined as sdi so as a result β=Tda,sia is redefined as β=sia,Pᶊ−Td,Pᶬ−Td,Pƅ−Td. In this paper, small time duration range is 0 to d~t3, and medium time duration range is from d~t1 to d~t4, and big time duration range is from d~t2, where 0<d~t1<d~t2<d~t3<d~t4. Each sia stores t_rulei=dt1i,d~t2i,d~t3i,d~t4i, and t_rulei is fixed according to location and monitoring zone of sensor device sid. The mean of maximum scheme is appropriate for our method. Assumed activity A1 as an example and we set d~t1=5, d~t2=20, d~t3=35, andd~t4=50. After using fuzzy logic, term s8,15 can be defined as s8,0,1,0.Activity Design Model. In this section, we described the concept of activity variation. Activity variation can be defined as small difference between two the same activities because the same pattern of activities cannot be repeated exactly in the same way. Activity variation consists of trajectory variation and duration variation which is used to measure this small difference.(a)
Trajectory Variation. The term trajectory variation is defined as Tv. Activities A0 and A1 as shown in Figure 5 take as an example Tva1=s18⟶s20⟶s20⟶s21 but Tva2=s18⟶s10⟶s20⟶s21, and this represents the same activity but with a small difference in trajectory. This trajectory variation is measured by ϻ_variation, and the difference between two trajectories Tvn and Tvm is calculated as(11)TvariationTvn,Tvm=MinuTvn−Tvm,Tvm−Tvn+Tvn−Tvm+orderTvn,Tvm=ϻvariation.Tvn−Tvm represents the total number of sdi which sdi∈Tvn and sdi∉Tvm.Tvn∣−∣Tvm explain the length between Tvn and Tvm. OrderTvn,Tvm computes the difference in sequence between Tvn and Tvm[26].(b)
Time Duration Variation. As discussed above, activities A0 and A1 as shown in Figure 5 are not the same activities due to the difference of time duration in s19. However, another activity Ay=s10,11,s18,25,s19,13,s18,15 is not same with A1, and difference of time duration is small. Term Tdv is used for time duration variation. Therefore, the variation between the duration of two activities can be calculated as(12)DissimilarityAx,Ay=Tdv−deviationTvx,Tvy,DAx,DAy∣Tvn,Tvm∣/2+Tv−deviationAx,Ay∣Tvn,Tvm∣/2=Adissmilarity.Activity variation of PL4 is calculated by equations (10) and (12), where դ is the duration threshold. The variation threshold is defined as Г to measure the similarity, and if Asimlarity≤Г, then Ax is considered as similar toAy.


## 3.1. Behavior Pattern Privacy Degree

Behavior pattern privacy degree (BehaviorPrivacyDeg) is aimed at protecting privacy of user’s activity variation in smart IoT environment which is as follows: (i) first, it extracts normal behavior pattern from the genuine data and then presents an activity pattern algorithm based on time duration that compresses and reduces the quantity of mined behavior pattern of user’s activity; (ii) secondly, it records mined pattern in each device according to record keeping mechanism, and it also detects abnormal activity to protect user’s behavior and pattern privacy. BehaviorPrivacyDeg uses three algorithms to protect the privacy of user’s behavior pattern which are (i) frequent pattern mining-based time-duration algorithm (FPMTA), (ii) patterns compact algorithm (PCA), and (iii) abnormal activity detection time-duration algorithm (AADTA). Sensors: we divided sensors into REGULAR sensors and FUNCTIONAL sensors as per requirement of deployment to sense the data of user’s locations and activities as shown in Figure 2. Firstly, set of all the deployed motion sensor devices across the smart IoT environment is represented asD=s1,s2,s3,sl,⋯,sn. User’s position is represented by sing location of sensor device sl which detects the movement of user’s position/location P. Sensor devices are defined by N. As we know, all users probably have different velocity of doing activities. Therefore, the time between these sensors during user’s activity is different and longer as compared to specific time segment. Activity is produced that is composed of atomic users’ activities. Atomic activitiesalai=sla,tlai define the trigger of sensor device sl wheresla∈D, and tlaiis trigger time of sla in ith sampling period. Number of sampling periods is defined by Ns which represents the conditions when a person passes bysla. Basic activity is defined as βla=αla1,αla2,αla3,⋯,αlaNs=sla,tla1,⋯,sia,tlaNs which shows basic activity, where time duration isdla=tlaNs,tla1.Figure 2
Basic layout of sensor deployment in smart environment. Sensors are classified into REGULAR sensors and FUNCTIONAL sensors. Time duration between sensors and sensors’ ID is represented by tuples in lines. These lines also represent activity of trajectories.


## 3.2. Frequent Pattern Storage, Compression, and Mining

To store, compress, and detect the abnormal activity, top priority ofBehaviorPrivacyDeg is mining the user’s normal activity pattern to protect behavior pattern.Definition 1.
Normal activity is defined as if frequency of an activityAu which we assigned as fu exceeds a particular threshold during appearing in the storage data; then, activity Au is called a normal activity.Algorithm 1: FPMTA.
Input:sl,dl,ci,cl,si,diOutput:r-activity-patterns, frequent pattern tree (FP-tree) assigned as ft(1) Whiledi,sido(2) ifcl=REGULARthen treeinsertsl,dl,di,si;(3) else ifci=REGULARthentreeinsertsl,dl;(4) Tree_insertsl,dl,sl,dl;else(5) Tree_insertsl,dl;(6) Tree_insertsl,dl,di,si; end(7) ifsl,dl=di,si; nest item will be assigned in server to di,si(8) end while(9) ifdi,si last item at end of dataset then(10) For every activityAl in FP-tree do(11) ifft≥λthen(12) addAlintor-activity-patterns;(13) end if(14) end for(15) end if(16) returnr-activity-patterns and ftFP−treeDefinition 2.
Abnormal activity can be defined as activity that deviates from normal activities in the collected data. In activity recognition, the temporal relationship is foundation of sequence determination [26], and it leads to error of activity recognition. We determine abnormal activity as follows, if there is any kind of activity pattern Au which apparently seems normal but actually has deviation from normal activity, i.e.,Avary≤γ,Au, is determined as abnormal activity. Mostly, supervised learning algorithms for sensor data require several labeled data; therefore, learning algorithms unsupervised that saved labor and accelerate the learning speed [27].


## 3.3. Frequent Pattern Mining

Keeping in mind the Definition1, we prefer to use frequent pattern mining approach [7] for user’ behavior pattern privacy by mining normal activity patterns. Based on frequent pattern mining approach [7], if frequency of an element set exceeds minimum threshold λ within specific time duration, then it is considered as a normal activity. Each path from leaf node to root node and root node to leaf node is defined as pattern Ap, and the frequency is calculated as fp which represents minimum support count in a path. We use frequent pattern tree (FP-tree) to store quantitative and crucial information about FP-tree and time duration. FP-tree is proposed to achieve the privacy level of data in smart IoT environment. In FPMTA, line 3 and line 5 represent the insert-tree function. The function of insert-tree set si,di,sl,dl is inserted in two steps; in first step, node si,di is inserted into FP-tree as a child node sl,dl, and in second step, si,diinsert-tree is to insert a node si,di into FP-tree as a child node of root node. If there sl,dl is a child node sp,dp or root node which sp−di≤λ and sp=si, then counting of sp,dp is incremental by value 1. Suppose it is not the same, then node si,di is inserted into FP-tree as fresh child node’s root node sl,dl. Variables of Algorithms 1, 2, and 3 are used in Table 1.Algorithm 2: Patterns Compact Algorithm (PCA).
Input:r-activity-patterns, g-activity-patterns, γOutput:c-activity-patterns: to compact the real normal activity pattern(1) Sortingg-activity-patterns in order of descending dAu;//dAu it represents the quantity of activity in data set dA;(2) Whileg-activity-patterns’ size=0 do(3) Attain first activity patternAu in g-activity-patterns(4) for activity patternAl∈dAudo(5) DeleteAl in r-activity-patterns and g-activity-patterns;(6) for every activity patternAnin g-activity-patterns do(7) DeleteAl in dAn;(8) end for(9) end for(10) deleteAuin g-activity-patterns;(11) sortingg-activity-patterns in descending order dAu;(12) end while;c−activity−patterns=r−activity−patterns(13) returnc-activity-patternsTable 1
Variable detail used in Algorithms1, 2, and 3.
VariablesDetailλIt represents time duration threshold.γIt represents variation threshold.r-activity-patternsThis variable used to store real mined patterns.g-activity-patternsIt represent the setA1,rAu,⋯,Ai,rAu,⋯,AN,rAN and where Ai∈r−act−patterns. And դ is number of activities that stored in r-activity-patterns.rAuThis variable stores the activities that are the same toAu.di,ti, cidi is for current triggered sensor device/node, and ti represents the time duration probability. ci is category of sensor device di (REGULAR sensor device or FUNCTIONAL sensor device).dl, tl,cldl represents last triggered sensor, and tl represents corresponding time duration probability. cl is for corresponding type/category.c-activity-patternsThis variable is used to store the compacted patterns from the real.Ac,dc,tcAc represents current user’ activity, dc represents current sensor device, tc is current time duration probability of sensor device.DAl,TAlThese represent their mining from latest change of state-message.To compress and compact the mined frequent activity pattern of user’s behavior, we introduced a PCA. Furthermore,BehaviorPrivacyDeg of MPCS introduced abnormal activity detection-based time-duration algorithm (AADTA) to protect the privacy of user’s behavior pattern by detecting abnormal activity. AADTA contains sensor device ID di and sensor category and table of activity detection that is named as table-activity-dect. Activity table of sensor device S16 as shown in Figure 3 is described in Table 2. Mined patterns are stored in relevant room sensor devices separately as per proposed storage method. Previous sensors stored the ID in normal pattern field before triggering sensor S16. Time-duration probability is stored by previous time-duration probability corresponding with previous sensors S16.Algorithm 3: AADTA.
Input: table-activity-dect,dc,tc, DAl,TAl, γ(1)minu=1(2)adddcintoTAl;(3)addtcintoDAl;(4) reorganizeAlwithDAlandTAl;(5) fori⟵1to table-activity-dect do(6) if dissimilarAu,Al<minuthen(7)minu=dissmilarAc,Al;(8) end if(9) end for(10) ifminu>γthen(11) labelAlabnormal;(12) return c-activity-patterns;Figure 3
Basic difference between two kinds of frequent pattern tree (FP-tree). (a) The trajectory FP-tree and (b) the time duration-based FP-tree.
(a)(b)Table 2
Detects abnormal activity table of sensor deviceS16.
Previous device (dl)Previous time-duration probability (tl)Particular time-duration probabilitytoS20(1,0,0)(0.8, 0.2, 0)S15,S11,S12(1,0,0), (0,1,0), (0,1,0)(1,0,0)


## 3.4. Multilevel Privacy Design Model

The term privacy conveys various concepts such as privacy of activities, location, time duration, and decisional privacy. The form of privacy discussed in this section is user’s behavior pattern privacy based on activities. We divided user’s behavior pattern privacy into four levels termed as privacy level-1PL1, privacy level-2 PL2, and so on as discussed in Table 3 and Figure 4. Let PM=PL1,PL2,PL3,PL4 be the set of privacy model, including four privacy levels. The ability of multilevel privacy model is to deal privacy of user’s behavior pattern in smart IoT environment. Multilevel privacy model is comprised of (i) privacy level configuration protocol (PLCP) and (ii) activity design model.Table 3
Several levels for protecting privacy of users.
Privacy levelTypeDescriptionPL1Zone/regionIn this level, user just shares that he is in university but does not allow to share where exactly he is (e.g., in which building and apartment).PL2Building/office/roomIn this level, user shares his room/office/building but does not share the exact time (e.g., in which office at what time he is/was).PL3Time durationIn this level, either he shares approximate time (09.00 to 14.00) about his activity/location or accurate time, day, week, and month etc.PL4Activity/actionThis level includes the activity/action of the user (e.g., exercise, work, taking class, and watching TV).Figure 4
All privacy level that queries to the server. Work flow of PLCP.


## 3.5. Privacy-Level Configuration Protocol (PLCP)

PLCP is designed to manage privacy of users by controlling privacy levels and transmit data among sensors. In order to avail any service from server, users have to share some information of their privacy level with the server through limited resource sensors as shown in Figure2. Privacy of user will be changed with the selection of privacy level. Term ui is for user, and term ρi is used for privacy-level concern. At the level PLi, the average number of hidden data for all user is defined as PLρi=∑j=1k∂jPrρi,∂j,δj where term δj is used as how sensitive the data is perceived by user and ∂j is used as weight for the data. ThePr=ρi,∂j,δjbt the value of user’s privacy concern. We defined this measure for privacy rating at privacy configuration levelPLρi. For the user ui, the actual weighted number of hidden data ∑j=1k∂jsij is privacy rating at level of PLρi. PLCP uses level concern algorithm and privacy level index mechanism.(1)∑j=1k∂jsij=∑j=1k∂jPrρi,∂j,δj.(1)
Level Concern Privacy Algorithm (LCPA). LCPA provides a way for finding the optimal privacy configuration for a desired level of privacy concern. A new user can stipulate his/her level of privacy concern ρi based on the relative value in the range (1 to 4). LCPA assumes the data item models Pr=ρi,∂j,δj,j=1⋯..k. Also, privacy configuration for each user has been calculated as ρi, i=1,2,3,4. LCPA first calculates the privacy level PLρi for user level of privacy concern ρi with the data item model and then searches whether the user has the similar level of privacy concern ρ−ρi<∈, where ∈>0 is very small value according to LCPA.(2)
Privacy Level Index Mechanism. We introduced a new privacy level index mechanism which is used to assign index for each level. Let us assume that privacy level has been PL1-assigned index 0.1, PL2 has been assigned 0.2, PL3 has been assigned 0.3, and PL4 has been assigned index 0.4. User can use these indices to set their privacy level according to their concern in our smart IoT environment. At the same time, different user has different privacy levels and these levels are used by our proposed MPCS to protect the user’s behavior pattern privacy.Algorithm 4: Level concern privacy algorithm (LCPA).
1. Input.ρ: the desired level of privacy, ρi: the level of privacy for user in the data, ∂j,δj: the value for the data model, sij: learned data2.PLρi⟵∑j=1k∂jPrρi,∂j,δj3.T⟵ search the set of ρi, so that ρ−ρi<∈;4.Copt⟵∑j=1k∂j;5.Optconf⟵∅;6.foreveryuseruihavingρi∈Tdo7.PL1⟵∑j=1k∂jsij;8.ifCopt>ρi−PL1<∈then9.Copt>ρi−PL1;10.Optconf⟵ui′s privacy configuration;11.endif12. Return OptconfEach privacy level has data set as discussed above. Sometimes the user is more conscious about information of his location and sometimes about information of his time duration etc. Figure4 illustrates how PLCP works. Assuming that one user follows the PL1 in Figure 4 when sensor is triggered, it first executes the LCPA to control and manage privacy of user’s behavior pattern. The target of adversary is to access sensitive information of a user. We focused on two types of adversaries: (i) active adversary, any entity is an active adversary if he can access the untrusted sensor nodes. (ii) A passive adversary, which can eavesdrop on a communication channel between compromised nodes to track other user’s sensitive data. We consider gateway and sensor nodes as active adversaries.


## 3.6. Location-Based Privacy Algorithm (LPA)

Privacy levels 1 and 2 include user’s location, and in order to protect user’s location, we used concept of entropy. Entropy is used to measure the degree ofk-anonymity. To calculate entropy, each location has probability of being queried qi and probability donated by bi is 1. To identify the individual’s entropy E in users, set is defined as(2)E=−∑i=1kbi·log2bi.Our goal is to attain the maximum entropy, which can be achieved when all possible positions/locationsP have the same probability 1/P where the maximum entropy will beEmax=log2P. Server can assume real location with high probability as 1/P−Pd, where Pd represents the number of fake locations and server will calculate it based on probabilities of their low query. The query probability is higher than others in locations 1 to 3 and on the basis of information.It means thatP−Pd=3,and entropy will drop considerably from log2P to log2P−Pd. We enhance privacy of users in two phases: (i) first, we try to select fake locations of users with the same query probabilities; (ii) second, if there are more than one user, the fake location spread is as far as possible. Suppose the user’s location map is segregated into equal size cells n×n as shown in Figure 5. Each cell of the map has its own enquiry probability that is based on previous query history as follows:(3)qi=numberofenqueriesineachcellinumberofenqueriesinfullmap,i=1,2,3,⋯⋯⋯.n2,where(4)∑i=1n2qi=1.Figure 5
Layout of our basic approach in smart environment.
(a)
Real and fake users’ location(b)
Fake location with bigger and smaller cloaking region (CR)To provide a degree ofk-anonymity, in addition to real locations, we need to conclude the other k−1 cells to assign the fake locations. The user selects the P cells right before and P cells right after real location from sorted list as 2P users. Therefore, user make N set of cells, and in every set, one cell belongs to real user’s location and the others are randomly selected from 2P users. The mthm∈1,n set is represented as Rj=rj1,rj2,⋯,rji,⋯,rjk. The normalized query probability of the involved cells which is based on real query probabilities of the selected cells can be presented as sj1,sj2,⋯,sji,⋯,sjk and calculated by summing it to 1.(5)sj1=qbi∑l=1kqbl,i=1,2,⋯⋯,k.Algorithm 5: Location-based privacy algorithm
Input: real locationLreal, sets of N and P, probabilities of query in qi.Output: set of fake-locations1. All cells sort on based probabilities of their query2. Select fake2P of users among which P user is right before Lreal and P user right after Lrealin stored list.3. for (m=1; j≤N; m++) do4. develop a setRj which consist of Lrealand P−1, additional cells are randomly chosen from users 2P;5. Calculates the normalized probabilitysji for every cell rji in the set.6.Ej⟵−∑i=1kbji·log2bji;7. End8. Output maxEj;To effectively achievek-anonymity of P location, we need to create an optimal set. The level of privacy is guaranteed by using the entropy metric that is extensively used to measure privacy of users. We compute entropy for specifically selected set Rj as follows:(6)Ej=−∑i=1krji..log2rji.Finally, the LPA achieved the set with effective and highest degree of entropy.(7)R=argmaxEj.To measure the cloak region (CR), distances between pair of fake locations are calculated and the sum of distances can be utilized to measure the CR which is∑i=jdri,rj where dri,rj represents the distance between rows/cells ri and rj. In Figure 6, l1 represents real location of user and d1 is selected as a fake location of the user, since it is considered farthest location from l1. Furthermore, suppose there are two choices for assigning third fake locations d2 and d3. We select it based on the sum of distance between pairs of fake user’s locations. We have to select either of them because d2l1+d2d1=d3l1+d3d1. In this scenario,d2l1.d2d1=d3l1.d3d1; hence, we select d2 as a fake location. Let R=r1,r2,⋯,rk represents the set of fake and real user’s location. Multiobjective optimization problem (MOP) is described as(8)max−∑i=1kbi·log2bi,∏i≠jdri,rj,where ri,rj∈R,ki, and kj represent the query probabilities of the ri and rj, respectively. Our first priority is to confuse the adversary so that adversary cannot target the specific location of user. This objective can be represented as follows:(9)R=argmax−∑i=1kbi·log2bi,Figure 6
The scenario of user’s locations inside smart environment.That is basic condition to achieve the higher entropy by using a set of fake locations. Optimal combination ofP locations is as follows:(10)R=argmax∏i≠jdri,rj.Time Duration. The time duration Td is divided into three parts: small, medium, and big; thus, fuzzy logic [28] is used to calculate the time duration, and fuzzy inference system (FIS) [29] is adopted to measure the probability of Td being small Pᶊ−Td, medium Pᶬ−Td, and big Pƅ−Td. Basic activity is defined as βla, and sensor device is defined as sdi so as a result β=Tda,sia is redefined as β=sia,Pᶊ−Td,Pᶬ−Td,Pƅ−Td. In this paper, small time duration range is 0 to d~t3, and medium time duration range is from d~t1 to d~t4, and big time duration range is from d~t2, where 0<d~t1<d~t2<d~t3<d~t4. Each sia stores t_rulei=dt1i,d~t2i,d~t3i,d~t4i, and t_rulei is fixed according to location and monitoring zone of sensor device sid. The mean of maximum scheme is appropriate for our method. Assumed activity A1 as an example and we set d~t1=5, d~t2=20, d~t3=35, andd~t4=50. After using fuzzy logic, term s8,15 can be defined as s8,0,1,0.Activity Design Model. In this section, we described the concept of activity variation. Activity variation can be defined as small difference between two the same activities because the same pattern of activities cannot be repeated exactly in the same way. Activity variation consists of trajectory variation and duration variation which is used to measure this small difference.(a)
Trajectory Variation. The term trajectory variation is defined as Tv. Activities A0 and A1 as shown in Figure 5 take as an example Tva1=s18⟶s20⟶s20⟶s21 but Tva2=s18⟶s10⟶s20⟶s21, and this represents the same activity but with a small difference in trajectory. This trajectory variation is measured by ϻ_variation, and the difference between two trajectories Tvn and Tvm is calculated as(11)TvariationTvn,Tvm=MinuTvn−Tvm,Tvm−Tvn+Tvn−Tvm+orderTvn,Tvm=ϻvariation.Tvn−Tvm represents the total number of sdi which sdi∈Tvn and sdi∉Tvm.Tvn∣−∣Tvm explain the length between Tvn and Tvm. OrderTvn,Tvm computes the difference in sequence between Tvn and Tvm[26].(b)
Time Duration Variation. As discussed above, activities A0 and A1 as shown in Figure 5 are not the same activities due to the difference of time duration in s19. However, another activity Ay=s10,11,s18,25,s19,13,s18,15 is not same with A1, and difference of time duration is small. Term Tdv is used for time duration variation. Therefore, the variation between the duration of two activities can be calculated as(12)DissimilarityAx,Ay=Tdv−deviationTvx,Tvy,DAx,DAy∣Tvn,Tvm∣/2+Tv−deviationAx,Ay∣Tvn,Tvm∣/2=Adissmilarity.Activity variation of PL4 is calculated by equations (10) and (12), where դ is the duration threshold. The variation threshold is defined as Г to measure the similarity, and if Asimlarity≤Г, then Ax is considered as similar toAy.


## 4. Experiments

### 4.1. Simulation-Based Experiment

As a simulation model with ground facts, we used smart IoT environment simulator tool to simulate the sensor device-based smart IoT environment, and information was installed manually instead of real setup smart IoT environment. Simulation smart IoT environment is basically divided into three main parts which are as follows.(1)
Motions Sensor Devices. We installed more than 100 sensor devices to sense data of location-based users’ activity for simulation in smart IoT environment which is shown in Figures 7 and 8. In Figure 7, sensors, which are colored with yellow, are deployed in hallways and elevators. Light yellow sensors are deployed within the rooms, office, and conference rooms. White color sensors are installed in living room, study room, and restrooms.(2)
Smart IoT Environment’s Trajectory. We designed more than 15 normal trajectories which have average length of 13. These trajectories reflect typical condition about user’s activities.(3)
Time Duration. As per deployment locations of sensor devices di′slocations and basic features, three types of t_rule are defined to respond the concerned sensor devices.(i)
Int_rule1, firstly, {2 d, 4 d, 6 d, 8 d} is designed for those sensor devices which are utilized for detecting passing (such as in lobby and hallway).(ii)
Int_rule2, {1 s, 3 s, 5 s, 9 s, 11 s, 13 s} is designed for such sensor devices which are deployed in areas where users may stay for few minutes (such as in washroom and kitchen).(iii)
Int_rule3, {0.4 h, 1.5 h, 2 h, 5 h, 7 h, 9 h} is designed for sensor devices which are located in the area where users will stay for rather long time such as office, study room, and bedroom.Figure 7
Motion sensor-based smart environment setup for simulation experiment.Figure 8
Example of the smart IoT environment and deployment of motion sensor devices are shown.Meanwhile, their time duration of staying ist_di, and corresponding table-activity-dect are set and assigned with appropriate value manually. The simulation detection system has completed the operations of the LPA, FPMTA, PCA, and the AADTA.Real-Time Location. The parameter average distance and location are designed to calculate the real-time location’ property. ADL is measured as follows:(13)ADT=∑i=1nLdisAu.Ldis represents the trigger sensor devices during decision-making, and Au represents the length of Au. Experiment results showed that ADT of detecting activity is 75.5% which is good as compared to centralized detecting algorithm.


### 4.2. Lab-Time Experiments

In this section, we conducted real experiment.


#### 4.2.1. Detecting Activity’s Feasibility

In smart IoT environment, each sensor device will use AADTA for execution process. In AADTA, the time complexity isoti and it showed that the time complexity of AADTA is oti. We used TelosW sensor devices for real-time experiment because TelosW has memory size of 1 MB, and it meets the computing capacity of detecting activity. If the average size of stored patterns is 10 at TelosW sensor device, then it means total 7489 patterns bytes1024∗1024/bytes4+4+4+2∗10=7489 can be stored on one sensor device in smart IoT environment. It clearly showed that feasibility of sensors’ capacity for storage of patterns is enough. Average time of execution of number of patterns is shown in Table 4.Table 4
Experiment result of performance test.
Number of patternAverage time of execution677.5 m/s1280.4 m/s1886.3 m/s2493.9 m/sDetecting Abnormalities. Transition probabilities of each sensor in smart IoT environment are represented byT_proi=t_p_ri,t_p_ui,t_p_li,t_p_di. This transaction probability is set to calculate the possibility of which near sensor device will be triggered for next. Considering the deployed sensor devices as shown in Figure 7, if a user triggers m27, the user must trigger m26,m22,m25,m24 as transaction m27⟶m26,m27⟶m22,m27⟶m25,m27⟶m24. If we set T_proi=0.2,0.1,0.3,0.4 then user will like to select the trajectory m27⟶m25. Moreover, it is also possible that user may choose to do the remaining three trajectories. Here, users are allowed to randomly choose any trajectory from 15 designed trajectories. In other words, users can choose any route depending on the T_proi and user can also change his route. We calculated 95 trajectories after repeating 95 times, and only 4 of them are the same as we have designed. 75 abnormal trajectories are detected by our algorithm-based trajectory method [7] and labeled 91 abnormalities, but in real, just 73 abnormalities are produced as shown in Table 5. We use two important keys during simulation experiment when time duration is taking into consideration. Firstly, we use ai for average speed where i represents the sensor device ID. Average speed represents the approach corresponding with every interlinked device-pair but we set up various speeds during simulation in each sensor device to manage the average speed. Secondly, we assign various speeds with index virepresenting the variance of ai. When user is passing through sensor device di and ai randomly selects from 0.4 m/s to 1.2 m/s, vi randomly selects from 0.11 m/s to 0.32 m/s. Time duration t_di is altered manually. After repeating and executing 40 times, 40 trajectories are produced with uniform time duration. 30 abnormalities are generated, and our algorithm detected 29 abnormalities by using trajectory-based approach [7].Table 5
Detecting abnormalities.
ParametersAlgorithm detecting_ activity trajectorySize of model9595Trajectory_abnormality7373Disc_abnormal_trajectory7591Size of model5454Time_duration_abnormality3838Disc_time_duration_abnormality35Fail


#### 4.2.2. Results

The experimental setup to validate our algorithms is based at Chongqing University Campus A, China. During these experiments, we choose two groups of students who have volunteered to participate. Students in group 1 were aware with the environment layout, and students of group 2 were not familiar with environment. Sensor devices were deployed in the building as shown in Figure9. Red colored sensors in Figure 9 represent the motion sensors. TelosW sensor devices were deployed, and position of sensor in building is shown in Figure 8. Five tasks were performed in two experiments. In each task, participant needs to start from specific position and reaches destination through designed workplace. To achieve the fair result, the specified rooms and position were randomly chosen. The results are shown in Figure 10(b). After extracting 662 activates, we stored related information in each node by LCPA, LPA, PCA, and AADTA, and Table 6 shows the complete details.Figure 9
Deployment layout of motion sensor devices network in smart IoT environment. The position of sensor and its ID are shown.Figure 10
Experiment results during simulation test.
(a)
Detection abnormal trajectory(b)
Detection abnormal time durationTable 6
Detail of stored patterns in sensors.
Sensor device IDTotal patternsSensor device IDTotal patternsSensor device IDTotal patternsd12d1317d2517d24d1414d2619d37d1513d2714d49d169d2813d512d1712d2913d615d187d3011d717d198d319d813d2010d327d915d2113d335d1016d2211d343d1111d2312d352d1215d2415d367Knowing and Unknowing. Students of group 1 were aware about the layout of designed setup, and they completed all six tasks without any prompting. Trajectories of group 1 are traced to detect abnormal activity at real time by using Algorithm 5 (AADTA). Students of group 1 involved in the same task are different from unaware participants of group 2 as shown in Table 7. In other words, unaware participants develop uncommon trajectories which were significantly different from pattern generated by aware group. After 14.5 seconds, it is clearly shown that it repels previous possibility of pattern 2 and it mismatches with other patterns shown in Figure 11(a). Therefore, such kind of activity is labeled with abnormal activity, and user’s behavior pattern privacy can be protected by detecting such abnormal activity.Table 7
Triggered sensors (known versus unknown).
Task settingKnownUnknownADL105-11591173%115-106121577%104-121101180.10%112A-109B4662%101-1196872%Average ADL73%Figure 11
Experimental result of tasks.
(a)
Result of known versus unknown(b)
Result of task normal versus abnormalNormal Versus Abnormal. In the second experiment, it is required from participants of group 1 to stimulate a condition which we can label as abnormal condition. To create real abnormal situation, like as tumble, is hard to stimulate. Therefore, to generate abnormal phenomena, some disturbance such as by calling to a participant randomly while the task is being performed, are added in the experiment. After applying disturbed method, our algorithm detects abnormal activity at real-time occurrence without waiting for task’s completion as shown in Figure 11(b). So our algorithm detects activity at real time instead of central computing in which abnormality is detected after completion of whole process of activity, and it enhanced the real-time performance. Hence, we found that our scheme protects privacy of user’s behavior pattern by detecting abnormal activity at real time without waiting for completion of the process. Table 8 shows the result of abnormal activity detection by our proposed BehaviorPrivacyDeg. The transition of participants shown in Figure 9 is d26⟶d24⟶d22⟶d34⟶d40⟶d21⟶d19⟶d17⟶d13⟶d10⟶d16⟶d21⟶d14. When abnormality is detected at sensor device d19 by interfering the participants, the trajectory remains the same but time duration is significantly changed. Results in Figures 12(a) and 12(b) show the suitability and effectiveness of our scheme.Table 8
Time-duration number of devices triggered in normal versus abnormal.
Task settingSenor devicesTime duration (s)Abnormal-detection-locationADL105-1159948.5169.1758%115-106121280.285.43868.4%104-121101052.3165.89778.9%112A-109B4412.1024.23470%101-1196616.7525.13380%Average ADL71%Figure 12
Experiment results of our proposed scheme.
(a)
Experiment of known versus unknown(b)
Time duration during interfered versus normalUser Privacy-Level Concern Index. In this section, as discussed in privacy-level design model section, experiment result of our proposed MPCS showed that user’s behavior pattern privacy is changed with the changing of privacy level. Privacy levels are configured by using index value on server. In Figure 13, index value showed that most users have much concerned about their activity privacy in smart IoT environment. After this, result revealed that users are more concerned about that area/zone and only 10 percent users are worried about their location. Hence, users can control their privacy level according to their concern by using our proposed MPCS.Figure 13
Result of experiment about privacy level of various users.Location Privacy. To protect the location of user in smart IoT environment, our proposed LPA achieved privacy of user’s location by considering entropy and cloak region (CR). Users are required to share some level of personal information for getting services from server via installed sensor devices which are also called access point (AP).We used a parameter∂ to obtain partial information. In our experiments, we used 120 sensor devices which sense data and ∂=1.5 represents the user familiarity about query probability over 75 APs. The effect of ∂ on entropy and product of distance are represented in results of our proposed LPA which is shown in Figures 14(a) and 14(b). In our simulation,P=15, r=500m, and change ∂is from 0.5 to 1.5. The result revealed that location privacy algorithm (LPA) is better and has achieved the set target. The assessments of results showed that performance of LPA is better.Figure 14
Effect of∂ entropy and product of distance.
(a)
∂ versus entropy(b)
∂ versus distance product


## 4.1. Simulation-Based Experiment

As a simulation model with ground facts, we used smart IoT environment simulator tool to simulate the sensor device-based smart IoT environment, and information was installed manually instead of real setup smart IoT environment. Simulation smart IoT environment is basically divided into three main parts which are as follows.(1)
Motions Sensor Devices. We installed more than 100 sensor devices to sense data of location-based users’ activity for simulation in smart IoT environment which is shown in Figures 7 and 8. In Figure 7, sensors, which are colored with yellow, are deployed in hallways and elevators. Light yellow sensors are deployed within the rooms, office, and conference rooms. White color sensors are installed in living room, study room, and restrooms.(2)
Smart IoT Environment’s Trajectory. We designed more than 15 normal trajectories which have average length of 13. These trajectories reflect typical condition about user’s activities.(3)
Time Duration. As per deployment locations of sensor devices di′slocations and basic features, three types of t_rule are defined to respond the concerned sensor devices.(i)
Int_rule1, firstly, {2 d, 4 d, 6 d, 8 d} is designed for those sensor devices which are utilized for detecting passing (such as in lobby and hallway).(ii)
Int_rule2, {1 s, 3 s, 5 s, 9 s, 11 s, 13 s} is designed for such sensor devices which are deployed in areas where users may stay for few minutes (such as in washroom and kitchen).(iii)
Int_rule3, {0.4 h, 1.5 h, 2 h, 5 h, 7 h, 9 h} is designed for sensor devices which are located in the area where users will stay for rather long time such as office, study room, and bedroom.Figure 7
Motion sensor-based smart environment setup for simulation experiment.Figure 8
Example of the smart IoT environment and deployment of motion sensor devices are shown.Meanwhile, their time duration of staying ist_di, and corresponding table-activity-dect are set and assigned with appropriate value manually. The simulation detection system has completed the operations of the LPA, FPMTA, PCA, and the AADTA.Real-Time Location. The parameter average distance and location are designed to calculate the real-time location’ property. ADL is measured as follows:(13)ADT=∑i=1nLdisAu.Ldis represents the trigger sensor devices during decision-making, and Au represents the length of Au. Experiment results showed that ADT of detecting activity is 75.5% which is good as compared to centralized detecting algorithm.


## 4.2. Lab-Time Experiments

In this section, we conducted real experiment.


### 4.2.1. Detecting Activity’s Feasibility

In smart IoT environment, each sensor device will use AADTA for execution process. In AADTA, the time complexity isoti and it showed that the time complexity of AADTA is oti. We used TelosW sensor devices for real-time experiment because TelosW has memory size of 1 MB, and it meets the computing capacity of detecting activity. If the average size of stored patterns is 10 at TelosW sensor device, then it means total 7489 patterns bytes1024∗1024/bytes4+4+4+2∗10=7489 can be stored on one sensor device in smart IoT environment. It clearly showed that feasibility of sensors’ capacity for storage of patterns is enough. Average time of execution of number of patterns is shown in Table 4.Table 4
Experiment result of performance test.
Number of patternAverage time of execution677.5 m/s1280.4 m/s1886.3 m/s2493.9 m/sDetecting Abnormalities. Transition probabilities of each sensor in smart IoT environment are represented byT_proi=t_p_ri,t_p_ui,t_p_li,t_p_di. This transaction probability is set to calculate the possibility of which near sensor device will be triggered for next. Considering the deployed sensor devices as shown in Figure 7, if a user triggers m27, the user must trigger m26,m22,m25,m24 as transaction m27⟶m26,m27⟶m22,m27⟶m25,m27⟶m24. If we set T_proi=0.2,0.1,0.3,0.4 then user will like to select the trajectory m27⟶m25. Moreover, it is also possible that user may choose to do the remaining three trajectories. Here, users are allowed to randomly choose any trajectory from 15 designed trajectories. In other words, users can choose any route depending on the T_proi and user can also change his route. We calculated 95 trajectories after repeating 95 times, and only 4 of them are the same as we have designed. 75 abnormal trajectories are detected by our algorithm-based trajectory method [7] and labeled 91 abnormalities, but in real, just 73 abnormalities are produced as shown in Table 5. We use two important keys during simulation experiment when time duration is taking into consideration. Firstly, we use ai for average speed where i represents the sensor device ID. Average speed represents the approach corresponding with every interlinked device-pair but we set up various speeds during simulation in each sensor device to manage the average speed. Secondly, we assign various speeds with index virepresenting the variance of ai. When user is passing through sensor device di and ai randomly selects from 0.4 m/s to 1.2 m/s, vi randomly selects from 0.11 m/s to 0.32 m/s. Time duration t_di is altered manually. After repeating and executing 40 times, 40 trajectories are produced with uniform time duration. 30 abnormalities are generated, and our algorithm detected 29 abnormalities by using trajectory-based approach [7].Table 5
Detecting abnormalities.
ParametersAlgorithm detecting_ activity trajectorySize of model9595Trajectory_abnormality7373Disc_abnormal_trajectory7591Size of model5454Time_duration_abnormality3838Disc_time_duration_abnormality35Fail


### 4.2.2. Results

The experimental setup to validate our algorithms is based at Chongqing University Campus A, China. During these experiments, we choose two groups of students who have volunteered to participate. Students in group 1 were aware with the environment layout, and students of group 2 were not familiar with environment. Sensor devices were deployed in the building as shown in Figure9. Red colored sensors in Figure 9 represent the motion sensors. TelosW sensor devices were deployed, and position of sensor in building is shown in Figure 8. Five tasks were performed in two experiments. In each task, participant needs to start from specific position and reaches destination through designed workplace. To achieve the fair result, the specified rooms and position were randomly chosen. The results are shown in Figure 10(b). After extracting 662 activates, we stored related information in each node by LCPA, LPA, PCA, and AADTA, and Table 6 shows the complete details.Figure 9
Deployment layout of motion sensor devices network in smart IoT environment. The position of sensor and its ID are shown.Figure 10
Experiment results during simulation test.
(a)
Detection abnormal trajectory(b)
Detection abnormal time durationTable 6
Detail of stored patterns in sensors.
Sensor device IDTotal patternsSensor device IDTotal patternsSensor device IDTotal patternsd12d1317d2517d24d1414d2619d37d1513d2714d49d169d2813d512d1712d2913d615d187d3011d717d198d319d813d2010d327d915d2113d335d1016d2211d343d1111d2312d352d1215d2415d367Knowing and Unknowing. Students of group 1 were aware about the layout of designed setup, and they completed all six tasks without any prompting. Trajectories of group 1 are traced to detect abnormal activity at real time by using Algorithm 5 (AADTA). Students of group 1 involved in the same task are different from unaware participants of group 2 as shown in Table 7. In other words, unaware participants develop uncommon trajectories which were significantly different from pattern generated by aware group. After 14.5 seconds, it is clearly shown that it repels previous possibility of pattern 2 and it mismatches with other patterns shown in Figure 11(a). Therefore, such kind of activity is labeled with abnormal activity, and user’s behavior pattern privacy can be protected by detecting such abnormal activity.Table 7
Triggered sensors (known versus unknown).
Task settingKnownUnknownADL105-11591173%115-106121577%104-121101180.10%112A-109B4662%101-1196872%Average ADL73%Figure 11
Experimental result of tasks.
(a)
Result of known versus unknown(b)
Result of task normal versus abnormalNormal Versus Abnormal. In the second experiment, it is required from participants of group 1 to stimulate a condition which we can label as abnormal condition. To create real abnormal situation, like as tumble, is hard to stimulate. Therefore, to generate abnormal phenomena, some disturbance such as by calling to a participant randomly while the task is being performed, are added in the experiment. After applying disturbed method, our algorithm detects abnormal activity at real-time occurrence without waiting for task’s completion as shown in Figure 11(b). So our algorithm detects activity at real time instead of central computing in which abnormality is detected after completion of whole process of activity, and it enhanced the real-time performance. Hence, we found that our scheme protects privacy of user’s behavior pattern by detecting abnormal activity at real time without waiting for completion of the process. Table 8 shows the result of abnormal activity detection by our proposed BehaviorPrivacyDeg. The transition of participants shown in Figure 9 is d26⟶d24⟶d22⟶d34⟶d40⟶d21⟶d19⟶d17⟶d13⟶d10⟶d16⟶d21⟶d14. When abnormality is detected at sensor device d19 by interfering the participants, the trajectory remains the same but time duration is significantly changed. Results in Figures 12(a) and 12(b) show the suitability and effectiveness of our scheme.Table 8
Time-duration number of devices triggered in normal versus abnormal.
Task settingSenor devicesTime duration (s)Abnormal-detection-locationADL105-1159948.5169.1758%115-106121280.285.43868.4%104-121101052.3165.89778.9%112A-109B4412.1024.23470%101-1196616.7525.13380%Average ADL71%Figure 12
Experiment results of our proposed scheme.
(a)
Experiment of known versus unknown(b)
Time duration during interfered versus normalUser Privacy-Level Concern Index. In this section, as discussed in privacy-level design model section, experiment result of our proposed MPCS showed that user’s behavior pattern privacy is changed with the changing of privacy level. Privacy levels are configured by using index value on server. In Figure 13, index value showed that most users have much concerned about their activity privacy in smart IoT environment. After this, result revealed that users are more concerned about that area/zone and only 10 percent users are worried about their location. Hence, users can control their privacy level according to their concern by using our proposed MPCS.Figure 13
Result of experiment about privacy level of various users.Location Privacy. To protect the location of user in smart IoT environment, our proposed LPA achieved privacy of user’s location by considering entropy and cloak region (CR). Users are required to share some level of personal information for getting services from server via installed sensor devices which are also called access point (AP).We used a parameter∂ to obtain partial information. In our experiments, we used 120 sensor devices which sense data and ∂=1.5 represents the user familiarity about query probability over 75 APs. The effect of ∂ on entropy and product of distance are represented in results of our proposed LPA which is shown in Figures 14(a) and 14(b). In our simulation,P=15, r=500m, and change ∂is from 0.5 to 1.5. The result revealed that location privacy algorithm (LPA) is better and has achieved the set target. The assessments of results showed that performance of LPA is better.Figure 14
Effect of∂ entropy and product of distance.
(a)
∂ versus entropy(b)
∂ versus distance product


## 4.2.1. Detecting Activity’s Feasibility

In smart IoT environment, each sensor device will use AADTA for execution process. In AADTA, the time complexity isoti and it showed that the time complexity of AADTA is oti. We used TelosW sensor devices for real-time experiment because TelosW has memory size of 1 MB, and it meets the computing capacity of detecting activity. If the average size of stored patterns is 10 at TelosW sensor device, then it means total 7489 patterns bytes1024∗1024/bytes4+4+4+2∗10=7489 can be stored on one sensor device in smart IoT environment. It clearly showed that feasibility of sensors’ capacity for storage of patterns is enough. Average time of execution of number of patterns is shown in Table 4.Table 4
Experiment result of performance test.
Number of patternAverage time of execution677.5 m/s1280.4 m/s1886.3 m/s2493.9 m/sDetecting Abnormalities. Transition probabilities of each sensor in smart IoT environment are represented byT_proi=t_p_ri,t_p_ui,t_p_li,t_p_di. This transaction probability is set to calculate the possibility of which near sensor device will be triggered for next. Considering the deployed sensor devices as shown in Figure 7, if a user triggers m27, the user must trigger m26,m22,m25,m24 as transaction m27⟶m26,m27⟶m22,m27⟶m25,m27⟶m24. If we set T_proi=0.2,0.1,0.3,0.4 then user will like to select the trajectory m27⟶m25. Moreover, it is also possible that user may choose to do the remaining three trajectories. Here, users are allowed to randomly choose any trajectory from 15 designed trajectories. In other words, users can choose any route depending on the T_proi and user can also change his route. We calculated 95 trajectories after repeating 95 times, and only 4 of them are the same as we have designed. 75 abnormal trajectories are detected by our algorithm-based trajectory method [7] and labeled 91 abnormalities, but in real, just 73 abnormalities are produced as shown in Table 5. We use two important keys during simulation experiment when time duration is taking into consideration. Firstly, we use ai for average speed where i represents the sensor device ID. Average speed represents the approach corresponding with every interlinked device-pair but we set up various speeds during simulation in each sensor device to manage the average speed. Secondly, we assign various speeds with index virepresenting the variance of ai. When user is passing through sensor device di and ai randomly selects from 0.4 m/s to 1.2 m/s, vi randomly selects from 0.11 m/s to 0.32 m/s. Time duration t_di is altered manually. After repeating and executing 40 times, 40 trajectories are produced with uniform time duration. 30 abnormalities are generated, and our algorithm detected 29 abnormalities by using trajectory-based approach [7].Table 5
Detecting abnormalities.
ParametersAlgorithm detecting_ activity trajectorySize of model9595Trajectory_abnormality7373Disc_abnormal_trajectory7591Size of model5454Time_duration_abnormality3838Disc_time_duration_abnormality35Fail


## 4.2.2. Results

The experimental setup to validate our algorithms is based at Chongqing University Campus A, China. During these experiments, we choose two groups of students who have volunteered to participate. Students in group 1 were aware with the environment layout, and students of group 2 were not familiar with environment. Sensor devices were deployed in the building as shown in Figure9. Red colored sensors in Figure 9 represent the motion sensors. TelosW sensor devices were deployed, and position of sensor in building is shown in Figure 8. Five tasks were performed in two experiments. In each task, participant needs to start from specific position and reaches destination through designed workplace. To achieve the fair result, the specified rooms and position were randomly chosen. The results are shown in Figure 10(b). After extracting 662 activates, we stored related information in each node by LCPA, LPA, PCA, and AADTA, and Table 6 shows the complete details.Figure 9
Deployment layout of motion sensor devices network in smart IoT environment. The position of sensor and its ID are shown.Figure 10
Experiment results during simulation test.
(a)
Detection abnormal trajectory(b)
Detection abnormal time durationTable 6
Detail of stored patterns in sensors.
Sensor device IDTotal patternsSensor device IDTotal patternsSensor device IDTotal patternsd12d1317d2517d24d1414d2619d37d1513d2714d49d169d2813d512d1712d2913d615d187d3011d717d198d319d813d2010d327d915d2113d335d1016d2211d343d1111d2312d352d1215d2415d367Knowing and Unknowing. Students of group 1 were aware about the layout of designed setup, and they completed all six tasks without any prompting. Trajectories of group 1 are traced to detect abnormal activity at real time by using Algorithm 5 (AADTA). Students of group 1 involved in the same task are different from unaware participants of group 2 as shown in Table 7. In other words, unaware participants develop uncommon trajectories which were significantly different from pattern generated by aware group. After 14.5 seconds, it is clearly shown that it repels previous possibility of pattern 2 and it mismatches with other patterns shown in Figure 11(a). Therefore, such kind of activity is labeled with abnormal activity, and user’s behavior pattern privacy can be protected by detecting such abnormal activity.Table 7
Triggered sensors (known versus unknown).
Task settingKnownUnknownADL105-11591173%115-106121577%104-121101180.10%112A-109B4662%101-1196872%Average ADL73%Figure 11
Experimental result of tasks.
(a)
Result of known versus unknown(b)
Result of task normal versus abnormalNormal Versus Abnormal. In the second experiment, it is required from participants of group 1 to stimulate a condition which we can label as abnormal condition. To create real abnormal situation, like as tumble, is hard to stimulate. Therefore, to generate abnormal phenomena, some disturbance such as by calling to a participant randomly while the task is being performed, are added in the experiment. After applying disturbed method, our algorithm detects abnormal activity at real-time occurrence without waiting for task’s completion as shown in Figure 11(b). So our algorithm detects activity at real time instead of central computing in which abnormality is detected after completion of whole process of activity, and it enhanced the real-time performance. Hence, we found that our scheme protects privacy of user’s behavior pattern by detecting abnormal activity at real time without waiting for completion of the process. Table 8 shows the result of abnormal activity detection by our proposed BehaviorPrivacyDeg. The transition of participants shown in Figure 9 is d26⟶d24⟶d22⟶d34⟶d40⟶d21⟶d19⟶d17⟶d13⟶d10⟶d16⟶d21⟶d14. When abnormality is detected at sensor device d19 by interfering the participants, the trajectory remains the same but time duration is significantly changed. Results in Figures 12(a) and 12(b) show the suitability and effectiveness of our scheme.Table 8
Time-duration number of devices triggered in normal versus abnormal.
Task settingSenor devicesTime duration (s)Abnormal-detection-locationADL105-1159948.5169.1758%115-106121280.285.43868.4%104-121101052.3165.89778.9%112A-109B4412.1024.23470%101-1196616.7525.13380%Average ADL71%Figure 12
Experiment results of our proposed scheme.
(a)
Experiment of known versus unknown(b)
Time duration during interfered versus normalUser Privacy-Level Concern Index. In this section, as discussed in privacy-level design model section, experiment result of our proposed MPCS showed that user’s behavior pattern privacy is changed with the changing of privacy level. Privacy levels are configured by using index value on server. In Figure 13, index value showed that most users have much concerned about their activity privacy in smart IoT environment. After this, result revealed that users are more concerned about that area/zone and only 10 percent users are worried about their location. Hence, users can control their privacy level according to their concern by using our proposed MPCS.Figure 13
Result of experiment about privacy level of various users.Location Privacy. To protect the location of user in smart IoT environment, our proposed LPA achieved privacy of user’s location by considering entropy and cloak region (CR). Users are required to share some level of personal information for getting services from server via installed sensor devices which are also called access point (AP).We used a parameter∂ to obtain partial information. In our experiments, we used 120 sensor devices which sense data and ∂=1.5 represents the user familiarity about query probability over 75 APs. The effect of ∂ on entropy and product of distance are represented in results of our proposed LPA which is shown in Figures 14(a) and 14(b). In our simulation,P=15, r=500m, and change ∂is from 0.5 to 1.5. The result revealed that location privacy algorithm (LPA) is better and has achieved the set target. The assessments of results showed that performance of LPA is better.Figure 14
Effect of∂ entropy and product of distance.
(a)
∂ versus entropy(b)
∂ versus distance product


## 5. Conclusion

In this paper, we have proposed an effective multilevel privacy controlling scheme based on behavior pattern privacy degree and multilevel privacy design model. To protect the privacy of user’s behavior pattern, we introducedBehaviorPrivacyDeg based on FPMTA, PCA, and AADTA. BehaviorPrivacyDeg focuses to mine, compress, store, and compute activities of user’s behavior pattern by using proposed mining, compression algorithms, and storage mechanism. To detect abnormality and to protect the activity, we use the AADTA. Privacy levels are used for controlling method to protect users’ behavior pattern. LCPA is used to configure the privacy level of users according to their concern and priority. PLA protects the privacy of user’s location. PLA used entropy and cloak region (CR) to ensure privacy of location by spreading fake locations as far as possible. The experiments revealed the performance and feasibility of proposed MPCS. The scheme we proposed could provide a basis for behavior pattern privacy, LBS research, having the practical and theoretical significance on the study of trajectory anonymity, and location-based privacy preserving in smart IoT environment.



---

*Source: 9915408-2021-07-07.xml*