## 3 Proposed Skyline Query Processing Method Based on DCS
### Proposed Skyline Query Processing Method
As shown in Figure 2, a sensor node may receive several SQMs with the same CSR. If the sensor node processes all the SQMs with the same CSR, unnecessary message transmissions will occur. To avoid this case, each sensor node stores CSRs of SQMs that it processes. Whenever a sensor node receives a SQM, it compares the CSR of the SQM with the stored CSRs, and if the CSR of the SQM is contained in one of the stored CSRs, it ignores this newly received SQM. If not, the above process will be repeated and the sensor node stores the CSR of SQM. This message transmission process is stopped when a sensor node that receives a SQM cannot find any neighbor node that is not dominated. The last stage is that BS gathers candidate data set from candidate sensor nodes (CNs), and generates a final query result. A CN refers that a sensor node who receives a SQM and has stored data. The CN transmits its stored data to the BS. The BS analyzes the candidate data set from CNs, and produces the final query result from the candidate set. We describe the proposed skyline query process with an example in Figure 2. In Figure 2, gray circles represent sensor nodes that have stored sensor readings, and white circles are sensor nodes without stored data. The BS receives a skyline query \"find out the area in which pollution degree is the least\", and analyzes the skyline query to find out a SN. In this example, sensor node 0 at the left-lower corner is selected, and the BS sends the skyline query to sensor node 0. Sensor node 0 creates a SQM (Q, NULL, NULL, NULL), and checks if itself stores data. Since sensor node 0 does not store data, the CSR of the SQM remains as NULL. Therefore, it sends the SQM (Q, NULL, 0, {1, 5, 6}) to all neighbor nodes 1, 5 and 6. Sensor node 1 receives the SQM and changes the CSR of the SQM to {(4, 0), (8, 4)} because it stores data within the range from (4, 0) to (8, 4). Then, the sensor node compares the changed CSR with NDRs of its neighbor nodes 2, 7, 6, 5, and 0. In that comparison, the sensor node checks that the data range of the CSR is dominated by the NDRs of the neighbor nodes. Through the comparison, sensor nodes 0, 2, 5 and 6 are selected, but the 0 is excluded because 0 is included in the TIDs of the SQM. Sensor node 1 transmits a SQM (Q, {(4, 0), (8, 4)}, {0, 1}, {2, 5, 6}) to sensor nodes 2, 5 and 6. Sensor node 6 receives the SQM from sensor node 0, and it updates the CSR of the SQM to {(4, 4), (8, 8)} to include its stored data range. After that, it compares the CSR with the NDRs of its neighbor nodes, 0, 1, 2, 5, 7, 10, 11 and 12 to find out NDRs that are not dominated by the CSR. Since node 12 is explicitly dominated by the CSR, it is excluded. Consequently, sensor nodes 0, 1, 2, 5, 10, 11 and 7 are remained, but the NDR of sensor node 7 is dominated by the NDR of sensor node 1, sensor node 7 is excluded. Finally, sensor node 6 transmits a SQM (Q, {(4, 4), (8, 8)}, {0, 6}, {0, 1, 2, 5, 10, 11}) to sensor nodes 0, 1, 2, 5, 10 and 11, and it stores the CSR {(4, 4), (8, 8)}. Simultaneously, sensor node 6 receives the SQM from sensor node 1, and it changes the CSR {(4, 0), (8, 4)} of the SQM to include the stored data range to {(4, 0), (8, 8)}. Then, through comparing the updated CSR with NDRs of neighbor nodes 0, 1, 2, 5, 7, 10, 11 and 12, it selects sensor nodes which have NDRs that are not completely dominated. Consequently, sensor nodes 0, 1, 5, 10 and 11 are selected, but sensor nodes 0 and 1 are excluded since it is included in the SIDs of the SQM. Finally, sensor nodes 5, 10 and 11 are selected. Then, sensor node 6 compares the locally stored CSR with the CSR of the SQM. In this case, the local CSR is not included in the SQM's CSR, so the SQM (Q, {(4, 0), (8, 8)}, {0, 1, 6}, {5, 10, 11}) is transmits to selected neighbors. Sensor node 11 receives the SQM (Q, {(4, 0), (8, 8)}, {0, 1, 6}, {5, 10, 11}) from sensor node 6, and after the same process, sends the updated SQM to 10, 15 and 16. It stores the CSR {(4, 0), (8, 12)} of the SQM locally.