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 allocation 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 machine-learning (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.

Fig. 1
figure 1

Architecture of CRN model

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:

$$ \xi_{b,k} \left( n \right) = \frac{{h_{b,k} \left( n \right)P_{b,k} \left( n \right)}}{{I_{k} \left( n \right) + \sigma^{2} }}, $$
(1)
$$ I_{k} \left( n \right) = \sum\limits_{m = 1}^{M} {P_{u,m} \left( n \right)h_{u,m} \left( n \right)} + \sum\limits_{i = 1,i \ne k}^{K} {\sum\limits_{{l \in \frac{B}{{\left\{ b \right\}}}}}^{K} {P_{l,i} \left( n \right)h_{l,i} \left( n \right)} } , $$
(2)
$$ d_{k} \left( n \right) = c_{b,k} \left( n \right)\log_{2} \left( {1 + \xi_{b,k} \left( n \right)} \right), $$
(3)
$$ C_{k} = \sum\limits_{n = 1}^{N} {d_{k} \left( n \right)} , $$
(4)
$$ E_{k} = \frac{1}{{P_{k} }}\sum\limits_{n = 1}^{N} {c_{b,k} \left( n \right)\log_{2} \left( {1 + \xi_{b,k} \left( n \right)} \right)} , $$
(5)
$$ E = \sum\limits_{k = 1}^{K} {E_{k} } , $$
(6)
$$ P:\;\max \,E, $$
(7)
$$ a:\;P_{b,k} \left( n \right) \le c_{b,k} \left( n \right)\left( {\max P_{b} } \right),\,\forall k = K,\forall b = B, $$
(8)
$$ b:\;\sum\limits_{k = 1}^{K} {\sum\limits_{n = 1}^{N} {P_{b,k} \left( n \right)c_{b,k} \left( n \right)I_{n,m} \le I_{m} } } , $$
(9)
$$ c:\;\sum\limits_{n = 1}^{N} {c_{b,k} \left( n \right)\log_{2} \left( {\xi_{b,k} \left( n \right) + 1} \right) \ge \min C_{k} } , $$
(10)
$$ d:\;c_{b,k} \in \left\{ {0,1} \right\},\quad \forall n = N,\quad \forall b = B, $$
(11)
$$ e:\;\sum\limits_{n = 1}^{N} {c_{b,k} \left( n \right) = 1,\quad \forall n = N} . $$
(12)

Optimizing the route using machine learning

The ML is typically essential in optimising the decision to route using network resources optimally. The machine-learning 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.

Fig. 2
figure 2

Layers in artificial neural network

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]:

$$ \overrightarrow {D}_{h} = \left| {\overrightarrow {B} \cdot \overrightarrow {P}_{p} - \overrightarrow {P} (x)} \right|, $$
(13)
$$ \overrightarrow {P} (x + 1) = \overrightarrow {P}_{D} (x) - \overrightarrow {E} \cdot \overrightarrow {D}_{h} , $$
(14)
$$ \overrightarrow {B} = 2\, \cdot \,r\overrightarrow {d}_{1} , $$
(15)
$$ \overrightarrow {E} = 2\overrightarrow {h} \cdot r\overrightarrow {d}_{2} - \overrightarrow {h} , $$
(16)
$$ \begin{aligned} \overrightarrow {h} & = 5 - ({\text{Iteration}}\, \times \,(5/{\text{Max}}_{{{\text{Iteration}}}} )) \\ & \quad {\text{where}},\;{\text{Iteration}} = 1,2,3 \ldots ,{\text{Max}}_{{{\text{Iteration}}}} , \\ \end{aligned} $$
(17)
$$ \overrightarrow {D}_{h} = \left| {\overrightarrow {B} \cdot \overrightarrow {P}_{h} - \overrightarrow {P}_{k} } \right|, $$
(18)
$$ \overrightarrow {P}_{k} = \overrightarrow {P}_{h} - \overrightarrow {E} \cdot \overrightarrow {D}_{h} , $$
(19)
$$ \overrightarrow {C}_{h} = \overrightarrow {P}_{k} + \overrightarrow {P}_{k + 1} + \cdots + \overrightarrow {P}_{k + N} , $$
(20)
$$ P\left( {x + 1} \right) = N/C. $$
(21)

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 BS-controllers 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 cross-layers. 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:

$$ E^{\prime}_{R} \left( {c_{b,k} \left( n \right)} \right) = \left( {\frac{1}{B} + \frac{1}{M}} \right)\sum\limits_{i = 1}^{{f\left( {B,M} \right)}} {E_{R} \left( {c_{b,k} \left( n \right)} \right)} , $$
(22)
$$ \min \left( {D_{{{\text{FPU}}}} } \right) = \sum\limits_{j = 1}^{{B_{{{\text{FPU}}}} }} {\sqrt {\left( {X - x\left( j \right)} \right)^{2} + \left( {Y - Y\left( j \right)} \right)} } . $$
(23)

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:

$$ C_{{{\text{FPU}}}} = \sum\limits_{{S \ne {\text{FPU}} \ne D}} {\frac{{S - D_{{{\text{FPU}}}} }}{S - D}} , $$
(24)
$$ \overline{C}_{{{\text{FPU}}}} = \left\{ {\begin{array}{*{20}l} {\frac{P\left( j \right)}{{1 - P\left( j \right)d \times \left( {r\,\bmod \,\frac{1}{P\left( j \right)}} \right)}}} \hfill & {\quad {\text{if}}\;n \in C_{{{\text{FPU}}}} } \hfill \\ 0 \hfill & {\quad {\text{otherwise}}{.}} \hfill \\ \end{array} } \right. $$
(25)

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 cost-effectiveness. 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 and greater mobility. There is thus no premature convergence of any of the solutions and the delivery of packets between source and destination knots provides optimal pathways. Larger interference, like Figs. 5 and 6, occurs with growing interference than Case 2.

Fig. 3
figure 3

Case-1 network capacity with the use of ML techniques for BS-PU and mobile BS-CR

Fig. 4
figure 4

Case-2 network capacity with the use of ML techniques for BS-PU and mobile BS-CR

Fig. 5
figure 5

Interference for Case-1 network capacity with the use of ML techniques for BS-PU and mobile BS-CR

Fig. 6
figure 6

Interference for Case-2 network capacity with the use of ML techniques for BS-PU and mobile BS-CR [36]

The CRN routing support protocol for machine learning allows controls with main or secondary users to collaborate on transferring aircraft for clustering formulation that prepares 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.

Fig. 7
figure 7

Energy Efficiency for Case-1 network capacity with the use of ML techniques for BS-PU and mobile BS-CR [36]

Fig. 8
figure 8

Energy Efficiency for Case-2 network capacity with the use of ML techniques for BS-PU and mobile BS-CR [36]

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].

Fig. 9
figure 9

Energy efficiency for Case-1 network capacity with the use of ML techniques for BS-PU and mobile BS-CR. w.r.t. to increasing CR [36]

Fig. 10
figure 10

Energy Efficiency for Case-2 network capacity with the use of ML techniques for BS-PU and mobile BS-CR. w.r.t. to increasing CR [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.