Wireless sensor networks (WSNs) are envisioned to consist of hundreds to thousands of wireless sensor nodes. The operator doesn't interest in the data sensed by a specific sensor node generally, on the contrary, he pays more attention to the data gathered from a specific area in granted time. One crucial problem is how to process the great deal of data and respond to the query request.
We propose a novel query processing based data attributes, called Spatio-Temporal Attributes R-tree based Query (STARQ). Consider the similarity of data collected by a sensor node and its neighboring nodes, partial clustering algorithm is used to form a storage cluster. Partial clustering algorithm is implemented in two phases. First phase is the beginning of partial clustering, in which an object occurs. In second phase, a certain node (e.g., resumes from failure) senses an existed object. The method provided in this paper aims to obtain the neighboring nodes firstly, and judges whether existing a storage cluster that conforms to metadata of the sensor node or not. If the relevant storage cluster does not exist, first phase works, otherwise second phase. If failed in first phase, partial clustering algorithm is called again after a random time. If there are more than one relevant storage cluster in second phase, exercises a sort algorithm which is in descending order according to the storage node's capability weight, and tries to join a storage cluster in turn.
R-tree [1] is an approximately balanced search tree that is widely used to handle spatial data in traditional database systems. Motivated by the unique characteristic of R-tree, a Saptio-Temporal Attributes R-tree (STAR) is built on the top of storage clusters. Objects in STAR are not restricted to the geographical rectangles and could be any abstract ranges of arbitrary attributes. A top-down approach that achieves energy efficiency is adopted to locate the corresponding storage nodes, which transmit the relevant data back to the operator.
We compare STARQ with Directed Diffusion [2] and GHT [3] in NS-2. To measure the performance of these protocols, we consider two metrics: interval of query and the size of network. The simulation results show that STARQ has better performance with different query intervals and network size.