The Use of Blockchain to Support Distributed AI Implementation in IoT Systems