Compared to conventional electricity grids, Smart Grids have advanced features more as a result of smart communications. The cognitive radio sensor networks (CRSNs) are being used to make up the increased demands for quality of services in Smart Grids. The majority of currently applied techniques are not enough to fulfil the spectrum demand of users, which results in data transmission delays. Therefore, this rock hyraxes group optimization (RHGO) built on deep Q-probabilistic procedure is suggested in this study to enhance the allocation of channels in CRSN Smart Grids. The Q-table is located within the sink nodes that store the users' IDs. The channels send request to user IDs. The RHGO selects the highly prioritized user from the Q-table after searching for the initial demanded users. According to the users' requests, deep probabilistic neural networks (DPNNs) find the unoccupied channel. According to the active and sleeping period, the DPNNs search for unoccupied channels. By utilizing DPNNs, the suggested technique enhances the allocation of channels while taking less time. This study applies the MATLAB program to accomplish the suggested approach.