Text this: AI-based model for securing cognitive IoT devices in advance communication systems