Abstract

In wireless sensor networks, network security against virus propagation is one of the challenges with the applications. In severe cases, the network system may become paralyzed. In order to study the process of virus propagation in wireless sensor networks with the media access control mechanism, this paper uses the susceptible-infectious-removed (SIR) model to analyze the spreading process. It provides a theoretical basis for the development of virus immune mechanisms to solve network virus attack hidden dangers. The research shows that the media access control (MAC) mechanism in the wireless sensor network can inhibit the process of virus propagation, reduce the network virus propagating speed, and decrease the scale of infected nodes. The listen/sleep duty cycle of this mechanism will affect the suppression effect of virus propagation. The smaller the listen/sleep duty cycle, the stronger the suppression effect. Energy consumption has a peak value under specific infection probability. Meanwhile, it is also found that the spreading scale of the virus in wireless sensor networks can be effectively inhibited by the MAC mechanism.

1. Introduction

Viruses and cyber-attacks frequently exposed to computer networks have caused significant losses to human society. A network virus refers to a group of computer instructions or programs that can damage data or destroy device functions and spread through computer networks such as the Internet or wireless communication networks [1]. Different from the so-called viruses in biology, a network virus is created artificially and implanted malignantly but does not occur naturally. A network virus can self-replicate and self-transmit without human intervention, can trigger and lurk, and at the same time can have strong destructive ability and great harm [2]. For example, the worm known as the “beauty killer” once caused a world-renowned Internet paralysis event [3]. The Chernobyl virus (also known as CIH or Spacefiller) damages the essential input and output system of the computer by infecting the executable file of the system, making the machine unable to start usually [4]. Wireless sensor networks, which are composed of a large number of low power consumption sensor nodes through wireless communication technology, are a kind of computer networks [5] and are also threatened by network virus. Some researchers have found that the topology of wireless sensor networks is relatively complex and vulnerable to virus attack [6], because wireless sensor networks are constrained by space, energy, channel bandwidth, and other conditions [7]. Furthermore, the resources and power of the nodes in the wireless sensor networks are limited. Once a large number of nodes are infected, it is easy to become invalid due to the exhaustion of resources or energy. The failure of a large number of nodes will increase the average path length of the network, reduce network performance, lead to disconnection of this network, and stop the service of the system. Therefore, the threat of the viruses in the wireless sensor networks is more vulnerable than the traditional wired networks [8, 9].

However, in essence, wireless sensor network virus propagation is similar to traditional virus propagation in other computer networks. Some studies have found that worms, malignant virus, and other viruses can use the vulnerability of the communication protocol or mechanism loopholes to expand communication by web pages, emails, Bluetooth, WIFI, etc. [10]. Besides, some studies have found that the virus can intensify the transmission process in mobile networks by the dynamic movement of devices [11]. There are many existing pieces of research on the dynamic process of virus propagation in wireless sensor networks. But because the wireless access layer of wireless sensor networks (WSNs) has a relatively new view on the influence of virus propagation, there are few relevant studies and few references on the impact of wireless access layer in the relevant literature. So, it is necessary to do further research on this subject.

In this paper, we intend to study the virus propagation process in the wireless sensor networks by using the susceptible-infectious-removed (SIR) propagation model. We mainly consider the influence of the media access control (MAC) mechanism on virus propagation in wireless sensor networks with uniform random distribution and limited communication capacity. A random network topology model with a limited communication range is established based on the Waxman algorithm, and the SIR virus propagation model is developed on this basis. We considered the effect of the MAC mechanism on the virus infection process in wireless sensor networks. The research results reveal the pattern of virus propagation in wireless sensor networks, which can provide a basis for improving the security of wireless sensor networks.

The rest of this paper is structured as follows: Section 2 introduces the current research on virus propagation in wireless sensor networks and the basic principle of the influence of MAC mechanism on virus propagation in wireless sensor networks. Section 3 proposes an improved SIR model. Section 4 conducts this improved SIR simulation. Section 5 analyzes the experimental results. Section 6 makes a conclusion and outlook.

With the continuous expansion of wireless sensor networks in the fields of industry, agriculture, military, etc., the importance of security issues has become increasingly prominent, among which the wireless sensor network virus attack has attracted much attention. Many researchers have participated in the study of virus propagation in wireless sensor networks. In the research process, some researchers will consider the network application scenarios or the environment. Some researchers will consider network constraints, such as communication range, node energy, etc. Some researchers have also enhanced the security and robustness of the network by establishing devices and data trust system in networks [12, 13] and proposed trust evaluation mechanisms [14]. Some researchers will pay attention to the applicable model of virus propagation in wireless sensor networks, such as the susceptible-infectious (SI) model, SIR model, etc.

The SIR model is one of these typical virus propagation models. Due to the moderate complexity of the SIR model, it can better characterize the dynamical state of nodes in virus propagation, so it has a specific model reference value. Besides, there are many versions of improved SIR models in wireless networks, which are modified or extended based on the SIR model. Hu et al. [15] analyzed the dynamic propagation characteristics of wireless sensor networks with regional detection mechanisms using a two-dimensional cellular automata-based SIR model. They found that the regional detection mechanism can not only regionalize the wireless sensor network but also prevent the malware propagation in the wireless sensor network by implementing the detection strategy. The regional detection mechanism can reduce the risk of virus outbreaks. Tang et al. [16] used the susceptibility-infection-recovery-maintenance (SIR-M) model to describe the dynamic process of the malicious viruses spreading from a single node to the entire network in WSN. Zhou et al. [17] modified the traditional SIR model according to low energy adaptive clustering hierarchy (LEACH) protocol communication rules, formed a new SIR model, and used it to describe the virus propagation dynamics in IPv6 wireless sensor networks. Feng et al. [18] used a SIRS model as considering the communication radius and node distribution density to capture the space-time dynamics of the worm propagation process. Wang et al. [19] analyzed the propagating dynamics of worms in wireless sensor networks by introducing the death node state and susceptible-infectious-removed-susceptible (SIRS) mechanism that cannot normally work due to energy depletion based on the traditional SIR model. Srivastava et al. [20] used the susceptibility-infection-dead-recovery (SIDR) propagation model that introduced the concept of death node to discuss the propagating dynamics of digital worms in wireless sensor networks with limited node energy. Singh et al. [21] introduced exposure state and inoculation state based on the SIR model to study the transmission behavior of a digital worm virus. By considering the sleep mechanism of WSN, Upadhyay et al. [22] developed an e-epidemic energy-efficient susceptible-infected-terminally infected-recovered (SITR) model to study and analyze worm attack behavior in wireless sensor networks using cyrtoid-type functional response. They obtain the stability and directionality of the Hopf bifurcation of the local equilibrium point by using the central accessible theorem analysis.

As far as we know, the original model and improved version of SIR are applicable to not only WSN networks, but also other complex networks, and the scope of application is quite extensive. For example, Xiang et al. [23] used SIR model to simulate emotion contagion in dynamic crowd aggregation process, and they found that the SIR model can effectively improve the fidelity of emotional interaction processes and crowd aggregation. Lamb et al. [24] described the SIR stochastic epidemic model of computer virus by combining the time-Markov chain of the minimum traffic model and the control of virus propagation. They applied the model to the scale-free networks to determine how the free flow and traffic flow in the crowded phase affect virus propagation. Androulidakis et al. [25] used the susceptible-exposed-infectious-removed (SEIR) model to simulate the infection of malware in the Private Branch eXchanges (PBX) network and monitor their development. And the results show that two days are sufficient for the malware diffusion. No matter which researchers use virus propagation model, this model is selected according to the principle of optimal and most suitable, which can adequately reflect the characteristics of virus propagation in a specific wireless sensor network structure.

In the existing studies on virus propagation in wireless sensor networks, most researches concern the influence of network structure or node state changes on virus propagation. Some other researchers will also pay attention to the impact of the MAC, and they will add MAC mechanisms to the study on virus propagation in wireless sensor networks. MAC mechanism, also known as the media access mechanism, is applied to the data link layer. In wireless sensor networks, it is mainly used to solve network channel disputes and allocate channel access, and wireless communication resources [26]. However, in wireless sensor networks, viruses generally function in the application layer, so virus propagation is restricted by the MAC layer, the same as other standard data transmissions [27]. Li et al. [28] pointed out that MAC protocol is a very complicated protocol, which can control the entry channel of nodes and influence the number of infected nodes at the time of t to influence the spread of network virus. Wang et al. [29] showed that the channel monitoring of the MAC mechanism can limit the communication between nodes and inhibit the propagation of network virus by reducing the density of network infected nodes. Research shows that the smaller the duty cycle of sleep/listening, the better the suppression effect of network virus propagation. Also, the network structure will affect virus propagation. For example, the network node distribution strategy with local clustering features will increase the virus propagation speed. From the current research status, few studies consider the influence of the MAC mechanism in the study of wireless sensor network virus propagation. However, the MAC mechanism is often used in wireless sensor network communication and has a far-reaching influence on network virus propagation. Therefore, it is necessary to consider the MAC mechanism in the study of wireless sensor network virus propagation.

In this paper, wireless sensor networks with uniform and random distribution of network nodes are established by using the Waxman model. It is assumed that the sensor nodes in the network have a limited communication radius, and an improved version of the SIR model is used to study the propagation of viruses in these networks. At the same time, we use the MAC mechanism to avoid channel disputes in wireless sensor networks in the process of virus propagation. In the wireless sensor network, the MAC mechanism can reasonably allocate the right to use the channel, reducing and avoiding channel collision and channel interference. Meanwhile, the role of the MAC mechanism will also have an impact on the network virus propagation process, which increases the difficulty and complexity of virus propagation research to some extent. Energy consumption in the process of virus propagation is also analyzed in this paper.

3. Virus Propagation Model for Wireless Sensor Networks with MAC Mechanism

In this part, according to the Waxman algorithm and the Warshall algorithm, we build a wireless sensor network topology model with a limited communication range of nodes. On this basis, we develop an SIR virus propagation model. Because WSNs have a wireless access layer, we consider the influence of the MAC mechanism in every step of virus propagation from infected nodes to neighboring nodes.

3.1. Wireless Sensor Network Structure Model

Wireless sensor networks are generated on the Waxman algorithm [30] in our study, which is a typical random network topology generation algorithm. Considering the limited communication capacity of sensor nodes, when setting up the network environment, the probability of the existence of links between two nodes within the communication radius is , as inwhere the parameters of equation (1) are shown in Table 1.

The network topology is generated by adding relationships between all pairs of nodes in the network with probability . However, since the Waxman algorithm cannot guarantee the network connectivity, the Warshall algorithm [31] is needed to verify the connectivity of network.

3.2. SIR Virus Propagation Model with MAC Mechanism

The SIR propagation model is used to study the dynamics of virus propagation in wireless sensor networks under the MAC mechanism. The interaction between data transmission and virus propagation in wireless sensor networks is also considered in this model. It is assumed that N nodes are uniformly and randomly distributed in the wireless sensor network, each node has a limited communication radius , and at each moment, n nodes in the wireless sensor network have data sending requests, and these n nodes are called active nodes. According to the SIR model, each node in the wireless sensor network has three different states; namely, the susceptible state (S-state) node can be infected easily by viruses, the infectious state (I-state) node can infect S-state node, and the removed state (R-state) node is invalid after virus infection. In these three states, only the node in the R-state could not work correctly; that is, it could not send data or transmit the viruses. At time t, the number of S-state, I-state, and R-state nodes are denoted as , , and , respectively, and at each time step t. At the beginning moment of virus propagation, an arbitrary node is set as the infected node and begins to transmit the viruses outwards.

In wireless sensor networks, virus propagation between nodes or other conventional data transmission is constrained by the MAC mechanism. With the MAC mechanism, a node needs to listen to the channel before data transmission or virus propagation. It is only allowed to transmit data or virus outward when the channel is idle. Two dynamic processes of data transmission and virus propagation are performed simultaneously in wireless sensor networks. To describe the problem more clearly and concisely, we regard the listen/sleep mechanism in the MAC mechanism of sensor networks as periodic and discretize time [3234]. The specific process is as follows: during the monitoring (listening) period of each unit time t, the active node publishes a data reception request in the broadcast form to all working nodes in the communication range. To meet the requirements of the MAC mechanism, the monitor channel is idle. And the data sent by the active node is received by an idle node. An active node cannot send data to its neighbor node if this neighbor is busy. Then, this active node needs to wait unit time to re-enable channel monitoring. After the monitoring period ends, the working nodes in the network will enter the dormant period, while the nodes in the dormant period cannot work. However, since the active node issues the receiving request in a broadcast form, the information-receiving channels of all nodes (except the data receiving node) within the communication range are overwhelmed and interfered by the receiving request of the active node, and the active node can no longer receive communication requests from other nodes except the active node. Such a node with limited receiving function is called an interfered node, and the viruses cannot infect it.

Assume the active node to send very little data that is a virus. After the active node sends the virus data, each I node infects the S node whose normal operation and the channel is idle in the communication range with the infection probability . And at each unit time step t, each I-state node turns to an R-state node that cannot normally work with probability . Without loss of generality, let [35].

3.3. Model Theory Analysis

It is assumed that N nodes are uniformly and randomly distributed in the 2-dimensional square area X2 of the wireless sensor network with length X. Initially, most of the nodes are S-state nodes, and very few nodes are I-state nodes. The average node degree adjustment parameter in the network is , and the proportion of active nodes that need to send data is , where , where is the number of active nodes, and the size of the area where the signal is disturbed is . In a unit time, an arbitrary node of an I-state infects a normal working S-state node in the idle state within the communication radius Rc of the node with probability . Then, the node is transformed into the R-state node with a probability of . The listen/sleep duty cycle of the MAC mechanism is . Based on the above description, we propose a relatively reasonable and applicable virus propagation model. This model is as follows:

And at each time step t, , , and satisfy the following equation:

Let , , and is the inhibitor of virus propagation, that is, the inhibition of viral transmission by the number of active nodes. Since the proportion of active nodes in the network will affect the inhibitory effect of the MAC mechanism, the more active nodes there are, the more obvious the inhibitory effect of the MAC mechanism will be, and the fewer nodes the viruses can infect. Therefore, we regard the relationship between the number of active nodes and virus propagation rate as inversely proportional, and regard constant as a constraint constant. According to equations (2)–(4), the following equations can be obtained:

Assume that the initial S-state node number is and the initial R-state node number is . Then, we have the following results about and from equations (6) and (7):

3.4. Basic Regeneration Number

Since , is monotonically decreasing and has a lower bound, the limit ofexists. It can be known from equations (2), (3), (6) that when , reaches a maximum value. From equation (6), when the number of susceptible nodes at the beginning moment, with the increase of time, the number of infected nodes will first increase to the maximum, then gradually decrease, and eventually die. This phenomenon shows that as long as , that is, , the viruses will spread in wireless sensor networks. Therefore, the basic regeneration number of this model is

When , the viruses can spread exponentially on a large scale, and when , the viruses will not spread, and the number of infected nodes will decrease monotonically to zero. The spreading of viruses meets a critical state if . In this critical moment, viruses may spread only in a small area and die locally. To prevent the viruses from spreading in wireless sensor networks, reduce to less than 1 to achieve the purpose of hindering the spread of the viruses. From equation (10) and the definition of , we can know that the virus infection ability can be reduced or the disease period can be reduced through virus killing and other means. In addition, can be reduced by reducing the MAC mechanism listen/sleep duty cycle , node communication radius , and network average node adjustment parameters .

3.5. Stability Analysis

From the perspective of virus propagation dynamics, the behavior of removed state (R) nodes in the mathematical model of virus propagation is independent of susceptible state (S) nodes and infected state (I) nodes. Therefore, from equations (2) and (3), the SIR model has an infinite number of non-negative equilibrium points , , where is any non-negative real number, and because these equilibrium points satisfy , it is also called disease-free equilibrium. When , the virus cannot spread out or die in a local area; therefore, the disease-free equilibrium point is stable. But on the contrary, if , the disease-free equilibrium point is unstable. The proof is as follows:

Defining function (11),

Find the partial derivatives of and for the formulas and , respectively,

The linear parts of the Taylor expansions in equations (11) and (12) at and are

So, the linear equation at and is

The matrix of its linear equation is

The characteristic equation of equation (16) is

The eigenvalues of equation (17) are and . From , know , and from the theory of ordinary differential equations, this disease-free equilibrium point is unstable.

4. Simulation

In the simulation experiment using MATLAB, we randomly distribute N = 1000 nodes in an  = 100 × 100 square area and set the ratio between the number of long links and the number of short links in the network topology with  = 0.87. We set all nodes as S-state nodes at the beginning and then randomly set a node as infected I-state to spread the viruses. Thus, at , we have , . As shown in Figure 1, at each time step, an I-state node infects each of the idle S-state neighbor nodes in its communication range with probability ; then, the I-state node immediately transforms to the R-state with probability . The newly infected node will turn to I-state in the next time step.

With the MAC mechanism, the energy consumption during the spread of virus in wireless sensor networks is considered. In a typical wireless sensor network, the energy consumed by data transmission and reception is much greater than that of other stages such as information processing, storage, and sleep [36, 37]. Therefore, we assume the initial energy of each node is , and the remaining energy of the node i at time step t is , and the energy consumed by the node to transmit or receive a packet of data is .

Then, according to the simulation results, we analyze the virus propagation process with node communication radius , average node degree , virus infection probability , number of active nodes , etc. For each influencing parameter, the result is based on an average of 50 simulations independently. If there is no data sending request in the network, we regard the number of active nodes as 0, and the MAC mechanism is considered as not working in this situation. Otherwise, it will be regarded as the case that the MAC mechanism works.

4.1. Effect of Active Nodes Number in Virus Propagation

Figure 2 shows the effect of the number of active nodes on virus propagation under different infection probabilities . In this simulation, in addition to the default value, other parameters are set as follows: node communication radius  = 7, average node degree , active node number , respectively, network average degree adjustment parameter  = 0.7, the listen/sleep duty cycle of the MAC mechanism . It can be observed from Figure 2 that the infection ability of the viruses increases with the increase of infection probability . But the more active nodes in the network, the fewer nodes the viruses can infect with the same infection rate . Figure 2 also shows that when there are many active nodes, even if the infection probability is large, the viruses cannot spread to the entire network. Through the analysis of the experimental results, it is found that there are two reasons for this phenomenon:

Firstly, the influence of a number of active nodes: the more active nodes, the fewer nodes the viruses infect, and the active nodes will affect the speed of network failure. The more active nodes, the faster the network failure rate, the faster the network failure, and the more nodes retained to work, so that even if the infection probability is large, the viruses cannot spread to the entire network.

Secondly, the influence of the infection probability: the higher the infection probability is, the stronger the ability of the viruses is, and the more nodes are infected.

Figure 3 shows the influence of the number of active nodes on the speed of virus propagation under the same infection probability. This part of the simulation analyzes the propagating process of virus propagation in the time domain with a significant value of infection probability  = 0.6. Figure 3 reflects that, in the same network environment, the number of active nodes can directly affect the scale of infected nodes, which is roughly inversely proportional. The more active nodes, the slower the virus infects the node and the fewer infected nodes.

4.2. Effect of Listen/Sleep Duty Cycle in Virus Propagation

Figure 4 shows the effect of listen/sleep duty cycle on virus propagation under different infection probabilities . In this simulation, in addition to the default value, other parameters are set as follows: node communication radius  = 7, average node degree , active node number  = 20, respectively, network average degree adjustment parameter  = 0.7, the listen/sleep duty cycle of the MAC mechanism . The curve change in the figure intuitively reflects that the listen/sleep duty cycle on the MAC mechanism is proportional to the size of the infected node. The larger the listen/sleep duty cycle is, the more nodes infected by the viruses, and the smaller the listen/sleep duty cycle is, the fewer nodes. The listen/sleep duty cycle represents the ratio of the listening period to the length of the sleeping period within a period of time. When the listen/sleep duty cycle approaches zero, it indicates that the network is always in a dormant state, so the viruses cannot spread on the network in this state. The curve in Figure 4 confirms this statement.

The listen/sleep duty cycle of the MAC mechanism affects virus propagation by changing the duration of the listening period. The smaller the listen/sleep duty cycle, the slower the virus propagation and the smaller the scale. Theoretically, to prevent the viruses from spreading in the network, it is better to set the listen/sleep duty cycle as short as possible. But this is not the case. The listen/sleep duty cycle of the MAC mechanism not only affects the virus propagation process but also affects the flow of normal data, causing latency issues. For networks with higher real-time requirements, a lower listen/sleep duty cycle is fatal. Therefore, considering the delay and energy-saving issues, the listen/sleep duty cycle used in this study is 0.6.

4.3. Virus Propagation with MAC Mechanism under Different Values of Infection Probability

The dynamics of virus propagation under different values of infection probabilities considering the impact of the MAC mechanism are shown in Figure 5. Node communication radius  = 7, average node degree , virus infection probability  = 0.4, 0.8, active node number  = 0, 20, network average degree adjustment parameter  = 0.7, and the listen/sleep duty cycle of the MAC mechanism . The probability of virus infection indicates the infectivity of the viruses. The stronger the infectivity, the more nodes the viruses infect. From the comparison in Figure 5, the higher the infection probability of the same MAC scheme is, the faster the virus propagation speed is, and the larger the infection scale is after it tends to be stable. We also find that using the MAC mechanism can well suppress the speed of network virus propagation and the scale of infection.

Furthermore, the smaller the probability of viral infection, the more obvious the inhibition of viral transmission by MAC mechanism, the slower the viruses spread, and the fewer infected nodes. It indicates that the probability of virus infection or MAC mechanism will have an impact on the spread of the viruses, but the combined effect of the two will be better. What is more, the smaller the probability of viral infection, the more obvious the inhibition of viral transmission by MAC mechanism, the slower the viruses spread, and the fewer infected nodes. It indicates that the probability of virus infection or MAC mechanism will have an impact on the spread of the viruses, but the combined effect of the two will be better.

Figure 6 shows the influence of node averaging degree on virus propagation speed. The node communication radius  = 7, the average node degree , the virus infection probability  = 0.6, the number of active nodes , the listen/sleep duty cycle of the MAC mechanism , and the regulating parameters of network average degree  = 0.53, 0.7, 0.9, respectively. It can be observed from Figure 6 that, without considering the MAC mechanism, the greater the average node degree, the faster the viruses spread. Eventually, the viruses infect the entire network. Considering the MAC mechanism, the speed of virus propagation increases with the average node degree, but in the end, it can only infect some nodes, and the number of virus-infected nodes increases as the average node degree increases. Through comprehensive analysis, it is found that the average node degree would affect the speed and scale of virus propagation. At the same time, the MAC mechanism will hinder the propagating speed of viruses and will also inhibit the influence of the average node degree on virus propagation.

The effect of communication radius on virus propagation is shown in Figure 7. The research in this part mainly focuses on the changes in virus propagation speed and the infection scale after the stabilization caused by the change of node communication radius . The node communication radius  = 6, 7, 8, the average node degree , the virus infection probability  = 0.6, the active node number , the network average adjustment parameter  = 0.55, 0.7, 0.95, and the listen/sleep duty cycle of the MAC mechanism . It can be observed from Figure 7 that, under the same communication radius, the influence of the presence or absence of the MAC mechanism on virus propagation is the opposite. Without considering the impact of the MAC mechanism, the larger the communication radius of the node, the faster the virus propagation will be, and the viruses will eventually infect the whole network. However, under the influence of the MAC mechanism, the larger the node communication radius, the slower the virus propagation speed, and the fewer infected nodes. The experimental results show that whether the MAC mechanism works or not will affect the impact of communication radius on virus propagation. As can be seen from the above, if you want to suppress the spread of network virus better, you can use the MAC mechanism and the network average to work together.

4.4. Energy Consumption in Virus Propagation

Figure 8 shows the energy consumption in virus propagation under different infection probabilities . In this simulation, the parameters are set as follows:  = 7, ,  = 0.7, , and , respectively. Figure 8 shows the energy consumption in virus propagation has a peak value as increases. When , with the increasing of , the scale of virus infection in the network increases, so energy consumption also increases. On the contrary, when , as increases, the energy consumption decreases slowly.

The interaction combined with the infection scale of network and spreading speed of virus leads to the existence of peak value of energy consumption. We assume that, when , the energy consumption reaches its largest value. There are two factors influencing the energy consumption of virus propagation: the infection scale and the speed of virus propagation. When the virus can spread out in the network, the larger infection scale will cause the faster propagation speed. A larger infection scale consumes more energy. But the faster propagation speed reduces the time for the virus to spread out and reduces the energy consumption relatively. Therefore, peak value of energy consumption is the result of the combined effect of the infection scale and propagation speed.

5. Analysis of Results

In the context of the wireless sensor networks, this paper established a random network topology model based on the characteristics of limited node communication radius and wireless access MAC layer. It improved the classical SIR virus propagation model on this basis, to study the virus propagation dynamics in the network environment and find the characteristics of virus propagation. We mainly studied the characteristics of virus propagation process with the number of active nodes , the listen/sleep duty cycle , the virus infection probability , the average node degree , the communication radius of nodes , etc. And we verified the conclusion that the MAC mechanism affects virus propagation by comparing the research results with or without the MAC mechanism. Compared with the experimental results, it is found that wireless access to the MAC mechanism does affect the process of virus propagation and has an inhibitory effect. Moreover, it can be known from the propagation model that the listen/sleep duty cycle of the MAC mechanism directly affects the virus suppression effect. The smaller the listen/sleep duty cycle, the smaller the change amount of the infected node per unit moment, and vice versa. The results of the research on the listen/sleep duty cycle also confirm this conclusion. Besides, we also found that factors such as virus infection probability, average node degree, and node communication radius would promote virus propagation. In contrast, the number of active nodes would hinder virus propagation. The probability of virus infection and the average node degree have similar effects on the virus propagation procedure. Increasing the probability of virus infection or the average node degree can accelerate the speed of the virus propagation process and increase the scale of virus infection. The number of active nodes will restrain the virus propagation procedure. The more active the node, the larger the range of signal interference, the smaller the virus spread, and the better the suppression effect. The influence of node communication radius on virus propagation is more complicated. Without considering the MAC mechanism, the larger the communication radius is, the faster the viruses spread, and the more nodes the viruses infect. On the contrary, if the MAC mechanism is considered, the virus propagation process is opposite to the previous situation. Increasing the communication radius of nodes can increase the range of signal interference. The larger the range of signal interference, the smaller the range of virus propagation and the fewer nodes infected by viruses. Therefore, in wireless sensor networks with the MAC mechanism, the traditional virus propagation models do not consider the impact of the MAC mechanism and cannot be directly applied. Because the MAC mechanism has played a significant inhibitory effect on virus propagation, the MAC mechanism can not only slow down the virus propagation rate but also reduce the number of infected nodes. In terms of energy consumption, when , energy consumption reaches the peak value. When , energy consumption reduces with the increasing of , because the spread of the virus stops prematurely. This situation is the result of the combined effect of the infection scale and speed of the virus spreading. The results have important reference significance for the study of virus propagation procedure in wireless sensor networks.

6. Conclusion

Aiming at the characteristics of wireless sensor networks with space constraints and the MAC communication mechanism, we explore the virus propagation process wireless sensor networks by using the SIR model. The analysis of the mathematical model of virus propagation shows that the number of active nodes, the probability of virus infection, the average node degree, the communication radius of the nodes, and the listen/sleep duty cycle of the MAC mechanism will affect the virus propagation in the wireless sensor network. Reasoning and qualitative analysis: the increase in the probability of virus infection and the increase in the average node degree will promote the spread of the viruses; the number of active nodes will suppress the spread of the viruses; the larger the number of active nodes, the slower the viruses spread, and the node communication radius is relatively complicated. Under the MAC mechanism, the increase in the phase of the node communication radius will inhibit the viruses from spreading. Still, the opposite is true without the MAC mechanism. The effect of the MAC mechanism on virus suppression depends on the listen/sleep duty cycle. The smaller the listen/sleep duty cycle, the better the virus propagation suppression effect. With the MAC mechanism in wireless sensor networks, the traditional virus propagation models cannot be applied directly. In addition, with the change of , the peak value of energy consumption in the process of virus propagation appears at a specific infection probability value. This situation is the result of the combined effect of the infection scale and speed of the virus spreading. This paper relatively comprehensively and systematically studies the specific influence of various factors of wireless sensor networks on the process of virus propagation. To a certain extent, it can provide corresponding theoretical support for solving the security risks of wireless sensor networks and formulating effective virus immunity mechanism of wireless sensor networks.

Data Availability

The simulation data and results used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare no conflicts of interest.

Acknowledgments

This research was supported by the National Natural Science Foundation of China (61602417), Zhejiang Provincial Key Research and Development Plan (2015C03023), Public Welfare Project of Zhejiang Province under Grant no. 2014C33102, Basic Scientific Research Project of Zhejiang Sci-Tech University (2019Q042), and “521” Talent Project of ZSTU.