Internet of Things (IoT) is one of the promising technologies, announced as one of the primary use cases of the fifth-generation cellular systems (5G). It has many applications that cover many fields, moving from indoor applications, e.g., smart homes, smart metering, and healthcare applications, to outdoor applications, including smart agriculture, smart city, and surveillance applications. This produces massive heterogeneous traffic that loads the IoT network and other integrated communication networks, e.g., 5G, which represents a significant challenge in designing IoT networks; especially, with dense deployment scenarios. To this end, this work considers developing a novel artificial intelligence (AI)-based framework for predicting traffic over IoT networks with dense deployment. This facilitates traffic management and avoids network congestion. The developed AI algorithm is a deep learning model based on the convolutional neural network, which is a lightweight algorithm to be implemented by a distributed edge computing node, e.g., a fog node, with limited computing capabilities. The considered IoT model deploys distributed edge computing to enable dense deployment, increase network availability, reliability, and energy efficiency, and reduce communication latency. The developed framework has been evaluated, and the results are introduced to validate the proposed prediction model. © 2022, The Author(s) under exclusive licence to The Korean Institute of Electrical Engineers.