## 3 Immune Game-Based Abnormal Node Detection Algorithm
### Detailed System Model and Problem Formulation
#### 3.2.2 Node Game Model  
The node game is to solve the priority problem of node detection and recovery based on global considerations between abnormal nodes. When an exception occurs on a node, it can be understood in two cases. One is that the node itself is destroyed, and the other is the node is disturbed, spoofed, or attacked. Whatever the case, once the node occurs abnormal, the node energy will be consumed. These abnormal nodes will affect the normal operation of the mobile network and cause the breakdown of the communication between adjacent nodes. Therefore, the game uses the energy consumption of nodes as the utility index. Because the system uses artificial immune theory for abnormal detection, it is assumed that all nodes in the network structure have deployed corresponding abnormal detection agents. In the game model, there are two participants, the sensor node \(S\) (\(\theta_{s}\)) and abnormal detection agent \(R\) (\(\theta_{R}\)). The goal of the game translates to the abnormal detection agent providing the optimal strategy when deciding whether to adopt a defense or recovery strategy. When the transmission bandwidth is \(B\), the node energy consumption is satisfied:  
\[E_{Etr}(B,I)=BE_{Eno}+Bl^{x}E_{Eli}, \tag{10}\]  
where \(E_{Eno}\) indicates that the node's internal circuit consumes power. \(E_{Eli}\) represents the amplified power of the antenna to the current signal. \(l\) is the transmission distance correction coefficient. For a node in the region, let \(l_{N}\) be the stable transmission distance. That is, if the actual transmission distance \(l_{d}\) is less than or equal to \(l_{N}\), the data transmission within this range is considered stable, and the energy consumption of node transmission is the same. If \(l_{d}\) is greater than \(l_{N}\), \(l=l_{d}/l_{N}\). In formula (10), \(x\) represents the transport model index. When the transport model exponent between nodes is 2, a direct link between the two is no longer established [20]. \[\mathrm{x}=\left\{ \begin{array}{l}0\;when\;l_{d}\leq l_{N}\\ 1\;when\;l_{d}>l_{N}\\ 2\;when\;l_{d}\gg l_{N}\end{array} \right. \tag{11}\]  
According to the above assumptions, ordinary nodes in the region are similar. These ordinary and regional nodes are in a highly correlated state. As a result, the zone node can combine the upload bandwidth of k normal nodes in region \(B1\), \(B2\),..., \(Bk\) into the zone bandwidth \(BBlo\) and upload data. The energy consumption generated by the zone node, \(EElo(BBlo,k)\), is  
\[E_{Elo}(B_{Blo},k)=B_{Blo}E_{Elo}, \tag{12}\]  
where \(E_{Elo}\) is the power consumption of the circuit inside the regional node. The number of zones is \(N\) and the correction coefficient of transmission radius of regional nodes is \(d\). Let \(d_{N}\) be the stable transmission distance. That is, if the actual transmission radius \(d_{d}\) is less than or equal to \(d_{N}\), the data transmission within this range is considered stable, and the energy consumption of node transmission is the same. If \(d_{d}\) is greater than \(d_{N}\), \(d=d_{d}/d_{N}\). Taking one region and counting the number of normal nodes, we can see that the region contains \(k\) ordinary nodes. Owing to the high correlation of nodes within the region, the upload bandwidth of normal nodes is the fixed value \(B_{Ble}\). Regional nodes must aggregate data and transmit it to the sink node, so the overall energy consumption of the region's ordinary nodes is  
\[E_{Eall}(B_{Ble},d,k)=kB_{Ble}E_{Emo}+kB_{Ble}d^{x}E_{Eli}. \tag{13}\]  
where x means the same thing as Formula (11). Considering the short topological distance between the region node and normal nodes, the energy consumption model mainly uses the zone transmission mode. Since the final network data must be transferred to the sink node, the node must be selected in segments. The regional and sink nodes select the optimal number of partitions and initialize the link data by routing the table.