In the framework of smart grid cyber-physical system(CPS), a privacy-preserving data aggregation scheme which using homomorphic encryption aggregation and a suitable encoding mechanism is adopted to achieve users’ requirements for data security, confidentiality and integrity; an ESAM chip is used to achieve reliability and integrity of direct load control instructions; non-intrusive load monitoring(NILM) technology is adopted to help utilities verifying users’ credibility which simplify the process of trusted computing.