This application claims the benefit of Korean Patent Application No. 10-2011-0025715, filed on Mar. 23, 2011, in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference.
1. Field of the Invention
The present invention relates to use of a circular buffer used by peers in a multimedia streaming service based on peer-to-peer (P2P), and an operating method thereof.
2. Description of the Related Art
Unlike a server-client scheme, a peer-to-peer (P2P) scheme may have a merit of providing scalability. While the server-client scheme may involve a degraded quality of service to all clients, due to an increased server load resulting from an increased number of clients, the P2P scheme based on a small amount of communication with a server and communication between clients referred to as peers, may not involve a degraded quality of service, and may result in an enhanced quality of service according to the occasion. Due to scalability, the number of service providers using the P2P scheme in the provision of a real-time multimedia streaming service is gradually increasing.
Unlike a video on demand (VOD) service based on a server, the real-time multimedia streaming service provided through the P2P scheme may divide a single piece of content into several data fragments, and may use an active data exchange between peers. Thus, a streaming server that generates real-time multimedia streaming content may generate content, divide the content into several data fragments having unique identifications (IDs), and transmit the data fragments to other peers. Peers received the data fragment from other peer, in turn, may transmit data fragments to other peers, thereby distributing streaming data to an overall P2P network.
A conventional real-time multimedia streaming service based on P2P may generate a temporary file on a local disk, and continuously write received data in the temporary file. Thus, the file size of a disk space may continuously increase as a service progresses, and the size of information related to stored data fragments exchanged to share data between peers may also increase.
An aspect of the present invention provides a circular buffer for a multimedia streaming service based on a peer-to-peer, and an operating method thereof that may minimize a load in a peer-to-peer (P2P) network using the circular buffer.
Another aspect of the present invention also provides a circular buffer for a multimedia streaming service based on a peer-to-peer, and an operating method thereof that may minimize, using the circular buffer, a storage space used for the multimedia streaming service.
According to an aspect of the present invention, there is provided a circular buffer for a multimedia streaming service based on a peer-to-peer, the circular buffer including a buffering section to process a delayed data fragment transmission request from at least one peer present in a network according to a playback of a multimedia content, a storing section to store data to be provided to the at least one peer, a continuous storing section in which data fragments for the playback of the multimedia content are stored in serial order, and a discontinuous storing section in which a space for a received data fragment to be shared with the at least one peer is reserved and a space for a data fragment to be received is reserved.
The buffering section may be located between an ending point of the discontinuous storing section and a starting point of the storing section.
A length of the buffering section and a length of the storing section may be defined, by a system parameter, according to a bit rate of the multimedia content.
The storing section may be located between an ending point of the buffering section and a playback position corresponding to a position at which data of a buffer is used to output content.
The continuous storing section may be set to an area starting from a playback position at which data of a buffer is read to output content, to a position of a final data fragment continuously connected to a data fragment at the playback position.
Data present in the continuous storing section may be transmittable to the at least one peer present in the network.
The discontinuous storing section may be set to an area starting from a point at which a first non-storing data fragment is generated in a playback direction, to a point before the buffering section starts.
An area of one of the buffering section, the storing section, the continuous storing section, and the discontinuous storing section may be moved, simultaneously, according to a reception of the data fragment.
Information about storing the data fragment may include information about an identification (ID) of a data fragment referred to by a playback position, a length of the continuous storing section in an integer form, a length of the discontinuous storing section in an integer form, a buffer map of the discontinuous storing section, and a length of the storing section in an integer form.
The buffer map of the discontinuous storing section may indicate whether each data fragment is included by use of a bit “0” or a bit “1.”
According to another aspect of the present invention, there is provided an operating method for a multimedia streaming service based on a peer-to-peer, the method including requesting, from at least one peer included in a peer-to-peer network, information about stored data fragments, receiving, from the at least one peer, the information about stored data fragments, requesting a data fragment to be used with reference to the received information, and receiving the data fragment being requested.
The requesting of the data fragment to be used may include requesting the data fragment to be used along with information about an ID of the data fragment to be used, a block number of starting data, and a number of data blocks requested to be transmitted.
When the data fragment to be used is received from the at least one peer, the data fragment to be used may include an ID of the data fragment, the number of starting data block, the number of ending data block, and a data block.
Verifying whether the data fragment to be used is present may correspond to identifying a data fragment included in a storing/continuous storing section in the information about stored data fragments received from the at least one peer.
According to still another aspect of the present invention, there is provided an operating method for a multimedia streaming service based on a peer-to-peer, the method including requesting, from at least one peer included in a peer-to-peer network, information about stored data fragments, receiving, from the at least one peer, the information about stored data fragments, determining whether a data fragment to be used is included in a storing/continuous storing section of the at least one peer with reference to the information about stored data fragments received from the at least one peer, performing a bit-and operation on a stored buffer map and a buffer map included in the received information about stored data fragments when the data fragment to be used is absent in storing section and continuous storing section, determining whether the data fragment to be used is included in the discontinuous storing section of the at least one peer as a result of the operation, and requesting the data fragment to be used when the data fragment to be used is included in the discontinuous storing section.
The bit-and operation may be performed after performing a bit-shift operation between the own buffer map and the received buffer map by referencing to a length of the continuous storing section and an ID of a data fragment referred to by a playback position.
According to yet another aspect of the present invention, there is provided an operating method for a multimedia streaming service based on a peer-to-peer, the method including changing a starting address of a continuous storing section from an address including an nth fragment to an address including an n+1th fragment in response to a playback position moving from a point in time t to a point in time t+1, according to a multimedia streaming service, changing a final address of a storing section to the starting address of the continuous storing section at the point in time t, according to the change of the starting address of the continuous storing section, and shifting a buffering section and a discontinuous storing section to correspond to a changed starting address of the storing section.
A length of the buffering section may be fixed, and a starting address of the buffering section may be changed in response to an ending address of the buffering section being changed.
According to an embodiment of the present invention, it is possible to reduce a size of information related to stored data fragments exchanged in a P2P network, and reduce an amount of the corresponding control traffic, using a minimum amount of memory or a minimum amount of local disk space in a conventional multimedia streaming service.
These and/or other aspects, features, and advantages of the invention will become apparent and more readily appreciated from the following description of exemplary embodiments, taken in conjunction with the accompanying drawings of which:
Reference will now be made in detail to exemplary embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. Exemplary embodiments are described below to explain the present invention by referring to the figures.
Referring to
The peers 101, 102, 103, and 104 may basically perform a function of using the multimedia streaming content, or a function of providing received content data to another peer. A connection between a peer and the streaming server 100 or between peers may be newly generated or disconnected according to a data transmission operation.
Referring to
The buffering section 200 may correspond to a section for handling the request for a data fragment which is included in the storing section 201 when the request is sent but is belonged to buffering section 200 when the request is arrived as the storing section 201 moves. How much buffering section can handle the delayed request is dependent on the length of the buffering section 200. Information about the buffering section 200 may be excluded from information about stored data fragments informing another peer. The buffering section 200 may be located between an ending point of the discontinuous storing section 203 and a starting point of the storing section 201.
The storing section 201 may correspond to a space for storing data to provide data to another peer. That is, the storing section 201 may correspond to a space for temporarily storing data to be provided to another peer rather than data to be used for a media playback. The storing section 201 may be located between an ending point of the buffering section 200 and a playback position 204 corresponding to a position at which data of a buffer is used by a peer to view content. A length of the buffering section 200 and a length of the storing section 201 may be defined, by a system parameter, according to a bit rate of the content. A ratio of the length of the buffering section 200 and the length of the storing section 201 according to a bit rate of the content may not be limited.
The playback position 204 may indicate a position at which data of a buffer is used by a peer to view content.
All data fragments stored in the continuous storing section 202 is in serial order for smooth play back of content and may be provided to another peer. The continuous storing section 202 may be set to an area starting from the playback position 204 at which data of a buffer is read to output content, to a position of a final data fragment continuously connected to a data fragment at the playback position 204.
The discontinuous storing section 203 may be set to an area starting from a point at which the continuous storing section 202 ends, until reaching a point before the buffering section 200 starts. Here, the continuous storing section 202 may correspond to an area for a non-storing data fragment read first in a playback direction starting from the playback position 204, and may have a space for a received data fragment and a space for a data fragment to be received.
A peer may request another peer for a data fragment to be received so as to receive the data fragment. A stored data fragment may be provided to another peer. In response to receiving a data fragment, each area of the buffering section 200, the storing section 201, the continuous storing section 202, and the discontinuous storing section 203 may be adjusted, simultaneously.
Referring to
A case in which a first peer having a circular buffer 301 transmits information about stored data fragments to another service subscriber (hereinafter, referred to as a second peer) as illustrated in
The n−3th data fragment may be absent from a storing section 340 of a circular buffer 302, but is included in a buffering section 330 in time t+1. Thus, the n−3th data fragment can be transmittable. That is, the buffering section 330 may be used to accommodate the delayed request for transmitting data which have been moved to the buffering section 330, and may function as a buffer between the storing section 340 and a discontinuous storing section 320.
Referring to
A discontinuous storing section 420 may have a space for a received data fragment and a space for a data fragment to be received. Referring to a state of an n+4th data fragment 403 having a data block storing state, a third data block and a fifth data block may be not currently received and thus, reception of the n+4th data fragment 403 may not be completed.
In response to the reception of the n+4th data fragment 403 being completed, the continuous storing section 410 may be extended up to an area having an n+6th data fragment. Thus, the discontinuous storing section 420 will be shrunk accordingly.
Although
Information about stored data fragments exchanged between components included in a P2P network may include information about an ID of a data fragment referred to by the playback position 401, a length of the continuous storing section 410 expressed as an integer, a length of the discontinuous storing section 420 expressed as an integer, a buffer map of the discontinuous storing section 420, and a length of the storing section 440 expressed as an integer.
The information about an ID may correspond to an ID of a data fragment referred to by the playback position 401, that is, an ID of a first data fragment in the continuous storing section 410. As illustrated in
The length of the continuous storing section 410 in an integer form may correspond to “4” according to embodiments of the present invention. IDs of data fragments in the continuous storing section 410 may be calculated using the length of the continuous storing section 410 and an ID value of a data fragment referred to by the playback position 401.
The length of the discontinuous storing section 420, expressed as an integer, may be used as a reference for processing the buffer map since the length of the discontinuous storing section 420 is variable and thus, a length of the buffer map of the discontinuous storing section 420 is variable. The length of the discontinuous storing section 420 may be set to “0” when a received data fragment is absent from the discontinuous storing section 420.
The buffer map of the discontinuous storing section 420 may indicate whether each data fragment is included in the discontinuous storing section 420 by use of a bit “0” or a bit “1.” The buffer map according to embodiments of the present invention may have a value of “011 . . . 0.” When a received data fragment is absent in the discontinuous storing section 420, information about the buffer map of the discontinuous storing section 420 may be excluded from the information about stored data fragments.
The length of the storing section 440, expressed as an integer, may have a value set by a system parameter, which may correspond to “3” according to embodiments of the present invention. Thus, a peer receiving the information about stored data fragments may be informed that data fragments up to a data fragment having an ID, obtained by subtracting a maximum of 3 from an ID value referred to by the playback position 401, is included in a storing section of a peer that transmits the information about stored data fragments.
A message used for exchanging the information about stored data fragments between peers disclosed in embodiments of the present invention are exemplary and may not be limited thereby.
Referring to
In operation 515, the second peer 102 may compare information about stored data fragments of the second peer 102 with the received information, and verify whether the first peer has the data fragment to be used for the second peer 102. In operation 520, when the second peer 102 desires to get a “12347” data fragment included in the first peer 101, as a result of verification in operation 515, the second peer 102 may request transmission of the “12347” data fragment from the first peer 101.
In this instance, information to be provided may include additional information such as information about an ID of the data fragment to be used, the block number of starting data block, and a number of data blocks requested to be transmitted. The block number of starting data block may correspond to a block number of a first data block requested to be transmitted. The number of data blocks requested to be transmitted may correspond to a number of data blocks requested to be transmitted, including the first data block. Thus, an example of requesting seven data blocks from a 0th data block of the “12347” data fragment is provided. However, the data fragment may not be divided into seven data blocks. Further, for a single request for transmission of a data fragment, a number of transmissions, depending on a size of a data block, may be performed for the data fragment when transmitting the data fragment.
When the requested data fragment is transmitted, the requested data fragment may be transmitted in a form of an ID of the data fragment, a block number of starting data block, a block number of ending data block, and data blocks. According to embodiments of the present invention, data blocks from the 0th data block to a 4th data block of the “12347” data fragment may be transmitted in operation 525, and then data blocks from a 5th data block to a 7th data block may be transmitted in operation 530.
In operation 605, information about stored data fragments may be requested and received between peers present in a network.
As illustrated in
In operation 625, when the data fragment to be used is present in the storing/continuous storing section of the first peer 101 as a result of determination, the second peer 102 may request the corresponding data fragment from a data block to be used, and terminate a procedure.
In operation 615, when the data fragment to be used is absent in the storing/continuous storing section of the first peer 101, the second peer 102 may perform a bit-and operation on a buffer map of a discontinuous storing section of the second peer 102 and a buffer map of a discontinuous storing section in the received information about stored data fragments.
An ID of a data fragment corresponding to a start of a buffer map of a discontinuous storing section may differ between the first peer 101 and the second peer 102. Thus, a bit-shift operation may be performed on the buffer map of the discontinuous storing section with reference to a length of the continuous storing section and an ID of a data fragment referred to by a playback position. Thereafter, a bit-and operation may be performed after matching starting data fragment ID of the buffer map of the discontinuous storing section of the first peer 101 and the second peer 102.
In operation 620, the second peer 102 may verify whether a data fragment to be used for the second peer 102 is present in the discontinuous storing section of the first peer 101 after performing the bit-and operation. In operation 625, when the data fragment to be used is present as a result of verification, the second peer 102 may request the first peer for the data fragment.
In response to a playback position being moved with a progress of a multimedia streaming service in operation 705, a starting address of a continuous storing section may change in operation 710 since the starting address of the continuous storing section may match the playback position.
Referring to
In operation 715, the storing section 340 may be adjusted. An ending address of the storing section 340 may correspond to a previous playback position, and a starting address may move accordingly. Referring to
An ending address of the buffering section 330 may change since the starting address of the storing section 340 may change. Referring to
For example, changing of a length of the continuous storing section 310 may be determined based on a movement of the playback position 303 or based on whether a first data fragment of the discontinuous storing section 320 from the continuous storing section 310 (an n+4th data fragment in
In operation 725, a starting address of the discontinuous storing section 320 may be changed according to the changed continuous storing section 310.
According to embodiments of the present invention, adjusting of each section is successively illustrated in
The above-described exemplary embodiments of the present invention may be recorded in non-transitory computer-readable media including program instructions to implement various operations embodied by a computer. The media may also include, alone or in combination with the program instructions, data files, data structures, and the like. Examples of non-transitory computer-readable media include magnetic media such as hard disks, floppy disks, and magnetic tape; optical media such as CD ROM discs and DVDs; magneto-optical media such as optical discs; and hardware devices that are specially configured to store and perform program instructions, such as read-only memory (ROM), random access memory (RAM), flash memory, and the like. Examples of program instructions include both machine code, such as produced by a compiler, and files containing higher level code that may be executed by the computer using an interpreter. The described hardware devices may be configured to act as one or more software modules in order to perform the operations of the above-described exemplary embodiments of the present invention, or vice versa.
Although a few exemplary embodiments of the present invention have been shown and described, the present invention is not limited to the described exemplary embodiments. Instead, it would be appreciated by those skilled in the art that changes may be made to these exemplary embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
10-2011-0025715 | Mar 2011 | KR | national |