Since industry 4.0 was put forward in 2013, industrial process around the world has been moving rapidly towards the age of intelligent manufacturing. Industry 4.0 is known as the fourth industrial revolution dominated by intelligent manufacturing, which has changed the production mode of global manufacturing and triggered far-reaching industrial changes. However, when intelligent machines communicate with each other under industrial 4.0, a large amount of data adopting distributed control will be generated. The infographic in the data is mainly a visual design of industry 4.0 data. Therefore, this paper mainly studies the distributed data optimization processing for industry 4.0. Considering that data leakage is one of the biggest challenges faced by the data storage systems, this paper proposes a data storage method that considers the efficiency and security of data access. The concept of security distance not only guarantees data security but also takes into account the emphasis of different user groups on data security. To minimize data access time, this paper proposes a data access node selection algorithm to minimize data access time while ensuring data security. The simulation proves that compared with baselines, the data access time of the proposed algorithm in random topology and Internet2 topology is less than that of the current data storage algorithm while ensuring data security. The experimental results are simulated on Internet2 topology and random topology with Matlab and Omnet + + simulation platform, showing that the proposed algorithm can select the optimal data storage node under the condition of satisfying the security distance constraint, thus reducing the data access time.