SHANN: an IoT and machine-learning-assisted edge cross-layered routing protocol using spotted hyena optimizer

In the case of new technology application, the cognitive radio network (CRN) addresses the bandwidth shortfall and the fixed spectrum problem. The method for CRN routing, however, often encounters issues with regard to road discovery, diversity of resources and mobility. In this paper, we present a reconfigurable CRN-based cross-layer routing protocol with the purpose of increasing routing performance and optimizing data transfer in reconfigurable networks. Recently developed spotted hyena optimizer (SHO) is used for tuning the hyperparameters of machine-learning models. The system produces a distributor built with a number of tasks, such as load balance, quarter sensing and the development path of machine learning. The proposed technique is sensitive to traffic and charges, as well as a series of other network metrics and interference (2bps/Hz/W average). The tests are performed with classic models that demonstrate the residual energy and strength of the resistant scalability and resource.


Introduction
Reconfigurable wireless networks (RWNs) are mainly adaptive networking software that is designed to meet the demands of existing applications and changing network topology. The RWNs can be reconfigured in all stack levels of the protocol. This reassignment will require a load on the transportation layer routing protocol to be reconfigured using heterogeneous networks or to develop the high-quality service requirement (QoS) [1], to promote high time variable scenario mobility. Cognitive radio (CR) is a contemporary communication technology that tends to give secondary or cognitive television a smart sense of the environment and, based on the information gained, the parameters for the transmission of spectrum resources are properly altered. It may also be viewed as the ability of cognitive radios to feel the spectra from their environment for the available spectrum and the channel sets are divided in accordance with transmission policy [2] for the optimization of channels that discourage interference with secondary users. The secondary user (SU) is responsible for detecting the primary user (PU) transmission range and for preventing interference [3]. The smart SU also senses the ideal resource and reduces the distortion during PU transmission. More chances for spectral access are offered by smart SU. The transferred data in a reliable fashion utilising a transport layer according to the optimum spectral sensing, the ideal quality evaluation on available channels and the optimum PU detection [4]. It is additionally supported by good strategy and transmission speed in the congestion control [5].
For a network layer protocol to meet all the problems, the functions of the CRNs need to be improved. The delay and interferences on relay nodes, resulting in spectrum fluctuations in CRN, are increased by congestion and switching [6]. A routing protocol must examine these parameters and create routing protocol architecture to overcome such issues. The cross-film design is, therefore, important to construct a design that is energy efficient and routing problems [7]. The network conjunction with the MAC provides a routing solution that is imperative [8]. Often with dynamic alloca-tion and its value, CRNs [9][10][11][12][13][14] are cross-layered. It often boosts customised programming, spectrum resources and power control by improving the optimum routing of the CRN. Dynamic resource allocation should be considered to improve the transmission connection with the PUs. In contrast, routing methods are commonly selected in an unsaved way [15], 16].
It is very important to construct a very robust machinelearning (ML) [17][18][19] to adapt to the limits of routing on the CRNs by spectral resource allocations and to adjust the network to reconfigure. In combination with the limitations associated with the MAC layer, optimised routing decisions in CRNs can be launched with the machine-learning models [20]. Machine-learning may, therefore, be regarded appropriate in the construction of a layer-overlay protocol that provides other levels of information and services [21,22]. The reconfiguration of the CRN is operated on the basis of dynamic features of the CRN. This requires the use of the ML approach to work together to reconfigure a CRN by sensing its environment and selecting better courses. For this study, it is vital to examine the coherence of the ML method in the analysis of the whole properties of CRNs. Smart adaptations on CRNs, depending on information collected from the CRN features, are achievable in such a scenario as a robotic mechanism to expedite the choice. The cross-face design consideration further optimises the routing performance with ML for multi-path/channel selection [23,24]. The ML engine is thus found to be clever based on full information about cross-sectional design on the training of the ML for routing purposes. The formation with full knowledge of ML makes it possible to forecast optimal pathways in CRNs in future.
The present study models a CRN-assisted ML routing aimed at (1) increasing energy efficiency, (2) preserving the balance, (3) optimising resource use. In this research, the purpose of the CRN controllers is to use the CRN architecture by machine-learning optimization to achieve optimum in this way. An efficient optimising routing technique is provided in CRN. The use of artificial neural networks [25][26][27] routing capability [25,26,[28][29][30][31][32][33][34][35] allows CRN to identify the right paths for the actual transfer of information. The ANN routing addresses certain dynamic limitations of the CRN, where resources are distributed in conjunction with the network dynamics without prior information. Consequently, applying ML on cross-layer design in CRN offers the best routing decision for intelligent routing. The following is the outline of the paper: "Related works" discusses studies relating to different cross-sectional CRN routing systems. The problem and the system model of CRNs are provided in "System model". "Optimizing the route using machine learning" gives a quick description of the route optimization machine learning for CRNs. The suggested CRN routing policy is presented in "Policy of CRN routing". The suggested cross-layered ML route is assessed in "Performance evaluation". "Conclusions and future work" concludes the study with proposed future guidelines.

Related works
Existing ML routing approaches are discussed in this part on a number of factors including channel selection, routing, routing strategies, etc. Also, in this section, the optimal routing strategy of routing decisions is discussed in several protocols relating to cross-layered architecture. For cognitive engine development, Du et al. [9] used CRN reinforcement learning. It tackles two challenges, including: firstly, it takes a long time before it is intelligent to interact with the surroundings. Second, the agents improve their performance by trial and error; however, some of the CRN applications cannot afford a large amount of latency and power. A learning approach based on expert demonstrations is adopted to address the above-mentioned difficulties.
To reduce the misidentification of nodes owing to SU distant position, a radius adaptable to the Bregman Ball model is introduced. The process of speed learning from specialist nodes, multi-teaching deep-Q study is further offered. The confirmation indicates reduced training time and improves the quality of transmission compared to standard methods. Moreover, the new nodes can be more effective than the experts. Researchers [10] present a layer-wide allocation approach for the distribution of dynamics in cognitive radio networks to enhance the quality of expertise evaluated by mean viewpoint. The solution to the problem of spectrum shortages is the distribution of funds between SUs and PUs. The method enables resources for physical and network layers to be allocated in CR by observing ambient factors. This will improve the optimum inter-layering approach and usually enhances the single-grade MOS scale. This will improve its own characteristics.
In [11], the cross-layer routing protocol to the CRN is regarded to be challenging to attain in terms of spectrum statistics and topology, quasi co-operative latency learning and energy efficiency increase. A utility function combines the energy efficiency. Experience replay is employed to update the assumptions to disrupt the correlations and lower update variance to continue improving efficiency.
An energy efficient cross-layer routing training approach was developed in [12]. Firstly, a new idea will be established as a dynamic adaptation rate that governs efficient power transmission through a multi-level transition mechanism to ensure energy efficiency and to condense vast sectors of activity. In addition, Q-Learning for priority memories is offered to speed up convergence and reduce storage. This technology enhances the efficiency of energy and reduces the latency of routing in a transversal architecture. Simulation results demonstrate that this procedure is more efficient than conventional algorithms, decreased routing delay and higher packing ratio [36]. The cross-layer QoS-related restrictions for cognitive communication were developed by Shah et al. [13]. The proposed system uses CRN to reduce crowded strips and noise by boosting the communication capacity of channels. The Lyapunov Shift optimization is seen as an issue in maximising weighted-services in different traffic classes.
To decrease the restrictions for SDR operations, Kakkavas et al. [14] have created the resource allocation model in the CRN. CRN SU resource is allotted according to the framework of Markov random field (MRF).

System model
The system is modelled as hexagonal, user-and cognitive radio network as presented in Fig. 1. The system is modelled.
Users are allocated to cognitive radios with the same level of spectrum.
Consider the Primary User Index (PU), which denotes index B of PU as, B ∈ {1, 2,…, B}. In terms of indices, cognitive or secondary radios (SU) are specified X ∈ {1, 2,…, X} and the cognitive radios are indicated N ∈ {1, 2, …, N}. The BS of main users (BS-PU) and BS of cognitive (BS-CR) [36] are respectively related to the indexes of uses and cognitive radios. The spectral allocation architecture of CRN w.r.t. is shown in Fig. 1: a : c : Optimizing the route using machine learning The ML is typically essential in optimising the decision to route using network resources optimally. The machinelearning to be based on the characteristics of input, and they tend to reset the whole services to the dynamic resource on the basis of its adjustment. Intelligent services in CRN are, therefore, smartly enabled with the increased learning capacity in ML routing algorithms. The ANNs and spotted hyena optimizer (SHO) often personify the human brain activity that helps to recognise non-linear relations in any model as optimally as possible. SHO and ANNs are constructed with ANN which is often meant to calculate the required output(s) for non-linear inputs. Figure 2 illustrates the one-layer ANN architecture.
128 input layers, one hundred and sixty layers of hidden and one layer of output are constructed into ANN.

Spotted hyena optimizer (SHO)
Social connections are inherently changing environments. These are influenced by changing relations between the network as well as people who leave/enter the population. The study related to animal behaviors in the social network was divided into three stages: • The first stage included ecological variables that include resources as well as the rivalry to other species. • In the second stage, social liking is highly dependent on quality. • The 3rd group receives less scientists' attention, including social relationships related to species themselves.
Social relationships among animals are what inspire us. This behavior works and corresponds to detected hyena, which is known as Crocuta. Hyenas are like carnivores that are similar to dogs. They live in the African and Asian savannas, grasslands, deserts and woodlands. Spotted hyenas are complex, clever and very sociable creatures with a terrible reputation. They are capable of fighting territory as well as food indefinitely. In spotted hyenas, women are influenced as well as live in clans. When men are adults, male members leave their clan to look up and join a clan in different places. They are the members having low rank of this new family to receive their portion of supper. A male member who joined the clan remains for a long period with the same members (friends). Whereas a woman is always guaranteed a steady location. An intriguing feature of spotted hyenas is they emit voice warning that is quite similar to laughter. The mathematical modelling of SHO algorithm is described as follows [37]: where, Iteration 1, 2, 3 . . . , Max Iteration , Mostly detected hyenas hunt for stalks according to location in a group of spotted hyenas related to vector Ch. To display SHO's unpredictable nature, suppose vector B > 1 as well as B < 1 to illustrate the distance effect as shown in Eq. (3). This is useful for investigation as well as local optimum prevention. Looking upon the choices of location, a spotted hyena may determine arbitrarily the weight of stalk as well as prepare it stiff for spotted hyenas.

Policy of CRN routing
This section improves network routing on a distributed basis with its network architecture in reconfigurable CRN. A distributed network model has several CRN controllers that collect the main features of the CRN on the MAC and on the network layer. It offers numerous controllers for different layers. This is combined with BS by helping the transmission of BS to reduce energy and computer resources.
With dense network resources and architecture is described in Fig. 1. The network answers are forwarded to the ML-approached controllers, which are used for network layer path selection. The ML controller recasts regular routing data collected by the network layer. The network heterogeneity and information are obtained by means of critically functioning ML protocol. Diverse network metrics or features are collected in the MAC layer for optimum routing path selection, channel quality, channel quality, buffer occupancies, network congestion and window size. The CRN controller has an ML algorithm which additionally takes the limitations of computer capability and inadequate memory into account in connection with the limitations specified in "System model".

Network modeling
The initial CRN network layer settings regularly specify the pattern of re-sets across network operation. The BS-PU was initially positioned in the external CRN region. The BScontrollers CR's are developed as a processing and capability. PU and SU are dispersed with varied heterogeneity levels and are classified into normal, advanced and superzones with an upward energy order [36].

Reconfiguring the routing
In this part, CRN is developed to choose the ideal way with the right collection of CRN inputs on a regular basis. The routing reconfiguration is carried out periodically to handle the sensitive information of the CRN on the study's crosslayers. The reconfiguration of this routing system with more functions means that the overhead of computers is increased and the data transmission time is reduced severely. In order for such a difficulty to be addressed, ML-based reconfigurable network modelling optimises the CRN reconfiguration method by reprogramming the periodicity until the index is stable for ten iterations. The distributed controllers maintain this reconfiguration model's computational threshold throughout a time t.
The implementation of the reconfigurable CRN consists of three parts: topology, settlement and transmission phases. The following paragraph gives the details:

Management of topology
The ML-assisted routing technique allows integration to choose the best paths for re-configuring devices. This reconfigures the CRN topology and requires periodic updates based on topology discovery. The continuous update of the CRN helps the ML-based mechanism to accurately generate answers relating to the routing path. Distance to BS, residual energy, distance between BS-PU and BS-CR [36], the information of the era and the frequency of the CRN in licenced and non-licensed tapes are used for extracting the CRN information using a hi messages from the network layers. The BS controller in PU and SU/CR reacts in an iterative manner to the message by updating the entire CRN with current information relating to the network.

Settling phase
The settlement phase calculates the reconfiguration [36] in the provided CRN topology of clusters PU and SU. It also largely calculates the synchronisation of CRN stability amongst the controllers. The best clustering of cells provides the ML-assisted routing path using sensed CRN data. In addition, ML considers the cell heterogeneity to use remaining CRN resources efficiently. The study purposefully delays up to ten iterations to achieve a network.
In the maintenance phase, the dispersed controllers collect data about CRN heterogeneity. The settlement phase then uses the following equation: Controllers employ ML while designing clusters to maximise their FPU centrality. The study employs the parameters of CRN cell values for the calculation of FPU centrality as previously and then the central grade is explained. To maximise the clustering process, the more degree is chosen. To attain the appropriate position, the FPUs are described as the indexing rate. The centre position is, therefore, viewed as an average message ratio between the source PU and each of its destinations SU and the other FPU (both FPU and non-FPU) and the following is estimated: The protocol for the machine-learning routing follows the same reconfiguration procedure throughout the whole CRN iteration. To optimise formulations for cluster formation, the CRN analytical cost is assessed using the distributed controllers. The estimate is performed in accordance with 10th [38] and CRN reconfiguration has the highest costeffectiveness. In determining cost-effective settings, the main consideration is the equal distribution of loads across PUs [36], with a reduced use of resources and minimum energy.

Performance evaluation
The simulation is carried out with a high-end computing system in a MATLAB environment. The study does not take into account data set but the video streaming data between the sender and the receiver is communicated [36]. The simulation is conducted using the system model with one BS-PU/2 BS-CR [36]. Several CRs can share their resources with the PUs in this arrangement [35]. Since, a greater educational rate component causes local optima to decline. The gullible method of exploration approaches unity at each iteration at its exploration pace. More than unitary, routes with premature convergence will be used improperly. In another scenario, ANN is not premature and hence, depending on each PU's error measurements, the outputs of ANN are measured.

Average network capacity
The average capacity of a network, shown in Figs. 3 and 4, is estimated in this section. The study deals with two different case studies: Box 1-BS-PU, BS-CR [39] mobile fixed and Box 2-BS-PU for mobile and BS-CR mobile. Figure 1 illustrates the condition in Fig. 3 and case 2 in Fig. 4. In the fixed BS-CR, i.e. in case 2 higher than in case 1 it is shown. The average network capacity tends to decline, because the calculations in the control system are integrated by ANN with mobile BS-CR due to poor convergence due to mobility pares the way to data packet routing with sensitive CRN information. Machine learning controllers help to map key users' resources to optimise heterogeneity. For the stationary BS-CR, the BS-CR is static with other BS-CRs and mobile/state-of-the-art BS-Pus [36]. The BS-CR also supports the ANN model, which updates the network's observed information at each iteration [36].

Energy efficiency
The average energy efficiency in this section is estimated, as shown in Figs. 6 and 7. Two separate case studies are also taken into account to assess the CNR helped by ANN routing, similar to the previous paragraph. The average efficiency is calculated using SINR and Case 1 findings are shown in Fig. 7 and Case 2 is also shown in Fig. 8. In fixed BS-CR, i.e. in instance 2 greater energy efficiency is attained than in case 1. The ANN assisted routing works better in lower SINR compared to previous techniques. The separation of three separate processes and ANN helps the CRN to increase its performance compared to other approaches.
The energy efficiency is indicated in both Figs. 9 and 10, on the other hand, with increasing numbers of CRs. The findings of the simulation reveal that energy efficiency is reduced due to growing CRs. More CRs tend to produce high interference rates, and demand more power and resources to complete the routing operation between the destination and the source [36].

Conclusions and future work
In this study, we have built a cross-layer machine learning process for reconfigurable CRN applications. The distributed control system monitors the entire environment and creates the CRN reports for optimal judgement in the selection of cluster members, cluster head and the routing path. This ideal selection allows for the real transfer of data by taking into account the whole nature of CRNs, including their features. The use of three-phases with the help of ML also enhances this selection, with cluster, threshold and CRN reconfiguration dependent on network requirements. Moreover, SHO algorithm is used to tune the hyperparameters of ANN model. The advantages include the maximum use of a controller CRN network, allowing optimum data transmission at higher network level. This cross-cutting method permits coordination among layers during the routing process with occasional reconfiguration. The distributed controllers optimise the processes during the settlement phase with mutual cooperation and therefore the routing paths are used. In addition, the analysis is extended with routing activities in heterogeneous cooperative CRNs, involving channel imperfection effects. Further, it would no longer be regarded as a constraint to update the routing table to include a cloud storage to the routing procedure.
Funding None.

Conflict of interest
There is no conflict of interest.

Availability of data and materials Not applicable.
Code availability Not applicable.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecomm ons.org/licenses/by/4.0/.