## 3 Proposed Methodology
### Enhanced Adapting Hidden Attribute Weighted Naive Baye Based Data Packet Transmission  
To showcase the effectiveness against flooding attacks of the control plane, various controllers are installed in the domain layer. They are managed by a smart controller (SC) with a hierarchical structure. The smart controller serves as a private key generator, creating secret keys for all switches using a consistent searchable algorithm. Switch authentication considers switch ID, location, and packet history stored in the control plane. Enhanced adapting hidden attribute-weighted naive bayes integrates attribute-weighted naive bayes, which enhances traditional naive bayes by weighting attributes based on their relevance to identifying suspicious packets. This adaptation allows EAWNB to effectively prioritize and differentiate between normal and suspicious packet behaviors, thereby improving accuracy in threat detection.  
The EAWNB approach enhances naive Bayes classification in 5G network security. It integrates attribute weighting, assigning varying importance to attributes such as MAC address, identity, password, physically unclonable function, and location [35]. This adaptability contributes to a more delicate and accurate classification of normal packets. Let '\(v_{i}\)' represent the weight assigned to the attribute '\(i\)'. The weighted probability of a feature '\(Z_{i}\)' in the context of naive Bayes is expressed in Equation (6).  
\[N(Z_{i}|D)=\frac{Count(Z_{i},D)\times v_{i}}{Count(D)} \tag{6}\]  
where '\(N(Z_{i}|D)\)' is the count of occurrences of feature '\(Z_{i}\)' in class '\(D\)', and '\(Count(D)\)' is the count of occurrences of class '\(D\)'. EAWNB incorporates an adaptive hidden mechanism, dynamically adjust the weight assigned to each attribute based on the network's evolving conditions. This ensures that the model remains resilient to changes, adapts new patterns effectively, and faces potential security threats. The dynamic adjustment of attribute weights in the adaptive mechanism is formalized in Equation (7).  
\[v_{i}(d+1)=v_{i}(d)+\eta\cdot\frac{\partial L}{\partial v_{i}} \tag{7}\]  
where '\(v_{i}(d)\)' is the weight assigned to attribute '\(i\)' at time '\(d\)'; '\(\eta\)' denoted as learning rate and '\(L\)' denoted as loss function representing the difference between predicted and actual class labels. Various packet attributes are tracked and updated in the BSHNN model, mitigating security attacks effectively. Computation complexity is crucial for algorithm validation.  
\begin{table}
\begin{tabular}{c c} \hline
**Packet Features** & **Description** \\ \hline Service type & Service request to destination, e.g., HTTP \\ \hline Packet header length & Size of packet header \\ \hline Flags & Indicates connection status: normal (flag = 0) or error (flag = 1) \\ \hline Epoch time & Epoch completion time duration \\ \hline Protocol used & TCP/UDP \\ \hline RRT & Response reply time \\ \hline TTL & Time to live \\ \hline Port Number & Port number of switches \\ \hline Packet count & Packets per flow amount \\ \hline Byte count & Bytes per flow amount \\ \hline Duration & Alive time of switch (nanoseconds) \\ \hline \end{tabular}
\end{table}
Table 1: Data Packet Attributes.