Many real-world networks for the Industrial Internet of Things (IIoT) have diverse connectivity characteristics and real-time constraints imposed by industrial processing. In the context of digital twin networks (DTNs), a large number of IIoT devices may access the network and have a tremendous volume of data. A crucial element of these IIoT devices is mobility, which cannot be effectively solved because the number of IIoT devices connected is extremely large. IIoT devices in DTNs suffer from poor data transmission and link quality because of their mobility. In this paper, device-to-device (D2D) communication-based mobility-assisted digital twin networks are proposed, where edge computing is introduced to design an efficient mapping between the physical and virtual space. Then, we propose the architecture of data transmission for the D2D network to maximize the data rate for reliable connectivity among multiple mobile nodes based on IIoT. A Markov decision process (MDP) is formulated to maximize the data rate for multiple mobile nodes while maintaining the D2D communication link quality. The simulation results demonstrate the superiority of the proposed scheme over other comparable models.