Algorithm 3 Cutting the Tuples Inside the Node |
Input: The set M of the nodes that own the TB_Sfilters table Output: skyline data result 1: for ∀ Si∈M do // From bottom to top, the sensor conducts the algorithm to the nodes in M on the query route in turn 2: create bcut_tuple by using Si.TB_Sfilters 3: if id-value of bcut_tuple is equal to Si.id-value then 4: create cut_tuple by using Si. TB_qdatas and cut data in Si.TB_qdatas. 5: Si sends cut_tuple to its child nodes on the query route 6: else 7: Si sends bcut_tuple to the node Sj with the same id. Here, Sj is the child node of Si 8: create cut_tuple by using Sj. 9: Sj sends cut_tuple to Si 10: Si sends cut_tuple to the other child nodes on the query route in turn, except for Sj. 11: end if 12: the sensor received cut_tuple to conduct a local cut for the data in the TB_qdata table and deletes the non_skyline data. 13: Then, the sensor sends the skyline data up to its father node Si. 14: if Si is one of the nodes of the query route, then 15: the skyline data received combine with the local data and send it to the father node 16: else 17: send the skyline data that were received to the father node 18: endif 19: end for |