Keywords

1 Introduction

With the promotion and popularization of Internet in contemporary society, the number of Internet users is increasing. As one of the main applications of Internet, network video has a huge user base. According to data provided by Baidu.com, as of December 2018, China had 829 million Internet users and 612 million video users. Video users accounted for 73.9% of the total number of Internet users. The huge number of video users will incur huge network bandwidth costs when watching network video. In addition, they place higher demands on viewing quality, including fluency and clarity. Therefore, improving the users’ viewing quality while reducing the network bandwidth costs has become a hot spot of current research. P2P video on demand (VoD) technology can effectively deal with this problem.

Video on demand (VoD) is popular because it can deliver video content to users based on user requirements. Therefore, the research in this paper is for VoD. In VoD, P2P technology is widely used to provide VoD services due to its high scalability and low deployment cost [1,2,3]. On the other hand, DASH is widely used in VoD streaming and live streaming because it provides users with the best video quality based on current network conditions [4, 8]. These studies also show that DASH can effectively improve the viewing quality of users. In addition, DASH is based on the standard HTTP protocol and defines a mechanism suitable for real-time transmission of video data based on the HTTP protocol. Therefore, DASH effectively ensures real-time transmission of video data. Besides, most firewalls allow HTTP protocol penetration by default, that is, the HTTP protocol has strong applicability to the network. So, DASH has strong network adaptability and is easy to deploy. Therefore, building P2P VoD system based on DASH can adapt to existing networks, greatly reducing deployment costs and providing users with a better experience.

In this paper, we propose a new P2P-DASH VoD scheme for peer-to-peer VoD streaming, which combines the advantages of DASH technology and P2P technology. The scheme takes advantage of the high scalability and low cost of P2P technology and the dynamic adaptability of DASH. The scheme guarantees low deployment cost, short jump latency, high playback fluency and satisfaction of users. First, we propose a new multi-layer overlay structure which consists of a power-law ring overlay structure and Fibonacci ring overlay structure. The integrated overlay structure is used to reduce the jump latency caused by VCR operations and improve playback fluency. It can also handle the high dynamic features and asynchronous features of VoD service. High dynamic feature means that client peers can join/leave at any time and can drag playback point at any time. Asynchronous feature means that users watching the same video can watch different parts of the video. Final, a DASH streaming rate control approach is proposed. Through the rate control approach, users can adaptively choose their best watching experiences and obtain the best satisfaction of users.

2 Related Work

The research on P2P VoD streaming mainly includes [5,6,7]. Ganapathi et al. [5] propose the hierarchical prefetching technology based on popularity. First, the method estimates the popularity of each video by proxies. Then, the proxies cache the popular videos and distributes the videos to the desired peers. This method can effectively solve the problem that P2P system is difficult to provide constant download and playback services due to frequent VCR operations. In order to improve the quality of video playback and reduce the consumption of cloud bandwidth, the authors of [6] propose an incentive scheme based on adaptive bitrate streaming method. In this scheme, the quality of the video received by a user depends on the user’s contribution to the upload bandwidth of the P2P network. The authors of [7] study the buffer-map exchange problem in a pull-based P2P VoD streaming system. They propose an adaptive mechanism to reduce overhead. The mechanism sends the buffer-maps based on playing position of peers. Experiments show that this method effectively reduces the bandwidth overhead of buffer-map exchange in P2P VoD streaming systems.

Most of the research on P2P-DASH focuses on the construction of P2P-DASH system, and proposes a new DASH rate control approach when constructing the system. The authors of [9] propose a DASH rate control method. Before downloading video segments, the method estimates the throughput of peers based on the changes in network throughput. Peers select streaming rate based on the estimated throughput and playback buffer occupancy. The authors of [11] propose a block-based rate adaptation method. The method considers both the difference in bandwidth and the video time of the feedback buffer. Experiments show that this method effectively solves the problem that the video rate switching on multiple servers is not smooth due to different bandwidth. A DASH method based on machine learning is proposed by the authors of [12]. The approach enables customers to understand the environment in an unsupervised way to help clients adapt to the changing network environment. The method eliminates redundant adaptive work similar to network signatures and reduces the complexity of running time. Other studies have focused on live streaming. Such as the research work of [10] is a DASH rate control algorithm for live streaming. A decentralized rate control scheme is proposed by the authors of [10]. Peers independently performed the rate control algorithm to select the appropriate streaming rate. Based on paper [10], the authors of [13] made a more detailed study and explanation of the work of [10]. They add the description of system parameter selection and perform the same simulation experiment as [10], and reach the same conclusion.

Different from previous work, the research of P2P-DASH in this paper is aimed at VoD streaming. We propose a new P2P-DASH VoD scheme. This paper investigates the method of constructing an overlay structure in a VoD stream to reduce the playback delay caused by VCR operations in the VoD stream. On the other hand, this paper studies a new DASH streaming rate control approach for streaming rate conversion in video transmission to maximize the satisfaction of users.

3 System Overview and Overlay Structure Construction

3.1 System Overview

In this paper, only VoD streaming is studied. We consider the construction and maintenance of P2P overlay structure under the condition of AVC video coding. First, a multi-layer overlay structure is constructed according to different DASH representations (i.e., streaming rates). Each DASH representation corresponds to an overlay. In AVC coding, peers with different streaming rates do not have the ability to share video segments. The P2P overlay structure in our system is mesh-based. The overlay structure consists of power-law ring overlay structures and Fibonacci ring overlay structures. The peers are organized into Fibonacci ring overlay structures and power-law ring overlay structures based on distance between peers. Based on search distance, peers decide in which ring structure to find target video segments. This integrated overlay structure effectively shortens the jump latency and effectively handles the dynamic and asynchronous nature of VoD services.

Then, a DASH streaming rate control approach is proposed to control the streaming rate in VoD. Based on the situation of overlay, the DASH streaming rate control approach selects the best streaming rate for peers. When peers switch their streaming rate, they will migrate from one overlay to another. In order to maximize the viewing quality and ensure the good performance of P2P overlay structure, DASH streaming rate control approach considers four adaptive factors. The four adaptive factors including the on-time arrival rate of segment AR, available buffer length Wavailiable, current overlay available bandwidth μ, and current overlay upload bandwidth utilization η. The adaptive factors determine whether peers can switch streaming rate (i.e., migrating their overlay).

3.2 Overlay Structure Construction

The overlay structure of this system is a multi-layer mesh-based structure. Peers in the system are organized in a comprehensive structure of Fibonacci ring and power-law ring. The number of overlays in the system is the same as the number of DASH representations of video. Each DASH representation (i.e., streaming rate) corresponds to an overlay. Our system structure consists of a streaming server, a tracker, and many peers. The system structure is shown in Fig. 1. The streaming server distributes different DASH representations to the corresponding overlay. In the system, we use rate represent DASH representation, ratej is streaming rate in overlayj. overlayj represents the jth overlay and 1  j  max. The maximum streaming rate and overlay are represented as ratemax and overlaymax, respectively. Each peer belongs to an overlay at a time. Each peer provides its cached video segments to other peers. The streaming server divides a video into multiple segments. Each segment contains a certain number of video encoding frames. From previous research [14], it can be concluded that the larger the video segment, the better the user experience. Since the DASH video segments are small (generally 2 s or 10 s), this paper divides a certain number of video segments into a video group. In the system, the tracker saves peers’ information, including the upload bandwidth, ID and streaming video resources. Besides, the tracker organize the peers into clusters. When a new peer i joins the overlay structure, it first notifies the tracker. Then, the tracker selects some neighbor peers for peer i based on its playing position. Each peer stores its own ID information and the video being played. Each peer joins the system based on its playing position.

Fig. 1.
figure 1

System architecture

When constructing the overlay structure, the distance between peers (dpeer) is calculated based on the playing position. For example, the playing position of peer i and peer n is curi and curn. The distance from peer n to peer i (dnpeer) is calculated as dnpeer = curn− curi. Then, according to dpeer, the neighbor peers are organized into the Fibonacci ring overlay and the power-law ring overlay. Final, when a peer searches for the target video segment, the peer first calculates the search distance (dsearch). dsearch is the interval between the current playing position of a peer and the position of target video segments. We use tari for the target segment position of peer i. Then, the search distance (disearch) equals tari − curi. According to dsearch, peers decide to search for the target segment in Fibonacci ring overlay or power-law ring overlay.

The authors of papers [15] and [16] show that Fibonacci ring overlay structure supports short-range search and power-law ring overlay structure supports remote search. Specifically, when dsearch is small, a peer searches for target segment in its Fibonacci ring overlay structure. Instead, a peer will find the target segment in its power-law ring overlay structure when dsearch is large. In this way, the jump latency of our system is short. The critical distance which determine a peer search a target segment in Fibonacci ring overlay or power-law ring overlay is called dcritical. Through experiments, it can be concluded that when dcritical is equal to 8, the jump latency is short and the search speed of the whole system is the fastest. That is, when dcritical less than or equal to 8, peers look for target segments in their Fibonacci ring overlay. Otherwise, when dcritical is greater than 8, peers look for target segments in their power-law ring overlay.

According to the pseudo-code of Algorithm 1, the steps for a peer to search for a target segment are as follows. First, calculate the distance dpeer of peers in the system. According to dpeer, the peers are organized into the Fibonacci ring overlay and the power-law ring overlay. Then, calculate disearch of peer i sending a request. If disearch≤ dcritical, the peer i looks for the target segment in its Fibonacci ring overlay. If disearch> dcritical, the peer i looks for the target segment in its power-law ring overlay. If the required segment of peer i is found, then the information of the neighbor peer that cached the desired segment is returned. Peer i sends a request to the neighbor peer to get the target segment. If there is no required segment in the neighbor ring of peer i, then peer i sends the request to its nearest neighbor peer. The neighbor peer finds the target segment according to the above rules, until the target segment is fond or TTL becomes to 0.

figure a

4 DASH Streaming Rate Control Approach

DASH streaming rate control approach is used to handle streaming rate conversion during video playback. In our approach, when a peer starts playing a video, it first requests video segments with the lowest streaming rate to quickly play the video and reduce the startup delay. During playback, a peer will attempt to request video segments with higher streaming rate or video segments with lower streaming rate. The streaming rate conversion of a peer is the conversion process of a peer from one overlay to another. Our streaming rate control approach restricts that a peer exclusively moves from its current overlay to an adjacent overlay. Therefore, the approach avoids the large fluctuations of video quality caused by large switching range.

In the traditional DASH client-server scenario, only the peer’s buffer status and the peer’s upload bandwidth utilization are considered when switching streaming rate. Unlike the traditional DASH client-server scenario, in the P2P-DASH scheme, each peer is a client and a server. Each peer obtains video from other peers and provides cached video to other peers. Therefore, when a peer switch its streaming rate, a peer autonomously executes the streaming rate control approach. The approach considers not only the performance of a peer itself, but also the performance of the whole overlay structure.

The DASH streaming rate control approach proposed in this paper considers four adaptive factors. They comprehensive indicator peers switch their streaming rate. The factors including on-time arrival rate of segment AR, peer’s available buffer length Wavailiable, current overlay available bandwidth μ and current overlay upload bandwidth utilization η. The following four adaptive factors are introduced separately.

  1. (1)

    The on-time arrival rate of segment

    ARi is the on-time arrival rate of segment of peer i, which is defined as: in the period τ, the ratio between the number of video segments that meet the playback deadline and the total number of segments that peer i should receive. The calculation formula of ARi is

    $$ AR_{i} = \frac{{S_{ontime}^{i} }}{{S_{total}^{i} }} $$
    (1)

    In the formula (1), Siontime is the number of video segments that meet the playback deadline of peer i. Sitotal is the total number of video segments that peer i should receive.

  2. (2)

    The peer’s available buffer length

    Wiavailiable is the available buffer length of peer i, which is defined as: the interval between the total buffer size of a peer (the sliding window size) and the buffer size already used by the peer. The calculation formula of Wiavailiable is

    $$ W_{availiable}^{i} = W - W_{{_{used} }}^{i} $$
    (2)

    In the formula (2), W is the total buffer size of peer i. Wiused is the buffer size already used by peer i. Wiused is calculated as

    $$ W_{{_{used} }}^{i} = \frac{{S_{w} + S_{k} }}{{b_{i} }} $$
    (3)

    In the formula (3), Sw is the size of the segments waiting to be sent in the buffer. Sk is the size of segment k that peer i is requesting. bi is the upload bandwidth of peer i.

  3. (3)

    The current overlay available bandwidth

    According to the paper [17], the current overlay available bandwidth of overlay j at time t is defined as:

    $$ \mu_{j} \left( t \right) = \frac{{b_{server}^{j} + \sum\nolimits_{{i \in Q_{j} \left( t \right)}} {b_{i} } }}{{q \cdot rate_{j} }} $$
    (4)

    In the formula (4), bjserver is the upload bandwidth provided by the streaming server for overlay j to transmit segments with streaming rate ratej at time t. bi is the upload bandwidth of peer i. Qj(t) is the set of active peers in overlay j at time t. q is the number of peers in set Qj(t). ratej is the streaming rate of overlay j.

  4. (4)

    The current overlay upload bandwidth utilization

    The current overlay upload bandwidth utilization of overlay j at time t is defined as:

    $$ \eta_{j} \left( t \right) = \frac{{U_{server}^{j} + \sum\nolimits_{{i \in Q_{j} \left( t \right)}} {U_{i} } }}{{q \cdot rate_{j} }} $$
    (5)

    In the formula (5), Ujserver is the server’s upload bandwidth utilization of overlay j at time t. Ui is the upload bandwidth utilization of peer i.

The adaptive factors μj(t) and ηj(t) are used to judge the overall performance of current overlay structure. μj(t) indicates whether the available bandwidth of the network can support peers switch to an overlay with higher streaming rate at time t. When μj(t) ≥ 1, it means that the performance of current network is good. At this time, the upload bandwidth of the network ensures that the target video segment is sent to the requesting peer. μj(t) < 1 is the opposite. ηj(t) is a deeper judgment index for global network performance. ηj(t) represents the effective upload bandwidth utilization of peers on overlay j. If new peers join to the overlay structure, the value of ηj(t) will significantly decrease. This is because the new peers do not contribute upload bandwidth immediately. In our DASH streaming rate control approach, a peer switches to DASH representation with higher streaming rate, call a peer switches upward. When a peer switches upward, our approach comprehensively consider four adaptive factors. These four adaptive factors jointly determine whether a peer can successfully switch upward. When a peer switches downward, only the indexes of itself (AR and Wavailiable) are considered.

According to the pseudo-code of Algorithm 2, the steps of our DASH streaming rate control approach are as follows. We assume that ritarget is the target streaming rate of peer i. In each period τ, when raetj< ritarget, it means peer i is not satisfied with the current streaming rate. Then, peer i expects to switch upward. If ARi > ARthres and Wiavailiable > Wthres, it means that the peer has the ability to switch to overlay with a higher streaming rate. ARthres is the threshold of the on-time arrival rate. Wthres is the threshold of the available buffer length of a peer. Then, the approach judge the current overlay performance. If μj< 1 and bi ratej, it means that the current overlay state cannot guarantee the peer to switch an overlay with higher streaming rate successfully. So the peer remains in the current overlay j. Otherwise, the state of the target overlay is judged. If bi > ratej+1, peer i switch to overlay j + 1. If μj+1 > 1 and ηj+1> ηthres, peer i switch to overlay j + 1. ηthres is the threshold of the overlay upload bandwidth utilization. If ARi < ARthres and Wiavailiable< Wthres, it indicates that the peer cannot guarantee normal playback at the current streaming rate and needs to move to overlay j − 1 with lower streaming rate.

figure b

5 Performance Evaluation

In this section, we demonstrate the performance of P2P-DASH VoD scheme through simulation. First, we introduce the simulation steps and evaluation indicators. Then, the performance of P2P-DASH VoD scheme is represented by graphs.

5.1 Simulation Setup

We implement an event-driven simulator based on the Peersim simulation platform to evaluate the performance of the P2P-DASH VoD scheme. We build a multi-overlay system where each cluster transmits the same video at a different streaming rate. First, we set different upload and download capabilities for the peers in the system by referring to the paper [10]. The specific settings of peers are shown in Table 1. The number of peers we consider in our experiment is 2000. In the experiment, a network with four overlays is considered. The streaming rates corresponding to the four overlays are 700 kbit/s, 1500 kbit/s, 2500 kbit/s and 3500 kbit/s respectively. We consider the case where peers download the high streaming rate as high as possible within the capacity of their download bandwidth. In order to simulate the real network status, the system randomly selects 1% of active peers to join or leave the system. To illustrate the P2P characteristics of our system, our system allocates a small amount of streaming server upload bandwidth for each overlay. The streaming server upload bandwidth is set to four times the streaming rate of each overlay, i.e., bjserver = 4rj. In order to compare with the P2P-DASH scheme proposed in paper [10], some parameter values of our system are consistent with those in the paper [10]. The sliding window is set to 20 s, ηthres= 0.8, ARthres= 0.55, Wthres= 14 s. Final, we ran our P2P-DASH VoD scheme on the simulation platform and implemented the DASH-P2P scheme in the same way.

Table. 1. The parameter distribution of peers

In the simulation, we first test the jump latency of our scheme and compare it with the Fibonacci ring overlay structure and the power-law ring overlay structure. Then, in order to illustrate the playback fluency brought by our scheme, we test three indicators and compare them with the P2P-DASH method. The three indicators including the PMF of hops, the average playback delay and the on-time arrival rate of segments. The number of hops tested is the hop generated by the peer switching streaming rate when our system does not generate VCR operations. We use improvements in these three indicators to illustrate the improvements in playback fluency. Final, we test the satisfaction of users and compare it to the DASH method.

5.2 Simulation Result

  1. (1)

    Jump latency

    The jump latency is defined as the average number of message hops per peer. In the experiment, we record the number of jumping peers and the number of message hops generated by each peer. Then, we calculate the average number of message hops for each peer. Based on the data provided by the paper [15], we assume that the probability of peers generating a jump operation during playback is 30%. The author of [18] show that 80% of the VRC operations generated by the user while watching the video are close-range drags, and 20% are long-distance drags. So, in our experiments, it is assumed that 80% of jump operations are close jumps and 20% are long jumps. We compare the jump latency of power-law ring overlay structure, Fibonacci ring overlay structure and our integrated overlay structure under different peers. As can be seen from Fig. 2, the jump latency of our integrated overlay structure is shorter than that of power-law ring overlay structure and Fibonacci ring overlay structure. This shows that our integrated overlay structure can effectively reduce the jump delay then the other two structures.

    Fig. 2.
    figure 2

    Jump latency

  2. (2)

    The PMF of hops

    The Probability Mass Function (PMF) of hops represents the probability of the number of peer hops when the peers convert streaming rate. In this part, we test the number of peer hops in target overlay 2 and target overlay 4 when our system do not generate VCR operations. We draw the PMF graph of the number of peer hops. From Fig. 3, we can clearly see that the number of hops in our P2P-DASH VoD scheme is significantly less than the P2P-DASH scheme. As can be clearly seen from Fig. 3, when the target overlay is 2, the number of peer hops are mostly 1 with a probability of 0.861. This is because, in our scheme the new peer is first allowed to request the video segment with lowest streaming rate. So, most peers need to switch from overlay 1 to overlay 2 when the target overlay is 2. When the target overlay is 4, the number of peer hops are mostly 3 with a probability of 0.623. The small number of peer hops indicate that our scheme is very efficient for video segment searches.

    Fig. 3.
    figure 3

    The PMF of hops in target overlay 2 and target overlay 4

  3. (3)

    Average playback delay

    The average playback delay is defined as the interval between a peer make a request of a video segment and the peer receiving the video segment. In Fig. 4, we test the average playback delay in the four overlays. As can be seen from Fig. 4, our P2P-DASH VoD scheme can guarantee a lower playback delay and is much lower than the P2P-DASH scheme. The playback delay in overlay 1 is the lowest, while the playback delay in other overlays is higher. This is because the higher streaming rate of video segments require longer transmission times. However, since our streaming rate control approach strictly limits the transition of peers from the lower rate representation to the higher rate representation, there is little difference in the average playback delay for the peers in overlay 2, 3 and 4. As can be seen from Fig. 4, the minimum values of the average playback delay of P2P-DASH VoD scheme and P2P-DASH scheme are 5 s and 12 s respectively. The maximum values of the average playback delay of P2P-DASH VoD scheme and P2P-DASH scheme are 26 s and 35 s, respectively.

    Fig. 4.
    figure 4

    The average playback delay

  4. (4)

    The on-time arrival rate

    The on-time arrival rate is the ratio between the number of video segments that meet the playback deadline and the total number of segments that peer i should receive, as defined in part 4. In Fig. 5, we test the on-time arrival rate for each overlay in the system. As is apparent from Fig. 5, the on-time arrival rate of our P2P-DASH VoD scheme is higher than the P2P-DASH scheme, especially in overlay 2 and overlay 3. The on-time arrival rate for the four overlays in our scheme are 0.980, 0.957, 0.945 and 0.916 respectively. The on-time arrival rate for the four overlays in the P2P-DASH scheme are 0.974, 0.934, 0.887 and 0.921 respectively. This shows that our scheme can effectively send target video segments to the required peers.

    Fig. 5.
    figure 5

    The on-time arrival rate

  5. (5)

    The global system satisfaction of users

    The global system satisfaction indicates whether the streaming rate received by peers can meet the required streaming rate. This evaluation indicator was used in the paper [10]. In the experiment, we compare our P2P-DASH VoD scheme with the P2P-DASH scheme. First, the scenario we consider is that the target video segment of peers is the highest DASH representation within their download capability. However, the upload bandwidth provided by peers themselves is limited. The total upload bandwidth in the network is relatively small due to the upload bandwidth of the peers. In Fig. 6, we show the satisfaction of users for five consecutive periods. As can be seen from Fig. 6, in the same scenario, the satisfaction of users of our P2P-DASH VoD scheme is significantly better than the P2P-DASH scheme. The satisfaction of users of our scheme reaches up to 0.660, while the P2P-DASH scheme reaches up to 0.636. The minimum values of user satisfaction of our scheme and the P2P-DASH scheme are 0.648 and 0.619, respectively. In addition, we can see that the global system satisfaction of users of our scheme is more stable than the P2P-DASH scheme.

    Fig. 6.
    figure 6

    The global system satisfaction of users in different periods

6 Conclusions

For peer-to-peer VoD streaming, this paper proposed a new P2P-DASH VoD scheme, which takes advantage of the dynamic adaptive characteristic of DASH and the low cost characteristic of P2P. First, the P2P overlay structure of the P2P-DASH VoD scheme adopts the combination of the power-law ring overlay structure and the Fibonacci ring overlay structure. The overlay structure can effectively reduce the jump latency caused by VCR operations in VoD service. Then, in terms of streaming rate control, we proposed a DASH streaming rate control approach. Each peer in our system performs a streaming rate control approach to control its streaming rate change (switching overlay). Peers moves from one overlay to another based on four adaptive factors. So our streaming rate control approach can cope with the streaming rate conversion generated during playback and improve the user’s viewing quality. The effectiveness of the P2P-DASH VoD scheme is verified by simulations. The simulation experiments show that the P2P-DASH VoD scheme can effectively reduce jump latency, improve playback fluency and the satisfaction of users.