This study proposes a digital twin (DT) approach and technical framework for smart meters to solve potential implementation and development problems and adapt to the new energy revolution trend and increase smart grid network security. DT models were deployed in the cloud and edge using a smart meter DT demonstration system. This paper evaluates the DT system's communication performance in real-time smart grid application through three dimensions: remote application service for smart grid user side, P2P transaction on the user side, and user real-time request service. This study's container-based decision tree strategy for smart meters meets the smart grid's real-time communication requirements for user-side applications.