A large number of devices with communication and sensing capabilities are connected to the 5G network and facilitate distributed industrial Internet of Things (IIoT) applications. Those devices can update their program code by using software-defined technologies and upgrade functions without hardware replacement, thus, greatly facilitating the development of IIoT applications. Disseminating code safely to these devices is a pivotal issue. However, the existing methods rarely consider whether the code received by devices is integrated. Therefore, an unmanned aerial vehicle (UAV) assisted trustw...