Abstract:Wireless sensor networks are often deployed in diverse application specific contexts, which can be treated essentially as distributed databases. The event-involved responses can be obtained by issuing queries to this kind of database. The applications with real-time requirement have tight constraints on query delay. However, the existing query algorithms cannot meet the demands of the real-time query applications. With regard to the special applications, a real-time query processing algorithm based on ant colony optimization is proposed. In this algorithm,priority-based multiple-rings storage scheme and ant-based distributed search mechanism are adopted to improve the integrated performance of energy-efficiency, delay and query reception rate. It takes advantage of the self-organization and positive feedback characteristics of ant colony optimization algorithm. The proposed algorithm provide a new idea for distributed dynamic parallel real-time query applications, demanding merely local information to obtain named events efficiently and determine the number and allocation of event replicas adaptively.Theoretical analysis and experiments prove that compared with other existing query algorithms, this algorithm cannot only improve the performance of energy-efficiency and reception, it can also shorten the query delay considerably.