The key identification element of the smart factory is the interconnection between devices, which solves the production method and development dilemma of the factory under Industry 3.0 and previous models. The new article published by Xinhua News Agency on January 16, 2022, advocates the idea of industry+ Internet, and its main goal is to realize intelligent production. At present, smart factories have become the main development direction of industrial enterprises in the world. 5G technology has been rapidly deployed with the development of mobile communication, and its performance has also been greatly improved compared to previous communication technologies. After China put forward the smart manufacturing 2025 plan, although a large number of enterprises are still lingering in the process of research, learning, and exploration, the idea of Industry 4.0 has taken root in various intelligent manufacturing enterprises, and the development route of Chinese manufacturing enterprises in the future has been ahead of schedule. Direction. Based on the basic theory of Industry 4.0, 5G wireless communication, Internet of Things, and smart factories, this paper firstly distributed questionnaires to 20 enterprises with smart factories by means of network and interview and reanalyzed the collected questionnaires by regression analysis method and then used the questionnaire scale analysis method to analyze the reliability and validity of the questionnaire and combined with the results of the questionnaire analysis to analyze the problems existing in the current smart factory. Finally, based on the background of Industry 4.0 and 5G communication technology, combined with the Internet of Things technology, the development layout of the smart factory is designed; that is, based on the elliptic curve encryption algorithm, the signature mechanism of mutual trust of all electronic devices in the IoT smart factory is set to improve the smart factory.