The Spatial-Temporal Connective Location Anonymizer
4.1 Data structure
The data structure of the Spatial-Temporal Connective Location Anonymizer is shown in Figure 4.1. We propose this hierarchical structure to bottom up compose those road segments into different Lh level and form different granularity until the root which has only one block covers the whole spatial network. When h = 0, each road segments will be each one block. So, there are T otalseg blocks in L0 level where T otalseg is the total number of road segments in a spatial network. When h > 0, each block of Lh−1 will merge with its’ neighbor to obtain larger blocks of Lh and get lower granularity. In the example of Figure 4.1, edge (n10, n4) and edge (n10, n9) of L0 merge together and form block B1,1 of L1. Next, Block B1,1 and B1,2 of L1 merge together and form B2,3 of L2. B2,1 and B2,3 of L2 merge together and form B3,1 of L3. B3,1 and B3,2 of L3 merge together and form B4,1 of L4. Each block is represented as ¡
Bh,i, N userBh,i, LengthBh,i, N segBh,i¢
where Bh,i is the block identifier of Lh, N userBh,i is the number of users in Bh,i, LengthBh,i is the length summation in Bh,i and N segBh,i is the number of segments in Bh,i. By this hierarchical structure, we can quickly find the cloaked road segments to fit user’s profile (k, Lmin) or (k, Nmin).
According to user’s profile is (k, Lmin) or (k, Nmin), we can build two different index tree to match each of them better. If user’s profile is (k, Lmin), we will build the index tree named Indexlength which can let the length summation of the cloaked road segments is as close as possible to Lmin. If the summation of road length in each block of the same level is as the same as possible, the quality of spatial network partition is better. Given a spatial network, there are T otaljunction road junctions, and T otallength length summation of all road segments. We define
Figure 4.1: An example of hierarchical structure of the Spatial-Temporal Connec-tive Location Anonymizer.
Figure 4.2: An example of spatial network with mobile users and length of each segment.
the spatial network partition quality as
. For level 1, we merge the road segments to their common junction, so the maxi-mum number of blocks in level 1 is T otaljunction and the minimum average length summation of road segments in each block of level 1 is T otalT otallength
junction. For higher level, if we want to merge the blocks from Lh−1 to Lh, the maximum number of blocks in level h is
lN block
Lh−1
2
m
and the minimum average length summation of road segments in each block of level h is »N blockLh−1T otallength
2
¼. The length summation of road segments in block i of level h is LengthBh,i. We calculate the variance be-tween LengthBh,i and T otalT otallength
junction, when h = 1, or LengthBh,i and »N blockLh−1T otallength 2
¼, when h > 1, to recognize if the length summation of road segments are averagely dis-tributed in those blocks. The less the variance is, the higher the quality of partition is.
The Build Indexlength algorithm is shown in Algorithm 1. Assume the spatial network is shown in Figure 4.2. At first, we calculate the total length summation
Algorithm 1 Build Indexlength Algorithm
Input: A modeling spatial network graph, G(V, E)
Output: A hierarchical index structure, Indexlength, for Lmin
1: T otallength= the total length summation of road segments in G(V, E)
2: T otaljunction= the total number of road junctions in G(V, E)
3: k = 0
4: while Any segment is not distributed do
5: Finds junction, ni,whose length summation of adjacent segments is closest to T otalT otallength
junction
6: ni’s adjacent segments become B1,i and remove those segments from ni’s adjacent node,nj
7: Re-sum up the adjacent length summation and number of adjacent segments of nj
14: while Any Bh−1,i have not been merged do
15: if Bh−1,i connects to Bh−1,j and they have not merge with other block then
16: if LengthBh−1,i+ LengthBh−1,j is closet to »N blockLh−1T otallength 2
of all road segments and the number of junction (Line 1 and 2 in Algorithm 1). In this example, the length summation of all road segments is 86 and the number of junctions is 7. Next, we start to merge the blocks from level 0 to 1 according to the above spatial network partition quality:
. We greedily choose the junction whose length summation of road segments is the closet to T otalT otallength
junction. Once the road segments have already been distributed to a road junction, it can not be distributed to another junction again. So, the length summation of road segments in each junction will change after each choosing procedure (Line 4 to 9 in Algorithm 1). In our example, we will choose the junction whose length summation of road segments is the closet to 867 = 12.3. We first choose the junction n10 whose length summation is 14, shown in Figure 4.3(a), the adjacent edges of n10 merge together and form B1,1. Then it causes the road segments (n10, n4) and (n10, n9) need be removed from the adjacent list of n4, n9 respectively, so the remain length summation of junction n4 and n9 will become 10 and 13 respectively. So, shown in Figure 4.3(b), the next choosen junction is n9 and form B1,2. Repeat the procedure until all of the road segments have been distributed to their junctions. Level 1 of Figure 4.1 shows the result of L1. Next, we choose the pair of blocks in Lh−1 whose length summation of road segments is the closet to
lN block
Lh−1
2
m
and merge together to obtain a larger block of Lh. Repeats the merge procedure until there exists only one block that covers the whole spatial network (Line 12 to 24 in Algorithm 1). In our example, N blockL1 = 7, so the maximum average length summation of road segments in each block of L2
(a) First step of merge L0 (b) Second step of merge L0
Figure 4.3: Merge step of L0
(a) First step of merge L1 (b) Second step of merge L1
Figure 4.4: Merge step of L1
of road segments will be 20 which is closet to 21.5. So, we merge B4 with B5 and obtain B8 of L2, shown in Figure 4.4(a). Next, shown in Figure 4.4(b), we merge B3 with B7 and obtain B9 of L2. Repeat the procedure until there are no blocks of L2 can be merge. Level 2 of Figure 4.1 shows the result of L2. Repeat the same procedure of each level, we can obtain the result of L3 and L4 and we obtain the index structure, Indexlength shown in Figure 4.1.
If user’s profile is (k, Nmin), we will build the index tree named IndexN um segment
which can let the number of road segments in the cloaked road segments is as close as possible to Nmin. The concept of building IndexN um segment is almost the
same with Indexlength, and the difference of them is that the partition quality of IndexN um segment is according to
The mobile user will periodically update his location to the Spatial-Connective Location Anonymizer in this form (uid, x, y) where uid is used to identify this mo-bile user, x and y are the spatial coordinate of this momo-bile user’s new location.
Once the Spatial-Temporal Connective Location Anonymizer receives this update information, it will apply the f ind segments(px) operation to find this mobile user locates on which road segment, segmentnew. Then the Spatial-Temporal Con-nective Location Anonymizer will check the original road segment, segmentold, with segmentnew. If segmentold = segmentnew, there is no additional process-ing. If segmentold 6= segmentnew, the number of users on both segmentold and segmentnew need to update. Then propagate the Number of user (segmentold) and Number of user (segmentnew) in the block counters N userBh,i of their higher layer. If a new mobile user registers to our architecture, the number of users on the segment which this user locates on needs to increase by one and update the block counters N userBh,i of its’ higher layer.