There exist two key problems about data aggregation that should be thoroughly explored - algorithm design in networking layer, and algorithm design in application layer. Those two problems should be subtlety tackled in termers of high efficiency and robustness. Therefore, the former one requires the survivability and highly reliable design at networking layer, the latter one usually asks for high efficiency and robustness at application layer. Moreover, the optimization of algorithms is also considered for further enhancement. The integrity check is a key requirement for optimization. The context-aware and cross-layer design is applied in the optimization. A dynamic fragment odd-even parity checking code is proposed, and a context-aware aggregative integrity check code is proposed.