Neighbor-Index Method for Continuous Window ...

4 downloads 180 Views 332KB Size Report
Jun-Hong Shen. 1, a. , Ching-Ta Lu. 1. , and Ming-Shen Jian. 2. 1Dept. of Information Communication, Asia University, Taichung, Taiwan. 2Dept. of Comp.
Applied Mechanics and Materials Vols. 284-287 (2013) pp 3295-3299 © (2013) Trans Tech Publications, Switzerland doi:10.4028/www.scientific.net/AMM.284-287.3295

Neighbor-Index Method for Continuous Window Queries over Wireless Data Broadcast Jun-Hong Shen1, a, Ching-Ta Lu1, and Ming-Shen Jian2 1

Dept. of Information Communication, Asia University, Taichung, Taiwan

2

Dept. of Comp. Sci. and Information Eng., National Formosa University, Yunlin County, Taiwan a

[email protected]

Keywords: Continuous window queries, location-based services, spatial index, wireless data broadcast.

Abstract. A continuous window query is an important class of spatial queries for location-based services. It retrieves spatial objects in a fixed window region of every point on a line segment and indicates the valid segments of them. In this paper, we focus on continuous window queries in wireless data broadcast systems. Since the query result of the continuous window queries has the spatial locality, providing neighbor information of spatial objects can guide clients to efficiently retrieve related objects. Therefore, we propose a neighbor-index method to efficiently support the continuous window queries in wireless data broadcast systems. The proposed method interleaves the neighbor information between spatial objects to guide mobile clients to quickly retrieve the answered objects and save the power consumption of the mobile devices. Experimental results show that our method outperforms the distributed spatial index. Introduction The advances in wireless technology and positioning systems have led to the development of location-based services (LBSs). LBSs provide the information to mobile clients according to their current location. In the environment for providing LBSs, a large number of mobile clients issue spatial queries for spatial objects, e.g., gas stations, hotels, restaurants, and attractions. Due to its scalability, wireless data broadcast allows a huge number of mobile clients simultaneously access data at anytime and anywhere in the wireless environment. Therefore, it is efficient for disseminating spatial objects to a large number of the mobile clients equipped with the GPS (global positioning system) facility at anytime and anywhere. In this paper, we focus on continuous window queries for static spatial objects via wireless data broadcast. That is, the mobile clients may move to another place after issuing window queries for retrieving static spatial objects. For example, a newly married couple goes to Hawaii for honeymoon. They may want to know the attractions located within one mile according to their location while driving. Then, they can decide to reach some of them on the way. The continuous window queries retrieve spatial objects in a fixed window region of every point on a line segment and indicate the valid segments of them. The mobile clients can use this information cached in the mobile devices, instead of continuously issuing queries while moving [6]. Due to the scarce energy resources, energy conservation is a crucial issue for the mobile devices. Spatial indexes are interleaved with spatial objects to save power consumption. With help from them, the mobile devices can skip unwanted data by slipping into the doze mode, and stay in the active mode to listen the wireless channel only when the desirable data is arrived. Many studies provide spatial indexes to efficiently support the access on continuous spatial queries over wireless data broadcast. In [3], R-tree air index and Hilbert-curve air index are proposed to support continuous nearest neighbor queries. In [4], the authors extends Hilbert-curve air index to support continuous k-nearest neighbor queries. In [5], the distributed spatial index (DSI) is proposed to support continuous k-nearest neighbor queries and continuous window queries.

All rights reserved. No part of contents of this paper may be reproduced or transmitted in any form or by any means without the written permission of TTP, www.ttp.net. (ID: 120.108.113.191-04/01/13,11:38:42)

3296

Innovation for Applied Science and Technology

Among them, DSI is efficient for the continuous window queries. In this paper, we take it as our benchmark on performance. Since the query result of the continuous window queries has the spatial locality, providing neighbor information of spatial objects can guide clients to efficiently retrieve related objects. Therefore, we propose a neighbor-index method, NI, to efficiently support the continuous window queries over wireless data broadcast. Our proposed method provides neighbor information for the clients to speed up the query processing and save the power consumption. Experimental results show that the proposed NI outperforms DSI. Background In this paper, spatial objects forming a broadcast cycle is cyclically broadcast on a single wireless channel. When mobile clients issue continuous window queries, their mobile devices tune in to the wireless channel to retrieve the related data. For data being disseminated via the wireless broadcast mechanism, the access time and the tuning time are of concern [2]. The access time is the client waiting time from issuing a query to retrieving the wanted data. The tuning time is the amount of time spent by a client listening to the channel, which determines the power consumption of the mobile devices. In order to preserve the spatial proximity, we apply the Hilbert curve, one kind of space-filling curves, to allocate the broadcast sequence of spatial objects. A space-filling curve is a continuous path which passes through every point in the two-dimensional space once to map these points to one-dimensional sequence numbers on the curve. Among the existing space-filling curves, the Hilbert curve has the best clustering property. The clustering means that after ordering, spatial objects which are close to each other in the two-dimensional space are still close to each other in the one-dimensional space [1]. Given a two-dimensional space of size , where N = 2n, n > 0, the Hilbert curve of order n recursively divides the space into four equal-sized blocks and gives each block a sequence number from 0 to (N2 –1) [1]. Fig. 1 shows the Hilbert curve of order n = 3. The Neighbor-Index Method For a continuous window query, the answered spatial objects may be neighbors of each other. Therefore, in this paper, to efficiently support continuous window queries, we interleave the neighbor index with spatial objects on the wireless channel. The basic idea is that the surrounding neighbor information of spatial objects is provided to guild clients to retrieve the answered object. The neighbor index contains information about neighbors of the northern, southern, eastern, western, northeastern, southeastern, northwestern and southwestern directions. In our proposed method, spatial objects are represented as points in a two-dimensional space, and transformed into sequence numbers in a one-dimensional space by visiting them in the ascending order of the Hilbert curve of order n. Each spatial object is put into a data bucket. Moreover, these objects are broadcast once in a cycle on the wireless channel according to their Hilbert-curve values of order n, hn. The objects having the same Hilbert-curve value of order (n – 1), h(n-1), are allocated to the same group. Note that the Hilbert-curve value of order (n – 1) of a spatial object, h(n-1), is obtained from h(n-1)= hn / 4 . An index bucket containing neighbor-index information is allocated before each group. Note that the size of a data bucket is a multiple of that of an index bucket. Each data bucket has information guiding clients to get the following nearest index bucket. The neighbor-index information in the index bucket is proceeded by procedure NeighborIndexConstruction shown in Fig. 2 by taking h(n-1) as its parameter. Consider that spatial objects are allocated in the Hilbert curve of order 3 (n = 3), as shown in Fig. 1, where a solid black circle represents a spatial object, and the number indicates its Hilbert-curve value of order 3. The objects having the same Hilbert-curve value of order 2 (= n – 1 = 3 – 1) are allocated to the same group. Therefore, the objects shown in Fig. 1 are partitioned into seven groups: blocks 0, 2, 5, 7, 8, 10, and 12 shown in Fig. 3-(a), where the block number represents the Hilbert-curve value of order 2. An index bucket containing information about neighbor indexes and spatial objects in the same group is then allocated before each group, as depicted in Fig. 3-(c).

Applied Mechanics and Materials Vols. 284-287

21

22

25 26

37 38

41

42

39

36 27 24 Minkowski region 40 34 45 29 28 35 E 32 33 46 31S' 17 30 11 10 53 52 51 12

20

23 18

19 16 15

1. 2. 3. 4.

43 44 47 48

S E'

14 1

8

13 2

9 6

7

49

55 50 56 61

54 57

62

5. 6. 7. 8.

Minkowski region

0

3

4

58 59

5

60

9.

63

procedure NeighborIndexConstruction(h(n-1)) current_h ←h(n-1) /*current_h is the current processing block.*/ for i ← (n-1), 1 do Call procedure NeighborInformation(current_h) /* Calculate the Hilbert-curve value of the previous order. */ current_h ← current _ h / 4 end for Call procedure IndexEntryShrink Add the index entries pointing to those spatial objects in the same group to the index bucket for this group end procedure

Fig. 2. Procedure NeighborIndexConstruction

Fig. 1. The Hilbert curve of order 3 21

41 42

5

23

6

9

10

21

41 42

23

29

4

7

1

11

32

3

2 8

13

32

48

2

1

0 0

1

14

48

1249 15

2

1 0

0

8

3

NI1 o0

2

29

8

3297

o1

NI2 NI3 NI4 NI5 NI6 NI7 o2 o8 o21 o23 o29 o32 o41 o42 o48 o49

(8, 8, NI2)

(21, 29, NI3)

(29, 29, NI4) (32, 42, NI5) (41, 42, NI6) (48, 49, NI7)

(21, 29, NI3)

(29, 29, NI4)

(32, 42, NI5) (48, 49, NI7) (48, 49, NI7)

(32, 42, NI5)

(32, 42, NI5)

(48, 49, NI7)

(0, 8, NI1')

(0, 8, NI1')

(21, 29, NI3') (32, 42, NI5')

(48, 49, NI7)

(48, 49, NI7)

(0, 8, NI1')

(8, 8, NI2')

(8, 8, NI2')

(32, 32, NI5')

49

(0, 2, NI1')

(0, 8, NI1')

(0, 8, NI1') (21, 29, NI3')

(21, 23, NI3') (21, 29, NI3') (29, 29, NI4')

Index bucket

Data bucket

(a) (b) (c) Fig. 3. The neighbor-index method: (a) neighbor indexes of order 2; (b) neighbor indexes of order 1; (c) the broadcast spatial objects with neighbor indexes. The index bucket of each group contains the neighbor-index information from order 2 (= n –1 = 3–1) to order 1. In procedure NeighborIndexConstruction, procedure NeighborInformation is used to find the surrounding neighbor information of the current processing block, current_h, based on the method in [1]. The index entry providing the neighbor information is of form (start_h, end_h, ptr), where start_h (end_h) is the smallest (largest) Hilbert-curve value in the target block, and ptr is the offset to the beginning of the designated index bucket for the target block. Take block 2 shown in Fig. 3-(a) for example. This group is processed by procedure NeighborIndexConstruction taking hn-1 = h3-1 = h2 = 2 as the parameter, i.e., current_h = 2. The neighbors of order 2 for block 2 are examined in the first round, i.e., the dash-line rectangle shown in Fig. 3-(a). Since blocks 0, 7, and 8 contain objects inside, the index entries pointing to the index buckets for these blocks are added to index bucket NI2 shown in Fig. 3-(c) for this group, i.e., (0, 2, NI1'), (29, 29, NI4), and (32, 32, NI5), where NI1' is index bucket NI1 in the next cycle. After that, the Hilbert-curve value of order 1 of the current processing block is calculated in order to examine the neighbors of order 1, i.e., current_h = 2 / 4  = 0. In the second round, the index entries pointing to the index buckets for blocks 1, 2, and 3 of order 1, as indicated by dash-line arrows in Fig. 3-(b), are added to index bucket NI2, i.e., (21, 29, NI3), (32, 42, NI5), and (48, 49, NI7). The index entry with the wide range can provide more information about the following objects as compared to that with the short range. Therefore, if the index entries point to the same destination, the one with the short range will be removed. Since index entries (32, 32, NI5) and (32, 42, NI5) are pointing the same destination, index bucket NI5, the one with the short range, i.e., (32, 32, NI5), is removed by procedure IndexEntryShrink. As a result, the neighbor-index information for block 2 in Fig. 3-(a) is shown in index bucket NI2 in Fig. 3-(c), where the index entries pointing to the objects in the same group are not shown. In this example, the broadcast cycle containing the objects shown in Fig. 1 and their corresponding neighbor-index information are shown in Fig. 3-(c). Validity Segments. For a continuous window query, the answered objects are only valid along part of the query line segment, i.e., validity segments [5]. The validity segment of the answered object is the intersection of the query line segment with its Minkowski region [5]. The Minkowski region has

3298

Innovation for Applied Science and Technology

the same size as the query window and centers at the answered object. In Fig. 1, the answered objects for the query with query line segment SE are o8 and o32. Their corresponding Minkowski regions are depicted in Fig. 1 and their corresponding validity segments are SE' and S'E, respectively. The Access Protocol. For a continuous window query, the segments along the Hilbert curve intersected with the query region should be examined, i.e., target segments. The target segments are refined while the index buckets are visited. The access protocol is as follows. 1. Tune in to the broadcast channel to receive the current bucket to get the information about the following nearest index bucket and proceed to that index bucket. 2. Examine the index entries in the index bucket with the target segments. If the range of an index entry is intersected with the target segment, its offset is recorded in set V to be visited. Moreover, the target segment is refined if needed. Choose the nearest offset from the current location in set V to follow, and then go into the doze mode. 3. Tune in to the broadcast channel to receive the designated bucket, and remove the corresponding offset from set V. If it is a data bucket, the validity segment of this answered object is calculated. If it is an index bucket, go to Step 2. 4. Repeat Step 2 to Step 3 until set V is empty. Performance Evaluation This section compares our proposed NI method with DSI [5] on the average access time, tuning time, and power consumption. Two data sets are used to evaluate the performance of NI and DSI: the uniform data set and the real data set. The uniform data set contains 20,000 points uniformly generated in a square Euclidean space. The real data set contains 5,922 points of cities and village of Greece (http://www.rtreeportal.org). Two integer numbers of 1 byte are used to represent two coordinates in a two-dimensional space, so that an integer number of 2 bytes is used to represent a Hilbert-curve value. Each spatial object occupies 1,024 bytes. The search region of a fixed window query is controlled by WinSideRatio, the ratio of the side length of a window query to that of the search space. The query line segment of a continuous window query is controlled by QueryLengthRatio, the ratio of the length of a query line segment to the side length of the search space. The start position of a continuous window query is randomly picked, and its corresponding moving direction is randomly picked between 0 and π/2 [5]. Simulation results are the average of 10,000 queries. In addition, the average access time and tuning time are measured in terms of bytes. In the first experimental result, we evaluate the average access time and tuning time for different values of WinSideRatio: 0.02, 0.05, 0.1, and 0.2. To simplify the experimental result, the value of WinSideRatio and that of QueryLengthRatio are set to the same. Fig. 4-(a) and Fig. 4-(b) show the average access time for the uniform data set and that of the real data set with the increase of both values of WinSideRatio and QueryLengthRatio, respectively. As both values of WinSideRatio and QueryLengthRatio increase, the search region of the continuous window query increases, resulting in the increase of the number of retrieved spatial objects. This increases the average access time, as can be observed in both Fig. 4-(a) and Fig. 4-(b). Moreover, NI has the shorter average access time than DSI in all cases. NI has average improvements of 4% and 5% on the average access time over DSI for the uniform data set and the real data set, respectively. Fig. 4-(c) and Fig. 4-(d) show the average tuning time for the uniform data set and that of the real data set with the increase of both values of WinSideRatio and QueryLengthRatio, respectively. As mentioned above, when both values of WinSideRatio and QueryLengthRatio increase, the number of retrieved spatial objects increases. Consequently, the mobile devices need to download more packets on the wireless channel to get information about these spatial objects, resulting in the increase of the average tuning time. In these figures, both the average tuning time of NI and DSI increases when both values of WinSideRatio and QueryLengthRatio increase. Moreover, NI has the shorter average tuning time than DSI in all cases. NI has average improvements of 64% and 82% on the average tuning time over DSI for the uniform data set and the real data set, respectively.

NI DSI

25 20 15 10 5 -

3,000 2,000

DSI

-

0.02*0.02 0.05*0.05 0.1*0.1 0.2*0.2 WinSizeRatio*QueryLengthRatio

(e)

10 8 6 4 2

NI DSI

1,000

0.02*0.020.05*0.05 0.1*0.1 0.2*0.2 WinSizeRatio*QueryLengthRatio

NI DSI

0.02*0.02 0.05*0.05 0.1*0.1 0.2*0.2 WinSizeRatio*QueryLengthRatio

(d) Fig. 4. Experimental results

Power consumption

x 100000

NI

(b)

4,000

(c)

Tuning time

Access time

x 100000

(a)

3299

5,000

0.02*0.02 0.05*0.05 0.1*0.1 0.2*0.2 WinSizeRatio*QueryLengthRatio

0.02*0.02 0.05*0.05 0.1*0.1 0.2*0.2 WinSizeRatio*QueryLengthRatio 44 42 40 38 36 34 32 30

NI DSI

Power consumption

x 100000

170 160 150 140 130 120 110 100

Tuning time

Access time

x 100000

Applied Mechanics and Materials Vols. 284-287

2,000 1,500 1,000 NI DSI

500 -

0.02*0.020.05*0.05 0.1*0.1 0.2*0.2 WinSizeRatio*QueryLengthRatio

(f)

In the second experimental result, we evaluate the average power consumption for different values of WinSideRatio: 0.02, 0.05, 0.1, and 0.2. The power consumption in the doze mode is considered as the unit time and the power consumption in the active mode is 24.32 units according to the setting in [6]. Fig. 4-(e) and Fig. 4-(f) show the average power consumption of the uniform data set and that of the real data set, respectively. Both the average power consumption of NI and DSI increases when both values of WinSideRatio and QueryLengthRatio increase. Moreover, NI obtains the less average power consumption than DSI in all cases. NI has average improvements of 39% and 66% on the average power consumption over DSI for the uniform data set and the real data set, respectively. Conclusions In this paper, we have presented the neighbor-index method, NI, for continuous window queries over wireless data broadcast. To speed up the query processing and reduce the power consumption, our NI method interleaves the neighbor index for spatial objects among a wireless broadcast cycle. Experimental results show that NI has average improvements up to 5%, 82% and 66% on the average access time, tuning time and power consumption over DSI, respectively. Acknowledgment This research was supported in part by the National Science Council of Republic of China under Grant No. NSC 99-2221-E-468-019 and Grant No. 101-2914-I-468-008-A1. References [1] H.L. Chen and Y.I. Chang: All-nearest-neighbors finding based on the Hilbert curve, Expert Systems with Applications, 38(6) (2011) 7462-7475. [2] J.H. Shen and Y.I. Chang: An efficient nonuniform index in the wireless broadcast environments, The Journal of Systems and Software, 81(11) (2008) 2091-2103. [3] B. Zheng, Lee, W.C. Lee, and D.L. Lee: Search continuous nearest neighbor on the air, Proc. of the 1st Annual Int. Conf. on Mobile and Ubiquitous Systems: Networking and Services, (2004) 236-245. [4] B. Zheng, W.C. Lee, and D.L. Lee: On searching continuous k nearest neighbors in wireless data broadcast systems, IEEE Trans. on Mobile Computing, 6(7) (2007) 748-761. [5] B. Zheng, W.C. Lee, C.K. Lee, D.L. Lee, and M. Shao: A distributed spatial index for error-prone wireless data broadcast, The VLDB Journal, 18(4) (2009) 959-986.

Suggest Documents