• 沒有找到結果。

The Method of Query Assignment

Chapter 2 Related Work

2.4 The Method of Query Assignment

In MQM, the architecture for implementation of LBS Services is distributed client-server architecture. The BP-Tree spatial structure is used for query and subdomain management. When a new query q is submitted, the server searches the BP-Tree to find the subdomain it overlaps. The server then inserts the monitoring region to the BP-Tree. When the number of monitoring regions in a subdomain exceeds the split threshold (the minimum number of query that the least capable mobile host can load), the subdomain is partitioned into two equal size subdomains.

When a mobile host enters or exit a query boundary (monitoring region), it sends a location update message to the server, including its current position. Server updates the query and notifies the mobile host in that query.

10

A BP-Tree consists of two types of nodes: domain node and date node. All non-leaf nodes are domain node. Each domain node is the decomposition of its parent node. Figure 2-3 shows the decomposition of D1 is D11 and D12. Each domain node has a variable, size, to record the total number of monitoring regions under this domain. A data node is a leaf node, consists an array of rectangles that stores queries (monitoring regions) under its parents. There is also a variable, size, to record the total number of monitoring regions under this node.

Figure 2-3 An example of BP-Tree.

To let all mobile hosts can load at least one subdomain, the size of data nodes is limited by the minimum processing capability mobile hosts. The parameter is the split threshold for data nodes.

The BP-Tree efficiently supports the resident domain search. Given a position p and capability n queries of the mobile host, the server searches the BP-Tree from the root. If the number of monitoring regions inside the subdomain fit the mobile host’s capability (smaller or equal to n) and the mobile host is also inside, the subdomain can be the resident domain of the mobile host. Otherwise, the server descends the tree to check the domain that contains the mobile host. In the worst case, we may take the

11

subdomain that has data node. When a resident domain is selected, the server then retrieves all queries inside to notify the mobile host.

In Figure 2-4, the BP-Tree’s split threshold is set to 1 for clearly show on the figure. Each subdomain has only one monitoring region (query). The mobile host A’s capability is 5. Figure 2-5 shows the BP-Tree of this domain.

To search a resident domain for mobile host A in Figure 2-4, the server first process the request of resident domain from mobile host A. When mobile host is initializing or exits a resident domain, it will request the server to assign a resident domain. The mobile host’s capability is 5. Server searches from root of BP-Tree, find subdomain d2 is suitable for the mobile host. Finally, server assigns d2 as the mobile host’s resident domain. The queries in the resident domain is also fit A’s capability.

Figure 2-4 Resident Domain for mobile host A.

When mobile host A moves out of its current resident domain, as show in Figure 2-6. The mobile host requests the server to assign new resident domain again. The server assign d1 as A’s new resident domain.

12

Figure 2-5 BP-Tree for the above domain.

Figure 2-6 Resident Domain for mobile host A’.

13

However, A is not in the center of its resident domain, A may easily moves out of its current resident domain. And most of time the mobile host has requested for new resident domain, it just moved out of the last resident domain. The position of mobile host is near the boundary of multiple resident domains. In addition, the position reported by mobile host from GPS has some error, the mobile host may detect that it is cross over its resident domain boundary. This make mobile host request for a new resident domain again and again.

There is still one problem in MQM. The mobile host A’s capability is 5 queries, but the resident domain assign to it contains 4 queries. The server searches resident domain from the root. In this case, the number of queries in root domain exceeds the mobile host’s capability, and then the server descends the tree to check the subdomain d2 that contains the mobile host A. Server only allocate one or more whole unit domain to mobile host. This makes the mobile host’s capability would not always be satisfied.

The distributed client-server architecture, computing ability requirement, and memory storage requirement will also be required in our system. We then present the algorithm based on the location and capability of mobile host. We will allocate a rectangle area for the mobile host, which the mobile host is in the center of rectangle area. We will extend the safe region rectangle to overlap queries, not only load a whole unit domain, so that we can try to meet the capability of the mobile host. In this study, we may decrease the number query result update by using rectangle area, and share the server load with the mobile hosts by query assignment.

14

相關文件