###### Abstract
However, an IoT application may require a group of sensors to work together, and each sensor may have a different capability, i.e., each sensor could perform different tasks. In that regard, the random access procedure also impacts the energy consumption of the devices, which, if not regulated, may lead to a complete blackout as most of these devices are primarily powered by batteries. Although significant efforts have been made to address the issue of network congestion and access delay [3], the matter of energy efficiency in this context has not received sufficient attention. We have taken a different approach, recognizing that the sustainability of battery-powered sensors located remotely depends heavily on their constant availability. While previous approaches have led to significant progress in achieving satisfactory quality of service (QoS), robustness, and scalability, a more comprehensive understanding of the mMTC architecture is necessary to achieve these goals. In our previous work, we formulated the grouping decision as a combinatorial optimization problem and used a bin packing-based heuristic algorithm to solve the problem [4]. This has shown promising results compared to other grouping strategies, such as location-based and feature-based strategies. Now, in the context of the B5G network with massive MT device deployments, we leverage the relationship between the energy consumed and the random access of each device to propose an efficient grouping mechanism capable of guaranteeing the successful and timely transmission of the sensors while guaranteeing efficient energy utilization. Our approach considers the application-to-device relationship while grouping the devices. We propose a grouping strategy that transforms applications into task execution frameworks and initiates sequential device triggering. This approach is designed to minimize signaling overload by providing exclusive resource access to each group member. As the field of artificial intelligence (AI) is evolving, academics and industry leaders are using machine learning (ML) methodologies to help solve multiple problems in wireless communication networks [5]. From network optimization to resource allocation and other theme-specific enhancements, ML algorithms, such as reinforcement learning, federated learning, echo state networks (ESNs), adversarial machine learning (AML), and distributed reinforcement learning, are widely implemented to enhance wireless communications in B5G scenarios. Such ML applications in wireless network management enhance efficiency and pave the way for more adaptive and intelligent wireless network infrastructures and strategies. In [6], [PERSON] highlights the _learning-to-optimize_ techniques in 6G networks, covering various ML frameworks and their applications in solving complex optimization problems in wireless networks. To address the massive MT scenario with network congestion problems, the authors in [7] proposed a random access scheme as a partially observable Markov decision process (POMDP) framework to guarantee a short access delay requirement for high-priority UEs without any additional energy consumption of low-priority UEs during the access procedure. In [8], [PERSON] proposes a temporal convolutional network (TCN)-based model for RIS-based wireless communication, demonstrating its effectiveness through simulation results in terms of bit error rate and symbol error rate. In a more recent research, [PERSON] presents a machine learning (ML)-based traffic steering (TS) scheme for open RAN (O-RAN) to predict network congestion and proactively steer traffic to reduce expected queuing delay, focusing on enhancing the performance and reliability of RAN access for massive IoT networks [9]. Many researchers, including [10; 11], have focused on reducing the time complexity of heuristic models. However, due to the inherent computational complexity of these models, a decrease in performance is likely as the number of devices increases.