This paper discusses the implementation of a privacy preservation model in the Industrial Internet of Things (IIoT) using artificial intelligence techniques. The proposed model consists of two stages: data sanitization and restoration. A new Grasshopper-Black Hole Optimization (G-BHO) algorithm is used for optimal key generation. Simulation results show that the proposed model outperforms other state-of-the-art models in terms of various performance metrics.