1 Introduction

P2P is a new network technology which enables people to communicate with each other directly over the Internet. In the hybrid P2P network, thousands of interconnected computers are in a peer-to-peer position, acting as both servers and clients. Each peer can both provide resource services and send service requests. The Internet application system structure has shifted from a simple centralized C/S structure to a variety of distributed P2P structures, and the entire network no longer depends on a dedicated centralized server. It transforms communication on the network from centralized resource sharing to direct resource sharing among users, eliminating the middle links. With the increasing number of P2P applications over the past 20 years, a large number of users are uploading and downloading files through P2P services on a daily basis. Therefore, the problem of energy consumption is gradually becoming a vital obstacle to the rapid development of the Internet [1,2,3].

In recent years, the P2P network has attracted extensive attention. Zhang et al. [4] described a multi-sender node streaming data distribution strategy based on a hybrid P2P and C/S architecture. Then they gave and compared the performance of related scheduling algorithms. Amit et al. [5] proposed a content distribution method for P2P applications based on content distribution. And they designed a strategy for balanced content replication in the P2P network. He et al. [6] introduced the powerful advantages of P2P network in distributed computing, collaborative work, multimedia and the applications of P2P network in file sharing. And they analyzed the necessity of building secure P2P network. Yin et al. [7] introduced a peer selection strategy and a broadband allocation strategy, which were used to improve the performance and efficiency of the P2P system in the media content sharing process.

There are many strategies related to queueing theory. The negative customer is an operation or a system disaster whose main effect is to offset the positive customers in the system. The feedback strategy is that a customer for which service has been completed may return to the system with a certain probability to receive service again. Working vacation means that the server in the system may enter a working vacation period due to the small number of customers, and the server in the system is working at a lower rate to provide service to customers during this period, instead of stopping service directly during this period. The server may fail due to other reasons, such as end of life or attendant error. The fault repairable strategy means that a failed server can be repaired by repairers in the system.

In recent years, queueing theory studies were increasingly applied to the P2P network. Ferragut and Paganini [8] analyzed the dynamic properties of P2P file exchange swarms from the queueing perspective, where the service rate of serving nodes varied with the number of nodes. Yu et al. [9] used the repairable M/M/2 queueing model to study wireless communication network and proposed a strategy to decrease energy consumption. Si et al. [10] developed an M/M/c queueing model with impatient customers and repairable fault for unstructured distributed P2P network and took into account the node dynamic process. They concluded that an appropriate increase in node conversion rate can avoid system congestion and improve energy savings. Singha and Singh [11] presented a new incentive mechanism to strengthen cooperation in wireless environments. By using Nash equilibrium, the simulation verified the effectiveness of these mechanisms in enhancing cooperation among users. Liu et al. [12] discussed the equilibrium strategy for the mixed overlay/underlay spectrum sharing approach in cognitive radio networks, which were divided into visible and invisible. Based on the social optimum and spectrum revenue maximization, a pricing mechanism was derived for cognitive users. Jin et al. [13] proposed a delay repair strategy for fixed nodes in the context of hybrid P2P network and gave the expressions for performance indicators such as the system failure rate and the average data access time. Xue et al. [14] established a system model based on hybrid queueing network. And they verified the effectiveness of the strategy and system model. Zhang and Yin [15] considered a P2P network, in which heterogeneous servers were operated in processor sharing rules. By using limited capacity M/M/1/N processor sharing, the performance of the P2P network was analyzed. The computational results were verified by arithmetic examples and the performance of individual server was analyzed.

Due to the enormous number of nodes involved in the P2P network, reducing the total energy consumption has attracted more attention considering the system performance and quality of service. One strategy to decrease energy consumption is allowing the serving node to cycle between normal mode and sleep mode. In recent years, there were several papers that studied the hybrid P2P network from this aspect. Ma et al. [16] used a queueing model to address the "free-riding" phenomenon in the hybrid P2P network. They distinguished between requesting nodes of different reputation and introduced a work/sleep mechanism for the serving nodes. Trunfio [17] proposed a sleep–wake method, which allowed serving nodes to cycle between normal and sleep modes to save energy. In normal mode, the time that a node passed depended on the number of files it provided. Jin et al. [18] proposed a task scheduling strategy with sleep delay timer and wake-up threshold. According to the random behavior of the strategy task, a synchronous vacation queueing model with vacation delay and N-policy was built. Based on this, the energy saving level of the system at steady state is derived, and the effect of the system parameters on the performance indicators was studied by numerical experiments.

Regarding the applications of Nash equilibrium in the hybrid P2P network, Jin et al. [19] considered the online mechanism of P2P nodes and established a continuous time queueing model with random changes of the number of servers. They constructed a revenue function and analyzed the Nash equilibrium strategy and social optimal strategy of the node online mechanism. Huo et al. [20] proposed a new dual-rate transmission energy conservation strategy in a study of cognitive radio network. They established a payoff function based on the payoff expenditure structure and studied the Nash equilibrium strategy and the socially optimal strategy.

The majority of papers mentioned above studied the hybrid P2P network in terms of dynamic changes of nodes and performance of hybrid P2P network. Based on the actual situation that nodes may have some faults due to overloaded tasks in the hybrid P2P network, this paper introduces node faults that can be repaired. And considering the energy consumption generated by unnecessary online behavior when the nodes are idle, the working sleep mechanism is introduced in the hybrid P2P network. The normal busy period is abstracted as the online state, and the working sleep period is abstracted as offline state. The contributions of this paper are threefold.

  1. (1)

    By using the M/M/c queueing model, the hybrid P2P network model is built. The synchronous working vacation strategy is employed to decrease system energy consumption, and then, the energy consumption of the serving nodes in various state is quantified. In the meantime, the negative customer and feedback strategies are applied to the hybrid P2P network in order to make the model more compatible with the actual conditions. Compared with the traditional mode, this method can significantly reduce the energy consumption of the hybrid P2P network.

  2. (2)

    The expressions for performance indicators such as system energy consumption are given by employing Gauss–Seidel iteration method. In order to improve the efficiency of resource request data in the hybrid P2P network, the system performance is studied by numerical experiments.

  3. (3)

    The Nash equilibrium between the arrival rate and the individual benefit of the requesting nodes is studied to avoid the increase in system energy consumption due to an overload of the requesting nodes in the hybrid P2P network.

The rest of this paper is organized as follows. The schematic diagram and the operating mechanism of the hybrid P2P network is introduced in Sect. 2. In Sect. 3, the steady-state probability vector is derived through using a three-dimensional Markov chain. In Sect. 4, the performance indicators of the hybrid P2P network are studied by numerical experiments, and the individual benefit and the optimization of the social benefit are analyzed by Nash equilibrium strategy and social optimal strategy. Conclusions are introduced in Sect. 5.

2 Hybrid P2P network and modeling

2.1 Hybrid P2P network

Hybrid P2P network presents a centralized architecture locally, which consists of different clusters. Each cluster contains a super node (SN) and several ordinary nodes (ON) with the same service resources, and the details of hybrid P2P network can refer to [21]. The ordinary node stores its own resource information and area information, as a serving node receives resource requests from the requesting nodes, establishes peer-to-peer connections and then transmits the resource. The super node is responsible for responding to resource requests, transmitting resources and collecting resource information of ordinary nodes within their own region. In the meantime, the super node maintains and updates the information of the ordinary nodes in the region and establishes connections with the super nodes in other regions. The schematic diagram of the hybrid P2P network is shown in Fig. 1. Specifically, when the hybrid P2P network receives requests, the requesting nodes query within the super node region. If the requested resource exists in the region, the requesting nodes receive the resource transmission in the region. If the requested resource does not exist in the region, the requesting nodes query across the region. By the resource transmission of the super nodes, the requesting nodes find information about the requested resource outside the region. The requesting nodes enter the resource transmission stage after querying the node with the requested resource. A requesting node that completes a resource transmission may continue to request additional resources, or leave the hybrid P2P network after completing the service.

Fig. 1
figure 1

Schematic diagram of hybrid P2P network

2.2 Model description

In the hybrid P2P network, there are two types of nodes, the nodes that require to receive resource transmission are called the requesting nodes, and the nodes that provide resource request services are called the serving nodes. The so-called working sleep mechanism is allowing idle serving nodes to enter a low-energy working state to avoid unnecessary resource consumption. The resource transmission process of the hybrid P2P network is abstracted as the service process, the working sleep process of the serving node is abstracted as the working vacation period, and the normal resource transmission process is abstracted as the normal busy period. A new queueing system model with negative customers, feedback, working vacation and repairable fault is built in the hybrid P2P network. The model description and system parameters are as follows:

  1. (1)

    The requesting nodes which need to receive resource transmission are regarded as positive customers. The arrival of the requesting nodes follows the Poisson process with the parameter \({{\lambda }_{1}}\). There is also a type of external interference signal in the system that is regarded as negative customers. It is usually considered as a virus, a work disappearance signal, an operation error or system disaster, etc. The arrival of the external interference signal follows the Poisson process with the parameter \({{\lambda }_{2}}\). Under the removal of the customers at the end (RCE) offset strategy, an arrival of external interference signal can offset a requesting node at the end of the queue in the infinite buffer. If there is no requesting node in the buffer, the external interference signal disappears automatically and is not served.

  2. (2)

    In order to reduce energy consumption, the working sleep strategy of the serving nodes is being introduced into the system. When the serving nodes are in the normal busy period, the time consumed by each requesting node to complete the service follows the exponential distribution with parameter \({{\mu }_{1}}\). When there is no requesting node in the system, the serving nodes enter a working sleep period with random length V . The working sleep time follows the exponential distribution with parameter \(\xi\). During the working sleep period, the serving nodes remain at a lower service rate, the time consumed by each requesting node to complete the service follows the exponential distribution with parameter \({{\mu }_{2}}({{\mu }_{2}}<{{\mu }_{1}})\). If there is still no requesting node in the system after a working sleep period which has finished, the serving nodes continue an independent and identically distributed (i.i.d.) working sleep period. If there are requesting nodes in the system after the working sleep period has finished, the system enters into a normal busy period. After the normal busy period, the system again enters a working sleep period with random length V , then repeats the above process.

  3. (3)

    If some requesting nodes that have completed the service want to obtain other resource, they wait at the end of line as new customers after reentering the system. Any requesting node reenters the system with the probability \(p(0\le p\le 1)\), which is known as the feedback probability. If the requesting nodes that have completed service are idle, it will leave system with probability \(\overline{p}(\overline{p}=1-p)\).

  4. (4)

    The serving node may fail and the fault is repairable. All serving nodes may be overloaded with requests which causes faults such as the congestion and lag. The process of fault follows the Poisson process with parameter \(\alpha\). If the serving node fails, it can be repaired immediately, and the faulted node can only be repaired by one repairer. The repair time follows the exponential distribution with parameter \(\beta\). Assume that the number of repairers is infinite.

  5. (5)

    The service sequence is first-come-first-served (FCFS). It is assumed that the arrival interval, the service time, the working sleep time, the fault time and the repair time are mutually independent. The operation mechanism of the hybrid P2P network system is shown in Fig. 2.

Fig. 2
figure 2

Operation mechanism of the hybrid P2P network

3 Modeling analysis of P2P system

3.1 State transition rate matrix

Let L(t) denote the number of the requesting nodes at time t, Y(t) denote the number of the serving nodes faulted at time t, J(t) denote the state of the serving nodes at time t, and J(t) be defined as follows:

  1. (1)

    \(J(t)=0\) indicates that the serving nodes are in the working sleep period or the total faulted state at time t,

  2. (2)

    \(J(t)=1\) indicates that the serving nodes are in the normal busy period at time t.

Then \(\{(L(t),Y(t),J(t)),t\ge 0\}\) is a three-dimensional Markov process, which has the state space as follows:

$$\begin{aligned} {\varOmega ={{\varOmega }_{1}}\cup {{\varOmega }_{2}} } \end{aligned}$$
(1)

where \({{\varOmega }_{1}}=\{(i,l,j),i\ge 0,0\le l\le c,j=0\},\) \({{\varOmega }_{2}}=\{(i,l,j),i \ge 1,0\le l\le c-1,j=1\},\) the state set \((0,0,0),(0,1,0),(0,2,0),\cdots ,(0,c-1,0),(0,c,0)\) is called level 0, and the state set \((i,0,0),(i,0,1),(i,1,0),(i,1,1),\cdots ,(i,c-1,0),(i,c-1,1),(i,c,0)\) is called level \(i\ (i\ge 1)\). When all serving nodes fail, the hybrid P2P network enters the total faulted state (\(J(t)=0\)). Therefore, the state transition of the queueing model is shown in Fig. 3.

Fig. 3
figure 3

State transition diagram of queueing model

Arranging the states in lexicographic order, the state transition rate matrix of the system can be written as follows:

$$\begin{aligned} {{\varvec{Q}}}=\left[ \begin{array}{*{35}{l}} {{{{\varvec{A}}}}_{0}} &{} {{{{\varvec{C}}}}_{0}} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {} \\ {{{{\varvec{B}}}}_{1}} &{} {{{{\varvec{A}}}}_{1}} &{} {{{{\varvec{C}}}}_{{}}} &{} {} &{} {} &{} {} &{} {} &{} {} \\ {} &{} {{{{\varvec{B}}}}_{2}} &{} {{{{\varvec{A}}}}_{2}} &{} {{{{\varvec{C}}}}_{{}}} &{} {} &{} {} &{} {} &{} {} \\ {} &{} {} &{} \ddots &{} \ddots &{} \ddots &{} {} &{} {} &{} {} \\ {} &{} {} &{} {} &{} {{{{\varvec{B}}}}_{c-1}} &{} {{{{\varvec{A}}}}_{c-1}} &{} {{{{\varvec{C}}}}_{{}}} &{} {} &{} {} \\ {} &{} {} &{} {} &{} {} &{} {{{{\varvec{B}}}}_{{}}} &{} {{{{\varvec{A}}}}_{{}}} &{} {{{{\varvec{C}}}}_{{}}} &{} {} \\ {} &{} {} &{} {} &{} {} &{} {} &{} \ddots &{} \ddots &{} \ddots \\ \end{array} \right] \end{aligned}$$
(2)

where \({{\varvec{A}}_{0}},{{\varvec{C}}_{0}},{\varvec{C}},{{\varvec{A}}_{i}}\ (1\le i\le c),{{\varvec{B}}_{i}}\ (1\le i\le c)\) are the state transition rate between corresponding levels, and let \({\varvec{A}}={{\varvec{A}}_{c}},{\varvec{B}}={{\varvec{B}}_{c}}\). The specific matrix is as follows.

\((c+1)\times (c+1)\)-dimensional matrix \({{\varvec{A}}_{0}}\) is given as follows:

$$\begin{aligned} {{\varvec{A}}_{0}}=\left[ \begin{matrix} {{\eta }_{0}} &{} c\alpha &{} {} &{} {} &{} {} &{} {} &{} {} \\ \beta &{} {{\eta }_{1}} &{} (c-1)\alpha &{} {} &{} {} &{} {} &{} {} \\ {} &{} 2\beta &{} {{\eta }_{2}} &{} (c-2)\alpha &{} {} &{} {} &{} {} \\ {} &{} {} &{} 3\beta &{} {{\eta }_{3}} &{} (c-3)\alpha &{} {} &{} {} \\ {} &{} {} &{} {} &{} \ddots &{} \ddots &{} \ddots &{} {} \\ {} &{} {} &{} {} &{} {} &{} (c-1)\beta &{} {{\eta }_{c-1}} &{} \alpha \\ {} &{} {} &{} {} &{} {} &{} {} &{} c\beta &{} {{\eta }_{c}} \\ \end{matrix} \right] \end{aligned}$$

where \({{\eta }_{i}}=-{{\lambda }_{1}}-(c-i)\alpha -i\beta ,\quad 1\le i\le c.\)

\((c+1)\times (2c+1)\)-dimensional matrix \({{\varvec{C}}_{0}}\) is given as follows:

$$\begin{aligned} {{\varvec{C}}_{0}}=\left[ \begin{matrix} {{\lambda }_{1}} &{} 0 &{} {} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {} \\ {} &{} {} &{} {{\lambda }_{1}} &{} 0 &{} {} &{} {} &{} {} &{} {} &{} {} &{} {} \\ {} &{} {} &{} {} &{} {} &{} {{\lambda }_{1}} &{} 0 &{} {} &{} {} &{} {} &{} {} \\ {} &{} {} &{} {} &{} {} &{} {} &{} \ddots &{} \ddots &{} {} &{} {} &{} {} \\ {} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {{\lambda }_{1}} &{} 0 &{} {} \\ {} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {{\lambda }_{1}} \\ \end{matrix} \right] . \end{aligned}$$

\((2c+1)\times (c+1)\)-dimensional matrix \({{\varvec{B}}_{1}}\) is given as follows:

$$\begin{aligned} {{\varvec{B}}_{1}}=\left[ \begin{matrix} \omega &{} 0 &{} {} &{} {} &{} {} \\ \delta &{} 0 &{} {} &{} {} &{} {} \\ {} &{} \omega &{} 0 &{} {} &{} {} \\ {} &{} \delta &{} 0 &{} {} &{} {} \\ {} &{} {} &{} \ddots &{} \ddots &{} {} \\ {} &{} {} &{} {} &{} \omega &{} 0 \\ {} &{} {} &{} {} &{} \delta &{} 0 \\ {} &{} {} &{} {} &{} {} &{} {{\lambda }_{2}} \\ \end{matrix} \right] \end{aligned}$$

where \(\omega ={{\lambda }_{2}}+{{\mu }_{2}}(1-p),\quad \delta ={{\lambda }_{2}}+{{\mu }_{1}}(1-p).\)

\((2c+1)\times (2c+1)\)-dimensional matrix \({\varvec{C}}\) is given as follows:

$$\begin{aligned} {\varvec{C}}=\left[ \begin{matrix} {{\lambda }_{1}} &{} {} &{} {} &{} {} \\ {} &{} {{\lambda }_{1}} &{} {} &{} {} \\ {} &{} {} &{} \ddots &{} {} \\ {} &{} {} &{} {} &{} {{\lambda }_{1}} \\ \end{matrix} \right] . \end{aligned}$$

In order for the convenience of writing, when \(1\le k\le c\), the symbols are defined as follows:

$$\begin{aligned} {{a}_{k,i}}= & {} {\left\{ \begin{array}{ll} -{{\lambda }_{1}}-{{\lambda }_{2}}-k{{\mu }_{1}}(1-p)-(c-i)\alpha -i\beta ,\quad 0\le i\le c-k, \\ -{{\lambda }_{1}}-{{\lambda }_{2}}-(c-i){{\mu }_{1}}(1-p)-(c-i)\alpha -i\beta ,\quad c-k<i\le c, \\ \end{array}\right. } \\ a_{k,i}^{*}= & {} {\left\{ \begin{array}{ll} -{{\lambda }_{1}}-{{\lambda }_{2}}-k{{\mu }_{2}}(1-p)-(c-i)\alpha -i\beta -\xi ,\quad 0\le i\le c-k, \\ -{{\lambda }_{1}}-{{\lambda }_{2}}-(c-i){{\mu }_{2}}(1-p)-(c-i)\alpha -i\beta -\xi ,\quad c-k<i\le c. \\ \end{array}\right. } \end{aligned}$$

Then \((2c+1)\times (2c+1)\)-dimensional matrix \({{\varvec{A}}_{k}}(1\le k \le c)\) is given as follows:

$$\begin{aligned} {{\varvec{A}}_{k}}=\left[ \begin{matrix} a_{k,0}^{*} &{} \xi &{} c\alpha &{} {} &{} {} &{} {} &{} {} \\ 0 &{} {{a}_{k,0}} &{} 0 &{} {} &{} {} &{} {} &{} {} \\ \beta &{} 0 &{} a_{k,1}^{*} &{} \xi &{} (c-1)\alpha &{} {} &{} {} \\ {} &{} \ddots &{} \ddots &{} \ddots &{} \ddots &{} \ddots &{} {} \\ {} &{} {} &{} (c-1)\beta &{} 0 &{} a_{k,c-1}^{*} &{} \xi &{} \alpha \\ {} &{} {} &{} {} &{} (c-1)\beta &{} 0 &{} {{a}_{k,c-1}} &{} \alpha \\ {} &{} {} &{} {} &{} {} &{} c\beta &{} 0 &{} a_{k,c}^{*} \\ \end{matrix} \right] . \end{aligned}$$

In order for the convenience of writing, when \(2\le k\le c\), the symbols are defined as follows:

$$\begin{aligned} {{b}_{k,i}}= & {} {\left\{ \begin{array}{ll} {{\lambda }_{2}}+k{{\mu }_{1}}(1-p),\quad 0\le i\le c-k, \\ {{\lambda }_{2}}+(c-i){{\mu }_{1}}(1-p),\quad c-k<i\le c, \\ \end{array}\right. } \\ b_{k,i}^{*}= & {} {\left\{ \begin{array}{ll} {{\lambda }_{2}}+k{{\mu }_{2}}(1-p),\quad 0\le i\le c-k, \\ {{\lambda }_{2}}+(c-i){{\mu }_{2}}(1-p),\quad c-k<i\le c. \\ \end{array}\right. } \end{aligned}$$

Then \((2c+1)\times (2c+1)\)-dimensional matrix \({{\varvec{B}}_{k}}(2\le k \le c)\) is given as follows:

$$\begin{aligned} {{\varvec{B}}_{k}}=\left[ \begin{matrix} b_{k,0}^{*} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {} \\ {} &{} {{b}_{k,0}} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {} \\ {} &{} {} &{} b_{k,1}^{*} &{} {} &{} {} &{} {} &{} {} &{} {} \\ {} &{} {} &{} {} &{} {{b}_{k,1}} &{} {} &{} {} &{} {} &{} {} \\ {} &{} {} &{} {} &{} {} &{} \ddots &{} {} &{} {} &{} {} \\ {} &{} {} &{} {} &{} {} &{} {} &{} b_{k,c-1}^{*} &{} {} &{} {} \\ {} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {{b}_{k,c-1}} &{} {} \\ {} &{} {} &{} {} &{} {} &{} {} &{} {} &{} {} &{} b_{k,c}^{*} \\ \end{matrix} \right] . \end{aligned}$$

3.2 Steady-state analysis

The structure of the matrix \({\varvec{Q}}\) indicates that the Markov process \(\{(L(t),Y(t),J(t)),t\ge 0\}\) is a quasi-birth-and-death process (QBD). When the Markov process is positive recurrent, the steady-state distribution is defined as follows:

$$\begin{aligned}{} & {} {{\pi }_{i,l,j}}=\underset{t\rightarrow \infty }{\mathop {\lim }}\,P\{X(t)=i,Y(t)=l,J(t)=j\}, \quad (i,l,j)\in \varOmega , \nonumber \\{} & {} {{\pi }_{0}}=({{\pi }_{0,0,0}},{{\pi }_{0,1,0}},{{\pi }_{0,2,0}},\ldots ,{{\pi }_{0,c-1,0}},{{\pi }_{0,c,0}}), \nonumber \\{} & {} {{\pi }_{i}}=({{\pi }_{i,0,0}},{{\pi }_{i,0,1}},{{\pi }_{i,1,0}},{{\pi }_{i,1,1}}\ldots ,{{\pi }_{i,c-1,1}},{{\pi }_{i,c,0}}),\quad i\ge 1, \nonumber \\{} & {} {\Pi }=\left( {{\varvec{\pi }}_{0}},{{\varvec{\pi }}_{1}},{{\varvec{\pi }}_{2}},\ldots \right) \end{aligned}$$
(3)

The sufficient and necessary conditions that QBD \(\{(L(t),Y(t),J(t)),t\ge 0\}\) is positive recurrent are that the matrix quadratic equation:

$$\begin{aligned} \begin{aligned} {{{{\varvec{R}}}}^{2}}{{\varvec{B}}}+{{\varvec{RA}}}+{{\varvec{C}}}={\textbf {0}} \end{aligned} \end{aligned}$$
(4)

has a minimum nonnegative solution, and the spectral radius \(SP({{\varvec{R}}})<1\). Therefore, \(2{{c}^{2}}+2c+1\)-dimensional stochastic matrix:

$$\begin{aligned} \begin{aligned} {B[{\varvec{R}}]}=\left[ \begin{array}{*{35}{l}} {{\varvec{A}}_{0}} &{} {{\varvec{C}}_{0}} &{} {} &{} {} &{} {} &{} {} \\ {{\varvec{B}}_{1}} &{} {{\varvec{A}}_{1}} &{} {{\varvec{C}}_{{}}} &{} {} &{} {} &{} {} \\ {} &{} {{\varvec{B}}_{2}} &{} {{\varvec{A}}_{2}} &{} {{\varvec{C}}_{{}}} &{} {} &{} {} \\ {} &{} {} &{} \ddots &{} \ddots &{} \ddots &{} {} \\ {} &{} {} &{} {} &{} {{\varvec{B}}_{c-1}} &{} {{\varvec{A}}_{c-1}} &{} {{\varvec{C}}_{{}}} \\ {} &{} {} &{} {} &{} {} &{} \varvec{B} &{} \varvec{RB}+\varvec{A} \\ \end{array} \right] \end{aligned} \end{aligned}$$
(5)

exists a left-zero vector; when QBD is positive recurrent, the steady-state distribution satisfies the following equations:

$$\begin{aligned} \begin{aligned} {\left\{ \begin{array}{ll} ({{\varvec{\pi }}_{0}},{{\varvec{\pi }}_{1}},\cdots ,{{\varvec{\pi }}_{c}})B[{\varvec{R}}]=0, \\ {{\varvec{\pi }}_{0}}{{\varvec{e}}_{0}}+\sum \limits _{i=1}^{c-1}{{{\varvec{\pi }}_{i}}{\varvec{e}}+{{\varvec{\pi }}_{c}}{{({\varvec{I}}-{\varvec{R}})}^{-1}}{\varvec{e}}=1,} \\ {{\varvec{\pi }}_{i}}={{\varvec{\pi }}_{c}}{{\varvec{R}}^{i-c}},\quad i\ge c \\ \end{array}\right. }\\ \end{aligned} \end{aligned}$$
(6)

where \({{\varvec{e}}_{0}}\) is a \(c+1\)-dimensional column vector which all elements are 1, and \({\varvec{e}}\) is a \(2c+1\)-dimensional column vector which all elements are 1, \({\varvec{I}}\) is a \(2c+1\)-dimensional unit matrix.

The analytical process of the above conclusion employs matrix-geometric solution method, and the specific proof process can be referred to [22]. Due to the relative complexity of the matrix \({{\varvec{A}}}\), \({{\varvec{B}}}\), \({{\varvec{C}}}\), it is difficult to obtain an explicit expression for the minimum nonnegative solution \({{\varvec{R}}}\) of the above matrix equation \({{{{\varvec{R}}}}^{2}}{{\varvec{B}}}+{{\varvec{RA}}}+{{\varvec{C}}}={\textbf {0}}\). Therefore, the Gauss–Seidel iterative method is employed to address the difficulties mentioned above. The numerical results of \({{\pi }_{i,l,j}}\) are obtained. The specific algorithm is shown in Table 1.

Table 1 Iterative algorithm of rate matrix \({\varvec{R}}\)

3.3 Performance indicators

According to the above analysis, the performance indicators of the hybrid P2P network are obtained as follows:

  1. (1)

    The average queue length of the requesting node is given by:

    $$\begin{aligned} \begin{aligned} E(L)&=\sum \limits _{i=0}^{\infty }{iP(L=i)}=\sum \limits _{i=1}^{\infty }{i\left( \sum \limits _{l=0}^{c-1}{\sum \limits _{j=0}^{1}{{{\pi }_{i,l,j}}}} \right) }+\sum \limits _{i=1}^{\infty }{i{{\pi }_{i,c,0}}}. \end{aligned} \end{aligned}$$
  2. (2)

    The average delay of the requesting node is given by:

    $$\begin{aligned} \begin{aligned} E(W)=&\frac{1}{{{\lambda }_{1}}} \sum \limits _{i=c+1}^{\infty }{(i-c)} \sum \limits _{l=0}^{c-1}{\sum \limits _{j=0}^{1}{{{\pi }_{i,l,j}}}}+\frac{1}{{{\lambda }_{1}}}\sum \limits _{i=c+1}^{\infty }{(i-c){{\pi }_{i,c,0}}}. \end{aligned} \end{aligned}$$
  3. (3)

    The probability that the serving node is in the working sleep period is given by:

    $$\begin{aligned} {{P}_{1}}=\sum \limits _{i=0}^{\infty }{\sum \limits _{l=0}^{c-1}{{{\pi }_{i,l,0}}}}. \end{aligned}$$
  4. (4)

    The probability that the serving node is in the normal busy period is given by:

    $$\begin{aligned} {{P}_{2}}=\sum \limits _{i=1}^{\infty }{\sum \limits _{l=0}^{c-1}{{{\pi }_{i,l,1}}}}. \end{aligned}$$
  5. (5)

    The probability that all serving nodes are in the total faulted state is given by:

    $$\begin{aligned} {{P}_{3}}=\sum \limits _{i=0}^{\infty }{{{\pi }_{i,c,0}}}. \end{aligned}$$
  6. (6)

    The average number of faulted serving nodes in the system is given by:

    $$\begin{aligned} \begin{aligned}&E(Z)=\sum \limits _{l=1}^{c}{l{{\pi }_{0,l,0}}}+\sum \limits _{i=1}^{\infty }{\sum \limits _{l=1}^{c-1}{l}}({{\pi }_{i,l,0}}+{{\pi }_{i,l,1}})+\sum \limits _{i=1}^{\infty }{c}{{\pi }_{i,c,0}}. \end{aligned} \end{aligned}$$
  7. (7)

    The total energy consumption of the hybrid P2P network includes the energy consumption of the serving nodes in the normal busy period and the working sleep period. Assume that \({{g}_{1}}\) is the energy consumption of a single serving node in the working sleep period, \({{g}_{2}}\) is the energy consumption of a single serving node in the normal busy period, and the faulted serving node has no energy consumption. Therefore, the average energy consumption \({{G}_{1}}\) of the serving node in the working sleep period is given by:

    $$\begin{aligned} {{G}_{1}}={{g}_{1}}E({{L}_{1}})={{g}_{1}}\sum \limits _{i=0}^{\infty }{\sum \limits _{l=0}^{c-1}{(c-l){{\pi }_{i,l,0}}}}. \end{aligned}$$
  8. (8)

    The average energy consumption \({{G}_{2}}\) of the serving node in the normal busy period is given by:

    $$\begin{aligned} {{G}_{2}}={{g}_{2}}E({{L}_{2}})={{g}_{2}}\sum \limits _{i=1}^{\infty }{\sum \limits _{l=0}^{c-1}{(c-l){{\pi }_{i,l,1}}}}. \end{aligned}$$
  9. (9)

    The total energy consumption of the hybrid P2P network is given by:

    $$\begin{aligned} {{G}_{y}}={{g}_{1}}\sum \limits _{i=0}^{\infty }{\sum \limits _{l=0}^{c-1}{(c-l){{\pi }_{i,l,0}}}}+{{g}_{2}}\sum \limits _{i=0}^{\infty }{\sum \limits _{l=0}^{c-1}{(c-l){{\pi }_{i,l,1}}}}. \end{aligned}$$

4 Numerical experiments of the hybrid P2P network

The minimum nonnegative solution of the matrix quadratic equation (4) is obtained by the Gauss–Seidel iterative method. Then, the numerical results of \({{\pi }_{i,l,j}}\) are obtained by solving the system of steady-state distribution equations, and the performance indicators of the hybrid P2P system are obtained. Programming by computer software, the relationship graph that performance indicators changed with parameters is obtained, and then, analyzing the effect of parameter variations on the performance indicators provides the basis for hybrid P2P network to decrease energy consumption.

4.1 Effect of parameter on performance indicators

By numerical experiments, the effect of the system parameters on the performance indicators of the system is analyzed. Assuming that \(c=10\),\({{\lambda }_{2}}=1\),\({{\mu }_{2}}=1\),\(\alpha =0.8\),\(\beta =1.0\), Fig. 4 reflects the effect of the feedback probability p, the arrival rate \({{\lambda }_{1}}\), the working sleep parameter \(\xi\) and the service rate \({{\mu }_{1}}\) on the average queue length E(L). When the other three parameters are fixed, E(L) increases with the increase of p, E(L) increases with the increase of \({{\lambda }_{1}}\), E(L) decreases with the increase of \(\xi\), and E(L) decreases with the increase of \({{\mu }_{1}}\). The main reason is that when the feedback probability increases, it means that the number of the requesting nodes reentering the system to continue queueing for service increases; therefore, the average queue length increases. When the arrival rate increases, it means that the number of the requesting nodes arriving at the system per unit time increases; therefore, the average queue length increases. When the working sleep parameter increases, it means that the time when they are in the normal busy period increases. Because of the higher service rate in the normal busy period, the average queue length decreases. When the service rate increases, it means that the time consumed by the requesting node to complete the service decreases; thus, the average queue length decreases. It can be seen that in order to reduce the average queue length, it is required to decrease the feedback probability and the arrival rate, and increase the working sleep parameter and the service rate to some extent.

Fig. 4
figure 4

Relationship between E(L) and \(p,{{\lambda }_{1}},\xi ,{{\mu }_{1}}\)

Assuming that \(c=10,{{\lambda }_{2}}=1,{{\mu }_{1}}=3,{{\mu }_{2}}=1,p=0.6,\alpha =0.8,\beta =1.0\), Fig. 5 reflects the effect of the working sleep parameter \(\xi\), the service rate \({{\mu }_{1}}\), the fault rate \(\alpha\) and the arrival rate \({{\lambda }_{1}}\) on the average delay E(W). When the other three parameters are fixed, E(W) decreases with the increase of \(\xi\), E(W) decreases with the increase of \({{\mu }_{1}}\), E(W) increases with the increase of \(\alpha\), and E(W) increases with the increase of \({{\lambda }_{1}}\). The main reason is that when the working sleep parameter increases, it means that the time when they are in the normal busy period increases. Because of the higher service rate in the normal busy period, the average delay decreases. When the service rate increases, it means that the time consumed by the requesting node to complete the service decreases; therefore, the average delay decreases. When the fault rate increases, the number of faulted serving node in the system increases, it means that the number of the available serving nodes decreases with a certain number of requesting nodes; therefore, the average delay increases. When the arrival rate increases, it means that the number of the requesting nodes arriving at the system per unit time increases; therefore, the average delay increases. It can be seen that in order to reduce the average delay, it is required to decrease the fault rate and the arrival rate, and increase the working sleep parameter and the service rate to some extent.

Fig. 5
figure 5

Relationship between E(W) and \(\xi ,{{\mu }_{1}},\alpha ,{{\lambda }_{1}}\)

Assuming that \(c=10,{{\lambda }_{1}}=2,{{\lambda }_{2}}=1,{{\mu }_{1}}=3,{{\mu }_{2}}=1,p=0.6,\xi =0.8\), Table 2 reflects the effect of the fault rate \(\alpha\) and the repair rate \(\beta\) on the average number E(Z) of the faulted serving nodes in the system. When \(\alpha\) is a fixed value, E(Z) decreases with the increase of \(\beta\). When \(\beta\) is a fixed value, E(Z) increases with the increase of \(\alpha\). The main reason is that when the fault rate increases, the serving nodes in the system are more probable to fail; therefore, the average number of faulted serving nodes increases. When the repair rate increases, the time to repair the faulted node decreases; therefore, the average number of the faulted serving nodes decreases.

Table 2 Relationship between E(Z) and \(\alpha ,\beta\)

Assuming that \(c=10,{{\lambda }_{2}}=1.0,{{\mu }_{2}}=1.0,p=0.2,\alpha =0.8,\beta =0.8,{{g}_{1}}=5.0\), Fig. 6 reflects the effect of the working sleep parameter \(\xi\), the service rate \({{\mu }_{1}}\) and the arrival rate \({{\lambda }_{1}}\) on the average energy consumption \({{G}_{1}}\) in the working sleep period. When \({{\lambda }_{1}}\) and \({{\mu }_{1}}\) are fixed value, \({{G}_{1}}\) increases with the increase of \(\xi\). When \({{\lambda }_{1}}\) and \(\xi\) are fixed value, \({{G}_{1}}\) increases with the increase of \({{\mu }_{1}}\). When \({{\mu }_{1}}\) and \(\xi\) are fixed value, \({{G}_{1}}\) decreases with the increase of \({{\lambda }_{1}}\). The main reason is that when the working sleep parameter increases, the average working sleep time of the serving nodes decreases; therefore, the average energy consumption in the working sleep period decreases. When the arrival rate increases, the number of the requesting nodes increases, and the time that the serving nodes are in the normal busy period increases, and they are less likely to enter the working sleep period; therefore, the average energy consumption in the working sleep period decreases. When the service rate increases, the rate at which the system enters the working sleep period after all services are completed increases, the average time in the working sleep period increases, and therefore, the average energy consumption in the working sleep period increases. When \(\xi =0\), the energy consumption of the service node of the traditional no-sleep model \({{G}_{1}}=0.13\), and when \(\xi =1.5\), the energy consumption under this sleep parameter \({{G}_{1}}=0.11\). It can be concluded that, under this condition, the introduction of the working/sleeping mechanism reduces the energy consumption of the service node by about 15.4% compared with that of the traditional no-sleep model. It can be seen that in order to decrease the average energy consumption in the working sleep period, it is required to decrease the service rate and increase the working sleep parameter and the arrival rate to some extent.

Fig. 6
figure 6

Relationship between \({{G}_{1}}\) and \(\xi ,{{\lambda }_{1}},{{\mu }_{1}}\)

Assuming that \(c=15,{{\lambda }_{2}}=1,{{\mu }_{2}}=5,p=0.2,\alpha =1.0,\beta =2.0,{{g}_{1}}=3,{{g}_{2}}=10,\xi =0.8\), Fig. 7 reflects the effect of the arrival rate \({{\lambda }_{1}}\) and the service rate \({{\mu }_{1}}\) on the energy consumption \({{G}_{1}}\) in the working sleep period and the energy consumption \({{G}_{2}}\) in the normal busy period. When \({{\mu }_{1}}\) is a fixed value, \({{G}_{1}}\) decreases with the increase of \({{\lambda }_{1}}\), and \({{G}_{2}}\) increases with the increase of \({{\lambda }_{1}}\). When \({{\lambda }_{1}}\) is a fixed value, \({{G}_{1}}\) increases with the increase of \({{\mu }_{1}}\), and \({{G}_{2}}\) decreases with the increase of \({{\mu }_{1}}\). The main reason is that when the arrival rate increases, the average time when the system is in the working sleep period decreases while the average time when it is in the normal busy period increases; therefore, the energy consumption in the working sleep period decreases while the energy consumption in the normal busy period increases. When the service rate increases, the rate at which the system enters the working sleep period after completing all services increases; therefore, the energy consumption in the working sleep period increases while the energy consumption in the normal busy period decreases. It can be seen that in order to decrease the energy consumption in the normal busy period, it is required to increase the service rate and decrease the arrival rate to some extent.

Fig. 7
figure 7

Relationship between \({{G}_{1}},{{G}_{2}}\) and \({{\lambda }_{1}},{{\mu }_{1}}\)

Assuming that \(c=15,{{\lambda }_{2}}=1,{{\mu }_{2}}=2,p=0.2,\beta =1.5,{{g}_{1}}=2,{{g}_{2}}=10\), Fig. 8 reflects the effect of the arrival rate \({{\lambda }_{1}}\), the fault rate \(\alpha\), the working sleep parameter \(\xi\) and the service rate \({{\mu }_{1}}\) on the total energy consumption \({{G}_{y}}\). When the other three parameters are fixed, \({{G}_{y}}\) decreases with the increase of \({{\mu }_{1}}\), \({{G}_{y}}\) increases with the increase of \({{\lambda }_{1}}\), \({{G}_{y}}\) increases with the increase of \(\xi\), and \({{G}_{y}}\) increases with the increase of \(\alpha\). The main reason is that the energy consumption of a single serving node in the normal busy period is higher than that in the working sleep period. When the service rate increases, it means that the system is more easily able to enter the working sleep period after serving all the requesting nodes, and the time in the normal busy period decreases; therefore, the total energy consumption decreases. When the working sleep parameter increases, it means that the time when they are in the normal busy period increases; therefore, the total energy consumption increases. When the arrival rate increases, it means that the number of the requesting nodes arriving at the system per unit time increases, the time when the serving nodes are in the normal busy period increases; therefore, the total energy consumption increases. When the fault rate increases, the number of the faulted serving node in the system increases, it means that the number of available serving nodes decreases with a certain number of the requesting nodes, and the time when the serving nodes are in the normal busy period increases; therefore, the total energy consumption increases. It can be seen that in order to decrease the total energy consumption, it is required to decrease the fault rate, the arrival rate and the working sleep parameter, and increase the service rate to some extent.

Fig. 8
figure 8

Relationship between \({{G}_{y}}\) and \({{\lambda }_{1}},\alpha ,\xi ,{{\mu }_{1}}\)

4.2 Nash equilibrium strategy

To avoid an overwhelming number of requesting nodes to send the nonessential service requests to the hybrid P2P network which increase the unnecessary energy consumption of the hybrid P2P network, this section studies the Nash equilibrium between the arrival rate and the individual benefit of a single requesting node. Assume that \({{h}_{1}}\) indicates the benefit obtained after the service is completed, \({{C}_{1}}\) indicates that the average delay cost of the node unit time \({{h}_{2}}\) indicates the fee to be paid for each requesting node that enters the system. Therefore, the individual benefit function of each requesting node is defined as follows:

$$\begin{aligned} {{U}_{L}}={{h}_{1}}-{{C}_{1}}E(W)-{{h}_{2}}. \end{aligned}$$

Assume that the requesting node is not aware of the state of the serving nodes in the system, nor is it aware of the number of the serving nodes that have failed. Assume that \(\Lambda\) indicates the potential arrival rate of the requesting node, and \(\varGamma\) indicates the response probability that the requesting node is under the Nash equilibrium strategy. Therefore, the Nash equilibrium strategy of the requesting node is given by:

$$\begin{aligned} \varGamma =\left\{ \begin{array}{ccl} 0, &{} &{} {{{h}_{1}}{{C}_{1}}{{\left. E(W) \right| }_{\lambda =0}}+{{h}_{2}},} \\ \frac{{{\lambda }^{e}}}{\Lambda }, &{} &{} {{{C}_{1}}{{\left. E(W) \right| }_{\lambda =0}}+{{h}_{2}}\le {{h}_{1}}\le {{C}_{1}}{{\left. E(W) \right| }_{\lambda =\Lambda }}+{{h}_{2}},} \\ 1, &{} &{} {{{h}_{1}}{{\left. {{C}_{1}}E(W) \right| }_{\lambda =\Lambda }}+{{h}_{2}}} \\ \end{array} \right. \end{aligned}$$

where \({{\lambda }^{e}}\) is the solution of \({{U}_{L}}=0\).

Assuming that \(c=15,\alpha =0.8,\beta =0.8,{{\mu }_{1}}=3,{{\mu }_{2}}=1,p=0.6,{{h}_{1}}=17,{{h}_{2}}=2,{{C}_{1}}=3\), Fig. 9 reflects the effect of the arrival rate \({{\lambda }_{1}}\) and the working sleep parameter \(\xi\) on the individual benefit \({{U}_{L}}\) of each requesting node. When \(\xi\) is a fixed value, \({{U}_{L}}\) decreases with the increase of \({{\lambda }_{1}}\). When \({{\lambda }_{1}}\) is a fixed value, \({{U}_{L}}\) increases with the increase of \(\xi\). The main reason is that when the arrival rate increases, the number of the requesting nodes increases, and the average delay increases; therefore, the individual benefit decreases. When the working sleep parameter increases, the time in the normal busy period increases. The service rate in the normal busy period is higher than the service rate in the working sleep period. The average delay decreases; therefore, the individual benefit increases.

Fig. 9
figure 9

Relationship between \({{U}_{L}}\) and \({{\lambda }_{1}},\xi\)

As shown in Fig. 9, whichever value \(\xi\) is taken, \({{\lambda }_{1}}={{\lambda }_{1}}^{\min },{{U}_{L}}\ge 0,{{\lambda }_{1}}={{\lambda }_{1}}^{\max },{{U}_{L}}\le 0\). It indicates that only a part of the requesting nodes can obtain the positive individual benefit, while other requesting nodes obtain the negative individual benefit due to the long waiting time in the buffer. Nash equilibrium is reached when \({{U}_{L}}=0\), and the optimal arrival rate \({{\lambda }_{1}}^{\min }\le {{\lambda }_{1}}^{e}\le {{\lambda }_{1}}^{\max }\). Table 3 reflects the relationship between the individual benefit and the arrival rate \({{\lambda }_{1}}\) when \(\xi =.3\). It can be seen that the individual benefit \({{U}_{L}}\) decreases with the increase of \({{\lambda }_{1}}\). When \({{\lambda }_{1}}=7.5\), \({{U}_{L}}=0\). The optimal arrival rate to reach the Nash equilibrium state under this condition is \({{\lambda }_{1}}^{e}=7.5\).

Table 3 Relationship between \({{U}_{L}}\) and \({{\lambda }_{1}}\)

In the case of different working sleep parameters of the serving nodes, the numerical results of the individual benefit and the arrival rate are shown in Table 4.

Table 4 Effect of \({{\lambda }_{1}}\) and \(\xi\) on individual benefit \({{U}_{L}}\)

4.3 Social optimal strategy

In order to discuss the social optimal strategy, assume that the individual benefit function of all single resource request nodes is the same and the individual benefit of all single requesting nodes are additive. Therefore, the social benefit function is defined as follows:

$$\begin{aligned} {{U}_{S}}={{\lambda }_{1}}({{h}_{1}}-{{C}_{1}}E(W)-{{h}_{2}}). \end{aligned}$$

Assuming that \(c=15,\alpha =0.8,\beta =0.8,{{\mu }_{1}}=3,{{\mu }_{2}}=1,p=0.6,{{h}_{1}}=17,{{C}_{1}}=3,{{h}_{2}}=2\), Fig. 10 reflects the effect of the arrival rate \({{\lambda }_{1}}\) and the working sleep parameter \(\xi\) on the social benefit \({{U}_{S}}\). When \({{\lambda }_{1}}\) is a fixed value, \({{U}_{S}}\) increases with the increase of \(\xi\). When \(\xi\) is a fixed value, \({{U}_{S}}\) first increases and then decreases with the increase of \({{\lambda }_{1}}\). Therefore, the actual arrival rate and the value of the social maximum benefit under the social optimization exist. When \(\xi =1.0,{{\lambda }_{1}}=8.3\), the social benefit exists \(max{{U}_{S}}=93.4041\). The main reason is that when the working sleep parameter increases, the time in the normal busy period increases. The average delay decreases; therefore, the social benefit increases. In the meantime, before the system is congested, that is, before the serving nodes are fully utilized, when the arrival rate increases, the utilization of the serving nodes increases; therefore, the social benefit increases. When the arrival rate exceeds the actual arrival rate under the social optimum, more and more nodes request the download service, causing congestion in the system, and the average delay increases; therefore, the social benefit decreases. In conclusion, the social benefit shows a trend of first increasing and then decreasing with the increase of \({{\lambda }_{1}}\), and the value of the social maximum benefit under the social optimization exists.

Fig. 10
figure 10

Relationship between \({{U}_{S}}\) and \({{\lambda }_{1}},\xi\)

5 Conclusion

In order to address the problem generated by unnecessary online behavior of the nodes, the working sleep mechanism for the serving nodes is introduced, and the synchronous multiple working vacation strategy is adopted. Combining factors such as node feedback and environmental disturbances, an M/M/c queueing model with negative customer, feedback, working vacation and repairable fault is built. By employing the quasi-birth-and-death process and matrix-geometric solution method, the steady-state probability vector is derived. Further, the expressions for performance indicators, such as the average delay and the total energy consumption, are given. Through the numerical analysis, the energy consumption of the serving nodes in various states is quantified and analyzed. Finally, the Nash equilibrium between the arrival rate and the working sleep parameter and the individual benefit of a single requesting node is analyzed, and then, the optimization of the social benefit is studied. In conclusion, it can be seen that an appropriate decrease in the fault rate can avoid system congestion, and introducing the working sleep mechanism and an appropriate increase in the working sleep parameter can decrease the average delay and the total energy consumption in the hybrid P2P network system; besides, the individual benefit and social benefit also can be increased.