1 Introduction

At present, social networks have become an important channel and carrier for maintaining relationships and disseminating information in human society. Users can publish and receive all kinds of topics and opinions related to national economy and people’s livelihood through mobile phones and other mobile terminals anytime and anywhere. Taking online social network as a platform to provide various services and applications, many researchers have carried out extensive studies on individual user behaviors such as microblog posting, searching, browsing and commenting, as well as user group interaction behaviors such as relationship building and content selection [1]. The methods used to study user behavior in social networks include technology acceptance model, queuing theory and planned behavior theory.

In recent years, it has become a hot issue to study the modeling and application of interaction behavior among individual social users from the perspective of game. Among them, the research on user behavior analysis of social networks based on game theory is widely applied in public opinion analysis, privacy protection and benefit analysis of e-commerce platforms [2,3,4]. In the aspect of pre-warning and analysis of public opinion, based on the completely rational game analysis of the cost and income of users in the communication of public opinion, verified the relationship between individual trust, importance of public opinion and communication of public opinion in social relations. In terms of e-commerce platform, based on the theory of game and multi-objective decision making, the game optimization analysis of different types of participants is carried out, so as to realize the in-depth excavation of potential benefits of cross-border e-commerce. In the aspect of user privacy protection, by analyzing the problems of user privacy protection and incentive in social networks, a user privacy behavior analysis model based on evolutionary game and a privacy protection investment decision framework are proposed to improve the balance ability between the privacy protection and incentive mechanism of social users.

Although most social network user behavior analysis based on node game model has achieved good application effect, compared with node-based game strategy, edge-based game strategy is more suitable for depicting the high complexity and dynamic characteristics of social network structure, and makes the description of the diversity of cooperative behaviors among users more accurate. At present, there are few researches on user behavior of edge-based game model, and the following problems exist: (1) most researches focus on using grid network and Random network, that is, the influence of social network dynamics on cooperation level is ignored; (2) in the existing edge-based game model, most of the disconnect–reconnect mechanism adopts the one-to-many strategy, which will be affected by the benefits of all the surrounding neighbors. In other words, different user behaviors adopt the same update strategy, which leads to inaccurate depiction of user behavior diversity.

In order to solve the above problems, a user behavior analysis model of social network based on edge evolution game (EEG) is proposed, which sets the behavior interaction mode between users by defining the social game network. The payoff function is designed based on the prisoner’s dilemma problem. Considering the second-order propagation of information, the update strategy and the disconnect–reconnect mechanism are proposed to describe user behavior. The cooperative clusters generated in the evolution of the EEG model promote user cooperative behaviors in social networks, and the results provide a basis for studying user game behaviors and cooperative emergence in social networks. Its contributions are as follows:

(1) Based on the influence range of second-level neighbor nodes, the mechanism of disconnect–reconnect is proposed, which effectively simulates the relationship between network dynamic change and user behavior.

(2) In different dynamic network environments, the influence of different initial cooperation ratio, betrayal temptation and strategy update probability on the evolution of cooperation is discussed. Compared with other models, the authenticity and validity of EEG model for promoting cooperation evolution are verified.

(3) The influence of edge-based game evolution model on user behavior and network structure is analyzed and discussed. The interaction between node cooperative cluster formed by EEG model and user cooperative behavior is verified.

The whole article is organized as follows: in Sect. 2, the theory, model and application of the combination of game theory and social network are discussed and analyzed; in Sect. 3, the differences between edge-based game and node-based game in user behavior analysis and the advantages of side game are discussed; in Sect. 4, the framework of EEG model is proposed, and the calculation of benefit matrix, the design of disconnect–reconnect rule and the strategy updating process are discussed in detail; in Sect. 5, according to the set parameters, evolutionary game experiment and result analysis are carried out. Compared with similar models, the superiority of EEG model is verified; finally, the conclusion and the future work is discussed.

2 Related works

Evolutionary game theory focuses on how bounded rational individuals maximize their returns over time in repeated games. Based on individual game, Allen et al. proposed the conditions for the evolution of cooperative behavior on any interaction graph and substitution graph (in which the propagation graph is connected). Then, based on the theory of coalescing Random walks in the graph, a method to calculate the critical benefit–cost ratio of cooperative evolution on arbitrary spatial structure is obtained [5, 6]. At present, Allen et al. further extends this conclusion, making the method applicable to any update process and evolutionary prediction applications. Hilbe C. et al. analyzed the random game theory and evolutionary game theory on the premise that cooperation increases public resources while defection decreases public resources, and found that the dependence of public resources on interaction greatly enhances the cooperative tendency [7]. Danyang J. et al. studied the influence of inertia behavior on cooperation in an evolutionary model with isolated individuals, and found that individual inertia would hinder the emergence of cooperation [8]. Guo H. et al. proposed the evolutionary game model, and people with good reputations could be rewarded, while those with low reputations would be punished. Studies have found that this mechanism can promote cooperation [9]. Xu X. et al. studied the influence of individual rationality on cooperative behavior in a structured system with blackmail individuals [10]. Li Y. et al. assumed in the model that individuals with high income have sympathy for neighbors with low income, and introduced a mechanism of income redistribution, which was found to promote cooperation [11]. Su Q. et al. proposed a multi-person evolutionary game framework with edge diversity, in which different types of edges described different social relationships, emphasizing the importance of social connections, and providing an effective method to reduce computational complexity and analyze the evolution process of real systems [12]. Wang et al. established the dynamics of mixed stochastic evolutionary game based on individual strategy updating in Moran process and imitation process. By studying individual updating rules and strategies affecting evolutionary games, it was found that the probability of fixation has nothing to do with the probability of adopting imitative updating strategies [13]. As an additional strategy of game, voluntary participation has been proved to be an effective way to promote cooperative evolution. Therefore, Shen et al. studied the effect of coevolution on the evolution of cooperation in voluntary prisoner’s dilemma game, and the experiment showed that voluntary participation could effectively improve the proportion of cooperation, and there existed an optimal increment value that played an utmost role on the evolutionary dynamics [14].

In recent years, scholars have gradually shifted their attention from the macro level to the micro level to study users and interaction behaviors among users in social networks. Yu et al. studied the interaction between users discussing products based on their brand preference, loyalty and herd psychology, and their research was more inclined to study the competition between topics [15, 16]. Wang et al. proposed a random game network model to analyze competitive network behavior [17]. Su proposed a game theory model of multi-topic communication mechanism in social networks [18]. Zhang et al. introduced a permanence of expectation dependence in spatial prisoner’s dilemma game to promote cooperation between groups. The sensitivity of strategy persistence to expectation was characterized by defining tunable parameters, and the effect of this sensitivity on the evolution of cooperation was studied. The results showed that the micro-evolution and sensitivity of cooperation between users could gather larger cooperative groups to further promote cooperation [19]. Network users transmit different topics, considering their reward and personality. By analyzing relevant cases, it is found that multi-topic communication is influenced by self-cognition, social interaction and information acquisition. Wu et al. proposed a trust-based information transmission and prediction model, and discussed the interaction between information transmission and trust dynamics on multiple networks [20]. Wang et al. studied the cooperative evolution of user information sharing behavior in social networks based on the social evolutionary game model, and through numerical simulation of the social evolutionary game model, revealed the influence of updating frequency of concern relationship between users, users’ pursuit of reputation and group amplification effect on the evolution of social networks [21]. He et al. studied that when the environment performed better than the heredity in the spatial evolution game, the linear combination of heredity and environment was defined as individual fitness, and experimentally verified that joining the dominant environment could improve the level of cooperation between users [22].

In addition, when combining social networks with game theory, the complexity and dynamics of networks need to be considered from the perspective of social network structure. Zimmermann M. G. et al. studied the evolutionary game of dynamic network for the first time, gave the characteristics of dynamic network game, and discussed in detail the emergence characteristics of cooperation between users [23, 24]. Wu et al. studied the effect of dynamic networks on the level of network cooperation, the model assumes that the connection dynamic process is faster than the policy dynamic process [25]. By comparing four co-evolutionary rules, Liu et al. explored how the way of disconnection and connection establishment affects cooperation [26]. The effect of changing the strength of interaction according to the expectation of income on the level of network cooperation was discussed, and the evolutionary game of multi-layer networks had also attracted the attention of relevant scholars [27, 28]. At present, most of the research on evolutionary games in networks has been conducted on node-based, while relatively few research results have been conducted on edge-based evolutionary games, and the nature of edge-based evolutionary games is not necessarily the same as node-based evolutionary games. Nepusz T. et al. evaluated edge-based dynamics processes on networks and demonstrated that the controllability of the process is significantly different from node-based dynamics [29]. Su et al. proposed two models of interaction singularity and interaction diversity and verified that interaction diversity promotes user cooperation in homogeneous and heterogeneous networks, respectively [30, 31].

3 Edge-based and node-based evolutionary games

From Fig. 1, in the node-based game, when \(S_{x}\) is a cooperative strategy, node x only has a cooperative strategy for all its neighbors; while in the edge-based game, node x has one corresponding strategy for each neighbor: \(S_{xw}\), \(S_{xy}\), \(S_{xz}\), each of which can be chosen to cooperate or betray. Therefore, in the edge-based game, node behavior becomes diversified, which is more in line with the behavior of users in social networks: different strategies are adopted for different neighbors.

Fig. 1
figure 1

Edge-based and node-based evolutionary games. a Node-based evolutionary game, and b edge-based evolutionary game. xyz and w represent nodes; \(S_{x}\) in a represents the strategy adopted by node x; \(S_{xy}\) in b represents the strategy of node x to neighbor y, and similarly, \(S_{yx}\) represents the strategy of node y to neighbor x

Compared with the node-based evolutionary game, the edge-based evolutionary game model has the following advantages:

(1) Income calculation the total incomes of a node are the sum of the income obtained by the game between the node and each of its neighbors. The node can only choose one strategy in the node-based evolutionary game. Therefore, for a cooperative node, the betrayal neighbors can get benefits from themselves without paying any price, which reduces their own incomes; while in the edge-based evolutionary game, it can change strategies to the betraying neighbors in a targeted manner, which reduces losses and maximizes incomes.

(2) Strategy update when performing imitation update, if it is edge-based evolutionary game, only the node strategy to a certain neighbor is changed after successful update; if it is node-based evolutionary game, every time a node updates strategy, its strategy to all neighbors is also changed, instead of just changing the strategy to one neighbor.

(3) Disconnect–reconnect when performing disconnect–reconnect, the node chooses whether to disconnect or not according to the strategy of neighbor to itself. In the node-based evolutionary game, the node strategy is one-to-many and will be influenced by the incomes and strategy of all surrounding neighbors, which lacks relevance; in the edge-based evolutionary game, the node strategy is one-to-one and the strategy for a certain neighbor is mainly influenced by the incomes and strategy of the current neighbor. Therefore, performing the disconnect–reconnect, the node will not be disturbed by other factors when choosing the object of disconnection and has good relevance and correctness.

4 EEG model construction

Social gaming network can be expressed as G=(VESU). \(V=\{1\le i\le n\}\) represents user set, where n is the number of users; \(E=\{e_{ij}\mid i\in V,j\in V\}\) represents user relationship set; \(S=\{S_{ij}\mid i\in V,j\in V\}\) represents the user strategy set on the edge, where \(S_{ij}\) is the strategy of user i to user \(j;\,U=\{U_i\mid i\in V\}\) represents the income set of user, where \(U_i\) is the total income of user i. The framework of EEG model is shown in Fig. 2.

Fig. 2
figure 2

The framework of EEG model

Figure 2 shows that the EEG model framework is composed of network layer, game layer and evolution layer. In the network layer, user information, relationships between users, and user benefits and strategies are stored. The game layer defines the interaction mode of user game and the calculation rules of user payoff respectively. The evolution layer includes strategy update and disconnect–reconnect mechanism, which defines strategy and relationship update rules respectively. After the user updates the strategy and performs the disconnect–reconnect mechanism at the evolution layer, the relationship the user’s own strategy set and the relationships between users are updated.

The implementation process of the EEG model in Fig. 2 is as follows:

(1) Mapping the relationships between people in the real world into nodes and edges in social networks.

(2) The EEG model is used to deal with the relationship between users in social networks, and the basic information of users, the relationship between users and benefits are stored in the network layer.

(3) Based on the social network graph composed of basic information between users, interactive game between users is carried out in the game layer, and payoff calculation is carried out to update their own payoff.

(4) According to the results of payoff calculation, the strategy is updated in the evolution layer, and the user node with high payoff is selected to execute the disconnect–reconnect rule. The strategy set and the relationship between users are updated through the process of evolution layer.

(5) After the implementation of multiple rounds of evolutionary game, the user cooperation cluster is generated, which greatly promotes the level of cooperation between users.

In this paper, the pairwise interaction mode and the disconnect–reconnect mechanism are adopted. Due to the behavior diversity of neighbor nodes, the user node interacts with neighbor nodes in pairs to improve the diversity of user behaviors. However, when executing the disconnect–reconnect mechanism, the disconnected object will not be disturbed by other factors. Therefore, the execution results of EGG model have good correlation, and the user behavior presents the characteristics of diversity.

4.1 Income calculation

(1) Payoff matrix

As interpersonal relationship and price competition in social network satisfy the prisoner’s dilemma game model, the payoff matrix of prisoner’s dilemma model is selected in this paper, it is shown in Table 1:

Table 1 Payoff matrix

(2) Calculation process

User A games with user B, when a cooperative strategy is adopted between two users, the game income of each user is R; when the strategy of user A is cooperation and user B is betrayal, the game income of users A and B are S and T, respectively; when a betrayal is adopted between two users, the game income of each user is P.

$$\begin{aligned} U_{i}=\sum _{j\in neighbor_{i}}{U_{ij}}=\sum _{j\in neighbor_{i}}{S_{ij}^{\text {T}} {{\varvec{M}}}S_{ji}}. \end{aligned}$$
(1)

Where \(U_i\) represents the total income of user i, which is the sum of the incomes obtained by user i game with each neighbor; \(neighbor_{i}\) represents the neighbor set of node \(i;\,S_{ij}\) represents the strategy of node i to neighbor \(j.\, {{\varvec{M}}}\) is a \(2 \times 2\) matrix, and are expressed by the following Formula (2) and (3).

$$\begin{aligned} S_{ij}= & {} \left\{ \begin{array}{ll}(1,0)^{\text {T}}&{}S_{ij}={\text {C}},\\ (0,1)^{\text {T}}&{}S_{ij}={\text {D}},\end{array}\right. \end{aligned}$$
(2)
$$\begin{aligned} {{\varvec{M}}}= & {} \begin{pmatrix}R&{}S\\ T&{}P\end{pmatrix}, \end{aligned}$$
(3)

where C represents cooperation and D represents betrayal. Formula (2) vectorized the strategy, using \((1,0) ^{\text {T}}\) to represent the cooperation strategy, and \((0,1) ^{\text {T}}\) to represent the betrayal strategy. The TRSP in the matrix \({{\varvec{M}}}\) correspond to the parameters in Table 1, respectively.

In order to eliminate the influence of node degree on income calculation, the total incomes of the node are normalized as follows:

$$\begin{aligned} \overline{U}=\frac{U_{i}}{d_{i}}, \end{aligned}$$
(4)

where \(d_{i}\) represents the degree of node i.

4.2 Strategy update

The strategy of a node in social network to a certain neighbor will be influenced by the surrounding neighbors and to different degrees. Therefore, the strategy update is shown in Fig. 3.

Fig. 3
figure 3

Node i is randomly selected for strategy update, it randomly selects the edge \(e_{ij}\) (dotted line). When updating the strategy \(S_{ij}\), node i selects j as the imitation object with probability p, and performs the imitation update with probability \(f(U_{i}-U_{j})\) according to fermi function (red arrow); or randomly selects one of the surrounding neighbors (klm) as an imitation object with probability \(1-p\). As in [32], p is set to 0.90. Assuming that the selected imitation object is k, node i will imitate the strategy \(S_{ki}\) with probability \(f(U_{i}-U_{k})\) (blue arrow) (Color figure online)

The formula of function f is as follows:

$$\begin{aligned} f(U_{i}-U_{j})=\frac{1}{1+\exp [K(U_{i}-U_{j})]}, \end{aligned}$$
(5)

where \(K>0\) represents noise, whose function is to enable users in social networks to imitate strategies with higher total incomes than their own with a greater probability, and to describe user irrational behaviors, enabling users to imitate strategies with lower incomes than their own with a small probability. Referring to the classical value of K in [30, 33], and to increase the irrationality of the user, K is set to 0.8.

4.3 Disconnect–reconnect

Users in social networks will update their relationships to obtain higher incomes. For some low-income betrayal users, they will disconnect from them and establish connections with high-income users. Considering the second-level propagation characteristics of information dissemination, the node is restricted to perform disconnect–reconnect within the second-level neighbors. The rules are as follows:

(1) Disconnect

Node i will compare the income from the game with each neighbor, and choose the neighbor with the lowest game income. If the neighbor strategy for node i is betrayal, it is selected as the disconnect node j, the mathematical expression is as follows:

$$\begin{aligned} U_{ij}=\min U_{ik,k\in neighbor_{i}},\quad S_{ji}={\text {D}}, \end{aligned}$$
(6)

where min\(U_{ik,k\in neighbor_{i}}\) represents the minimum value of the game income between node i and each neighbor, \(U_{ij}\) represents the income of node i after the game of node j, \(S_{ji}\) represents the strategy of the disconnect node j to node i.

There are two special cases for the above strategies, which are handled as follows:

(a) If the disconnect node j has only one neighbor node i, the disconnect–reconnect fails.

(b) There is only one neighbor of node i, and its strategy to node i is betrayal, then the neighbor is directly selected as the disconnect node j.

In case (a), if the disconnect node j has only one neighbor node i, an isolated node j will be generated after the edge is disconnected. After multiple rounds of the game, a large number of isolated nodes will be generated, which is not conducive to the spread of cooperation. In case (b), a successful round of disconnect–reconnect consists of disconnection and reconnection. Therefore, after node i disconnects the only neighbor node j, it will choose another node to reconnect, and no isolated node will be generated.

(2) Reconnect

After disconnecting the edge, node i will select a node m from the neighbors of the disconnect node j to reconnect. The reconnect node m needs to satisfy the following conditions:

$$\begin{aligned} \left\{ \begin{array}{ll} U_{m}=\max U_{k,k\in Q}&{}\left| Q\right|>1,\\ U_{m}>U_{j}&{}\left| Q\right| =1,\end{array}\right. \end{aligned}$$
(7)

where \(U_{m}, U_{k}, U_{j}\) respectively represents the total incomes of node mk and j; \(Q= neighbor_{j}-i\) represents the neighbors of j except i.

Formula (7) indicates that when \(\left| Q\right| >1\), there are multiple nodes in Q, and the node with the highest total incomes is selected as the reconnect node m; When \(\left| Q\right| =1\), there is only one node in Q. If the total incomes of this node is greater than the total incomes of node j, it is selected as the reconnect node m.

After successful execution of the disconnect–reconnect, the reconnection edge is assigned strategies, the rules are as follows:

$$\begin{aligned} \left\{ \begin{array}{l}S_{mi}={\text {D}},\\ S_{im}=S_{ij}.\end{array}\right. \end{aligned}$$
(8)

The strategy \(S_{mi}\) of the reconnect node m to node i is set to betrayal, and the strategy \(S_{im}\) of node i to the reconnect node m is consistent with the strategy \(S_{ij}\) of node i to disconnect node j. The advantage of assigning strategies to reconnecting edges in this way to ensure that the number of cooperation and betrayal strategies in the network remains the same before and after the disconnect–reconnect, and to eliminate the influence of artificially adding cooperation or betrayal strategies to the network. In the process of evolutionary gaming, the nodes will update the strategy or perform the disconnect–reconnect according to the probability. The probability of strategy update is \(\tau _{s}\), and the probability of performing the disconnect–reconnect is \(\tau _{r}\).

In social network, users always change their strategies, but rarely change their own relationships. Therefore, the probability of node updating strategy is higher. To satisfy the situation, the experimental set \(\tau _{s}\) is between 0.90 and 0.98 in this paper.

4.4 EEG model algorithm description

The implementation of the EEG model is shown in Algorithm 1.

figure e

Algorithm 1 complexity analysis: assuming the number of network nodes is n and the average degree of network nodes is m. Lines 1–2 traverse the nodes in the network to calculate the income. In calculating the income, the neighbors of each node need to be traversed and the time complexity is O(\(n^2\)). Lines 3–30 are for loops with a time complexity of O(N). Lines 4–17 are strategy updates: line 17 calculates the game income of nodes i and j, and traverses their respective neighbors in time complexity O(\(2*m\)). Lines 18–29 are disconnect–reconnect: lines 20–23 traverse the neighbors of the nodes when choosing the disconnect node and reconnect node in time complexity of O(\(2*m\)). Line 28 calculates the game incomes of nodes ij, and m, which traverse their respective neighbors in time complexity of O(\(3* m\)). Since the probability of strategy update and disconnect–reconnect are 90% and 10%, respectively, the time complexity within the for loop is O(\(0.9*2m +0.1*5m\)) \(\approx\) O(2m). The time complexity of the EEG model is O(\(n^2\)) + O(2mN) = O(\(n^2 + 2mN\)).

5 Experimental results and analysis

5.1 Comparison of model parameters

Under different initial cooperation numbers, three networks of Random, WS small-world, and BA scale-free networks were selected separately to explore the effects of betrayal temptation T and strategy update probability \(\tau _s\) on the evolution of cooperation. The parameters are set as follows: Initial network G is randomly generated by using the functions of the networkx package in Python, the parameters of these three networks are shown in Table 2 Initial cooperation ratio \(\lambda\); number of evolution rounds \(N = 6*10^7\) and payoff Matrix M is shown in formula (9).

$$\begin{aligned} {{\varvec{M}}}=\begin{pmatrix}1.0&{}-0.4\\ T&{}0\end{pmatrix}. \end{aligned}$$
(9)
Table 2 Network data sets

A total of multiple experiments was carried out for each network, and the average of the multiple evolutionary results was taken as the experimental results, as shown in Figs. 4 and 5.

Fig. 4
figure 4

Fraction of cooperators at steady state \(F_c\) for the three networks with the betrayal temptation \(T=1.5, 1.6, 1.7, 1.8, 1.9, 2.1, 2.3\), under the strategy update probability \(\tau _s=0.98\) and the initial cooperation ratio \(\lambda =15\%, 30\%, 50\%\) (Color figure online)

Fig. 5
figure 5

Fraction of cooperators at steady state \(F_c\) for the three networks with the strategy update probability \(\tau _s = 0.98, 0.96, 0.94, 0.92, 0.90\), under \(T=1.5\) and the initial cooperation ratio \(\lambda =15\%, 30\%, 50\%\) (Color figure online)

As shown in Fig. 4, the curves show an overall decreasing trend under the three networks, indicating that the ability of the model to promote cooperative evolution decreases with the growth of T, and it cannot promote cooperative evolution at higher T.

In the WS and Random networks, at the same T, the blue curve is always the highest, the yellow curve is the second highest and the green curve is the lowest. In the two networks, the higher the initial cooperation rate \(\lambda\) is, the higher the cooperation rate in steady-state \(F_c\) is, and the stronger the EEG model can promote cooperation. The correlation between \(\lambda\) and \(F_c\) does not remain constant on the BA network; when \(T < 1.7\), \(\lambda\) and \(F_c\) correlations are the same as the WS and Random networks; when \(T > 1.7\), the higher \(\lambda\), the smaller \(F_c\) instead, and the lower the EEG model can promote cooperation.

As can be seen from the experimental results, with the increase of T, the income of the individual who adopts the betrayal strategy increases, and more and more users are more willing to imitate their strategy and establish contact with them. Therefore, \(F_c\) decreases with the increase of T. When T increases to a certain value, it is difficult for cooperative clusters to resist the intrusion of betrayal strategy, and finally betrayal dominates most of the network.

It can be seen from Fig. 5 that for the same strategy update probability \(\tau _s\), the curve values of the three networks are blue with the largest, yellow with the second largest and green with the smallest. The ability of the EEG model to promote cooperation increases with the increase of the initial cooperation rate \(\lambda\).

In the three networks, the curves have different trends. In BA network, the curve remains stable at first, and decreases with the increase of \(\tau _s\) after \(\tau _s > 0.94\). In WS and Random network, the curve shows an increasing trend and the curve value changes greatly. On BA network, the ability of EEG model to promote cooperation decreases slightly with the increase of \(\tau _s\), but it becomes more stable. In WS and Random networks, the ability of EEG model to promote cooperation is greatly affected by \(\tau _s\) and increases with the increase of \(\tau _s\). The curve change rates of WS network and Random network are different. In WS network, \(\tau _s > 0.94\), the curve increases rapidly in the early stage, and then tends to be flat and stable. In the Random network, the curve tends to be flat and stable when \(\tau _s > 0.94\).

It can be seen from the experimental results in Fig. 5 that \(\tau _s\) has different effects on \(F_c\) in different networks. In BA network, \(F_c\) is less affected and can be almost ignored, while in WS and Random network, \(F_c\) is more affected. As BA network itself has large degree nodes, it is easy to form cooperative clusters. For WS and Random networks, appropriate adjustment of relationships can promote the formation of cooperative clusters and thus promote the evolution of cooperation. Frequent relationship adjustment is not conducive to the formation of collaborative cluster, and it is always unable to resist the intrusion of betrayal strategy, resulting in the decrease of \(F_c\).

5.2 Analysis of evolution processes

The payoff matrix is shown below:

$$\begin{aligned} {{\varvec{M}}}=\begin{pmatrix}1.0&{}-0.4\\ 1.5&{}0\end{pmatrix}. \end{aligned}$$

To explore how the model EEG affects the evolution of cooperation, an experimental analysis of the evolutionary trend of the cooperation number was conducted. The parameters were set as in Sect. 5.1 except for the betrayal temptation \(T=1.5\), the initial cooperation ratio \(\lambda =15\%\), and strategy update probability \(\tau _s=0.98\). The results are shown in Fig. 6.

Fig. 6
figure 6

Evolution process of cooperation on social network. a On BA scale-free network, b on WS small world network, and c on random network. (Blue line) the evolution of cooperation with increasing number of games when nodes only update their strategies without the disconnect–reconnect; (yellow line) the evolution of cooperation after adding the disconnect–reconnect (Color figure online)

From Fig. 6, it can be seen that when only updating the strategy, on the BA scale-free network, the initial number of cooperation has increased after a small decline, and finally the cooperation has almost spread the network; on the WS small world network, the number of cooperation shows a oscillating downward trend, disappearing around \(3*10^7\) rounds, and betrayal dominates the whole network; on the random network, the evolution trend of the number of cooperation is roughly the same as that of the WS small world, except that the amplitude of oscillation is different. In the end, cooperation disappears and betrayal prevails. Therefore, when the social network satisfies the scale-free characteristics, users are more willing to obtain the maximum benefit through cooperation; when the social network satisfies the small world and random characteristics, the users who initially adopted the cooperative strategy changed their strategy due to the temptation of betrayal, and the cooperative behavior disappeared.

After adding the disconnect–reconnect, cooperation has been promoted on all three types of networks. In Fig. 6a, the cooperation number initially decreases more and then rises; compared with not adding the disconnect–reconnect, it rises slightly slower at the early stage of evolution and becomes faster after many rounds of evolution; in Fig. 6b, the number of cooperation starts to rise after a small decline and rises faster, while it becomes slower and gradually tends to steady state after 900; in Fig. 6c, the number of cooperation increases after a small decline, the initial increase is relatively fast, and then oscillates and rises slowly. The reason is: the addition of the disconnect–reconnect changes the relationship between nodes, which in turn changes the original network structure of the community, and has an impact on the evolutionary results.

In order to explore the process of the node relationship update and network structure evolution after adding the disconnect–reconnect, the time snapshots of the three network evolution game processes are analyzed and compared, as shown in Figs. 7, 8 and 9. The black dots in the figure indicate the nodes in the network, and the node size is proportional to the node degree: the larger the node degree, the larger the black dot; the edges in the network are represented by three different color line segments: red indicates two strategies on the edge are all cooperation; blue indicates that one strategy is cooperation and the other strategy is betrayal; black indicates that both strategies are betrayal.

Fig. 7
figure 7

Evolutionary snapshots on BA scale-free network. af Snapshots of the initial network, \(1*10^5, 5*10^6, 1*10^7, 4*10^7\) rounds and the final network, respectively (Color figure online)

In Fig. 7, during the evolution, a cluster with a large central node and a smaller degree of the surrounding nodes is formed in the network, and most of the edges within the cluster are red, which is called the cooperative cluster.

At the beginning, the blue edges are distributed relatively scattered, as shown in Fig. 7a; in the early stage of the evolution, the blue edges gradually disappear, and the network evolves a small number of cooperative clusters with relatively scattered distribution, as shown in Fig. 7b; as the evolution proceeds, the cooperative clusters split to form small cooperative clusters and move closer to the center, as shown in Fig. 7c; in the middle stage of the evolution, the cooperative clusters continue to split, and the cooperation spreads from the clusters to the surroundings, as shown in Fig. 7d; in the later stage of the evolution, the cooperative clusters increase, and most of the network is occupied by the red edges, as shown in Fig. 7e; after multiple rounds of evolution, the growth of cooperation slows down, and finally cooperation almost occupies the network, as shown in Fig. 7f, the network structure becomes diffuse as a whole.

Fig. 8
figure 8

Evolutionary snapshots on WS small-world network. af Snapshots of the initial network, \(1*10^5, 5*10^6, 1*10^7, 4*10^7\) rounds and the final network, respectively (Color figure online)

In Fig. 8, at the beginning of the network, most of the edges are blue, and the distribution is relatively concentrated, as shown in Fig. 8a; in the early stage of evolution, the network evolved to generate a small number of cooperative clusters, as shown in Fig. 8b; then, the network gradually evolves into a radial shape, forming a large-scale cooperative cluster in the center, with a small number of nodes of degree one distributed around, and most of the edges between nodes are black, as shown in Fig. 8c; in the middle stage of evolution, the cooperation spreads outward from the central cooperative cluster, and the number of cooperation increases, as shown in Fig. 8d; in the later stage of evolution, the cooperative clusters becomes dispersed, and the nodes with degree one increase and are more evenly distributed around the cooperative clusters, as shown in Fig. 8e; after multiple rounds of evolution, the cooperative clusters move closer to each other, and the number of cooperation increases less, as shown in Fig. 8f. The network structure becomes cohesive and in a state of shock.

Compared with the scale-free network in Fig. 7, the cooperative clusters on the small-world network are more concentrated, and the final network structure is relatively more aggregated. The reason is that the disconnect–reconnect restricts nodes from updating their relationships within the second-level neighbors. Therefore, if the initial network with tightly connected nodes becomes cohesive in its structure after evolution and forms more concentrated cooperative clusters; conversely the structure becomes divergent and forms more dispersed cooperative clusters.

Fig. 9
figure 9

Evolutionary snapshots on random network. af Snapshots of the initial network, \(1*10^5, 5*10^6, 1*10^7, 4*10^7\) rounds and the final network, respectively (Color figure online)

In Fig. 9, the network is initially mostly blue edges with more concentrated distribution, as shown in Fig. 9a; in the early stage of evolution, the nodes move closer to the middle to form small cooperative clusters, as shown in Fig. 9b; as the evolution proceeds, tight cooperative clusters are formed in the center of the network, as shown in Fig. 9c; in the middle stage of evolution, cooperation spreads outward, but there are more blue edges in the cooperative clusters, as shown in Fig. 9d; in the later stage of evolution, the number of cooperation increases, and the cooperative clusters gradually become larger, but there are still a few blue edges inside, as shown in Fig. 9e; after multiple rounds of evolution, the blue edges become less and a more stable cooperative cluster is formed, and in the end, the cooperation was greatly promoted, as shown in Fig. 9f. Among the three networks, the random network has the most densely connected initial nodes, the final network structure is the most cohesive, and the cooperative clusters are the most concentrated; compared to the small-world network, the nodes with degree one are fewer and closer to the central cluster.

From the experimental results obtained in Figs. 7, 8 and 9, it is clear that cooperative clusters are the key to promoting user cooperative behavior in social networks, and their formation is mainly influenced by two factors: network structure and disconnect–reconnect.

(1) Network structure cooperative clusters are easily formed in networks where clusters are initially present, such as scale-free networks.

(2) Disconnect–reconnect since the initial number of cooperation is set low, there are only a small number of red edges and the nodes are mostly surrounded by black edges in the network, and the income R from both sides of the game taking cooperation is greater than the income P from both taking betrayal. Therefore, when performing the disconnect–reconnect, the nodes are more willing to establish connections with the cooperating nodes. As the evolution proceeds, the central cooperating node attracts the surrounding nodes to establish connections to form small cooperative clusters, and the small cooperative clusters in turn attract the surrounding nodes to establish connections to form large cooperative clusters.

In the evolution of the three types of networks, the mechanism by which cooperative clusters can promote cooperative behavior of users in social networks is as follows:

Since the majority of the nodes within the clusters adopt cooperative strategies, the probability of imitating cooperative strategies is much higher than that of imitating betrayal strategies. Therefore, the clusters are more stable inside the clusters and can assimilate a small amount of betrayal strategies.

At the edge of the cluster, the total incomes of cooperative nodes are greater than betrayal nodes, nodes are more willing to imitate cooperative strategies and establish connections with cooperative nodes. Therefore, the cooperation shows a spread from the cluster to the outside.

5.3 Analysis of evolution results

Model EEG and VP [14], ADP [19], BC [22] and IID [30] models are compared. In order to highlight the authenticity and validity of the model, the payoff matrix of other models and model EEG were selected for comparison, and the main differences between the two designs are the \(S=0\) or \(S=-0.4\). The initial cooperation ratio were also set to \(15\%\), \(30\%\), and \(50\%\), respectively. The experiment is shown in the Figs. 10 and 11.

Fig. 10
figure 10

Fraction of cooperators at steady state \(F_c\) for the three networks with the betrayal temptation \(T=1.1, 1.2, 1.3, 1.4, 1.5\), under \(S=0\) and the initial cooperation ratio \(\lambda =15\%, 30\%, 50\%\) (Color figure online)

As shown in Fig. 10, in BA network, for different initial cooperation ratios, the curves of EEG, VP and ADP models are stable with respect to T, but the values of EEG curves are always larger than those of the other two models. Other models have different amplitude fluctuations, and the value of the curve is much smaller than that of the EEG model.

In WS network, the curves of EEG and IID model are more stable with the change of T under different initial cooperation ratios, and the value of EEG curve is much larger than that of IID model. The curve of BC and VP model fluctuates greatly. The fluctuation of ADP model curve is small, but the curve value always tends to 0. In Random networks, when the initial cooperation rate \(\lambda =15\%\) and 30%, the EEG model shows a small decreasing trend with the change of T. When \(\lambda =50\%\), the EEG curve is stable. Compared with EEG, the curve of IID and VP model is more stable, but the curve value is smaller. VP model curve value is always 0. Other models are inferior to EEG models in terms of stability and curve values.

Fig. 11
figure 11

Fraction of cooperators at steady state \(F_c\) for the three networks with the betrayal temptation \(T=1.5, 1.6, 1.7, 1.8, 1.9, 2.1, 2.3\), under \(S=-0.4\) and the initial cooperation ratio \(\lambda =15\%, 30\%, 50\%\) (Color figure online)

It can be seen from Fig. 11 that in BA network, EEG shows a decreasing trend with the change of T, while the performance of other models is relatively stable. When \(T < 1.7\), the curve value of EEG model is significantly higher than that of other models. When \(T > 1.7\), the curve value of the EEG model is smaller than that of some models. The curves of WS and Random networks are more similar. With the change of T, the change trend of each model curve in the two networks is similar to that in BA network. When \(T < 1.7\), the curve value of EEG model is significantly higher than that of other models. When \(T = 1.7\), it is similar to IID model. When \(T > 1.7\), the curve value of EEG model is smaller than that of IID model.

As can be seen from the experimental results in Figs. 10 and 11, when \(S = 0\), the proportion of cooperation decreases slightly with the increase of T in the Random network, but the overall effect of the EEG model promoting the evolution of cooperation is more stable. Compared with other models, EEG models promote collaboration and are significantly improved. In BA network, when \(S =-0.4\), and T is smaller, EEG promotes coevolution better than other models, but when T is larger, EEG promotes coevolution less. In WS and Random networks, when \(T > 1.7\), EEG model is less effective than IID model in promoting coevolution. In other cases, EEG models are more effective than other models at promoting cooperative evolution.

6 Conclusion

In order to accurately describe the diversity of user behaviors due to the dynamic and complex structure of social networks, an edge-based game evolution model EEG is proposed in this paper. Firstly, the differences between node-based evolutionary game model and edge-based evolutionary game model in user behavior analysis are discussed. Secondly, the payoff matrix is calculated based on the prisoner’s dilemma problem. According to the calculation results of different payoff, the disconnect–reconnect mechanism and strategy update rules are proposed for the dynamic change characteristics of user relationship. Experiments on EEG models on three types of dynamic networks show that compared with node-based games, EEG models can better describe user behavior diversity and network dynamics in social networks, and greatly promote the formation of cooperative clusters. Compared with the existing similar models, EEG model has obvious advantages in promoting cooperation evolution under different time snapshots and related parameters. The results of the study provide a theoretical basis for the analysis of user game behavior in social networks, and the EEG model can facilitate the research of the evolution of individual cooperation and the emergence of cooperation in the group by adopting disconnect–reconnect and stable cooperative clusters.

The disadvantage of EEG model is that it has high time complexity. Therefore, constructing a parallel framework and computing environment for EEG model, and comprehensively consider the related factors such as user’s individual reputation and individual memory in the mechanism of disconnect–reconnect are the future work.