Artificial Intelligence Implementing Federated Learning on Edge AI for Privacy-Preserving IoT Applications