Blockchain application and cyber-physical systems play a crucial role to modernize the traditional industrial process, technical procedures, and business models. It uses frame resilient and smart contracts to reduce the complexities of service costs. The blockchain applications associate the key features such as self-verification, and self-integrity to eliminate the role of trusted third parties access. It evolves scientific and industrial progress to reform as Industry 4.0 that uses Artificial Intelligence (AI) to process and extract the significant information of the real-time systems. Moreover, it applies digital analytics to link the data with blockchain and cloud repositories to improve system efficiencies. However, the security and privacy issues are still challenging to investigate the AI techniques and tools. Thus, this paper proposes a privacy-preserving in smart contracts using blockchain and artificial intelligence (PPSC-BCAI) framework that simplifies human interaction, system activities, service alerts, security risks, and fraudulent claims. To analyze the data transaction and sharing, an extreme gradient boosting (XGBoost) is applied. It analyses the transaction service to optimize the network load that reveals whether the transmission rate changes over the connectivity of unreliable networks. © 2021 Elsevier Ltd