TWI478548B - A streaming transmission method for peer-to-peer networks - Google Patents

A streaming transmission method for peer-to-peer networks Download PDF

Info

Publication number
TWI478548B
TWI478548B TW101116531A TW101116531A TWI478548B TW I478548 B TWI478548 B TW I478548B TW 101116531 A TW101116531 A TW 101116531A TW 101116531 A TW101116531 A TW 101116531A TW I478548 B TWI478548 B TW I478548B
Authority
TW
Taiwan
Prior art keywords
data
peer
source
data segment
range
Prior art date
Application number
TW101116531A
Other languages
Chinese (zh)
Other versions
TW201347478A (en
Inventor
Sheau Ru Tong
Yi Chen Hsu
Cheng Lin Wu
Original Assignee
Univ Nat Pingtung Sci & Tech
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Univ Nat Pingtung Sci & Tech filed Critical Univ Nat Pingtung Sci & Tech
Priority to TW101116531A priority Critical patent/TWI478548B/en
Publication of TW201347478A publication Critical patent/TW201347478A/en
Application granted granted Critical
Publication of TWI478548B publication Critical patent/TWI478548B/en

Links

Landscapes

  • Information Transfer Between Computers (AREA)

Description

對等網路串流傳輸方法Peer-to-peer network streaming method

本發明係關於一種串流傳輸方法,尤其是一種在對等網路環境中傳輸串流資料的方法。The present invention relates to a streaming transmission method, and more particularly to a method of transmitting streaming data in a peer-to-peer network environment.

按,在各種習知內容遞送網路(Content Delivery Network,CDN)技術中,對等(Peer-to-Peer,P2P)網路技術係以「使用者互助」的角度為出發點,而廣受使用者青睞。其中,隨著各式電腦(Computer)及行動通訊裝置(Mobile Communication Apparatus)的普及化,在實體(Physical)、行動(Mobile)或其組合而成之異質(Heterogeneous)網路環境中採用內容遞送網路技術觀賞影音串流(Media Streaming)已然成為趨勢。According to various content delivery network (CDN) technologies, Peer-to-Peer (P2P) network technology is widely used from the perspective of "user mutual assistance". Favored. Among them, with the popularization of various computers and mobile communication devices, content delivery is adopted in a heterogeneous (Heterogeneous) network environment of physical, mobile or a combination thereof. Network technology viewing video streaming (Media Streaming) has become a trend.

請參閱第1圖所示,其係習知對等網路的架構示意圖,其中,使用者可利用一終端裝置T(例如:習知個人電腦或可攜式裝置等),透過有線或行動網路(例如:習知ADSL、3.5G或WiFi等)連結其他終端裝置T,而構成一實體網路,並於該網路之應用層(Application Layer)映對(mapping)成一個對等-內容遞送網路(P2P-CDN)N(即一覆蓋網路,Overlay Network),讓使用者得以自由地加入該對等-內容遞送網路,以分享影音串流(Media Streaming)等資料。其中,各終端裝置T在該對等-內容遞送網路N中皆視為一個對等的端(Peer)P。Please refer to FIG. 1 , which is a schematic diagram of a conventional peer-to-peer network, in which a user can use a terminal device T (for example, a conventional personal computer or a portable device) through a wired or mobile network. The road (for example, conventional ADSL, 3.5G or WiFi, etc.) is connected to other terminal devices T to form a physical network, and is mapped into a peer-to-peer content on the application layer of the network. The delivery network (P2P-CDN) N (ie, Overlay Network) allows users to freely join the peer-to-peer delivery network to share information such as video streaming (Media Streaming). Each terminal device T is regarded as a peer (Peer) P in the peer-to-peer delivery network N.

其中,當某些端P(如第1圖所示之P1、P2)需要播放影音串流時,可先由一目錄伺服端(Directory Server)D查詢一來源列表(Peer List),例如:以一媒體伺服端(Media Server)V或其他資料來源作為接收封包(Packets)的來源端(Source Peer)P,再按封包所屬資料段(Segments)加以儲存,用以播放影音串流,並作為其他端P(如第1圖所示之P3)的資料來源之一,使資料的供應來源增加(即降低該些資料的稀有性),藉以提高資料傳輸的有效性,並減少傳輸瓶頸及網路癱瘓等情形。Where, when some terminal P (such as P1, P2 shown in FIG. 1) needs to play video stream, a directory server (Diarier Server) D can first query a source list (Peer List), for example: A media server (Media Server) V or other data source is used as a source (Peer) of the receiving packet (Source Peer) P, and then stored according to the segment of the packet to be used to play the video stream, and as other One of the sources of data for Terminal P (P3 as shown in Figure 1) increases the source of data supply (ie, reduces the rarity of the data) to improve the effectiveness of data transmission and reduce transmission bottlenecks and networks.瘫痪 and so on.

請一併參閱第2圖所示,其係習知對等網路的資料傳輸示意圖。其中,當某些端P(如第2圖所示之P2)取得所需影音串流資料段後,可能會因傳輸頻寬低、儲存空間小或「用完即丟」等因素,而刪除該資料段,因此,導致其他欲載入相同資料的端P(如第2圖所示之P3)無法就近取得需要的所有資料段,故仍須由該媒體伺服端V載入(Load)大部份的資料段(如第2圖所示之播放序號[15]、[16]及[17]),及由該端P1載入小部份的資料段(如第2圖所示之播放序號[14]),除將降低串流資料的分享率之外,亦會加重該媒體伺服端V的傳輸負擔。Please refer to Figure 2 for a detailed description of the data transmission of the peer-to-peer network. Among them, when some terminal P (such as P2 shown in Figure 2) obtains the required video stream data segment, it may be deleted due to factors such as low transmission bandwidth, small storage space or "use and lose". This data segment, therefore, causes other Ps that want to load the same data (such as P3 shown in Figure 2) to get all the data segments needed, so it must still be loaded by the media server V. Part of the data segment (such as the play sequence numbers [15], [16] and [17] shown in Figure 2), and the data segment loaded by the terminal P1 (as shown in Figure 2) No. [14]), in addition to reducing the sharing rate of streaming data, will also increase the transmission burden of the media server V.

再者,該些端P(如第2圖所示之P1、P2及P3)欲載入資料時,僅會考量資料的稀有性(即先取得流通數量較少的資料),而非先取得即將播放的資料(即未考量資料的即時性),當即將播放的資料的稀有性低於其他資料時,將會先取得其他資料,導致影音串流播放時產生不連續畫面(即流暢程度降低),讓使用者觀賞的畫面不順暢。Furthermore, the terminal P (such as P1, P2, and P3 shown in Figure 2) only needs to consider the rarity of the data (that is, obtain the lesser amount of data first) when the data is to be loaded, instead of obtaining the data first. The information to be played (that is, the immediacy of the data is not considered). When the rarity of the data to be played is lower than other data, other data will be obtained first, resulting in a discontinuous picture when the video stream is played (ie, the fluency is reduced). ), the screen that the user can watch is not smooth.

另,由於習知對等網路串流傳輸方法採用傳輸控制協 定(TCP),當遺失大量封包時,會由其他的傳送者(即其他端P或該媒體伺服端V)重新傳送該遺失的大量封包,可能導致網路頻寬被大量佔用,造成網路壅塞情況惡化,連帶使其他端P無法取得所需的資料,進一步降低資料的分享率;或者,因為網路連線中斷而無法收到該遺失封包,使得影音串流播放畫面中斷,進一步降低影音串流的流暢程度。In addition, since the conventional peer-to-peer network streaming method uses the Transmission Control Association Fixed (TCP), when a large number of packets are lost, the other transmitters (ie, other end P or the media server V) will retransmit the lost large number of packets, which may cause the network bandwidth to be occupied in a large amount, resulting in the network. The congestion situation has deteriorated, and the other parties have been unable to obtain the required information, which further reduces the data sharing rate. Or, because the network connection is interrupted, the lost packet cannot be received, which interrupts the video streaming playback screen and further reduces the video and audio. The smoothness of the stream.

綜上所述,習知對等網路串流傳輸方法應用於行動網路時,除了會導致「串流資料的分享率降低」問題,而且,在傳輸過程會有「串流資料播放時的流暢程度降低」、「加重媒體伺服端的傳輸負擔」及「網路壅塞情況惡化」等疑慮,在實際使用時更衍生不同限制與缺點,確有不便之處,亟需進一步改良,提升其實用性。In summary, when the conventional peer-to-peer network streaming method is applied to a mobile network, the problem of "reducing the sharing rate of streaming data" will be caused, and in the transmission process, there will be "streaming data playback". Concerns such as reduced fluency, "increasing the transmission burden of the media server" and "deterioration of the network congestion" have caused different limitations and shortcomings in actual use. It is inconvenient and needs further improvement to enhance its practicability. .

本發明的目的乃改良上述之缺點,以提供一種對等網路串流傳輸方法,藉由預載或保留串流資料供他方使用,使所需串流資料可多方取得,以提高串流資料的分享率。The object of the present invention is to improve the above disadvantages, and to provide a peer-to-peer network streaming method, which can be used by other parties by preloading or retaining streaming data for use by other parties to improve streaming data. Sharing rate.

一種對等網路串流傳輸方法,係包含:一準備步驟,係由一需求端依據一串流資料之數個資料段取得至少一來源端,且該需求端與該來源端交換各自擁有的緩衝映對範圍,該緩衝映對範圍包含一資料預載範圍及一資料保留範圍,該資料保留範圍包含L個已經載入且播放過的資料段之播放序號{Sp-L,...,Sp-2,Sp-1};及一調節步驟,係由該來源端依據該需求端之資料預載範圍,而延後刪除或提前預 載屬於該資料預載範圍的至少一資料段。A peer-to-peer network streaming method includes: a preparation step of obtaining, by a demanding end, at least one source according to a plurality of data segments of a stream of data, and the demanding end exchanges with the source end The buffer mapping range includes a data preload range and a data retention range, and the data retention range includes the playback sequence number of the L data segments that have been loaded and played {Sp-L,..., Sp-2, Sp-1}; and an adjustment step by which the source terminal preloads the range according to the data of the demand side, and delays deletion or advancement Contain at least one data segment that falls within the pre-load range of the data.

其中,若該需求端之資料預載範圍映對的資料段為資料無效者,屬於該來源端已經載入且播放過的資料段,則該來源端延後刪除該已經載入且播放過的資料段。Wherein, if the data segment of the data preloading range of the demand side is invalid, and belongs to the data segment that has been loaded and played by the source end, the source end delays deleting the already loaded and played data. Data segment.

其中,若該需求端之資料預載範圍映對的資料段為資料無效者,屬於該來源端將會播放但仍未載入之資料段,則該來源端依序提前預載該仍未載入之資料段。Wherein, if the data segment of the data preloading range of the demand side is invalid, and belongs to the data segment that the source end will play but has not yet been loaded, the source end preloads in advance. Enter the data segment.

其中,該資料預載範圍包含U個未來需播放的資料段之播放序號{Sp+1,Sp+2,...,Sp+U}。The data preload range includes the play sequence numbers {Sp+1, Sp+2, ..., Sp+U} of the U data segments to be played in the future.

其中,該緩衝映對範圍包含數個資料段之播放序號及資料有效性,該資料有效性如下式所示: 其中,g[i]表示第i個播放序號所屬資料段的資料有效性。The buffer mapping range includes the playing sequence number and the data validity of the data segments, and the validity of the data is as follows: Where g[i] represents the validity of the data of the data segment to which the i th play sequence number belongs.

其中,該資料段之播放序號為{Sp-L,...,Sp-2,Sp-1,Sp,Sp+1,Sp+2,...,Sp+U},其中該播放序號{Sp-L,...,Sp-2,Sp-1}映對L個已經載入且播放過的資料段,該播放序號{Sp}映對1個目前時序正在播放的資料段,該播放序號{Sp+1,Sp+2,...,Sp+U}映對U個未來需播放的資料段,該緩衝映對範圍映對該需求端的W個資料段之儲存空間,W=L+1+U。The play sequence number of the data segment is {Sp-L,...,Sp-2,Sp-1,Sp,Sp+1,Sp+2,...,Sp+U}, where the play sequence number { Sp-L,...,Sp-2,Sp-1} is mapped to L data segments that have been loaded and played, and the playback sequence number {Sp} is mapped to a data segment currently being played at the current timing, and the playback is performed. The sequence number {Sp+1,Sp+2,...,Sp+U} is mapped to the data segments that need to be played in the future. The buffer mapping range reflects the storage space of the W data segments of the demand side, W=L. +1+U.

其中,該來源端之資料預載範圍的最大預載狀態設為該播放序號{Sp +1,Sp +2,...,Sp +U,...,Sp +W}。The maximum preload state of the data preload range of the source is set to the play sequence number {S p +1, S p +2, . . . , S p +U, . . . , S p +W}.

其中,該來源端之資料保留範圍的最大保留狀態設為該播放序號{Sp -W+3,...,Sp -1,Sp ,Sp +1,Sp +2}。The maximum retention state of the data retention range of the source is set to the play sequence number {S p -W+3,...,S p -1,S p ,S p +1,S p +2}.

一種對等網路串流傳輸方法,係包含:一準備步驟,係由一需求端依據一串流資料之數個資料段取得至少一來源端,且該需求端與該來源端交換各自擁有的緩衝映對範圍,該緩衝映對範圍包含一資料預載範圍;一調節步驟,係由該來源端依據該需求端之資料預載範圍,而延後刪除或提前預載屬於該資料預載範圍的至少一資料段;及一傳輸步驟,係由該需求端依據該來源端之緩衝映對範圍傳送至少一傳輸請求到具有該需求端所需資料段之來源端,用以取得該數個資料段之至少一個,再判斷該來源端是否逾時回應該傳輸請求,若判斷為是,則當該傳輸請求所屬資料段仍有需要取得時,改向另一個來源端發出該傳輸請求,若判斷為否,則再發出使取得其他資料段增加的傳輸請求至同一來源端,並逐次增加請求該來源端提供的資料需求量。A peer-to-peer network streaming method includes: a preparation step of obtaining, by a demanding end, at least one source according to a plurality of data segments of a stream of data, and the demanding end exchanges with the source end a buffer mapping range, the buffer mapping range includes a data preload range; an adjustment step is performed by the source end according to the data preload range of the demand end, and the delayed deletion or early preloading belongs to the data preload range And at least one data segment; and a transmitting step, wherein the demand terminal transmits at least one transmission request to a source end of the data segment having the demand end according to the buffer mapping range of the source end, to obtain the plurality of data At least one of the segments, and then judging whether the source end time should return the transmission request, if the judgment is yes, when the data segment to which the transmission request belongs still needs to be obtained, the transmission request is sent to another source, if it is judged If no, the transmission request to increase the acquisition of other data segments is sent to the same source, and the data demand requested by the source is increased one by one.

其中,該傳輸步驟之傳輸請求用以取得至少一資料段之封包。The transmission request of the transmission step is used to obtain a packet of at least one data segment.

其中,該傳輸步驟之傳輸請求採用UDP傳送該需求端所需的封包數量或編號。The transmission request of the transmission step uses UDP to transmit the number or number of packets required by the demand side.

其中,該傳輸步驟若該來源端的資料往返時間大於一等待時限,則該需求端認定該來源端逾時回應該傳輸請求。Wherein, in the transmitting step, if the data round-trip time of the source end is greater than a waiting time limit, the demanding end determines that the source end times the transmission request.

其中,該傳輸步驟之仍有需要的資料段為仍屬於該需求端需預先載入的資料段。Wherein, the data segment still needed in the transmission step is a data segment that still belongs to the demand end and needs to be preloaded.

為讓本發明之上述及其他目的、特徵及優點能更明顯易懂,下文特舉本發明之較佳實施例,並配合所附圖式,作詳細說明如下:本發明全文所述之「連結」(connecting),係指二終端裝置之間藉由有線實體、無線媒介或其組合(例如:異質網路)等方式,而使該二裝置之資料可以相互傳遞,係本發明所屬技術領域中具有通常知識者可以理解。The above and other objects, features and advantages of the present invention will become more <RTIgt; (connecting) means that the data of the two devices can be transmitted to each other by means of a wired entity, a wireless medium or a combination thereof (for example, a heterogeneous network) between the two terminal devices, which is in the technical field of the present invention. Those with ordinary knowledge can understand.

請參閱第3圖所示,其係本發明對等網路串流傳輸方法較佳實施例之系統架構圖,其中,數個習知對等的端(Peer)P可以透過網路相互連結,而構成一個習知對等-內容遞送網路N,其中,該些端P為具有資料處理及通訊功能之裝置,例如:習知筆記型電腦(Notebook PC)、平板電腦(Tablet PC)或智慧型手機(Smart Phone)等行動裝置;該網路可為實體、行動、異質網路或其組合等。因此,該端P可採用對等(P2P)傳輸方式,供不同使用者分享影音串流(Media Streaming)等資料。在此實施例中,各端P可由軟體(software)或硬體(hardware)模組形成一傳輸單元、一儲存單元、一緩衝單元及一播放單元,該傳輸單元(例如:對等傳輸協定控制器等)用以傳輸一影音串流之數個資料段(Segments)所含有的封包(Packets);該儲存單元(例如:快取記憶體等)用以載入(Load)該封包,並組成該資料段加以儲存;該緩衝單元(例如:資料緩衝器等)用以控制該資料段的儲存狀態,且該緩衝單元存有一緩衝映對範圍(Buffer Map),用以表示該資料段的儲存狀態;該播放單元(例如:一影音播放器等) 係依序以該資料段播放(play)該影音串流。Referring to FIG. 3, which is a system architecture diagram of a preferred embodiment of the peer-to-peer network stream transmission method of the present invention, wherein a plurality of conventional peer peers (Peer) P can be connected to each other through a network. And constitute a conventional peer-to-peer delivery network N, wherein the terminals P are devices with data processing and communication functions, such as: a notebook computer (Notebook PC), a tablet PC (Tablet PC) or wisdom. Mobile devices such as smart phones; the network can be physical, mobile, heterogeneous networks, or a combination thereof. Therefore, the terminal P can adopt a peer-to-peer (P2P) transmission mode for different users to share information such as video streaming (Media Streaming). In this embodiment, each end P may be formed by a software or hardware module to form a transmission unit, a storage unit, a buffer unit and a playback unit, and the transmission unit (for example, peer-to-peer transmission protocol control) a packet (Packets) contained in a plurality of segments of a video stream; the storage unit (eg, cache memory, etc.) is used to load (package) the packet and form The data segment is stored; the buffer unit (for example, a data buffer, etc.) is used to control the storage state of the data segment, and the buffer unit stores a buffer map (Buffer Map) for indicating the storage of the data segment. Status; the playback unit (for example: a video player, etc.) The video stream is played in sequence with the data segment.

為方便後續說明,在此定義取得資料段的端P為一〝需求端1〞,而提供資料段的端P為一〝來源端2〞,且各端P可依實際情形而視為該需求端1、該來源端2或其組合。其中,當該需求端1欲取得該資料段時,例如:使用者欲觀賞的串流資料段,可先向一習知目錄伺服端(Directory Server)D查詢一來源列表(Peer List),用以取得至少一資料來源(Data Source),例如:一習知媒體伺服端(Media Server)V或其他可提供資料的端P等,該需求端1與該來源端2之間可以交換彼此擁有的緩衝映對範圍,以便該需求端1向該來源端2取得所需資料段之封包。For the convenience of the following description, the terminal P for obtaining the data segment is defined as a demand terminal 1〞, and the terminal P providing the data segment is a source terminal 2〞, and each terminal P can be regarded as the demand according to the actual situation. Terminal 1, the source 2, or a combination thereof. Wherein, when the demand terminal 1 wants to obtain the data segment, for example, the streaming data segment that the user wants to view, first query a directory server (Directory Server) D for a source list (Peer List), In order to obtain at least one data source (Data Source), for example, a conventional media server (Media Server) V or other data-providing terminal P, etc., the demand terminal 1 and the source terminal 2 can exchange each other's possession. The buffer maps the range so that the demand terminal 1 obtains the packet of the required data segment from the source terminal 2.

請參閱第4圖所示,其係本發明對等網路串流傳輸方法較佳實施例之緩衝映對範圍的示意圖,其中,該緩衝映對範圍包含數個資料段之播放序號及資料有效性,該資料有效性如下式(1)所示: 其中,i表示各端P(例如:該需求端1)之資料段的播放序號,例如:{Sp-L,...,Sp-2,Sp-1,Sp,Sp+1,Sp+2,...,Sp+U}等,共有W(W=L+1+U,L≧1,U≧1)個播放序號映對(mapping)該需求端1之W個資料段之儲存空間的內容,g[i]表示第i個播放序號所屬資料段的資料有效性,若該資料段為有效資料,則g[i]為1;若該資料段為無效資料,則g[i]為0;g[i]之預設值為0(即無效資料)。Referring to FIG. 4, it is a schematic diagram of a buffer mapping range of a preferred embodiment of the peer-to-peer network stream transmission method of the present invention, wherein the buffer mapping range includes a plurality of data segments and the broadcast sequence number and data are valid. Sex, the validity of this data is as shown in the following formula (1): Where i denotes the play sequence number of the data segment of each terminal P (for example, the demand terminal 1), for example: {Sp-L, ..., Sp-2, Sp-1, Sp, Sp+1, Sp+2 , ..., Sp+U}, etc., a total of W (W = L + 1 + U, L ≧ 1, U ≧ 1) play number mapping (mapping) the storage space of the W data segment of the demand end 1 The content of g[i] indicates the validity of the data of the data segment to which the i-th playback sequence belongs. If the data segment is valid data, g[i] is 1; if the data segment is invalid, then g[i] Is 0; g[i] has a default value of 0 (ie invalid data).

此外,若將該資料段之播放序號加以細分,則該播放 序號{Sp-L,...,Sp-2,Sp-1}可映對L個〝已經載入且播放過的資料段〞,即其資料有效性g[Sp-L]、...、g[Sp-2]、g[Sp-1]皆為1,可暫時保留供其他端P載入。另,該播放序號Sp映對1個〝目前時序(time-slot)(t=T)正在播放的資料段〞。另,該播放序號{Sp+1,Sp+2,...,Sp+U}映對U個〝未來需播放的資料段〞,該U個資料段可由其他端P載入,並於載入各資料段後,將其播放序號之資料有效性g[Sp+1]、g[Sp+2]、...或g[Sp+U]設為1。例如:若W=5,L=U=2,Sp=10,則該播放序號設為{8,9,10,11,12},其資料有效性g[8]~g[11]設為1、g[12]設為0。In addition, if the play sequence number of the data segment is subdivided, the play The sequence number {Sp-L,...,Sp-2,Sp-1} can be used to map the data segments that have been loaded and played by L, that is, their data validity g[Sp-L],... , g[Sp-2], g[Sp-1] are all 1, can be temporarily reserved for other end P loading. In addition, the play sequence number Sp is mapped to a data segment in which the current time-slot (t=T) is being played. In addition, the play sequence number {Sp+1, Sp+2, ..., Sp+U} is mapped to the data segments that need to be played in the future, and the U data segments can be loaded by other terminals P, and After entering each data segment, the data validity g[Sp+1], g[Sp+2], ... or g[Sp+U] of the play sequence number is set to 1. For example, if W=5, L=U=2, and Sp=10, the play sequence number is set to {8,9,10,11,12}, and the data validity g[8]~g[11] is set to 1. g[12] is set to 0.

為方便後續說明,在此定義該L個〝該需求端1已經載入且播放過的資料段〞之播放序號{Sp-L,...,Sp-2,Sp-1}為一資料保留範圍(post-cached range);該U個〝該需求端1未來需播放的資料段〞之播放序號{Sp+1,Sp+2,...,Sp+U}為一資料預載範圍(pre-cached range)。For the convenience of the following description, it is defined that the playback numbers of the data segments {Sp-L, ..., Sp-2, Sp-1} that have been loaded and played by the demand terminal 1 are reserved for one data. The range (post-cached range); the playback number of the data segment {Sp+1, Sp+2, ..., Sp+U} of the data segment to be played by the demand terminal 1 in the future is a data preload range ( Pre-cached range).

請參閱第5圖所示,其係本發明對等網路串流傳輸方法較佳實施例之運作流程圖,其中,該對等網路串流傳輸方法包含一準備步驟S1及一調節步驟S2,請一併參閱第3及4圖所示:該準備步驟S1,係由一需求端1依據一串流資料之數個資料段取得至少一來源端2,且該需求端1與該來源端2交換各自擁有的緩衝映對範圍,該緩衝映對範圍包含一資料預載範圍。詳言之,由於該目錄伺服端D會更新不同資料的來源,因此,該需求端1可將本身要播放之串流資料分為數個資料段,並依據該資料段向該目錄伺服端D取得 一來源列表,該來源列表含有該資料段的來源端2(可能為該媒體伺服端V或其他可提供該資料段的端P),該需求端1與該來源端2為了解彼此所儲存的資料段狀態(例如:數量及編號等),可交換各自擁有的緩衝映對範圍,例如:該需求端1可將其緩衝映對範圍(例如:該需求端1之Sp =10,g[8,9,10,11,12]={1,1,1,0,0})傳送至兩個來源端2a、2b,且該需求端1可由該來源端2a、2b接收其緩衝映對範圍(例如:該來源端2a之Sp =9,g[7,8,9,10,11]={1,1,1,1,1};該來源端2b之Sp =13,g[11,12,13,14,15]={1,1,1,0,0})。因此,該來源端2a、2b可得知該需求端1的資料保留範圍及資料預載範圍,用以提供該需求端1所需資料段;且該需求端1可以得知該來源端2a、2b的資料保留範圍及資料預載範圍,並據以載入該需求端1所需資料段。Referring to FIG. 5, it is an operational flowchart of a preferred embodiment of the peer-to-peer network stream transmission method of the present invention, wherein the peer-to-peer network stream transmission method includes a preparation step S1 and an adjustment step S2. Please refer to FIG. 3 and FIG. 4 together. In the preparation step S1, at least one source end 2 is obtained by a demand end 1 according to a plurality of data segments of a stream of data, and the demand end 1 and the source end are 2 Exchanging the buffer mapping range owned by each buffer, the buffer mapping range includes a data preload range. In detail, since the directory server D updates the source of different data, the demand terminal 1 can divide the stream data to be played by itself into a plurality of data segments, and obtain the data from the directory server D according to the data segment. a source list, the source list containing the source 2 of the data segment (possibly the media server V or other terminal P that can provide the data segment), the demand terminal 1 and the source terminal 2 are aware of each other's storage The status of the data segment (for example, number and number) can be exchanged for the buffer mapping range that each has its own. For example, the demand side 1 can buffer its mapping range (for example, S p =10, g[ 8,9,10,11,12]={1,1,1,0,0}) are transmitted to the two source terminals 2a, 2b, and the demand terminal 1 can receive its buffer map from the source terminal 2a, 2b Range (for example: S p =9 at the source end 2a, g[7,8,9,10,11]={1,1,1,1,1}; S p =13,g at the source end 2b [11,12,13,14,15]={1,1,1,0,0}). Therefore, the source end 2a, 2b can know the data retention range and the data preload range of the demand terminal 1 to provide the data segment required by the demand terminal 1; and the demand terminal 1 can know the source terminal 2a, 2b's data retention range and data preload range, and the data segment required for the demand side 1 is loaded accordingly.

該調節步驟S2,係由該來源端2依據該需求端1之資料預載範圍,而〝延後刪除〞(post-cache)或〝提前預載〞(pre-cache)屬於該資料預載範圍的至少一資料段。詳言之,請一併參閱第4圖所示,該來源端2依據該需求端1的資料預載範圍映對的資料段是否有效,即可得知該需求端1未來需要載入之資料段。若該需求端1之資料預載範圍映對的資料段為資料無效者,屬於該來源端2已經載入且播放過的資料段(即該資料保留範圍的資料段),則該來源端2延後刪除該已經載入且播放過的資料段。例如:該需求端1的資料預載範圍的播放序號為{Sp +1,Sp +2,...,Sp +U},其資料無效者為該播放序號{Sp +2,...,Sp +U},若該播放序號{Sp +2,...,Sp +U}之至少一個屬於該來源端2已經載入且 播放過的資料段,則該來源端2在評估本身的資料預載範圍仍屬於一安全存量(例如:U=2)後,可在下一個時序(t=T+1),將該資料保留範圍之中可供該需求端1載入之資料段(即該播放序號{Sp +2,...,Sp +U}所屬資料段)保留給該需求端1而不刪除,意即〝延後刪除〞該播放序號{Sp +2,...,Sp +U}所屬資料段。另,基於該安全存量(例如:U=2),該資料保留範圍之最大範圍可調整為(L+U-2),使該來源端2之資料保留範圍的最大保留狀態設為該播放序號{Sp -L-U+2,...,Sp -1,Sp ,Sp +1,Sp +2}(如第6圖所示),即為該播放序號{Sp -W+3,...,Sp -1,Sp ,Sp +1,Sp +2}。The adjusting step S2 is performed by the source terminal 2 according to the data preload range of the demand terminal 1, and the post-cache or pre-cache pre-cache belongs to the data preload range. At least one data segment. In more detail, please refer to Figure 4 together. The source 2 can know the data to be loaded in the future of the demand terminal 1 according to whether the data segment of the data preloading range of the demand terminal 1 is valid. segment. If the data segment of the data preloading range of the demand terminal 1 is invalid, and belongs to the data segment that has been loaded and played by the source terminal 2 (ie, the data segment of the data retention range), the source terminal 2 Deferred deletion of the data segment that has been loaded and played. For example, the play sequence number of the data preload range of the demand side 1 is {S p +1, S p +2,..., S p +U}, and the data invalid is the play sequence number {S p +2, ...,S p +U}, if at least one of the play sequence number {S p +2,...,S p +U} belongs to a data segment that has been loaded and played by the source terminal 2, the source After the data preload range of the evaluation itself still belongs to a safe stock (for example: U=2), it can be used in the next time series (t=T+1). The data segment (that is, the data segment to which the play sequence number {S p +2,...,S p +U} belongs) is reserved for the demand terminal 1 without deleting, meaning that the playback sequence number is deleted after the delay. p +2,...,S p +U} belongs to the data segment. In addition, based on the safety stock (for example, U=2), the maximum range of the data retention range can be adjusted to (L+U-2), so that the maximum retention state of the data retention range of the source terminal 2 is set to the playback sequence number. {S p -L-U+2,...,S p -1,S p ,S p +1,S p +2} (as shown in Fig. 6), that is, the play sequence number {S p - W+3,...,S p -1,S p ,S p +1,S p +2}.

另一方面,若該需求端1之資料預載範圍映對的資料段為資料無效者,屬於該來源端2將會播放但仍未載入之資料段(即該資料預載範圍的資料段),則該來源端2依序提前預載該仍未載入之資料段。例如:該需求端1的資料預載範圍的播放序號為{Sp +3,...,Sp +U},該來源端2將會播放該播放序號{Sp +1,...,Sp +U-1},且仍未載入該播放序號{Sp +3,...,Sp +U-1},則該來源端2在評估保留給其他需求端1的播放序號後,在下一個時序(t=T+1),將不需保留的播放序號所屬資料段刪除,利用騰出的剩餘儲存空間〝提前預載〞該播放序號{Sp +3,...,Sp +U-1}。另,基於目前正在播放之資料段的播放序號Sp ,該資料預載範圍最大可調整為(U+L),使該來源端2之資料預載範圍的最大預載狀態設為該播放序號{Sp +1,Sp +2,...,Sp +U,...,Sp +U+L+1}(如第6圖所示),即為該播放序號{Sp +1,Sp +2,...,Sp +U,...,Sp +W}。為了更清楚揭示〝提前預載〞及〝延後刪除〞之運作情 形,係舉例說明如下所述。On the other hand, if the data segment of the data preload range of the demand terminal 1 is invalid, it belongs to the data segment that the source terminal 2 will play but is still not loaded (that is, the data segment of the data preload range) ), the source 2 preloads the data segment that is still not loaded in advance. For example, the play sequence number of the data preload range of the demand side 1 is {S p +3,...,S p +U}, and the source end 2 will play the play sequence number {S p +1,... , S p +U-1}, and the playback sequence number {S p +3,...,S p +U-1} is still not loaded, then the source 2 is reserved for playback to other demand terminals 1 After the serial number, at the next time sequence (t=T+1), the data segment to which the play sequence number that does not need to be reserved belongs is deleted, and the remaining storage space vacated is pre-loaded in advance. The play sequence number {S p +3,... , S p +U-1}. In addition, based on the play sequence S p of the data segment currently being played, the data preload range can be adjusted to be (U+L) at the maximum, so that the maximum preload state of the data preload range of the source terminal 2 is set to the play sequence number. {S p +1,S p +2,...,S p +U,...,S p +U+L+1} (as shown in Fig. 6), that is, the play sequence number {S p +1,S p +2,...,S p +U,...,S p +W}. In order to more clearly reveal the operation of pre-loading and post-deletion, the following is an example.

請參閱第7圖所示,其係本發明之提前預載及延後刪除的運作情形示意圖。其中,該來源端2a及2b依據該需求端1之緩衝映對範圍,可以得知該需求端1需要載入的一串流資料之播放序號{14,15,16,17},此時,由於該來源端2a正在播放同一串流之播放序號{12}所屬資料段,且僅預載播放序號{13,14}所屬資料段,因此,該來源端2a評估其儲存空間後,可再預載播放序號{15}所屬資料段,以供該需求端1及其本身未來播放串流之所需。另,由於該來源端2b正在播放同一串流之播放序號{18},且該播放序號{17}所屬資料段仍未刪除,因此,該來源端2b評估其本身需求後,可保留該播放序號{17}供該需求端1之所需。因此,該需求端1可由該來源端2a載入該播放序號{14,15}所屬資料段,另由該來源端2b載入該播放序號{17}所屬資料段,如此一來,僅剩該播放序號{16}所屬資料段需由該媒體伺服端V載入,因此,可以分散該需求端1的資料載入來源。Please refer to FIG. 7 , which is a schematic diagram of the operation of the pre-loading and deferred deletion of the present invention. The source terminals 2a and 2b can know the playback sequence number of the stream data to be loaded by the demand terminal 1 according to the buffer mapping range of the demand terminal 1 at this time. Since the source end 2a is playing the data segment to which the play sequence number {12} of the same stream belongs, and only the data segment to which the play sequence number {13, 14} belongs is preloaded, the source terminal 2a can re-predict the storage space after it is evaluated. The data segment to which the sequence number {15} belongs is carried for the demand side 1 and its own future playback stream. In addition, since the source end 2b is playing the play sequence number {18} of the same stream, and the data segment to which the play sequence number {17} belongs is still not deleted, the source end 2b can retain the play sequence number after evaluating its own requirement. {17} is required for this demand side 1. Therefore, the demand terminal 1 can load the data segment to which the play sequence number {14, 15} belongs from the source terminal 2a, and the source terminal 2b loads the data segment to which the play sequence number {17} belongs, so that only the remaining data segment The data segment to which the play sequence number {16} belongs is to be loaded by the media server V. Therefore, the data loading source of the demand terminal 1 can be dispersed.

其中,該來源端2可以計算該緩衝映對範圍經過調節後的獲益率(benefit ratio),如下式(2)~(5)所示: Wherein, the source terminal 2 can calculate a benefit ratio of the buffer mapping range, as shown in the following formulas (2) to (5):

其中,N1為所有來源端2的數量;N2為具有資料段Si 之來源端2的數量;D(Si )為資料段Si 之堪用度(availability);w(Si )為資料段Si 之獲益值(benefit value);B為緩衝映對範圍,Cw(B)為整個緩衝映對範圍之獲益值;β為介於最大保留狀態與最大預載狀態所有可能的排列集合,BOPT 為該緩衝映對範圍經過調節後的獲益率,即在所有可能的排列集合中的整個緩衝映對範圍之獲益值最大者對於其資料段數量的平均值。 Where N1 is the number of all source terminals 2; N2 is the number of source terminals 2 with data segment S i ; D(S i ) is the availability of data segment S i ; w(S i ) is the data The benefit value of the segment S i ; B is the buffer mapping range, Cw (B) is the benefit value of the entire buffer mapping range; β is all possible permutations between the maximum retention state and the maximum preload state. The set, B OPT is the adjusted benefit rate of the buffer mapping range, that is, the average of the number of data segments of the entire buffer mapping range in all possible permutation sets.

請再參閱第5圖所示,本發明對等網路串流傳輸方法還可以包含一傳輸步驟S3,係由該需求端1依據該來源端2之緩衝映對範圍,而傳送至少一傳輸請求(Transmission Request)到具有該需求端1所需資料段之來源端2,用以取得該資料段,再判斷該來源端2是否逾時(time-out)回應(response)該傳輸請求,若判斷為「是」,則當該傳輸請求所屬資料段仍有需要取得時,改向另一個來源端2發出該傳輸請求;若判斷為「否」,則再發出使取得其他資料段增加的傳輸請求至同一來源端2。詳言之,請一併參閱第8圖所示,其係本發明之需求端1的控制轉態示意圖,其中,該需求端1的控制狀態包含一〝待命狀態〞S31、一〝等待狀態〞S32、一〝逾時狀態〞S33及一〝結束狀態〞S34。該需求端1會先進入該〝待命狀態〞S31,依據各資料段及各緩衝映對範圍,選出至少一存有該資料段的來源端2,並發出該至少一傳輸請求至該存有該資料段的來源端2,用以取得至少一資料段之封包,例如:採用UDP傳送該需求端1所需的封包數量或編號等,避免該需求端1 與該來源端之間產生過多的確認過程。之後,該需求端1將進入該〝等待狀態〞S32,觀察該來源端2是否逾時回應該傳輸請求,例如:判斷該來源端2的資料往返時間(round trip time,RTT)是否大於一等待時限(例如:100毫秒,ms),倘若該來源端2逾時回應該傳輸請求(即該資料往返時間大於該等待時限),則進入該〝逾時狀態〞S33,由該需求端1視請求該來源端2傳輸的資料段是否仍有需要取得該資料段(即仍屬於該需求端1需預先載入的資料段),若仍有需要取得該資料段,則再進入該〝待命狀態〞S31,改向另一個存有該資料段的來源端2發出該傳輸請求;反之,若已不需要取得該資料段,則放棄該傳輸請求,進入該〝結束狀態〞S34;另一方面,倘若該來源端2可以及時回應該傳輸請求(即該資料往返時間不大於該等待時限),則該需求端1會取得該傳輸請求對應的資料段,之後,再進入該〝待命狀態〞S31,用以發出另一個傳輸請求至該來源端2a,此時,可以逐次增加請求該來源端2a提供的資料需求量(Quota)。如此一來,當來源端2無法傳輸資料至該需求端1時,該需求端1可由不同來源端2載入資料,而對於可載入資料的來源端2,該需求端1還可以逐次增加載入的資料量,可以避免單筆大量傳輸資料,而造成網路壅塞惡化的情形,使得該傳輸資料整筆遺失。Referring to FIG. 5 again, the peer-to-peer network stream transmission method of the present invention may further include a transmission step S3, wherein the demand terminal 1 transmits at least one transmission request according to the buffer mapping range of the source terminal 2. (Transmission Request) to the source end 2 of the data segment required by the demand terminal 1 for obtaining the data segment, and then determining whether the source terminal 2 responds to the transmission request by time-out. If yes, if the data segment to which the transfer request belongs still needs to be obtained, the transfer request is sent to another source 2; if the determination is "No", then a transfer request is made to obtain additional data segments. To the same source 2 . In detail, please refer to FIG. 8 , which is a schematic diagram of the control transition state of the demand terminal 1 of the present invention, wherein the control state of the demand terminal 1 includes a standby state 〞 S31 and a waiting state 〞 S32, a timeout state 〞S33, and an end state 〞S34. The demand terminal 1 first enters the standby state 〞S31, selects at least one source terminal 2 storing the data segment according to each data segment and each buffer mapping range, and issues the at least one transmission request to the stored one. The source end 2 of the data segment is used to obtain a packet of at least one data segment, for example, the number or number of packets required to transmit the demand terminal 1 by using UDP, to avoid the demand terminal 1 An excessive confirmation process occurs between the source and the source. After that, the demand terminal 1 will enter the waiting state 〞S32, and observe whether the source terminal 2 times out to respond to the transmission request, for example, whether the source round-trip time (RTT) of the source terminal 2 is greater than a waiting time. The time limit (for example, 100 milliseconds, ms), if the source terminal 2 times the response request (that is, the data round-trip time is greater than the waiting time limit), then enter the timeout state 〞S33, and the requester 1 requests the request Whether the data segment transmitted by the source 2 still needs to obtain the data segment (that is, the data segment that still needs to be preloaded at the demand end 1), and if it still needs to obtain the data segment, then enter the standby state. S31, redirecting to another source end 2 storing the data segment to issue the transmission request; otherwise, if the data segment is not required to be obtained, discarding the transmission request, entering the end state 〞S34; The source terminal 2 can respond to the transmission request in time (that is, the round-trip time of the data is not greater than the waiting time limit), then the demand terminal 1 obtains the data segment corresponding to the transmission request, and then enters the standby state 〞S31, To issue another transmission request to the source 2a, at this time, the data demand (Quota) requested by the source 2a may be sequentially increased. In this way, when the source terminal 2 cannot transmit data to the demand terminal 1, the demand terminal 1 can be loaded with data from different source terminals 2, and for the source terminal 2 of the loadable data, the demand terminal 1 can also be sequentially increased. The amount of data loaded can avoid a single large amount of data transmission, which causes the network congestion to deteriorate, and the transmission data is lost.

舉例而言,倘若該需求端1於時間為0毫秒時,分別發出該傳輸請求至該來源端2a及2b,請求該來源端2a及2b分別傳送該播放序號{1,2}所屬資料段。當時間為40毫秒時,該需求端1收到該來源端2a所傳送的播放序號{1} 所屬資料段,則該需求端1再發出另一傳輸請求至該來源端2a,要求該來源端2a傳送該播放序號{3,4}所屬資料段。當時間為65毫秒時,該需求端1收到該來源端2a所傳送的播放序號{3}所屬資料段。當時間為105毫秒時,該需求端1收到該來源端2a所傳送的播放序號{4}所屬資料段,此時,因為該來源端2b已逾該等待時限(例如:100毫秒),仍未回應該播放序號{2}的傳輸請求,倘若該需求端1正在播放播放序號{1}所屬資料段,則該需求端1再發出另一傳輸請求至該來源端2a,要求該來源端2a傳送播放序號{2,5,6}所屬資料段;反之,倘若該需求端1已播放至該播放序號{3}所屬資料段,則該需求端1放棄該播放序號{2}所屬資料段,直接發出另一傳輸請求至該來源端2a,要求該來源端2a傳送該播放序號{5,6,7}所屬資料段。其餘資料段傳輸方式係依此類推。For example, if the demand terminal 1 sends the transmission request to the source terminals 2a and 2b at a time of 0 milliseconds, the source terminals 2a and 2b are requested to respectively transmit the data segment to which the broadcast sequence number {1, 2} belongs. When the time is 40 milliseconds, the demand terminal 1 receives the play sequence number {1} transmitted by the source terminal 2a. In the data segment, the demand terminal 1 sends another transmission request to the source terminal 2a, and requests the source terminal 2a to transmit the data segment to which the play sequence number {3, 4} belongs. When the time is 65 milliseconds, the demand terminal 1 receives the data segment to which the play sequence number {3} transmitted by the source terminal 2a belongs. When the time is 105 milliseconds, the demand terminal 1 receives the data segment to which the play sequence number {4} transmitted by the source terminal 2a belongs, and at this time, because the source terminal 2b has exceeded the waiting time limit (for example, 100 milliseconds), The transmission request of the sequence number {2} should not be played back. If the demand terminal 1 is playing the data segment to which the play sequence number {1} belongs, the demand terminal 1 sends another transmission request to the source terminal 2a, requesting the source terminal 2a. Transmitting the data segment to which the play sequence number {2, 5, 6} belongs; conversely, if the demand terminal 1 has been played to the data segment to which the play sequence number {3} belongs, the demand terminal 1 discards the data segment to which the play sequence number {2} belongs. The other transmission request is directly sent to the source end 2a, and the source end 2a is required to transmit the data segment to which the play sequence number {5, 6, 7} belongs. The rest of the data segment transmission method is the same.

本發明對等網路串流傳輸方法在該需求端1取得所需資料段後,還可以包含一播放步驟(圖未繪示),係由該需求端1依據該資料段的順序進行解碼及播放作業。詳言之,該需求端1可多方取得所需的資料段,待逐一進行各資料段的解碼(decoding)作業後,可將各資料段轉為一影像內容,而進行播放(playing)作業時,可將該影像內容轉為使用者可以觀看的畫面,該解碼及播放作業係本發明所屬領域具有通常知識者可以理解,在此容不贅述。The peer-to-peer network stream transmission method may further include a playback step (not shown) after the required data segment is obtained by the demand terminal 1, and the demand terminal 1 decodes according to the sequence of the data segment. Play the game. In detail, the demand side 1 can obtain the required data segments by multiple parties. After decoding the data segments one by one, each data segment can be converted into an image content, and when playing a play operation The image content can be converted into a screen that can be viewed by the user. The decoding and playback operation can be understood by those having ordinary knowledge in the field to which the present invention pertains, and details are not described herein.

請參閱第9圖所示,其係本發明之分享率的關係曲線示意圖。其中,一第一曲線C1表示本發明對等網路串流傳輸方法的分享率,一第二曲線C2表示習知對等網路串 流傳輸方法的分享率,在考量不同〝伺服器供應能力〞(Server Capability,即資料由該媒體伺服器V供應的比例)的情形下,該第一曲線C1之值皆優於該第二曲線C2之值。因此,可知本發明不僅可以有效降低資料的稀有性、提高資料的分享率、降低該媒體伺服端V的傳輸負擔,而且,還可以避免資料大量傳輸的端P成為傳輸瓶頸,進一步避免發生網路壅塞。Please refer to FIG. 9, which is a schematic diagram of the relationship of the sharing rate of the present invention. Wherein, a first curve C1 represents a sharing rate of the peer-to-peer network streaming method of the present invention, and a second curve C2 represents a conventional peer-to-peer network string. The sharing rate of the streaming method is superior to the second curve in the case where the server Capability (Server Capability, that is, the ratio of the data supplied by the media server V) is considered. The value of C2. Therefore, it can be seen that the present invention can not only effectively reduce the rarity of data, improve the sharing rate of data, reduce the transmission load of the media server V, but also avoid the end of the mass transmission of data P as a transmission bottleneck, and further avoid the network. Congestion.

請參閱第10圖所示,其係本發明之連續程度的關係曲線示意圖。其中,一第三曲線C3表示本發明對等網路串流傳輸方法的連續程度,一第四曲線C4表示習知對等網路串流傳輸方法的連續程度,在考量不同〝伺服器供應能力〞低於65%的情形下,該第三曲線C3之值皆優於該第四曲線C4之值。因此,由於該需求端1可多方取得所需的資料段,可以讓影音串流播放時不會中斷,而提高串流播放的流暢程度。Please refer to Fig. 10, which is a schematic diagram showing the relationship of the degree of continuity of the present invention. Wherein, a third curve C3 indicates the degree of continuity of the peer-to-peer network stream transmission method of the present invention, and a fourth curve C4 indicates the degree of continuity of the conventional peer-to-peer network stream transmission method, considering different server supply capabilities. In the case where 〞 is less than 65%, the value of the third curve C3 is better than the value of the fourth curve C4. Therefore, since the demand side 1 can obtain the required data segments in multiple ways, the video stream can be played without interruption, and the streamability of streaming playback is improved.

藉由前揭之技術手段,本發明所揭示之對等網路串流傳輸方法的主要特點列舉如下:先由該需求端1依據該串流資料之數個資料段取得至少一來源端2,且該需求端1與該來源端2交換各自擁有的緩衝映對範圍,該緩衝映對範圍包含一資料保留範圍及一資料預載範圍。之後,再由該來源端2依據該需求端1之資料預載範圍,而〝延後刪除〞或〝提前預載〞屬於該資料預載範圍的至少一資料段。而且,該需求端1還可以依據該來源端2之緩衝映對範圍,而傳送至少一傳輸請求到具有該需求端1所需資料段之來源端2,用以取得該資料段,再判斷該來源端2是否 逾時回應該傳輸請求,若判斷為「是」,則當該傳輸請求所屬資料段仍有需要取得時,改向另一個來源端2發出該傳輸請求;若判斷為「否」,則再發出使取得其他資料段增加的傳輸請求至同一來源端2。The main features of the peer-to-peer network stream transmission method disclosed by the present invention are as follows: First, the demand terminal 1 obtains at least one source terminal 2 according to the data segments of the stream data. And the demand terminal 1 exchanges the buffer mapping range owned by the source end 2 with the source terminal 2, and the buffer mapping range includes a data retention range and a data preload range. Thereafter, the source terminal 2 preloads the range according to the data of the demand terminal 1, and then deletes the 〞 or 〝 preloaded at least one data segment that belongs to the preload range of the data. Moreover, the demand terminal 1 can further transmit at least one transmission request to the source end 2 of the data segment required by the demand terminal 1 according to the buffer mapping range of the source terminal 2, to obtain the data segment, and then determine the Source 2 If the judgment is "Yes", then when the data segment to which the transmission request belongs still needs to be obtained, the transmission request is sent to another source 2; if the judgment is "No", then the request is sent again. Make the transfer request of the other data segment increased to the same source 2.

因此,藉由〝延後刪除〞或〝提前預載〞串流資料段的機制,讓儲存容量有限的行動裝置也可提供資料,使該需求端1可多方取得所需串流資料,以提高串流資料的分享率,增加資料取得的整體效率,乃本發明之功效。Therefore, by deferring the deletion or pre-loading of the data segment in advance, the mobile device with limited storage capacity can also provide data, so that the demand terminal 1 can obtain the required streaming data in multiple ways to improve The sharing rate of streaming data and the overall efficiency of data acquisition are the effects of the present invention.

再者,該需求端1可由其他資料來源逐次增量取得遺失的串流資料,使得播放所需的串流資料不中斷,以提高串流資料播放時的流暢程度,讓使用者觀看串流資料不會停頓,為本發明之功效。Furthermore, the demand side 1 can incrementally obtain the lost streaming data by other data sources, so that the streaming data required for playback is not interrupted, so as to improve the smoothness of the streaming data during playback, and let the user watch the streaming data. Will not stop, is the effect of the invention.

另,該來源端2藉由〝延後刪除〞或〝提前預載〞串流資料段,供該需求端1載入,且該需求端1可由其他來源端2取得遺失的串流資料,使串流資料可經由多方取得,以降低串流資料來源端的傳輸負擔,避免出現資料傳輸瓶頸及網路壅塞的情形,係本發明之功效。In addition, the source terminal 2 preloads the stream data segment by delaying the deletion or the ,, for the demand terminal 1 to load, and the demand terminal 1 can obtain the lost stream data from other source terminals 2, so that The streaming data can be obtained by multiple parties to reduce the transmission burden of the source of the streaming data, avoiding the data transmission bottleneck and the network congestion, and is the effect of the present invention.

雖然本發明已利用上述較佳實施例揭示,然其並非用以限定本發明,任何熟習此技藝者在不脫離本發明之精神和範圍之內,相對上述實施例進行各種更動與修改仍屬本發明所保護之技術範疇,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。While the invention has been described in connection with the preferred embodiments described above, it is not intended to limit the scope of the invention. The technical scope of the invention is protected, and therefore the scope of the invention is defined by the scope of the appended claims.

〔本發明〕〔this invention〕

1‧‧‧需求端1‧‧‧ demand side

2,2a,2b‧‧‧來源端2, 2a, 2b‧‧‧ source

[0]‧‧‧播放序號[0]‧‧‧Play number

[12]~[20]‧‧‧播放序號[12]~[20]‧‧‧Play number

C1‧‧‧第一曲線C1‧‧‧ first curve

C2‧‧‧第二曲線C2‧‧‧second curve

C3‧‧‧第三曲線C3‧‧‧ third curve

C4‧‧‧第四曲線C4‧‧‧fourth curve

D‧‧‧目錄伺服端D‧‧‧ directory server

N‧‧‧對等-內容遞送網路N‧‧‧Peer-to-content delivery network

P‧‧‧端P‧‧‧

V‧‧‧媒體伺服端V‧‧‧Media server

S1‧‧‧準備步驟S1‧‧‧Preparation steps

S2‧‧‧調節步驟S2‧‧‧ adjustment steps

S3‧‧‧傳輸步驟S3‧‧‧Transfer steps

S31‧‧‧待命狀態S31‧‧‧ Standby

S32‧‧‧等待狀態S32‧‧‧ Waiting status

S33‧‧‧逾時狀態S33‧‧‧Overtime status

S34‧‧‧結束狀態S34‧‧‧End status

Sp ‧‧‧資料段S p ‧‧‧ data segment

Sp -L‧‧‧資料段S p -L‧‧‧ data segment

Sp -2‧‧‧資料段S p -2‧‧‧ data segment

Sp -1‧‧‧資料段S p -1‧‧‧ data segment

Sp +1‧‧‧資料段S p +1‧‧‧ data segment

Sp +2‧‧‧資料段S p +2‧‧‧ data segment

Sp +U‧‧‧資料段S p +U‧‧‧ data segment

〔習知〕[study]

[0]‧‧‧播放序號[0]‧‧‧Play number

[12]~[20]‧‧‧播放序號[12]~[20]‧‧‧Play number

D‧‧‧目錄伺服端D‧‧‧ directory server

N‧‧‧對等-內容遞送網路N‧‧‧Peer-to-content delivery network

P‧‧‧端P‧‧‧

P1,P2,P3‧‧‧端P1, P2, P3‧‧‧

T‧‧‧終端裝置T‧‧‧ terminal device

V‧‧‧媒體伺服端V‧‧‧Media server

第1圖:習知對等網路的架構示意圖。Figure 1: Schematic diagram of the structure of a conventional peer-to-peer network.

第2圖:習知對等網路的資料傳輸示意圖。Figure 2: Schematic diagram of data transmission for a conventional peer-to-peer network.

第3圖:本發明對等網路串流傳輸方法較佳實施例之系統架構圖。Figure 3 is a system architecture diagram of a preferred embodiment of the peer to peer network stream transmission method of the present invention.

第4圖:本發明對等網路串流傳輸方法較佳實施例之緩衝映對範圍的示意圖。Figure 4 is a diagram showing the buffer mapping range of the preferred embodiment of the peer to peer network stream transmission method of the present invention.

第5圖:本發明對等網路串流傳輸方法較佳實施例之運作流程圖。Figure 5 is a flow chart showing the operation of a preferred embodiment of the peer to peer network stream transmission method of the present invention.

第6圖:本發明之緩衝映對範圍的最大保留及最大預載狀態示意圖。Figure 6 is a schematic diagram showing the maximum retention and maximum preload state of the buffer mapping range of the present invention.

第7圖:本發明之提前預載及延後刪除的運作情形示意圖。Figure 7: Schematic diagram of the operation of the preloading and deferred deletion of the present invention.

第8圖:本發明之需求端的控制轉態示意圖。Figure 8 is a schematic diagram of the control transition state of the demand side of the present invention.

第9圖:本發明之分享率的關係曲線示意圖。Figure 9 is a diagram showing the relationship of the sharing rate of the present invention.

第10圖:本發明之連續程度的關係曲線示意圖。Figure 10 is a graphical representation of the relationship of the degree of continuity of the present invention.

S1...準備步驟S1. . . Preparation step

S2...調節步驟S2. . . Adjustment step

S3...傳輸步驟S3. . . Transmission step

Claims (13)

一種對等網路串流傳輸方法,係包含:一準備步驟,係由一需求端依據一串流資料之數個資料段取得至少一來源端,且該需求端與該來源端交換各自擁有的緩衝映對範圍,該緩衝映對範圍包含一資料預載範圍及一資料保留範圍,該資料保留範圍包含L個已經載入且播放過的資料段之播放序號{Sp-L,...,Sp-2,Sp-1};及一調節步驟,係由該來源端依據該需求端之資料預載範圍,而延後刪除或提前預載屬於該資料預載範圍的至少一資料段。 A peer-to-peer network streaming method includes: a preparation step of obtaining, by a demanding end, at least one source according to a plurality of data segments of a stream of data, and the demanding end exchanges with the source end The buffer mapping range includes a data preload range and a data retention range, and the data retention range includes the playback sequence number of the L data segments that have been loaded and played {Sp-L,..., Sp-2, Sp-1}; and an adjustment step, wherein the source terminal pre-loads the data according to the demand side, and delays or pre-loads at least one data segment belonging to the data preload range. 如申請專利範圍第1項所述之對等網路串流傳輸方法,其中若該需求端之資料預載範圍映對的資料段為資料無效者,屬於該來源端已經載入且播放過的資料段,則該來源端延後刪除該已經載入且播放過的資料段。 The peer-to-peer network stream transmission method according to claim 1, wherein if the data segment of the data preloading range of the demand side is invalid, the source end has been loaded and played. For the data segment, the source side delays deleting the data segment that has been loaded and played. 如申請專利範圍第1項所述之對等網路串流傳輸方法,其中若該需求端之資料預載範圍映對的資料段為資料無效者,屬於該來源端將會播放但仍未載入之資料段,則該來源端依序提前預載該仍未載入之資料段。 The peer-to-peer network streaming method as described in claim 1, wherein if the data segment of the data preloading range of the demand side is invalid, the source terminal will play but still does not carry In the data segment, the source end preloads the data segment that has not been loaded in advance. 如申請專利範圍第1項所述之對等網路串流傳輸方法,其中該資料預載範圍包含U個未來需播放的資料段之播放序號{Sp+1,Sp+2,...,Sp+U}。 The peer-to-peer network stream transmission method according to claim 1, wherein the data preload range includes a play sequence number of the U data segments to be played in the future {Sp+1, Sp+2, ..., Sp+U}. 如申請專利範圍第1項所述之對等網路串流傳輸方法,其中該緩衝映對範圍包含數個資料段之播放序號及資 料有效性,該資料有效性如下式所示: 其中,g[i]表示第i個播放序號所屬資料段的資料有效性。The peer-to-peer network streaming method as described in claim 1, wherein the buffer mapping range includes a play sequence number and a data validity of the plurality of data segments, and the validity of the data is as follows: Where g[i] represents the validity of the data of the data segment to which the i th play sequence number belongs. 如申請專利範圍第1項所述之對等網路串流傳輸方法,其中該資料段之播放序號為{Sp-L,...,Sp-2,Sp-1,Sp,Sp+1,Sp+2,...,Sp+U},其中該播放序號{Sp-L,...,Sp-2,Sp-1}映對L個已經載入且播放過的資料段,該播放序號{Sp}映對1個目前時序正在播放的資料段,該播放序號{Sp+1,Sp+2,...,Sp+U}映對U個未來需播放的資料段,該緩衝映對範圍映對該需求端的W個資料段之儲存空間,W=L+1+U。 The peer-to-peer network streaming method as described in claim 1, wherein the playing sequence number of the data segment is {Sp-L, ..., Sp-2, Sp-1, Sp, Sp+1, Sp+2,...,Sp+U}, wherein the play sequence number {Sp-L,...,Sp-2,Sp-1} is mapped to L pieces of data that have been loaded and played, the play The sequence number {Sp} is mapped to a data segment currently playing at the current time sequence, and the play sequence number {Sp+1, Sp+2, ..., Sp+U} is mapped to the U data segments to be played in the future. For the storage space of the W data segments of the demand side, the range is W=L+1+U. 如申請專利範圍第6項所述之對等網路串流傳輸方法,其中該資料預載範圍的最大預載狀態設為該播放序號{Sp +1,Sp +2,...,Sp +U,...,Sp +W}。The peer-to-peer network stream transmission method according to claim 6, wherein the maximum preload state of the data preload range is set to the play sequence number {S p +1, S p +2,..., S p +U,...,S p +W}. 如申請專利範圍第6項所述之對等網路串流傳輸方法,其中該緩衝映對範圍另包含一資料保留範圍,該資料保留範圍的最大保留狀態設為該播放序號{Sp -W+3,...,Sp -1,Sp ,Sp +1,Sp +2}。The peer-to-peer network stream transmission method according to claim 6, wherein the buffer mapping range further includes a data retention range, and the maximum retention state of the data retention range is set to the play sequence number {S p -W +3,...,S p -1,S p ,S p +1,S p +2}. 一種對等網路串流傳輸方法,係包含:一準備步驟,係由一需求端依據一串流資料之數個資料段取得至少一來源端,且該需求端與該來源端交換各自擁有的緩衝映對範圍,該緩衝映對範圍包含一資料預載範圍; 一調節步驟,係由該來源端依據該需求端之資料預載範圍,而延後刪除或提前預載屬於該資料預載範圍的至少一資料段;及一傳輸步驟,係由該需求端依據該來源端之緩衝映對範圍傳送至少一傳輸請求到具有該需求端所需資料段之來源端,用以取得該數個資料段之至少一個,再判斷該來源端是否逾時回應該傳輸請求,若判斷為是,則當該傳輸請求所屬資料段仍有需要取得時,改向另一個來源端發出該傳輸請求,若判斷為否,則再發出使取得其他資料段增加的傳輸請求至同一來源端,並逐次增加請求該來源端提供的資料需求量。 A peer-to-peer network streaming method includes: a preparation step of obtaining, by a demanding end, at least one source according to a plurality of data segments of a stream of data, and the demanding end exchanges with the source end The buffer mapping range, the buffer mapping range includes a data preload range; An adjustment step is performed by the source end according to the data preload range of the demand end, and delaying or pre-loading at least one data segment belonging to the data preload range; and a transmission step is performed by the demand end The buffering range of the source end transmits at least one transmission request to the source end of the data segment required by the demanding end, to obtain at least one of the plurality of data segments, and then determine whether the source terminal times the transmission request If the judgment is yes, when the data segment to which the transmission request belongs still needs to be obtained, the transmission request is sent to another source, and if the determination is no, the transmission request for obtaining the additional data segment is sent to the same Source, and increase the amount of data requested by the source. 如申請專利範圍第9項所述之對等網路串流傳輸方法,其中該傳輸步驟之傳輸請求用以取得至少一資料段之封包。 The peer-to-peer network streaming method of claim 9, wherein the transmission request of the transmitting step is used to obtain a packet of at least one data segment. 如申請專利範圍第9項所述之對等網路串流傳輸方法,其中該傳輸步驟之傳輸請求採用UDP傳送該需求端所需的封包數量或編號。 The peer-to-peer network stream transmission method according to claim 9, wherein the transmission request of the transmission step uses UDP to transmit the number or number of packets required by the demand side. 如申請專利範圍第9項所述之對等網路串流傳輸方法,其中該傳輸步驟若該來源端的資料往返時間大於一等待時限,則該需求端認定該來源端逾時回應該傳輸請求。 The peer-to-peer network stream transmission method according to claim 9, wherein if the data round-trip time of the source end is greater than a waiting time limit, the demanding end determines that the source end times the transmission request. 如申請專利範圍第9項所述之對等網路串流傳輸方法,其中該傳輸步驟之仍有需要取得的資料段為該需求端需預先載入的資料段。The peer-to-peer network stream transmission method according to claim 9, wherein the data segment that needs to be obtained in the transmission step is a data segment that needs to be pre-loaded at the demand end.
TW101116531A 2012-05-09 2012-05-09 A streaming transmission method for peer-to-peer networks TWI478548B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW101116531A TWI478548B (en) 2012-05-09 2012-05-09 A streaming transmission method for peer-to-peer networks

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW101116531A TWI478548B (en) 2012-05-09 2012-05-09 A streaming transmission method for peer-to-peer networks

Publications (2)

Publication Number Publication Date
TW201347478A TW201347478A (en) 2013-11-16
TWI478548B true TWI478548B (en) 2015-03-21

Family

ID=49990838

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101116531A TWI478548B (en) 2012-05-09 2012-05-09 A streaming transmission method for peer-to-peer networks

Country Status (1)

Country Link
TW (1) TWI478548B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200836558A (en) * 2006-12-20 2008-09-01 Intel Corp Method and apparatus for switching program streams using a fixed speed program stream buffer coupled to a decoder
CN100446567C (en) * 2005-10-25 2008-12-24 北京影立驰技术有限公司 Apparatus and method for realizing P2P stream broadcasting in information family appliances
US20100146138A1 (en) * 2008-12-09 2010-06-10 Hong Kong Applied Science And Technology Research Institute Co., Ltd. Method of data request scheduling in peer-to-peer sharing networks
TW201207841A (en) * 2010-03-09 2012-02-16 Fraunhofer Ges Forschung Apparatus and method for processing an audio signal using patch border alignment
CN101697554B (en) * 2009-09-27 2012-05-09 华中科技大学 Method for scheduling P2P streaming media video data transmission

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100446567C (en) * 2005-10-25 2008-12-24 北京影立驰技术有限公司 Apparatus and method for realizing P2P stream broadcasting in information family appliances
TW200836558A (en) * 2006-12-20 2008-09-01 Intel Corp Method and apparatus for switching program streams using a fixed speed program stream buffer coupled to a decoder
US20100146138A1 (en) * 2008-12-09 2010-06-10 Hong Kong Applied Science And Technology Research Institute Co., Ltd. Method of data request scheduling in peer-to-peer sharing networks
CN101697554B (en) * 2009-09-27 2012-05-09 华中科技大学 Method for scheduling P2P streaming media video data transmission
TW201207841A (en) * 2010-03-09 2012-02-16 Fraunhofer Ges Forschung Apparatus and method for processing an audio signal using patch border alignment

Also Published As

Publication number Publication date
TW201347478A (en) 2013-11-16

Similar Documents

Publication Publication Date Title
US9521180B2 (en) Adaptive variable fidelity media distribution system and method
US10469410B2 (en) System and method for improving an aggregated throughput of simultaneous connections
US9699236B2 (en) System and method of adaptive bit-rate streaming
ES2701858T3 (en) Adaptation of the link sensitive continuous transmission
US10432482B2 (en) Network parameter configuration based on end user device characteristics
JP2017517922A (en) Streaming control for real-time transport protocol
CN101860550A (en) Streaming media system accelerating method based on router cache
WO2019169556A1 (en) Packet sending method and apparatus, and storage device
TWI524756B (en) Method and device operable to store video and audio data
US20140280847A1 (en) Bandwidth management based on profiles
TWI478548B (en) A streaming transmission method for peer-to-peer networks
WO2023151338A1 (en) Game picture display method, storage medium, and electronic device
US9386056B1 (en) System, method and computer readable medium for providing media stream fragments
WO2023275969A1 (en) Data relay device, delivery system, data relay method, and computer readable medium
KR20130134911A (en) Method for providing content caching service in adapted streaming service and local caching device thereof
WO2016172967A1 (en) Media stream transmission method and device
Balitanas et al. Peer to peer content sharing on smart phones technology
Chen et al. FBSA: A self-adjustable multi-source data scheduling algorithm for P2P media streaming
Hsieh et al. On transport layer support for peer-to-peer networks
KR20140087687A (en) Communication method in wireless peer to peer network
Mate et al. Peer To Peer Content Sharing On Wi-Fi Network For Smart Phones
Su et al. pVD—Personal Video Distribution
JP2012004970A (en) Content distribution apparatus, distribution server device and program
Qin et al. An adaptive batched patch caching scheme for multimedia streaming
Bojarzadeh Adaptive Algorithm for Video Streaming over Wireless Networks

Legal Events

Date Code Title Description
MM4A Annulment or lapse of patent due to non-payment of fees