## 3 Localised Information Retrieval with Query Resolution  
### Query Resolution Mechanism  
A query resolution resolves the name of a query to the corresponding sensor nodes before the query message is forwarded to sensor nodes. A query resolution is somewhat analogous to the name resolution at the Domain Name System (DNS) widely used on the Internet. Domain name resolution is a process of resolving a host name to an IP address before a user sends the initial IP packet. A main function of domain name resolution is to facilitate the IP routing from the source node to the destination. Similarly, the query resolution mechanism in our scheme attempts to resolve each query's name to facilitate efficient query dissemination and data aggregation in sensor networks. Figure 1 illustrates an example of a query resolution process. We use an Attribute-Objects name (AO name) based on low-level naming, that describes the query's name as well as the properties of sensor nodes. A user's query can be specified by the interested objects and attributes of sensor data. For instance, in a building automation application, a query might be what temperature (attribute) status is in the storage room (object). In a factory application, a query could concern the vibration (attribute) status around the robot in a manufacturing line (object). In the same way, a sensor node can be described by the object that it is monitoring, and the physical attribute such as temperature or humidity that describes a sensor's type. A resolution table is adopted in the query resolution mechanism to discover the locality of sensor nodes corresponding to a query. The resolution table maps the attribute name of each query and sensing IDs. The query resolution table is implemented at the sink node of a sensor network. This is because the sink node generally has greater power and memory capacity than sensor nodes have. The query resolution table is initially achieved by the following two operations:  
1. Each sensor node registers its ID, location, sensing attributes and monitoring object (if the sensor knows it) with the sink node. 2. A sink node constructs a table that maps sensing attributes and monitoring objects to sensor IDs. The registration can operate in conjunction with the network configuration in the phase of network formation, minimising additional overhead. Because the sink node is generally a powerful node, it can maintain a large resolution table. Although the use of location information may increase the complexity of the system, the development of localization sin sensor networks in the past decades has provided more and more low cost, easily-maintained locating system [19, 33, 34]. Many applications of sensor networks use location of sensors to know the network deployment, obtain sensing context, analyze sensing data, and to perform network maintenance, recovery, and task management, _etc_. Because a general static sensor node is used in a sensor network, the requirements for updating the  
Figure 1: Query to IDs resolution. location of sensor node are minimal. The object that a sensor is monitoring refers to static objects that the sensors are monitoring over the long term, instead of the dynamic results that a sensor detected. The sink node processes each query before it is disseminated to sensor nodes. As shown in Figure 1, when the sink node receives a query message, it resolves the name of the query (_i.e._, AT1, MO1 in the example of Figure 1) to the corresponding sensor IDs (_i.e._, node 1, 3, 9, 16, 27), according to the resolution table. After a query's name is translated into an ID group corresponding to sensor nodes, the sink node calculates the query area by deriving a rectangle in which all corresponding sensor nodes reside. A rectangle area is calculated as follows, based on the locations (xi,yi) of each sensor node i that is in the ID list obtained from the query resolution:  
\[\text{Rect}=[\text{min(x1,x2,...xn), min(y1,y2,...yn), max(x1,x2,...xn), max(y1,y2,...yn)}] \tag{1}\]  
where n is the number of corresponding sensor nodes.