In view of the current problems of insufficient communication technology and real-time performance, and weak data processing and analysis capabilities, this paper proposes a technical solution that integrates the Internet of Things (IoT) and the improved 5G-TSN (Time-Sensitive Networking) model to improve the real-time control capabilities of the smart grid by integrating the Internet of Things technology. The model relies on the ubiquitous perception capability of the Internet of Things to achieve a full life cycle management of devices. Firstly, a multi-dimensional sensor network is constructed at the perception layer; the FlexE (Flexible Ethernet) interface is used to implement hard-isolated network slicing; the IEEE 802.1AS time synchronization protocol is deployed. Secondly, an edge computing gateway with AI (artificial intelligence) inference capabilities is deployed in the ring network cabinet, and a containerized microservice architecture based on Kubernetes is constructed to achieve intelligent collaborative management and control of Internet of Things devices. Then, a digital twin of the feeder automation device is established; an electromagnetic transient model is constructed using the Modelica language; a real-time data interaction interface based on OPC UA (Open Platform Communications Unified Architecture) is developed to open up the Internet of Things channel between physical devices and digital twins. Finally, the distribution automation performance is verified. Experiments show that the end-to-end latency is only about 8ms in normal load scenarios and about 22ms in encrypted transmission scenarios. The improved 5G-TSN model keeps the processing latency at a low level in most scenarios, and the accuracy rate reaches more than 95% within 3 seconds in single-phase grounding fault scenarios. The improved method can solve the problems of communication technology and real-time performance while improving data processing and analysis capabilities. This research provides technical support for building a highly elastic and adaptive new power system. Its cross-domain fusion paradigm can be extended to multiple scenarios of the energy Internet, which has significant economic value and social benefits in promoting the digital transformation of the power system.