# Control Mechanism of Virus Propagation in Wireless Sensor Networks Based on Analytic Hierarchy Process

Authors: Lurong Jiang; Hangyi Pan; Jiawang He; Renwang Li; Changguo Xu; Qiaoyu Xu; Yanyun Dai; Fang Dong; Jijun Tong
Journal: Security and Communication Networks
 (2022)

---

## Abstract

The research on virus propagation process and control method in wireless sensor networks (WSNs) is one of the essential challenges of network security. This paper proposes a virus control mechanism of degree, betweenness centrality, and k-core-based analytical hierarchy process (DBC-AHP) for WSNs. According to the topology of WSNs, the virus control mechanism uses the DBC-AHP to identify the crucial nodes of the network. It uses the way of crucial nodes’ self-disconnection to suppress the spread of the virus, to improve the network security. In this paper, the effectiveness of the virus control mechanism based on the DBC-AHP is verified by comparing and analyzing the effect of four different crucial node recognition algorithms. With the research of virus control mechanisms in various network environments, it is found that the average degree of nodes, the communication radius of nodes, and the probability of virus infection can affect the inhibition effect of the virus control mechanism. Furthermore, the inhibition effect of virus control mechanisms is studied under the condition with/without MAC mechanism.


---

## Body

## 1. Introduction

Wireless sensor networks (WSNs) are wireless communication networks formed by a large number of sensor nodes connected in a self-organizing manner. In general, WSNs is the subclass of computer network, using complex network communication protocols, so the WSNs face the virus threat [1]. The spatial openness [2] and topology heterogeneity [3] of WSNs make it easy for attackers to invade the networks. In addition, the limited energy of nodes makes WSNs vulnerable to resource consumption [4, 5]. In addition, protocols of WSNs at different layers will also suffer from different types of attacks, for example, MAC (media access control) layer DoS attack [6], routing attack [7], and so on. Therefore, with the development of the application of WSNs, the network safety problem against virus propagation has increased prominently.The virus propagation model in complex networks can describe the process of the virus spreading in computer networks or wireless networks [8, 9]. In the process of virus propagation, some nodes can accelerate or inhibit the dynamical spreading process as influential spreaders. We call these nodes crucial nodes. With the identification and strength of crucial nodes, the virus spread speed or the scale of infected nodes can be effectively controlled [10]. Although the research on crucial node identification and virus control methods in complex networks is abundant, there are still few related researches due to the structural characteristics of WSNs.This paper proposes a crucial node identification and virus control method in WSNs. In detail, we use the node degree, betweenness centrality, andk-core as the indicators of the importance of node, then rank the importance of nodes by the analytical hierarchy process (AHP) method in the process of virus propagation in WSNs, and finally reduce the scale of virus infection. This paper is organized as follows: in Section 2, we study the relative works of the virus propagation process and the virus control mechanism in WSNs. Then, we introduce the network construction model and the SIR model of network virus propagation in our research in Section 3. Section 4 describes the detail of the crucial node identification and virus control method. The simulation results show that the algorithm is effective to suppress the infection scale of the virus in Section 5. In Section 6, we conclude.


## 2. Related Works

To explore the virus propagation dynamics in WSNs, many researchers use the virus propagation principle of complex networks theory in WSNs. Upadhyay and Kumari [11] develop an electronic popular SITR model to analyze the attack behavior of worms in WSNs with cytoid type functional response. Considering channel interference and dynamic linking, Liu et al. [12] study the influence of mobility on the spread of malignant software in WSNs in extended mode and communication mode. Some researchers use classical methods such as the principle of percolation to quantitatively analyze the virus propagation process in WSNs [13]. Liu et al. [14] considered the low power consumption characteristics of WSNs. They introduced a low-energy state to the traditional SIR model and then described the virus propagation and mutation process in the rechargeable WSNs. In our former work [15], we proposed an SIR model considered with media access control (MAC) mechanism and found out that MAC with listen/sleep duty cycle can inhibit the scale of virus propagation. Shakya et al. [16] used spatial correlation to improve the SIR model in WSNs and study the influence of basic reproduction number, spatial correlation, and node density on the speed of virus propagation. Nwokoye et al. [17] established a multistate virus propagation model, adding a variety of intermediate states between the susceptible state and the infectious state. In summary, the SIR model can describe the virus propagation process in WSNs, but it is also necessary to improve the SIR model for the characteristics of low power consumption, the openness of wireless channels, and self-organization in WSNs [18].The immunization control of virus propagation is one of the hotspots in studying virus dynamics. The existing WSN virus immunization control mechanisms can be divided into network-structure- and machine-learning-based control methods. And the network-structure-based control methods can be further subdivided into uniform control, acquaintance control, and target control methods. Each immunization control mechanism has its advantages and disadvantages.The uniform control method randomly [19–21] selects a certain proportion of nodes as immune nodes in the network. This mechanism is relatively simple to apply, but the accuracy is not high, the immune cost is high, the virus suppression effect is not apparent, and the virus spread cannot be accurately and quickly suppressed due to the strong randomness.The acquaintance control method [22, 23] is an improved random control mechanism. The mechanism first selects a certain proportion of nodes. It then randomly selects a node from the neighbor nodes of each selected node for control. Compared with the random control mechanism, the accuracy of the acquaintance control mechanism has been improved; the virus suppression effect has also been enhanced; and it is suitable for large-scale network virus defense, but the acquaintance control mechanism is unstable.The target control method is a relatively complete mechanism among these three immunization control mechanisms [24, 25]. Xia et al. [26] take the clustering attribute as a critical feature of nodes, find out the crucial nodes, and strengthen their protection. Zhang et al. [27] provide a LeaderRank algorithm to find out the crucial spreaders of the virus with node degree and clustering coefficient. Li and Xiao [28] rank the importance of nodes based on the precise radius and value information. Guo et al. [29] identify the crucial nodes with the indicator of entropy. The core idea of target control is to identify crucial nodes based on network structure information, and then strengthen the immunity of these nodes. As long as a few nodes are immunized, the spread of the virus can be quickly suppressed. Therefore, this mechanism has strong performance and high accuracy.Machine learning is a type of essential method to realize intrusion detection and security [30]. Machine learning technology can predict the dynamic behavior of networks according to develop a model for completing specific security tasks. Some researchers have applied machine learning technology to identify the crucial spreaders in virus propagation. Rathore and Jha [31] use bio-inspired machine learning technology to distinguish between fraudulent nodes and good nodes in the system. Some researchers identify the crucial nodes with graph convolutional networks (GCNs) [32, 33]. Though machine learning technology shows an excellent application effect on security situation assessment, the identification of crucial nodes is still mainly based on network structure. The reason is that the crucial node identification method based on network structure has strong interpretability and better generalization performance for all kinds of networks [34].


## 3. Network Construction and Virus Spreading Model

### 3.1. Network Construction Model

The wireless sensor node is limited by energy and a terrible environment, making charging and checking the sensor node difficult. Therefore, it is vital that prolong the sensor node’s life [35]. Besides, WSNs are composed of a free-networking mode, which causes topological randomness significantly. Therefore, we have proposed a random network topology generation model based on the Waxman algorithm in our former work [15]. We deploy N nodes randomly in an area with a size of S×S and then link two arbitrary nodes with pe. The probability pe of the existing a link between two nodes in a WSN is(1)peu,v=0,lu,v>rc,βexp−u,vLα,0≤lu,v≤rc,where rc is the node communication radius, lu,v is the distance between two nodes u and v, L is the longest distance between arbitrary pair of nodes, β is the adjustment parameters of average node degree, and α can adjust the ratio of long links number to short links number.


### 3.2. Virus Propagation Model

The model of virus propagation in WSNs is based on the classic SIR virus propagation model, and this model is further constructed by comprehensively considering the environment and the propagation characteristics of the virus itself [36, 37]. We proposed an improved SIR propagation model according to the effect of the link-layer listening/sleeping mechanism and limited energy in WSNs. Furthermore, we explore the effect of duty ratio in the WSNs link-layer listening/sleeping mechanism and the interaction of data translation and virus propagation in WSNs.Each node in WSNs has three different states, namely susceptible state (S), infectious state (I), and removed state (R). A node in a susceptible state can be infected and turns to be infectious state. And then, the infected node turns into be removed state. Every node can only be in one of three states at each moment. Only the R node became invalid, which means it cannot transfer the data or propagate the virus or be infected again. Let St denote the number of susceptible nodes at time t, It denote the number of infectious nodes at time t, and Rt denote the number of removed nodes at time t. At every moment the equation N=St+It+Rt is always satisfied. All node states in the networks are S when the topology of the networks is generated. At the beginning of the virus propagation, set an arbitrary node as I state. Then, this node starts propagating virus outward. The proportion of nodes in each state of the initial networks is S0=N−1, I0=1, and R0=0.Virus propagation or normal data transmission between any nodes in WSNs is subject to a link-layer mechanism. Nodes need to check the transmission channel status before data transmission or virus propagation. Nodes can transfer the data or virus only if the transmission channel is idle. The link layer in WSNs uses a listening and sleeping cycle execution mechanism to save energy. Nodes will close the listening function when it goes to sleep; simultaneously, they cannot receive or transfer data. We denote the times of listening/sleeping duty ratio asτ.According to the SIR model, everyI-state node infects the S-state neighbours in communication range rc with probability η. Subsequently, every I-state node transfers to the R-state node, which cannot normally work with probability γ. Then we can get the infection efficiency as η/γ. Without loss of generality, we can set γ=1.The three-state transition equation at timet in networks is given by(2)dStdt=−ητc1−c2δαβπrc2X2StIt,dItdt=ητc1−c2δαβπrc2X2StIt−γIt,dRtdt=γIt.LetA=τc1−c2/δαβπrc2/X2 and ρ=γ/η, and α, c1, and c2 are adjustment constant. We also can combine (2) that can be viewed as(3)dStdt=ρASt−1,dRtdt=−ρASt.At the beginning of virus spreading, the initial proportion of theS-state node is S0, and the initial proportion of the R-state node is 0. We also can get the following equations from equations (3):(4)St=S0exp−AρRt,It=N−Rt−S0exp−AρRt.


## 3.1. Network Construction Model

The wireless sensor node is limited by energy and a terrible environment, making charging and checking the sensor node difficult. Therefore, it is vital that prolong the sensor node’s life [35]. Besides, WSNs are composed of a free-networking mode, which causes topological randomness significantly. Therefore, we have proposed a random network topology generation model based on the Waxman algorithm in our former work [15]. We deploy N nodes randomly in an area with a size of S×S and then link two arbitrary nodes with pe. The probability pe of the existing a link between two nodes in a WSN is(1)peu,v=0,lu,v>rc,βexp−u,vLα,0≤lu,v≤rc,where rc is the node communication radius, lu,v is the distance between two nodes u and v, L is the longest distance between arbitrary pair of nodes, β is the adjustment parameters of average node degree, and α can adjust the ratio of long links number to short links number.


## 3.2. Virus Propagation Model

The model of virus propagation in WSNs is based on the classic SIR virus propagation model, and this model is further constructed by comprehensively considering the environment and the propagation characteristics of the virus itself [36, 37]. We proposed an improved SIR propagation model according to the effect of the link-layer listening/sleeping mechanism and limited energy in WSNs. Furthermore, we explore the effect of duty ratio in the WSNs link-layer listening/sleeping mechanism and the interaction of data translation and virus propagation in WSNs.Each node in WSNs has three different states, namely susceptible state (S), infectious state (I), and removed state (R). A node in a susceptible state can be infected and turns to be infectious state. And then, the infected node turns into be removed state. Every node can only be in one of three states at each moment. Only the R node became invalid, which means it cannot transfer the data or propagate the virus or be infected again. Let St denote the number of susceptible nodes at time t, It denote the number of infectious nodes at time t, and Rt denote the number of removed nodes at time t. At every moment the equation N=St+It+Rt is always satisfied. All node states in the networks are S when the topology of the networks is generated. At the beginning of the virus propagation, set an arbitrary node as I state. Then, this node starts propagating virus outward. The proportion of nodes in each state of the initial networks is S0=N−1, I0=1, and R0=0.Virus propagation or normal data transmission between any nodes in WSNs is subject to a link-layer mechanism. Nodes need to check the transmission channel status before data transmission or virus propagation. Nodes can transfer the data or virus only if the transmission channel is idle. The link layer in WSNs uses a listening and sleeping cycle execution mechanism to save energy. Nodes will close the listening function when it goes to sleep; simultaneously, they cannot receive or transfer data. We denote the times of listening/sleeping duty ratio asτ.According to the SIR model, everyI-state node infects the S-state neighbours in communication range rc with probability η. Subsequently, every I-state node transfers to the R-state node, which cannot normally work with probability γ. Then we can get the infection efficiency as η/γ. Without loss of generality, we can set γ=1.The three-state transition equation at timet in networks is given by(2)dStdt=−ητc1−c2δαβπrc2X2StIt,dItdt=ητc1−c2δαβπrc2X2StIt−γIt,dRtdt=γIt.LetA=τc1−c2/δαβπrc2/X2 and ρ=γ/η, and α, c1, and c2 are adjustment constant. We also can combine (2) that can be viewed as(3)dStdt=ρASt−1,dRtdt=−ρASt.At the beginning of virus spreading, the initial proportion of theS-state node is S0, and the initial proportion of the R-state node is 0. We also can get the following equations from equations (3):(4)St=S0exp−AρRt,It=N−Rt−S0exp−AρRt.


## 4. Crucial Node Identification in Virus Propagation

### 4.1. Degree, Betweenness Centrality, andk-Core

In the complex network, node important evaluation indicators based on topological structure are node degree, betweenness centrality [38], k-core decomposition [39], and so on.The degree of a node is the number of connections it has to other nodes. In WSNs, the node degreek indicates the number of direct communication relations between a node and its k neighbors.Betweenness centrality measures the centrality in a network based on the shortest paths. Betweenness centrality of nodei in network is defined as(5)bci=∑w,vlw,vilw,v,where lw,v is the number of shortest paths between an arbitrary pair of nodes w and v and lw,vi is the number of shortest paths between nodes w and v and pass through node i. Therefore, betweenness centrality is a parameter that measures the importance of a node according to the amount of information passing through it. The higher the betweenness centrality of the node in the network, the more the importance of this node as a bridge. Betweenness centrality is the characterization of nodes in the global scope of the entire network.Thek-core means the largest subgraph where nodes in the network have at least k interconnections [40]. We can get the k-core of each node starting with k=1 as follows:Step 1. Remove all nodes with degrees less thank in the network and their edges.Step 2. If some of the rest nodes remain with less than degreek, then repeat step 1; otherwise go to step 3.Step 3. If there are remaining nodes in the rest of the network, letk=k+1 and go to step 1. Or the decomposition is completed if there is no node left.Figure1 is an example of k-core decomposition. The k-core reflects the depth of the network, which is a medium-granularity scale parameter between local scale degree and global scale betweenness centrality to describe network characteristics.Figure 1
An example ofk-core.


### 4.2. Degree,k-Core, and Betweenness Centrality Based Analytical Hierarchy Process

The degree, betweenness centrality, andk-core can describe the importance of nodes on local, medium, and global scales. Therefore, we adopt a degree, betweenness centrality, and k-core based analytical hierarchy process (DBC-AHP) to rank the importance of nodes in the process of virus propagation in WSNs. Then we can locate the crucial node according to the rank list.The DBC-AHP is divided into three layers. The highest layer is the target layer, which indicates the crucial nodes in the network. The second layer is the criterion layer, including node degree,k-core, and betweenness centrality of a node. The bottom layer is the object layer, corresponding to each node in the networks. Figure 2 illustrates the diagram of DBC-AHP.Figure 2
The hierarchical model of DBC-AHP, which is based on node degree, betweenness centrality, andk-core.In the analytical hierarchy process (AHP) [41], the relative importance comparison scales of each pair of criteria are shown in Table 1 [42]. In complex networks, the relative importance of node degree, k-core evaluation, and betweenness centrality indicators are as follows: compared with the node degree index, the betweenness centrality is the most important criterion, and k-core is slightly important [43–45]. In the criterion layer, we denote the three criteria of degree, k-core, and betweenness centrality as c1, c2, and c3, respectively, so that indicators set is C=c1,c2,c3. Then, we can structure a 3×3 pairwise comparison matrix as(6)A=aij=c1c2c3c1c2c3117137153151.Table 1
Parameter details table.
Scale valueDefinition1Ifi-th criterion and j-th criterion are equally important3Ifi-th criterion is slightly more important than j-th criterion5Ifi-th criterion is more important than j-th criterion7Ifi-th criterion is more important than j-th criterion9Ifi-th criterion is perfectly more important than j-th criterion2, 4, 6, 8Scale value of intermediate stateaij=1/ajiThe importance of indexi to index j is equal to the reciprocal of the importance of index j to index iWe normalize the columns of matrixA as(7)A=aij=0.0910.1060.0530.6360.7450.7890.2730.1490.158.Then we get the sum of each row and normalized it as(8)w=0.083,0.723,0.193T.WithAw=λw, we can get the largest eigenvalues λmax=3.066. And then, we can get the consistency of the judgment as C.I.=λmax−n/n−1=0.033, C.R.=C.I./R.I.=0.033/0.58<0.1 and get R.I.=0.58 by inquiring mean random consistency table. Through mentioned above, the judgment matrix satisfied the consistency condition. Eventually, the final weights of the three indicators are w=0.083,0.723,0.193T.If there areN nodes in the WSN, the set of nodes in the object layer can be denoted as A=a1,a2,…,aN. Therefore, all the pairs of the j-th criterion cj and the i-th node ai composed of a judgment matrix, which is denoted as(9)X=a1s1a1s2a1s3a2s1a2s2a2s3⋯⋯⋯aNs1aNs2aNs3.Eachaisj can be normalized as(10)rij=aisj∑i=11000aisj,i=1,2,…,N;j=1,2,3,and then get the comprehensive importance of each node under these three parameters according to the weight of each index as judgment matrixR=rijN×3. After that, get the rank of the importance of each node in descending order according to the comprehensive. Finally, find the crucial nodes according to this rank list.


### 4.3. Time Complexity of DBC-AHP

The DBC-AHP can be divided into two steps: the first step is to calculate the values of degree,k-core, and betweenness centrality for each node. Then the second step is to sort the node importance according to the AHP.For the first step, we analyze the time complexity of degree,k-core, and betweenness centrality of nodes. The calculation of node degree is straightforward, and its time complexity is related to the number of nodes n, that is, the complexity is OlogN [46]. The k-core has a low computational complexity with OM [46], where M stands for the links in the network. According to a fast method of calculating the betweenness centrality, the complexity of the unweighted graph is OMN [47]. In the first step, it is obvious that the stage with the highest time complexity is the calculating of betweenness centrality. For a network of average degree k, the number of edges is M=kM/2. Therefore, the time complexity of the first step is determined by betweenness centrality with ON2.In the second step, the time complexity of AHP isOminNC2,N2C [48], where M stands for the number of nodes in the object layer and C stands for the number of criteria. In our application, the criteria is a constant C=3, which refers to degree, k-core, and betweenness centrality. Therefore, the time complexity of AHP in our application is ON.Finally, considering the time complexity of the first and second steps, it can be found that the calculation of betweenness centrality has the highest time complexity. Therefore, the time complexity of DBC-AHP isON2.


## 4.1. Degree, Betweenness Centrality, andk-Core

In the complex network, node important evaluation indicators based on topological structure are node degree, betweenness centrality [38], k-core decomposition [39], and so on.The degree of a node is the number of connections it has to other nodes. In WSNs, the node degreek indicates the number of direct communication relations between a node and its k neighbors.Betweenness centrality measures the centrality in a network based on the shortest paths. Betweenness centrality of nodei in network is defined as(5)bci=∑w,vlw,vilw,v,where lw,v is the number of shortest paths between an arbitrary pair of nodes w and v and lw,vi is the number of shortest paths between nodes w and v and pass through node i. Therefore, betweenness centrality is a parameter that measures the importance of a node according to the amount of information passing through it. The higher the betweenness centrality of the node in the network, the more the importance of this node as a bridge. Betweenness centrality is the characterization of nodes in the global scope of the entire network.Thek-core means the largest subgraph where nodes in the network have at least k interconnections [40]. We can get the k-core of each node starting with k=1 as follows:Step 1. Remove all nodes with degrees less thank in the network and their edges.Step 2. If some of the rest nodes remain with less than degreek, then repeat step 1; otherwise go to step 3.Step 3. If there are remaining nodes in the rest of the network, letk=k+1 and go to step 1. Or the decomposition is completed if there is no node left.Figure1 is an example of k-core decomposition. The k-core reflects the depth of the network, which is a medium-granularity scale parameter between local scale degree and global scale betweenness centrality to describe network characteristics.Figure 1
An example ofk-core.


## 4.2. Degree,k-Core, and Betweenness Centrality Based Analytical Hierarchy Process

The degree, betweenness centrality, andk-core can describe the importance of nodes on local, medium, and global scales. Therefore, we adopt a degree, betweenness centrality, and k-core based analytical hierarchy process (DBC-AHP) to rank the importance of nodes in the process of virus propagation in WSNs. Then we can locate the crucial node according to the rank list.The DBC-AHP is divided into three layers. The highest layer is the target layer, which indicates the crucial nodes in the network. The second layer is the criterion layer, including node degree,k-core, and betweenness centrality of a node. The bottom layer is the object layer, corresponding to each node in the networks. Figure 2 illustrates the diagram of DBC-AHP.Figure 2
The hierarchical model of DBC-AHP, which is based on node degree, betweenness centrality, andk-core.In the analytical hierarchy process (AHP) [41], the relative importance comparison scales of each pair of criteria are shown in Table 1 [42]. In complex networks, the relative importance of node degree, k-core evaluation, and betweenness centrality indicators are as follows: compared with the node degree index, the betweenness centrality is the most important criterion, and k-core is slightly important [43–45]. In the criterion layer, we denote the three criteria of degree, k-core, and betweenness centrality as c1, c2, and c3, respectively, so that indicators set is C=c1,c2,c3. Then, we can structure a 3×3 pairwise comparison matrix as(6)A=aij=c1c2c3c1c2c3117137153151.Table 1
Parameter details table.
Scale valueDefinition1Ifi-th criterion and j-th criterion are equally important3Ifi-th criterion is slightly more important than j-th criterion5Ifi-th criterion is more important than j-th criterion7Ifi-th criterion is more important than j-th criterion9Ifi-th criterion is perfectly more important than j-th criterion2, 4, 6, 8Scale value of intermediate stateaij=1/ajiThe importance of indexi to index j is equal to the reciprocal of the importance of index j to index iWe normalize the columns of matrixA as(7)A=aij=0.0910.1060.0530.6360.7450.7890.2730.1490.158.Then we get the sum of each row and normalized it as(8)w=0.083,0.723,0.193T.WithAw=λw, we can get the largest eigenvalues λmax=3.066. And then, we can get the consistency of the judgment as C.I.=λmax−n/n−1=0.033, C.R.=C.I./R.I.=0.033/0.58<0.1 and get R.I.=0.58 by inquiring mean random consistency table. Through mentioned above, the judgment matrix satisfied the consistency condition. Eventually, the final weights of the three indicators are w=0.083,0.723,0.193T.If there areN nodes in the WSN, the set of nodes in the object layer can be denoted as A=a1,a2,…,aN. Therefore, all the pairs of the j-th criterion cj and the i-th node ai composed of a judgment matrix, which is denoted as(9)X=a1s1a1s2a1s3a2s1a2s2a2s3⋯⋯⋯aNs1aNs2aNs3.Eachaisj can be normalized as(10)rij=aisj∑i=11000aisj,i=1,2,…,N;j=1,2,3,and then get the comprehensive importance of each node under these three parameters according to the weight of each index as judgment matrixR=rijN×3. After that, get the rank of the importance of each node in descending order according to the comprehensive. Finally, find the crucial nodes according to this rank list.


## 4.3. Time Complexity of DBC-AHP

The DBC-AHP can be divided into two steps: the first step is to calculate the values of degree,k-core, and betweenness centrality for each node. Then the second step is to sort the node importance according to the AHP.For the first step, we analyze the time complexity of degree,k-core, and betweenness centrality of nodes. The calculation of node degree is straightforward, and its time complexity is related to the number of nodes n, that is, the complexity is OlogN [46]. The k-core has a low computational complexity with OM [46], where M stands for the links in the network. According to a fast method of calculating the betweenness centrality, the complexity of the unweighted graph is OMN [47]. In the first step, it is obvious that the stage with the highest time complexity is the calculating of betweenness centrality. For a network of average degree k, the number of edges is M=kM/2. Therefore, the time complexity of the first step is determined by betweenness centrality with ON2.In the second step, the time complexity of AHP isOminNC2,N2C [48], where M stands for the number of nodes in the object layer and C stands for the number of criteria. In our application, the criteria is a constant C=3, which refers to degree, k-core, and betweenness centrality. Therefore, the time complexity of AHP in our application is ON.Finally, considering the time complexity of the first and second steps, it can be found that the calculation of betweenness centrality has the highest time complexity. Therefore, the time complexity of DBC-AHP isON2.


## 5. Numerical Results and Analysis

### 5.1. Comparison of Four Virus Control Mechanisms in WSNs

We verify the efficiency of DBC-AHP by comparing virus propagation processes with/without various control mechanisms. Referring to our previous work on the research of virus propagation process in WSNs [15], assuming N=1000 nodes are randomly distributed in a 100×100 area, α=0.87, rc=7, the listening/sleeping duty ratio of link-layer is τ=0.6, and the infection probability η=0.6 in this network topology. In our former work, η=0.6 is the threshold for full virus outbreak in our network structure model, which means the virus cannot infect the entire network when η<0.6 and only can infect the whole network when η≤0.6. The simulation was carried out in MATLAB with the graph theory framework MatlabBGL.We add four virus control mechanisms to strengthen the immune ability of nodes in WSNs. From the perspective of a complex network, the immunity of a node is equivalent to the deletion of the node or the deletion of the edge of this node [49]. We contrastively analyze the effects of four virus control mechanisms based on node degree, betweenness centrality, k-core, and DBC-AHP separately for crucial node immunization. Taking the DBC-AHP index as an example, we rank the nodes in descending order and immunize them in proportion from high to low. Moreover, we also consider the listening/sleeping mechanism in MAC might affect the virus control process. The virus control mechanism comparison process is as follows: at the beginning, we add four types of virus control mechanisms in the virus propagation in WSNs. Then, we analyze the effect of four types of virus control mechanisms with the same node proportion by comparing the proportion of the R-state node after the virus propagation is over and the network is stable. The simulation results are illustrated in Figures 3 and 4.Figure 3
The comparison of the virus control mechanism without the listening/sleeping in MAC.Figure 4
The comparison of the virus control mechanism with the listening/sleeping in MAC.The virus control mechanism aims to restrain the virus propagation and decrease the number ofI-state node. The less of the infectious node means a better inhibitory effect of the virus; meanwhile, the curve is lower. We realize the four virus control mechanisms all can protect the node and improve the antiviral property of the network from Figures 3 and 4. However, the inhibitory effects of the four different virus control mechanisms are disparate. From the simulation result, the inhibitory effect can be divided into two categories. One group is the virus control mechanisms based on the node degree and k-core decomposition; the other group is based on the betweenness centrality and the DBC-AHP algorithm. The inhibitory effects of the former group are better than those of the latter group. This phenomenon indicates that global information is essential to inhibit the spread of the virus. However, local information can also take some effects supplementarily. As represented in Figure 4, the scales of virus propagation reduce with the listening/sleeping mechanism of the link layer. The inhibitory effect based on the betweenness centrality mechanism is slightly weak from that of the DBC-AHP mechanism. However, the effects of both are better than the other two methods. Whether with or without the listening/sleeping mechanism, the inhibitory effect based on the DBC-AHP algorithm exceeds the other three mechanisms.According to the phenomena shown in Figures3 and 4, the DBC-AHP algorithm has the best inhibition effect on virus propagation. Therefore, in the remaining part, we will discuss the influence of other factors on the virus propagation inhibition effects with the DBC-AHP algorithm.


### 5.2. Virus Propagation with the Control Mechanism of DBC-AHP

In order to understand the obstruction of virus control mechanism DBC-AHP to virus propagation comprehensively, we explore the dynamic processes with the changes ofk, rc, η, and the listening/sleeping mechanism of the link layer. Following is the default setting of network and virus propagation models: there are N=1000 nodes distributed randomly in 100×100 area with α=0.87 and β=0.7.


#### 5.2.1. Average Node Degreek

We observed the virus propagation processes with variousk=7,10,13 and with or without DBC-AHP. Furthermore, we add the listening/sleeping mechanism of the link layer with τ=0.6 for comparison. The results of the simulation are shown in Figures 5 and 6.Figure 5
The effect of node degree on the virus control mechanism without the listening/sleeping mechanism of the link layer.Figure 6
The effect of node degree on the virus control mechanism with the listening/sleeping mechanism of the link layer.As shown in Figures5 and 6, the DBC-AHP can defend the virus effectively, especially in the network with listening/sleeping in MAC. Furthermore, the inhibition effect of DBC-AHP is inversely proportional to the average node degree k. The smaller k is, the less proportion of removed node R becomes, and the inhibition of the mechanism gets more obvious.


#### 5.2.2. The Communication Radius of Nodesrc

The communication radiusrc of nodes is one of the influencing factors in virus propagation. We set rc=6,7,8 with or without DBC-AHP. Furthermore, we add the listening/sleeping mechanism of the link layer with τ=0.6 for comparison. The results of the simulation are shown in Figures 7 and 8.Figure 7
The effect of communication radius of nodes on virus control mechanism without the listening/sleeping mechanism.Figure 8
The effect of communication radius of nodes on virus control mechanism with the listening/sleeping mechanism.We found that DBC-AHP can inhibit the virus propagation process with variousrc. We observed that the less the communication radius rc is, the less the number of infectious nodes becomes, and the inhibition of the mechanism gets stronger. Furthermore, the inhibitions of virus propagation are stronger with the listening/sleeping in MAC. Therefore, the DBC-AHP will be more effective in WSNs closer to the actual situation.


#### 5.2.3. The Probability of Virus Infectionη

The probability of virus infectionη reflects the ability of the virus. Different values of η refer to different kinds of the virus. In this part, we verify the inhibition effect of DBC-AHP on viruses with different infection probabilities. We set η=0.4,0.6,08 with or without DBC-AHP. Furthermore, we add the listening/sleeping mechanism of the link layer with τ=0.6 for comparison. The results of the simulation are shown in Figures 9 and 10.Figure 9
The effect of the probability of infection on the virus control mechanism without the listening/sleeping mechanism.Figure 10
The effect of the probability of infection on the virus control mechanism with the listening/sleeping mechanism.As shown in Figures9 and 10, DBC-AHP limits the speed of virus infection and the scale of infectious nodes with or without the listening/sleeping mechanism, which is already verified. The fewer the η is, the less the number of infectious nodes become, and the inhibition of DBC-AHP is much better. Figures 9 and 10 show the inhibition effects of DBC-AHP with and without listening/sleeping mechanism. The results show that using DBC-AHP with listening/sleeping mechanism can effectively block the spread of virus. This indicates that the collective effect of DBC-AHP and the listening/sleeping mechanism in MAC would make the network safer.


### 5.3. Appling DBC-AHP in EDGF Networks

Furthermore, we verify the effectiveness of DBC-AHP in the network generated with the empirical data set generation framework (EDGF) without MAC [50]. The parameters of the network are grid-based deployment with node number N=160, seed value X0=43, constants a=3.359886 and c=1.902161, transmission range TR=15, and deployment area 100×100.Figure11 shows infection scale under different infection probability with immune rate values of 5%, 10%, 25%, and 50% in EDGF networks. The immune strategy protects the nodes with large values of average degree, k-core, betweenness centrality, and DBC-AHP. In Figures 11(a)–11(d), the red line is the baseline without immune nodes. For example, in Figure 11(a), 95% of nodes are not protected by the virus control mechanism of immune, so the scale of virus propagation will not exceed 95% of nodes. In subfigures 11(a)–11(d), we found that when the proportion of immune nodes increases, the scale of virus infection will continue to decrease with the same value of infection probability η. Under various immune proportions, the protection results of DBC-AHP were similar to those of betweenness centrality, and the results were the best. The control mechanism of average degree has the worst effect. Under the DBC-AHP and betweenness centrality control mechanisms in Figure 11(b), even if η=1, the virus still cannot infect all nodes in the network. The reason is that after those nodes based on DBC-AHP and betweenness centrality are protected, the network connectivity for virus propagation has been split. Therefore, there is always some nodes that will survive in this situation. In Figures 11(c) and 11(d), even if η=1, the virus cannot infect all nodes under all four control mechanisms. In general, DBC-AHP has a good effect on identifying the crucial nodes in the virus propagation.Figure 11
Infection scale under different infection probability with various immune rates in EDGF networks: (a) immune node, 5%; (b) immune node, 10%; (c) immune node, 25%; and (d) immune node, 50%.
(a)(b)(c)(d)


## 5.1. Comparison of Four Virus Control Mechanisms in WSNs

We verify the efficiency of DBC-AHP by comparing virus propagation processes with/without various control mechanisms. Referring to our previous work on the research of virus propagation process in WSNs [15], assuming N=1000 nodes are randomly distributed in a 100×100 area, α=0.87, rc=7, the listening/sleeping duty ratio of link-layer is τ=0.6, and the infection probability η=0.6 in this network topology. In our former work, η=0.6 is the threshold for full virus outbreak in our network structure model, which means the virus cannot infect the entire network when η<0.6 and only can infect the whole network when η≤0.6. The simulation was carried out in MATLAB with the graph theory framework MatlabBGL.We add four virus control mechanisms to strengthen the immune ability of nodes in WSNs. From the perspective of a complex network, the immunity of a node is equivalent to the deletion of the node or the deletion of the edge of this node [49]. We contrastively analyze the effects of four virus control mechanisms based on node degree, betweenness centrality, k-core, and DBC-AHP separately for crucial node immunization. Taking the DBC-AHP index as an example, we rank the nodes in descending order and immunize them in proportion from high to low. Moreover, we also consider the listening/sleeping mechanism in MAC might affect the virus control process. The virus control mechanism comparison process is as follows: at the beginning, we add four types of virus control mechanisms in the virus propagation in WSNs. Then, we analyze the effect of four types of virus control mechanisms with the same node proportion by comparing the proportion of the R-state node after the virus propagation is over and the network is stable. The simulation results are illustrated in Figures 3 and 4.Figure 3
The comparison of the virus control mechanism without the listening/sleeping in MAC.Figure 4
The comparison of the virus control mechanism with the listening/sleeping in MAC.The virus control mechanism aims to restrain the virus propagation and decrease the number ofI-state node. The less of the infectious node means a better inhibitory effect of the virus; meanwhile, the curve is lower. We realize the four virus control mechanisms all can protect the node and improve the antiviral property of the network from Figures 3 and 4. However, the inhibitory effects of the four different virus control mechanisms are disparate. From the simulation result, the inhibitory effect can be divided into two categories. One group is the virus control mechanisms based on the node degree and k-core decomposition; the other group is based on the betweenness centrality and the DBC-AHP algorithm. The inhibitory effects of the former group are better than those of the latter group. This phenomenon indicates that global information is essential to inhibit the spread of the virus. However, local information can also take some effects supplementarily. As represented in Figure 4, the scales of virus propagation reduce with the listening/sleeping mechanism of the link layer. The inhibitory effect based on the betweenness centrality mechanism is slightly weak from that of the DBC-AHP mechanism. However, the effects of both are better than the other two methods. Whether with or without the listening/sleeping mechanism, the inhibitory effect based on the DBC-AHP algorithm exceeds the other three mechanisms.According to the phenomena shown in Figures3 and 4, the DBC-AHP algorithm has the best inhibition effect on virus propagation. Therefore, in the remaining part, we will discuss the influence of other factors on the virus propagation inhibition effects with the DBC-AHP algorithm.


## 5.2. Virus Propagation with the Control Mechanism of DBC-AHP

In order to understand the obstruction of virus control mechanism DBC-AHP to virus propagation comprehensively, we explore the dynamic processes with the changes ofk, rc, η, and the listening/sleeping mechanism of the link layer. Following is the default setting of network and virus propagation models: there are N=1000 nodes distributed randomly in 100×100 area with α=0.87 and β=0.7.


### 5.2.1. Average Node Degreek

We observed the virus propagation processes with variousk=7,10,13 and with or without DBC-AHP. Furthermore, we add the listening/sleeping mechanism of the link layer with τ=0.6 for comparison. The results of the simulation are shown in Figures 5 and 6.Figure 5
The effect of node degree on the virus control mechanism without the listening/sleeping mechanism of the link layer.Figure 6
The effect of node degree on the virus control mechanism with the listening/sleeping mechanism of the link layer.As shown in Figures5 and 6, the DBC-AHP can defend the virus effectively, especially in the network with listening/sleeping in MAC. Furthermore, the inhibition effect of DBC-AHP is inversely proportional to the average node degree k. The smaller k is, the less proportion of removed node R becomes, and the inhibition of the mechanism gets more obvious.


### 5.2.2. The Communication Radius of Nodesrc

The communication radiusrc of nodes is one of the influencing factors in virus propagation. We set rc=6,7,8 with or without DBC-AHP. Furthermore, we add the listening/sleeping mechanism of the link layer with τ=0.6 for comparison. The results of the simulation are shown in Figures 7 and 8.Figure 7
The effect of communication radius of nodes on virus control mechanism without the listening/sleeping mechanism.Figure 8
The effect of communication radius of nodes on virus control mechanism with the listening/sleeping mechanism.We found that DBC-AHP can inhibit the virus propagation process with variousrc. We observed that the less the communication radius rc is, the less the number of infectious nodes becomes, and the inhibition of the mechanism gets stronger. Furthermore, the inhibitions of virus propagation are stronger with the listening/sleeping in MAC. Therefore, the DBC-AHP will be more effective in WSNs closer to the actual situation.


### 5.2.3. The Probability of Virus Infectionη

The probability of virus infectionη reflects the ability of the virus. Different values of η refer to different kinds of the virus. In this part, we verify the inhibition effect of DBC-AHP on viruses with different infection probabilities. We set η=0.4,0.6,08 with or without DBC-AHP. Furthermore, we add the listening/sleeping mechanism of the link layer with τ=0.6 for comparison. The results of the simulation are shown in Figures 9 and 10.Figure 9
The effect of the probability of infection on the virus control mechanism without the listening/sleeping mechanism.Figure 10
The effect of the probability of infection on the virus control mechanism with the listening/sleeping mechanism.As shown in Figures9 and 10, DBC-AHP limits the speed of virus infection and the scale of infectious nodes with or without the listening/sleeping mechanism, which is already verified. The fewer the η is, the less the number of infectious nodes become, and the inhibition of DBC-AHP is much better. Figures 9 and 10 show the inhibition effects of DBC-AHP with and without listening/sleeping mechanism. The results show that using DBC-AHP with listening/sleeping mechanism can effectively block the spread of virus. This indicates that the collective effect of DBC-AHP and the listening/sleeping mechanism in MAC would make the network safer.


## 5.2.1. Average Node Degreek

We observed the virus propagation processes with variousk=7,10,13 and with or without DBC-AHP. Furthermore, we add the listening/sleeping mechanism of the link layer with τ=0.6 for comparison. The results of the simulation are shown in Figures 5 and 6.Figure 5
The effect of node degree on the virus control mechanism without the listening/sleeping mechanism of the link layer.Figure 6
The effect of node degree on the virus control mechanism with the listening/sleeping mechanism of the link layer.As shown in Figures5 and 6, the DBC-AHP can defend the virus effectively, especially in the network with listening/sleeping in MAC. Furthermore, the inhibition effect of DBC-AHP is inversely proportional to the average node degree k. The smaller k is, the less proportion of removed node R becomes, and the inhibition of the mechanism gets more obvious.


## 5.2.2. The Communication Radius of Nodesrc

The communication radiusrc of nodes is one of the influencing factors in virus propagation. We set rc=6,7,8 with or without DBC-AHP. Furthermore, we add the listening/sleeping mechanism of the link layer with τ=0.6 for comparison. The results of the simulation are shown in Figures 7 and 8.Figure 7
The effect of communication radius of nodes on virus control mechanism without the listening/sleeping mechanism.Figure 8
The effect of communication radius of nodes on virus control mechanism with the listening/sleeping mechanism.We found that DBC-AHP can inhibit the virus propagation process with variousrc. We observed that the less the communication radius rc is, the less the number of infectious nodes becomes, and the inhibition of the mechanism gets stronger. Furthermore, the inhibitions of virus propagation are stronger with the listening/sleeping in MAC. Therefore, the DBC-AHP will be more effective in WSNs closer to the actual situation.


## 5.2.3. The Probability of Virus Infectionη

The probability of virus infectionη reflects the ability of the virus. Different values of η refer to different kinds of the virus. In this part, we verify the inhibition effect of DBC-AHP on viruses with different infection probabilities. We set η=0.4,0.6,08 with or without DBC-AHP. Furthermore, we add the listening/sleeping mechanism of the link layer with τ=0.6 for comparison. The results of the simulation are shown in Figures 9 and 10.Figure 9
The effect of the probability of infection on the virus control mechanism without the listening/sleeping mechanism.Figure 10
The effect of the probability of infection on the virus control mechanism with the listening/sleeping mechanism.As shown in Figures9 and 10, DBC-AHP limits the speed of virus infection and the scale of infectious nodes with or without the listening/sleeping mechanism, which is already verified. The fewer the η is, the less the number of infectious nodes become, and the inhibition of DBC-AHP is much better. Figures 9 and 10 show the inhibition effects of DBC-AHP with and without listening/sleeping mechanism. The results show that using DBC-AHP with listening/sleeping mechanism can effectively block the spread of virus. This indicates that the collective effect of DBC-AHP and the listening/sleeping mechanism in MAC would make the network safer.


## 5.3. Appling DBC-AHP in EDGF Networks

Furthermore, we verify the effectiveness of DBC-AHP in the network generated with the empirical data set generation framework (EDGF) without MAC [50]. The parameters of the network are grid-based deployment with node number N=160, seed value X0=43, constants a=3.359886 and c=1.902161, transmission range TR=15, and deployment area 100×100.Figure11 shows infection scale under different infection probability with immune rate values of 5%, 10%, 25%, and 50% in EDGF networks. The immune strategy protects the nodes with large values of average degree, k-core, betweenness centrality, and DBC-AHP. In Figures 11(a)–11(d), the red line is the baseline without immune nodes. For example, in Figure 11(a), 95% of nodes are not protected by the virus control mechanism of immune, so the scale of virus propagation will not exceed 95% of nodes. In subfigures 11(a)–11(d), we found that when the proportion of immune nodes increases, the scale of virus infection will continue to decrease with the same value of infection probability η. Under various immune proportions, the protection results of DBC-AHP were similar to those of betweenness centrality, and the results were the best. The control mechanism of average degree has the worst effect. Under the DBC-AHP and betweenness centrality control mechanisms in Figure 11(b), even if η=1, the virus still cannot infect all nodes in the network. The reason is that after those nodes based on DBC-AHP and betweenness centrality are protected, the network connectivity for virus propagation has been split. Therefore, there is always some nodes that will survive in this situation. In Figures 11(c) and 11(d), even if η=1, the virus cannot infect all nodes under all four control mechanisms. In general, DBC-AHP has a good effect on identifying the crucial nodes in the virus propagation.Figure 11
Infection scale under different infection probability with various immune rates in EDGF networks: (a) immune node, 5%; (b) immune node, 10%; (c) immune node, 25%; and (d) immune node, 50%.
(a)(b)(c)(d)


## 6. Conclusion

This paper proposes a virus control mechanism for DBC-AHP in WSNs. In DBC-AHP, we combine the node degree, betweenness centrality, andk-core comprehensively with AHP and get the rank of the node’s importance. After implementing immune protection for crucial nodes, we finally reduce the speed and the scale of virus infection. DBC-AHP shows a better effect than a single indicator method in the context of virus defense in WSNs.In future work, we can carry out some extended research on the virus control mechanism of WSNs. The DBC-AHP is highly dependent on the global index of betweenness centrality, and the time complexity is high. Therefore, we can find an alternative to betweenness centrality, such as the technology based on information entropy and so on. There are also some other virus control mechanisms in practical applications, such as routing-based mechanisms. Future research can start from the control mechanism and explore the inhibitory effects of other safety measures and other immune mechanisms on the spread of the virus.



---

*Source: 5719141-2022-05-17.xml*