Abstract
The development of the 5th Generation Mobile Communication Technology not only brings convenience to people but also brings many network security problems. Based on the static game theory of complete information, a game model of attack and defense with limited resources in heterogeneous networks of Cyber Physical Systems is established. This model analyzes the basic rules of the offensive and defensive strategies of both parties when the offensive and defensive resources are limited in the 5th Generation Mobile Communication Technology network environment. The model can also describe the interaction between attackers and defenders. A novel compact particle swarm optimization algorithm is proposed to solve the difficult problem of solving the Nash equilibrium of this game model. The simulation experiment proves that novel compact particle swarm optimization algorithm has good optimization ability and shows that the algorithm can effectively solve the Nash equilibrium of the model. The simulation experiment provides a strategic reference for the attackdefense game with limited resources.
1. Introduction
In recent years, the 5th Generation Mobile Communication Technology (5G) has developed rapidly and has been widely used in many aspects of the lives of people [1]. 5G is characterized by fast transmission rate and high stability [2]. In the future, 5G will be applied in cyber physical systems (CPS), industry, education, environment, medical care, transportation, and many other aspects to achieve real full coverage [3–5]. Based on these characteristics of 5G, heterogeneous networks of CPS are also developing rapidly. The core goal of heterogeneous networks is to achieve free connectivity of devices [6]. The Internet can be composed of multiple interconnected heterogeneous networks. The devices used to connect heterogeneous networks are routers. A heterogeneous network means that two or more wireless communication systems use different access technologies or use the same wireless access technology but belong to different wireless operators [7]. Heterogeneous networks can make use of existing multiple wireless communication systems, and through the integration of systems to make the multiple systems can learn from each other to meet the needs of future mobile communication services. The intelligent access means of multimode terminals is used by heterogeneous network to make a variety of different types of networks that can jointly provide wireless access anytime and anywhere for users [8]. The CPS is closely related to heterogeneous networks. The CPS is mainly divided into three layers: the perception layer, the network layer, and the control layer. The transmission of information mainly depends on the network layer. The connection of different devices among CPS can be regarded as a heterogeneous network [9]. The significance of CPS is to connect physical devices to the Internet, which enables physical devices to have five functions: computing, communication, precise control, remote coordination, and autonomy [10]. The communication is put on the same level as computing in CPS. The network scale of CPS surpasses that of existing industrial control network. The CPS is thought to connect the whole world. The development of 5G heterogeneous networks also brings opportunities for hackers [11–13]. Hackers can use advanced persistent threat (APT), denial of service (DOS), and other attack methods to attack network devices of CPS and use eavesdropping, interference, and other attack methods to attack the information transmission links of CPS [14–16]. The attacks from hackers are characterized by diversity, large scale, and high density [17–19]. It brings great challenges for defenders to defend against attacks [20, 21]. Firewall and intrusion detection system (IDS) has a delay in attacks from hackers, and reasonable defense measures cannot be taken before attacks from hackers [22, 23]. Therefore, it is particularly important to carry out macro analysis of attack and defense behaviors of hacker and defender through game theory. Through this analysis, defenders can obtain the possible attack strategies of hackers before being attacked and then defenders can take effective defense strategies to reduce the loss.
There have been many studies using game theory to analyze the behaviors of hackers and defenders [24–26]. Researchers build different models for different application environments and use game theory for macro analysis [27–30]. Li et al. propose a zerosum complete information static game model under the network topology graph and proposes a sensitive cost parameter for attacking and defensing [31]. He only considers two attack strategies, and the model is quite different from the actual situation, so this model is not universally applicable. Min builds a Colonel Blotto game using APT attack and defense [14]. And the Nash equilibrium of the model is solved. Simulation experiments show that a “hotbooting” CPU allocation method proposed by Min has lower computational complexity. Jiang proposes a network security defense graph by the state of devices [32]. Taking into account the three attributes of information confidentiality, availability, and integrity into the model, the optimal defense strategy is obtained through game theory. Leng et al. propose a threeplayer complete information static game model based on white hat, black hat, and software manufacturers. The simulation experiment shows that the model provides an effective strategy for software manufacturers to reduce the risk of software vulnerabilities [33]. Attiah et al. transform the threestrategy attackdefense game model into a twostrategy game model. And the mixed strategy of the model is solved [34]. Wang and Zeng propose a twostage game in the process of attack and defense. In the first stage, the attacker scans the port of the defender, and the defender deceives or truthfully responds to the attacker. In the second stage, the two sides play a strategic game [35]. FergusonWalter et al. establish an incomplete information dynamic game model for network deception attacks to analyze the strategic choices of both attackers and defenders. This model is more in line with the current offensive and defensive scenarios and has strong reference significance [36]. Shen et al. propose a signal game model for the selection of intrusion detection strategies in the wireless sensor network environment. The model uses detection rate and false alarm rate and analyzes the impact of these two parameters on strategies selection [37].
Although there are many existing studies on attackdefense equilibrium based on game theory, there are not many studies on the attack and defense game in the 5G heterogeneous network environment of CPS. The biggest flaw of the existing research models is that they do not consider whether the communication links are attacked, but only consider whether the heterogeneous devices are attacked. Another flaw is that the scale of attack and defense is too small to meet the conditions of 5G. Intelligent computing provides a solution for solving Nash equilibrium of largescale offensive and defensive games. The most used and most classic intelligent computing algorithm is the particle swarm optimization (PSO). The PSO is proposed by Kennedy and Russell in 1995 according to the foraging behavior of birds [38]. Different algorithms need to be optimized for different problems, so different heuristic algorithms are constantly proposed, such as genetic algorithm (GA) [39], whale optimization algorithm (WOA) [40], black hole (BH) [41], bat algorithm (BA) [42], and sine cosine algorithm (SCA) [43]. A novel compact particle swarm optimization (ncPSO) that uses less memory space and has stronger optimization ability is proposed to solve the Nash equilibrium of the game model proposed in this paper.
The main contributions of this paper are as follows:(1)Establish a network topology graph based on 5G heterogeneous network of CPS to analyze the attack and defense behaviors. Increase the number of offensive and defensive strategies.(2)Consider not only network devices being attacked but also communication links between devices being attacked.(3)A ncPSO is proposed to solve the mixed strategy Nash equilibrium of the game model.(4)The strategy selection problem of attackers and defenders under different attack resources and different defense resources is analyzed.
The rest of this paper is structured as follows. A 5G heterogeneous network topology diagram of CPS is constructed in Section 2. A attack and defense game model is established in Section 3. The cPSO is proposed and a method for solving mixed strategy Nash equilibrium using the cPSO is described in Section 4. Simulation experiments to discuss the mixed strategies of attackers and defenders under different resources are conducted in Section 5. A conclusion is given in Section 6.
2. System Model and Symbols
A heterogeneous network of CPS based on 5G can be described as an undirected connection graph. We use to represent the graph in this paper. is a set containing all vertices. represents the total number of the vertices. Each is a vertex in and indicates a device in heterogeneous network of CPS. Devices in a heterogeneous network can be mobile phones, servers, smart appliances, routers, etc. is a set containing all edges. represents the total number of the edges. Each is an edge in and indicates a type of communication link in heterogeneous network of CPS. Communication links in a heterogeneous network of CPS contain telephone communication, mobile communication, point to point (P2P), etc. The number of all elements in the graph is . We can denote by . Every can be an attack target for attacker and a protective target for defender.
We use a diagonal matrix to describe the connectivity of graph . The detailed representation of is shown in (1). Let denote the maximum connectivity of graph .
Since different devices and different communication links have different functions and roles in heterogeneous networks, they have different importance in networks. We use to denote the importance of the th element in graph . For vertices, their importance is represented by the number of edges connected by them. For edges, their importance is represented by the smaller maximum connectivity of the subgraphs on either side of the edge. The importance of each element in graph is shown inwhere and are subgraphs on either side of the edge . , and are the maximum connectivity of the subgraph and subgraph .
Usually, the available resources for attackers and defenders to attack and defense network components are limited. and are used to denote the total available resources of attackers and defenders, respectively. An attacker can attack one or more elements according to the attack resources. For example, an attacker can use DOS to attack a server, use routing spoofing to attack a router, use flooding to attack a switch, and use APT to attack a specific device. They also can use eavesdropping, truncation, jamming, and tampering to attack the communication links between devices. The defender can defense the network elements using limited resources at the same time. For example, a defender can use blacklist to prohibit attackers attacking server, use flow cleaning to protect routers, and use protection software to defense application devices. Defenders also can use encryption, filter, and VPN to defense the communication links.
3. Attack and Defense Game Model
Based on the model graph proposed in Section 2, we establish a game model to analyze behaviors of attacker and defender. In this game model, the attacker and defender take measures at the same time and there is no cooperative relationship between them, but the benefit calculation is different for both attacker and defender, so this game model is a nonzero sum game model. The meanings of the six tuple in the game model are as follows:(1): An attacker in a 5G heterogeneous network. The attacker can adopt different attack strategies to attack different components in the heterogeneous network.(2): A defender in a 5G heterogeneous network. The defender also can take feasible measures to protect components in the heterogeneous network.(3): is the attack action set for attacker, where represents the total number of the attack strategies. is an attack strategy combination in . The value of is shown in(4): is the defense action set for defender, where represents the total number of the defense strategies. is a defense strategy combination in . The value of is shown in(5): is the attack profit after the attacker and defender adopt strategy and .(6): is the defense profit after the attacker and defender adopt strategy and .
In the game, the available resources of both sides cannot be infinite. Taking human, material, and financial resources into consideration, and are used to denote the total available resources of attackers and defenders, respectively. Each element in has different attack costs and defense costs for attackers and defenders according to its own characteristics, denoted by and . Therefore, the offensive and defensive behaviors must meet the following:
Whether a network element in is breached depends on the strategies from attacker and defender. It can be described bywhere represents that is breached and represents that is not breached. When element is breached, we remove it from , then we obtain a new graph after the game.
For the attacker, the gain function in the model is represented by the loss connectivity of the graph . For the defender, the gain function is represented by the maximum connectivity of the network after the game. We have assumed the maximum connectivity before game is denoted as in Section 2. Then we assume the maximum connectivity after the game as . So the and can be calculated by (8). The profit matrix can be represented in Table 1.
In the game, both the attacker and the defender hope to achieve their maximum benefits. So they choose to use the strategy that could maximize their benefits. They also need to consider the strategies form another on their own returns. Eventually, they will reach a strategic equilibrium. In the game, there may exist a pure strategy and a mixed strategy Nash equilibrium. We assume that the optimal policy of attacker is , and the optimal policy of defender is . If and satisfy (9), they are a set of Nash equilibrium solutions.
4. Game Solution
A solution to solve the equilibrium strategy of is proposed in this section. This paper takes the attacker as an example to discuss, and the analysis method of the defender is similar to attacker. In this model game , there may be a pure strategy and a mixedstrategy Nash equilibrium.
For purepolicy Nash equilibrium, we use the traditional minmax theorem to solve [44]. The idea of this theorem is to choose the optimal strategy under various worstcase scenarios [45]. When the profit matrix of model satisfies (10), strategy is a pure strategy equilibrium.
Pure strategy is a special form of mixed strategy. When the probability of one strategy is 1, and the probabilities of other strategies are 0, it is a pure strategy. First of all, a strategy choice is given for one participant, another participant chooses the strategy that brings the highest profit among the different strategies. Second, the optimal strategy of another participant is given, and the first participant compare whether the strategy which another participant chooses is also optimal for him. Third, if the strategy combination is the optimal strategy for both participants, then it is a pure strategy Nash equilibrium of the game. When a Nash equilibrium is reached, both offense and defense are reluctant to change their strategies because changing strategies will make their gains less. When there is more than one purestrategy Nash equilibrium, both sides can choose mixed strategies to maximize their gains. Mixed strategies also occur when the game does not have a pure strategy Nash equilibrium. Taking the chicken game as an example, there are two pure strategy Nash equilibrium in the chicken game. But to participants, they want to take two strategies with a certain probability combination to obtain greater benefits, so the Nash equilibrium of mixed strategies is more important. Therefore, we mainly solve the Nash equilibrium of the mixed strategy. Mixed strategy means that players choose strategies according to probability. We set and to represent the probability of the attacker and defender using different strategies, respectively. Therefore, the and should satisfy
According to Table 1, the expected returns of the attacker and the defender can be expressed as (12). Taking the attacker as an example, if and are a Nash equilibrium of mixed strategies, then any individual modification of or alone cannot increase the profit. Another solution to mixed strategies is that optimal mixed strategy of every player must make the expected profit of another choosing different strategies the same. The strategy of attacker should consider the profit of defender, it should satisfy (13). The strategy of defender should consider the profit of attacker, it should satisfy
With the development of 5G, the means of network attack are diversified, large scale, and intelligent. The equilibrium solution under largescale attack and defense strategies is a difficult problem. The highspeed and lowlatency 5G make offensive and defensive strategies grow exponentially. Under the largescale attack and defense strategies, the traditional Nash equilibrium solution method is no longer applicable. As an optimization algorithm, intelligent computing has a good effect on solving highdimensional complex problems.
A ncPSO is proposed to solve the Nash equilibrium of mixed strategies. The ncPSO is an improvement over PSO. The position of each particle donated as represents a strategic choice of the attacker. PSO will record the global optimal position and the individual optimal position of the particle swarm. Then particles move according to and , and the movement equation refers to (15) and (16). is the inertia weight, and is the number of iterations.
The movement process of the particle swarm is shown in Figure 1. , , and represent three speeds in (15). is the combination of the three speeds. The new position of is based on and .
PSO is an iterative optimization algorithm, and and are updated according to the fitness value of particles. Considering that PSO requires larger memory, we apply compact strategy and propose ncPSO to optimize and reduce memory usage [46]. Instead of recording the position of each particle in each iteration, the compact strategy uses a mathematical distribution to record the position of the entire swarm of particles. The compact strategy that we proposed uses a Pareto distribution to describe the location of the particle swarm. The Pareto distribution contains three important parameters: shape parameter , scale parameter , and threshold parameter [47]. Among the three parameters, AA and BB play a decisive role in the optimization and convergence of the algorithm, so AA and BB are used to update the particle swarm position. Taking 50 particles with 40 dimensions as an example, the original PSO needs to record the position of each particle in each dimension, so memory units are required. The ncPSO only needs to record the AA and BB of entire swarm of particles in each dimension, so the ncPSO only needs memory units. Compared with traditional PSO, ncPSO can reduce a large number of memory units. The process of the compact strategy is shown as follows. First, generate a probability distribution function (PDF) according to and . Second, calculate cumulative distribution function (CDF) by PDF. Finally, a random number will be generated to calculate an inverse cumulative distribution function (iCDF). The value of iCDF is the position of the particle swarm. The figures of PDF and CDF of Pareto are shown in Figure 2. The equations of PDF and CDF of Pareto are shown in (17) and (18).
(a)
(b)
The ncPSO generates a and a through a competitive strategy and then updates and through the and . The update formulas for and are shown in (19) and (20), where is the virtual number of particles. For the attacker, the condition for winning the competition in the model can be expressed as how to choose the probability of using each attack strategy to make the defender get the same benefit adopting any defensive strategy. The th dimension of the particle represents the probability that the attacker chooses the attack strategy . The fitness value of ncPSO can be expressed as the standard deviation of the profit of defender. Its mathematical representation is shown in
For an attacker, let be the optimal probability distribution for choosing different attack strategies. The process of the ncPSO to calculate the is shown in Algorithm 1. In the same way, we can obtain the optimal probability distribution for the defender to choose different defense strategies.

The whole algorithm can be divided into the following six parts:(1)The network model is established according to the connection relationship between the actual heterogeneous network devices.(2)Calculate the importance of each element.(3)Initialize attack and defense costs for each element. Initialize the total available resources of the attacker and defender.(4)Build a set of strategies for attacker and defender to attack and defense network element.(5)Calculate the profit matrix for attacker and defender.(6)Calculate the mixed strategy Nash equilibrium of attacker and defender using ncPSO.
5. Simulation Experiment and Analysis
In this section, the performance of ncPSO is compared with GA, PSO, WOA, BH, BA, and SCA in 28 test functions in CEC2013. CEC2013 contains 28 different performance test functions, which have good representation. Then, we research the mixed strategy Nash equilibrium using a simple topology diagram. But in real life, the topology diagram of heterogeneous network is much more complicated. Our purpose is to analyze the attack and defense behavior under different attack and defense resources, so using a simple topology diagram can also get the desired results. Four sets of simulation experiments are tested to illustrate the validity of the equilibrium solution and the feasibility of the assignment of offensive and defensive strategies in the game model. First, simulation experiments are carried out to demonstrate the effectiveness of solving Nash equilibrium using ncPSO. Second, simulation experiments are carried out to demonstrate the losses of the defender under different attack and defense resources. Third, strategies of attacker and defender with different defense resources are discussed through simulation experiments. Lastly, strategies of attacker and defender with different attack resources are discussed through simulation experiments. The simulation tools in this section all use Matlab2021B.
5.1. Performance Test Experiment of ncPSO and Other Algorithms
In this subsection, the performance of different algorithms is compared on 28 test functions of CEC2013. Different algorithms search for the minimum value on the test function. The smaller the function value found, the stronger the optimization ability of the algorithm. Each algorithm is run 20 times on each test function, and the mean of the 20 experimental data is taken as the final experimental result. In addition to the performance test experiments, this section also performs Wilcoxon signed rank sum test with significant level on the test results to illustrate the validity of the experimental data. According to the relevant references of different algorithms, the parameter settings of different algorithms are shown in Table 2.
In Table 2, represents the dimension of the problem, represents the number of populations, and other parameters are unique to each algorithm and take values according to relevant references. The results of performance test experiments and rank sum verification are shown in Table 3. In Table 3, , respectively, indicates that ncPSO has better, same, and worse optimization effects on the test function than other algorithms.
The last row of Table 3 gives the number of better, the same, and worse performance of ncPSO compared to other algorithms in the 28 test functions. The experimental results in Table 3 show that ncPSO has the same optimization effect as all optimization algorithms on the two test functions and . Compared with GA, ncPSO performs better than GA in other 26 test functions. Compared with PSO, ncPSO performs better than PSO on 18 test functions, but not as good as PSO on 8 test functions. Compared with WOA and SCA, ncPSO performs better than WOA and SCA on 24 test functions, but worse than WOA and SCA on and . Compared with BH, ncPSO performs better than BH on 21 test functions, but not as good as BH on 4 test functions. Compared with BA, ncPSO performs better than BA on 18 test functions, but worse than BA on 7 test functions.
In order to better show the optimization performance of the algorithms, 9 optimization process diagrams with obvious effects are selected for display in Figure 3. After the algorithm iteration in each graph, the lower the curve, the stronger the optimization ability of the algorithm, and the faster the curve declines, the faster the convergence speed of the algorithm.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)
(i)
As can be seen in Figure 3, ncPSO has better optimization performance and faster convergence speed than other algorithms in functions , , , , , , , and . On the function , ncPSO has worse optimization performance compared with PSO, but has better optimization performance than GA, WOA, BH, BA, and SCA.
5.2. Effectiveness of Solving Nash Equilibrium Using ncPSO
The graph that we use in the simulation experiment is shown in Figure 4. Because a heterogeneous network of CPS is formed by various devices and different access technologies, the heterogeneous network of CPS is simplified as Figure 4. Each node in the diagram represents a terminal device in the network of CPS, such as terminal servers, mobile phones, sensors, and drones. Each edge in the graph represents a communication link in the network of CPS, such as optical fibers to transmit signals, radiowaves to transmit signals. We set the cost of attacking and defending each element in the graph to be 1. When the offensive and defensive resources are 2, 4, 6, 8, and 10, respectively, the number of strategies of attackers and defenders is shown in Table 4.
From Table 4, it can be seen that there are a large number of offensive and defensive strategies compared to previous studies. There are so many strategies in the small network in Figure 4, which is in line with the large scale of attack and defense in the 5G heterogeneous network environment.
In this subsection, simulation experiments are performed to demonstrate the effectiveness of using intelligent computing to solve the Nash equilibrium. When the defense resources are 4 and 6, respectively, attack and defense experiments are performed ten times when the attack resources are 2, 4, 6, 8, and 10, respectively. A solution to mixed strategies is that optimal mixed strategy of every player must make the expected profit of another choosing different strategies the same. In other words, no single player can change the combination of strategies he adopts to increase his own profit.
First of all, the defense balance strategy is found through ncPSO. Then, ten times attacks are randomly performed under the defense equilibrium strategy calculated by ncPSO, and the profit of attacker is calculated. The experimental results are shown in Tables 5 and 6.
The first row in Tables 5 and 6 represents ten times random attacks, the average and standard deviation of these ten attacks. The first column in Tables 5 and 6 represents different attack resources. It can be seen from Tables 5 and 6 that under the condition of the same attack resources, the profit of the attacker is roughly the same in ten attacks. The values of the standard deviations of ten attacks are very small. The standard deviation indicates how spread out the data are. The smaller the standard deviation value, the smaller the difference between the data. The small standard deviation in the experimental results also indicates that the profit from ten attacks are approximately equal. This proves that using ncPSO to solve mixedstrategy Nash equilibrium is effective.
5.3. Losses of Defender under Different Attack and Defense Resources
In this subsection, simulation experiments are performed to discuss the losses of defender under different attack and defense resources. When the attack resources and defense resources are 2, 4, 6, 8, and 10, respectively, ten times simulation experiments are performed to calculate the losses of defender. Then the average and standard deviation of the losses of defender over ten experiments are calculated. The results of ten times experiments are shown in Table 7.
Table 5 shows the defense losses obtained by using ncPSO to solve the Nash equilibrium under different attack and defense resources. The smaller standard deviation of each group of experiments indicates the stability of the experiment. The experimental results show that the more defense resources, the less defense loss of the defender. The more resources to attack, the greater the defense loss of the defender. At the same time, the experimental results show that when the offensive and defensive resources are equal and equal to about half of all the offensive and defensive resources, it is most unfavorable to the defender.
5.4. Strategies of Attacker and Defender with Different Defense Resources
In this section, the attack resource is fixed as 4, and the strategy selection of the attacker and the defender is discussed when the defense resource is 2, 4, 6, 8, and 10, respectively. In order to prevent the chance of the results, each group of experiments was carried out 10 times, and then the mean value was taken as the experimental result. After using ncPSO to calculate the mixedstrategy Nash equilibrium of both players of the game, we map it to the probability of attacking and defending each element to analyze the attack and defense behaviors. The experimental results are shown in Figure 5.
(a)
(b)
(c)
(d)
(e)
From subfigures a, b, and c, it can be seen that when there are fewer defensive resources, the defender will spend more resources on elements of higher importance. The attacker will attack less important elements to avoid the defense of defender to obtain a higher profit. As can be seen from subfigures d and e, when defense resources are sufficient, the defender will evenly allocate defense resources to each element. Because the attacker does not know the resource allocation of the defender, he will guess that the defender allocates most of the resources to the elements of high importance, so the attacker will still allocate the attack resources to the elements of lower importance.
5.5. Strategies of Attacker and Defender with Different Attack Resources
In this section, the defense resource is fixed as 4, and the strategy selection of the attacker and the defender is discussed when the attack resource is 2, 4, 6, 8, and 10, respectively. In order to prevent the chance of the results, each group of experiments was carried out 10 times, and then the mean value was taken as the experimental result. After using ncPSO to calculate the mixedstrategy Nash equilibrium of both players of the game, we map it to the probability of attacking and defending each element to analyze the attack and defense behaviors. The experimental results are shown in Figure 6.
(a)
(b)
(c)
(d)
(e)
As can be seen from subfigures a, b, and c, when there are few attack resources, the defender will allocate more defense resources to the elements with high importance, so that the attacker will attack the elements that allocate less defense resources to obtain profit successfully. As can be seen from subfigures d and e, when there are many attack resources, the attacker no longer considers the strategy choice of defender, but randomly attacks each element. In this case, the defender also distributes defense resources equally to defense each element.
5.6. Strategies of Attacker and Defender with Different Attack Resources in Another Network
In this subsection, the network scale is expanded, and a simulation experiment with 10 nodes and 19 elements is carried out. The experimental diagram is shown in Figure 7. In this experiment, the defense resources are set to 15, and the attack resources are set to 5, 10, and 15, respectively. When the attack resources are set to 5, 10, and 15, the number of strategies from attacker is shown in Table 8. Compared with the network graph in Figure 4, although Figure 8 only increases a little network size, the attack and defense strategies increase a lot. The ncPSO is used to solve the Nash equilibrium of the game, and the probability of each element being attacked and defended is calculated. The average of 10 experimental results is taken to ensure the reliability of the experiment. The experimental results are shown in Figure 8.
(a)
(b)
(c)
As can be seen from the figure, the importance of the communication link cannot be ignored, and the importance of the communication link is not lower than that of the communication equipment. Figure 8 shows that when the defense resource is 15 and the attack resource is 5, the defender will allocate resources evenly to deal with the attacks of attacker, and the attacker predicts that defender will allocates more resources to protect more important elements, so attacker will attack less important elements to obtain profit. When the defense resource is 15 and the attack resource is 15, the defender will select elements with higher importance to strengthen protection to reduce losses, and the attacker chooses the element that the defender allocates less defense resources to attack to maximize the benefit of benefit (see Table 9).
6. Conclusion
5G heterogeneous network of CPS is a more intelligent and open network system based on software defined network (SDN) and network function virtualization (NFV). The macro analysis of hacking behavior through game theory is an effective method to prevent hacking attacks. Therefore, we established a system model and a game model based on 5G heterogeneous networks of CPS, respectively. The solution of mixedstrategy Nash equilibrium in game models is the most important part of analyzing attack and defense behaviors. A ncPSO is proposed to solve the mixedstrategy Nash equilibrium and analyze the strategy choices of attacker and defender under different attack and defense resources through simulation experiments. Experiments demonstrate the effectiveness and superiority of the proposed ncPSO. The research in this paper provides a feasible macro analysis for defenders to defend against attacks of hacker.
Data Availability
The data used to support the findings of this study are included within the article.
Conflicts of Interest
The authors declare that they have no conflicts of interest.
Acknowledgments
This project was funded by the National Natural Science Foundation of China, under No. 61932005.