Research Article
Secure and Efficient Cluster-Based Range Query Processing in Wireless Sensor Networks
Algorithm 1
Secure and efficient cluster-based query processing.
(1) | initial_cluster; | (2) | sink_node; | (3) | query_node_id; | (4) | CH = cluster_head; | (5) | query_range = [a,b]; | (6) | query_msg = QueryMsg(query_node_id, sink_node, query_range); | (7) | if sink receives the query_msg then | (8) | SendQueryMsgToCH(CH, query_node_id); | (9) | if CH receives the query_msg then | (10) | selected_nodes = SelectNodesRandom(query_node_id); | (11) | for node in selected_nodes then | (12) | = CollectData(); | (13) | Sort , and as | (14) | Compute prefixes and numericalize all prefixes as | (15) | Compute the HMAC as | (16) | Encrypt by as ; | (17) | Send packet to CH | (18) | end for | (19) | packet = FilterPackets(); | (20) | SendToSink(packet); | (21) | end if | (22) | Compute and encode [a,b] as ; | (23) | GetQueryData(packet, ); | (24) | end if |
|