WO2015109847A1 - 一种分段节目快速分发的方法、服务器及客户端 - Google Patents
一种分段节目快速分发的方法、服务器及客户端 Download PDFInfo
- Publication number
- WO2015109847A1 WO2015109847A1 PCT/CN2014/085193 CN2014085193W WO2015109847A1 WO 2015109847 A1 WO2015109847 A1 WO 2015109847A1 CN 2014085193 W CN2014085193 W CN 2014085193W WO 2015109847 A1 WO2015109847 A1 WO 2015109847A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- index
- segment
- segment index
- distribution
- response
- Prior art date
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/65—Transmission of management data between client and server
- H04N21/658—Transmission by the client directed to the server
- H04N21/6581—Reference data, e.g. a movie identifier for ordering a movie or a product identifier in a home shopping application
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/25—Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
- H04N21/262—Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists
- H04N21/26258—Content or additional data distribution scheduling, e.g. sending additional data at off-peak times, updating software modules, calculating the carousel transmission frequency, delaying a video stream transmission, generating play-lists for generating a list of items to be played back in a given order, e.g. playlist, or scheduling item distribution according to such list
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/83—Generation or processing of protective or descriptive data associated with content; Content structuring
- H04N21/845—Structuring of content, e.g. decomposing content into time segments
- H04N21/8456—Structuring of content, e.g. decomposing content into time segments by decomposing the content in the time domain, e.g. in time segments
Definitions
- the present invention relates to the field of streaming media, and in particular, to a method, a server, and a client for quickly distributing segmented programs.
- the program content is usually physically or logically divided into many small segments, each segment corresponding to the segment index, and all the index strings are in the form of a program index table (Media Presentation Description) , MPD, including the index of the media segment, etc.), when the content is published, the segment index is first obtained, and then the segmented program is obtained according to the segment index.
- This method can easily modify and replace the program content, and is compatible with the Content Delivery Network (CDN) system in the related art.
- CDN Content Delivery Network
- the content, only the response header and the response body include a segmentation index
- the present invention has a response header, a response body including a segmentation index, and a distribution process of the segmentation program in the segmentation program related technology.
- FIG. 1 when the client acquires a segmentation program, the segmentation index is first obtained, and the server returns a distribution response to the client.
- the structure of the distribution response is as shown in FIG. 2, including: response line, response header, and response.
- the segmentation index information is carried in the response body, and the segmentation index information includes the segmentation program corresponding to the segmentation index, and then the client parses the segmentation index information, and acquires the corresponding segmentation program according to the index information.
- the technical problem to be solved by the present invention is to provide a method, a server, and a client for quickly distributing segmented programs, which can reduce the time for distributing the entire program, reduce waste of network bandwidth, and improve user experience quality.
- the present invention provides a method for rapidly distributing segmented programs, which is applied to a server, and includes: dividing a program source into a plurality of consecutive segmented programs and segment indexes, and establishing each segment index and Corresponding relationship of one or more segmented programs; receiving a distribution request of the client for a certain segment index; returning a distribution response to the client, the response body of the distribution response carrying the segmentation index and The segmentation index corresponds to one or more segmented programs.
- the method further includes: generating a uniform resource locator URL identifier And segmenting the index, and notifying the client; receiving a distribution request of the client for a segment index, where the distribution request carries a URL corresponding to the segmentation index; The client returns the distribution response.
- the generating a uniform resource locator URL identifier segment index includes: generating a URL identifier for the first segment index; or, by interacting with the client, generating a URL identifier for the client request The segmentation index corresponding to a segmented program sent.
- the method further includes: receiving, by the client, a distribution request that carries a URL that identifies a first segment index or a segment index corresponding to a segment program; Returning a distribution response to the client, identifying, in the response header of the distribution response, whether the segment index is the last segment index in the index file, and if yes, indicating that the segment index is the last segment in the index file Segment index; if not, indicating the next segment index; or, indicating the sequence number of the last segment index in the index file in the response header of the distribution response.
- the certain segment index is a first segment index in the index file or a non-first segment index in the index file, and the index file includes all index segments.
- the present invention provides a method for rapidly distributing a segmented program, which is applied to a client, and includes: sending a distribution request for acquiring a segment index to a server; and receiving a distribution response returned by the server
- the response body of the distribution response carries the segmentation index and one or more segmentation programs corresponding to the segmentation index; and the sequence number of the segmentation program in the index file according to the segmentation index Store in order.
- the method before the sending, by the server, the distribution request for acquiring the segment index, the method includes: receiving a uniform resource locator URL that is sent by the server and identifying the first segment index; or by interacting with the server, And receiving, by the server, a URL that identifies a segment index corresponding to a segmentation program that is sent by the client.
- the distribution request when the sending, by the server, the distribution request for acquiring a certain segment index, the distribution request carries a URL identifying the segment index; and the URL identifying the segment index And including: a URL that identifies the first segment index; or, a URL that identifies a segment index corresponding to a segment program that the client requests to deliver.
- the method further includes: Receiving the distribution response returned by the server, the response header of the distribution response identifies whether the segment index is the last segment index in the index file, and if yes, indicating that the segment index is the last in the index file a segmentation index; if not, indicating a next segment index; if the response header indicates that there is a next segment index, sending a distribution request for acquiring the next segment index to the server, in the distribution request Carrying a URL identifying the next segment index; if the response header indicates that the segment index is the last segment index in the index file, the distribution request is not sent to the server;
- the segment program is sequentially stored in accordance with the sequence number of the segment index in the index file.
- the method further includes: receiving a distribution response returned by the server, where a response sequence of the distribution response indicates a sequence number of a last segment index of the index file; the client sequentially The server sends a distribution request to obtain a second segment index or a segment index of a segment index corresponding to a segmentation program until a last segment index, where the distribution request carries the identifier of the second segment Segment index or the next segment index of the segment index corresponding to a segmentation program up to the URL of the last segment index; receiving the distribution response returned by the server side in turn, and segmenting all acquired segmentation programs according to segmentation The serial number of the index in the index file is sequentially stored.
- the method further includes: receiving a distribution response returned by the server, where the response header of the distribution response carries a name list of the segmentation program corresponding to the segmentation index;
- the list of names of the corresponding segmented programs in the segment index is sequentially stored.
- the certain segment index is a first segment index in the index file or a non-first segment index in the index file, and the index file includes all index segments.
- the present invention further provides a server for fast distribution of segmented programs, comprising: a segmentation module, configured to divide a program source into a plurality of consecutive segmented programs and segment indexes, and establish each Correspondence between the segmentation index and one or more segmented programs; a receiving module, configured to receive a distribution request of the client for a segment index; a distribution response module, configured to return a distribution response to the client, where the response body of the distribution response carries the segment index and The segmentation index corresponds to one or more segmented programs.
- a segmentation module configured to divide a program source into a plurality of consecutive segmented programs and segment indexes, and establish each Correspondence between the segmentation index and one or more segmented programs
- a receiving module configured to receive a distribution request of the client for a segment index
- a distribution response module configured to return a distribution response to the client, where the response body of the distribution response carries the segment index and
- the segmentation index corresponds to one or more segmente
- the segmentation module is further configured to: after dividing the program source into a plurality of consecutive segmented programs and segment indexes, and establishing a correspondence between each segment index and one or more segment programs, generate one The uniform resource locator URL identifies the segmentation index, and notifies the client; the receiving module is further configured to receive a distribution request of the client for a segment index, where the distribution request carries a URL corresponding to the segmentation index; the distribution response module is further configured to return the distribution response to the client according to the URL.
- the segmentation module is further configured to generate a uniform resource locator URL identifier segment index, including: generating a URL identifier for the first segment index; or, by interacting with the client, generating a URL And identifying a segment index corresponding to a segment program delivered by the client.
- the receiving module is further configured to receive, by the client, a distribution request that carries a URL that identifies a first segment index or a segment index corresponding to a segment program; the distribution response module further Set to return a distribution response to the client, in the response header of the distribution response, whether the segment index is the last segment index in the index file, and if yes, indicating that the segment index is the last in the index file a segmentation index; if not, indicating the next segmentation index; or indicating the sequence number of the last segmentation index in the index file in the response header of the distribution response.
- the certain segment index is a first segment index in the index file or a non-first segment index in the index file, and the index file includes all index segments.
- the present invention further provides a client for quickly distributing a segmented program, comprising: a distribution requesting module, configured to send a distribution request for obtaining a segment index to the server; a receiving module, configured to receive a distribution response returned by the server, where the response body of the distribution response carries the segment index and one or more segment programs corresponding to the segment index; and the storage module is configured to The segmented program is stored in accordance with the sequence number of the segmentation index in the index file.
- the client further includes an interaction module connected to the distribution request module, where: the interaction module is configured to receive a uniform resource locator URL that is sent by the server and that identifies the first segment index; or And receiving, by the server, the URL of the segment index corresponding to a segmentation program that is sent by the server and sent by the server.
- the distribution requesting module is configured to: when the server sends a distribution request for obtaining a segment index, the distribution request carries a URL that identifies the segmentation index;
- the URL of the segment index includes: a URL identifying the first segment index; or a URL identifying a segment index corresponding to a segment program delivered by the client.
- the receiving module is further configured to receive a distribution response returned by the server, where the response header of the distribution response identifies whether the segment index is the last segment index in the index file, if , indicating that the segment index is the last segment index in the index file; if not, indicating the next segment index; the distribution request module is further configured to: if the response header indicates that there is a next segment index, And sending, to the server, a distribution request for acquiring a next segment index, where the distribution request carries a URL that identifies the next segment index; if the response header indicates that the segment index is in the index file The last segmentation node I does not send a distribution request to the server; the storage module is further configured to store all the acquired segmentation programs in sequence according to the sequence number of the segmentation index in the index file.
- the receiving module is further configured to receive a distribution response returned by the server, where a response sequence of the distribution response indicates a sequence number of a last segment index of the index file; the distribution request module further And sending, to the server, a distribution request for obtaining a second segment index or a segment index of a segment index corresponding to a segmentation program until a last segment index,
- the distribution request carries a URL that identifies the next segment index of the second segment index or a segment index corresponding to a segmentation program up to the last segment index;
- the storage module is configured to The segmented program carried in the distribution response returned by the server in turn is sequentially stored according to the sequence number of the segment index in the index file.
- the receiving module is further configured to receive a distribution response returned by the server, where the response header of the distribution response carries a name list of the segmented program corresponding to the segment index; and the storage module further sets The segmentation program is sequentially stored according to the name list of the corresponding segmentation program in the segmentation index.
- the certain segment index is a first segment index in the index file or a non-first segment index in the index file, and the index file includes all index segments.
- FIG. 1 is a schematic diagram of segmented program distribution in the related art
- FIG. 2 is a schematic diagram of a distribution response structure returned by a server to a client in the related art
- FIG. 3 is a schematic diagram of segmented program distribution in the embodiment
- FIG. 5 is a structural diagram of a client in an embodiment
- FIG. 6 is a schematic diagram of a network in an embodiment
- FIG. 7 is a schematic diagram of an architecture in an embodiment
- 9 is a flow chart of a method for fast distribution of segmented programs applied to a client in an embodiment.
- Embodiments The core idea of the implementation is: establishing a correspondence between each segment index and one or more segment programs on the server side.
- the server end passes the response body.
- the segmentation index and the corresponding segmentation program in the index are respectively carried in different fields, so that the segmentation index and the corresponding segmentation program in the index are simultaneously pushed to the client, and the client implements all the segments by continuously requesting all segmentation indexes.
- the distribution of the segment program as shown in Fig. 3, provides a schematic diagram of the segmentation program distribution in this embodiment.
- the field structure of the distribution response in this embodiment is the same as that in the related art.
- the method includes: a response line, a response header, and a response body.
- the response header may carry the indication information, including: identifying whether the segment index is the last segment index in the index file, and if yes, indicating that the segment index is the last segment index in the index file; If not, indicating the next segment index; or, indicating the sequence number of the last segment index in the index file; the response header may also carry the name list of the segmentation program corresponding to the segment index; The segmentation index and the one or more segmentation programs corresponding to the segmentation index are as shown in FIG. 4.
- the embodiment provides a server for quickly distributing segmented programs, including: a segmentation module, configured to The program source is divided into a plurality of consecutive segmented programs and segment indexes, and a correspondence relationship between each segment index and one or more segment programs is established;
- the receiving module is configured to receive a distribution request of the client for a segment index;
- the distribution response module is configured to return a distribution response to the client, and the response body of the distribution response carries the segment index and the segment index corresponding to One or more segmented programs.
- the segmentation module is further configured to generate a unified resource after dividing the program source into a plurality of consecutive segmented programs and segment indexes, establishing a correspondence between each segment index and one or more segment programs.
- the locator URL identifies the segmentation index and notifies the client; wherein, a uniform resource locator URL identifier segmentation index is generated, including: A URL is generated to identify the first segment index; or, by interacting with the client, a URL is generated to identify a segment index corresponding to a segment program delivered by the client.
- the receiving module is further configured to receive a distribution request of the client for a segment index, where the distribution request carries a URL corresponding to the segment index; the distribution response module is further configured to return a distribution response to the client according to the URL .
- the receiving module is further configured to receive, by the client, a distribution request that carries a URL that identifies a first segment index or a segment index corresponding to a segment program; the distribution response module further Set to return the distribution response to the client, identify in the response header of the distribution response whether the segmentation index is the last segment index in the index file, and if so, indicate that the segment index is the last segment index in the index file If not, indicates the next segment index; or, in the response header of the distribution response, indicates the sequence number of the last segment index in the index file.
- the index file includes a first segment index in the index file or a non-first segment index in the index file, and the index file includes all index segments. As shown in FIG.
- the embodiment provides a client for quickly distributing a segmented program, including: a distribution requesting module, configured to send a distribution request for obtaining a segment index to a server; and a receiving module configured to receive a distribution response returned by the server, the response body of the distribution response carries a segmentation index and one or more segmentation programs corresponding to the segmentation index; and a storage module, configured to segment the segmentation according to the segmentation index in the index file The serial number is stored.
- the client further includes an interaction module connected to the distribution request module, where: the interaction module is configured to receive a uniform resource locator URL sent by the server and identify the first segment index; or The server interacts with the URL of the segment index corresponding to a segmentation program sent by the server that is sent by the server.
- the distribution requesting module is configured to: when sending a distribution request for obtaining a segment index to the server, carrying a URL identifying a segment index in the distribution request;
- the URL that identifies a segment index includes: a URL that identifies the first segment index; or a URL that identifies a segment index corresponding to a segment program that the client requests to deliver.
- the receiving module is further configured to receive a distribution response returned by the server, where the response header of the distribution response identifies whether the segment index is the last segment index in the index file, and if , indicating that the segment index is the last segment index in the index file; if not, indicating the next segment index; the distribution request module is further configured to send to the server if the response header indicates that there is a next segment index Obtaining a distribution request of the next segment index, where the distribution request carries a URL identifying the next segment index; if the response header indicates that the segment index is the last segment index in the index file, the distribution request is not sent to the server;
- the storage module is further configured to store all the acquired segmented programs in sequence according to the sequence number of the segment index in the index file.
- the receiving module is further configured to receive a distribution response returned by the server, and the sequence number of the last segment index indicating the index file in the response header of the distribution response;
- the distribution request module is further set to Sending, to the server, the next segment index of the segment index corresponding to the second segment index or a segment program until the distribution request of the last segment index, where the distribution request carries the identifier of the second segment index or The next segment index of the segmentation node corresponding to a segmentation program is up to the URL of the last segment index;
- the storage module is configured to segment the segmentation program carried in the distribution response returned by the server side according to the segmentation index The serial numbers in the index file are stored in order.
- the receiving module is further configured to receive a distribution response returned by the server, and the response header of the distribution response carries a name list of the segmentation program corresponding to the segmentation index; and the storage module is further configured to segment the segmentation program according to the segmentation index.
- the name list of the corresponding segmented program is stored in order.
- the index file includes a first segment index in the index file or a non-first segment index in the index file, and the index file includes all index segments.
- the central network is the server end in the embodiment, and the edge network is the client in this embodiment; as shown in FIG. 7, the central node is the implementation.
- the edge node is the client in the embodiment.
- the edge node stores all the obtained segmented programs in sequence according to the sequence number of the segment index in the index file, and provides completeness for the user terminal.
- the user terminal can be a set top box, a VLC player or a mobile phone, and the like.
- the embodiment provides a method for rapidly distributing segmented programs, which is applied to a server, and includes the following steps:
- S101 dividing the program source into a plurality of consecutive segmented programs and segment indexes, and establishing a correspondence between each segment index and one or more segment programs; wherein each segment program includes program decoding information and random
- the access unit information ensures that each segmented program can be independently decoded and played, so that the distributed segmented program can provide other media services separately, such as on-demand.
- the divided segmentation programs are successively arranged in order.
- S102 Receive a distribution request of the client for a segment index; where, a segment index is a first segment index in the index file or a non-first segment index in the index file, and the index file includes all Index segmentation.
- the distribution of all segmented programs is achieved by receiving a continuous distribution request from the client segment.
- step S103 Return a distribution response to the client, where the response body of the distribution response carries a segmentation index and one or more segmentation programs corresponding to the segmentation index.
- the method further includes: generating a uniform resource locator URL identifier corresponding to the segment index, and notifying the client;
- step S102 and step S103 the server receives a distribution request from the client for a segment index, and the distribution request carries a URL corresponding to the segment index; and returns a distribution response to the client according to the URL.
- generating a uniform resource locator URL identifier corresponding to the segment index includes: generating a URL identifier segment index list, and the segment index list includes all segment indexes in the index file; or A URL is generated to identify the first segment index; or, by interacting with the client, a URL is generated to identify a segment index corresponding to a segment program delivered by the client.
- the client sends a POST message to the server, requests a segmentation program, and the server side parses the segmentation index corresponding to the segmentation program, and constructs a URL identifier for the client to identify the segmentation cable. Then, the client can request a segmentation index from the server based on the URL.
- step S102 if a distribution request of the client carrying the URL identifying the first segment index or the segment index corresponding to a segmentation program is received; in step S103, the server The client returns a distribution response, and identifies in the response header of the distribution response whether the segment index is the last segment index in the index file, and if so, indicates that the segment index is the last segment index in the index file; , indicating the next segment index; or, indicating the sequence number of the last segment index in the index file in the response header of the distribution response.
- the client can obtain whether to continue to request the segmentation index according to the distribution response sent by the server, and obtain the URL of the next segment index to request the segment index and the corresponding segmentation program.
- the embodiment provides a method for quickly distributing segmented programs, which is applied to a client, and includes the following steps:
- S201 Send, to the server, a distribution request for obtaining a segment index; wherein, a segment index is a first segment index in the index file or a non-first segment index in the index file, and the index file includes all Index segmentation.
- the URL carries the URL identifying the segment index in the distribution request. The URL identifying the segmentation index is received from the server by interacting with the server.
- a URL identifying a segmentation index list and the segmentation index list includes all segmentation indexes in the index file; or The URL identifying the first segment index; or, By interacting with the server, the URL of the segment index corresponding to a segmented program that is sent by the server and sent by the server is received.
- S202 Receive a distribution response returned by the server, where the response body of the distribution response carries a segmentation index and one or more segmentation programs corresponding to the segmentation index; S203: segment the program according to the segmentation index in the index file The serial number is stored.
- a preferred method is: receiving a distribution response returned by the server, and indicating, in the response header of the distribution response, whether the segment index is the last segment index in the index file, and if yes, indicating the segment index Is the last segment index in the index file; if not, indicating the next segment index; if the response header indicates that there is a next segment index, the server sends a distribution request for obtaining the next segment index, which is carried in the distribution request There is a URL identifying the next segment index; if the response header indicates that the segment index is the last segment index in the index file, the distribution request is not sent to the server; all the segmented programs are indexed according to the segment index in the index file The serial numbers in the file are stored in sequence.
- the other preferred manner is: receiving a distribution response returned by the server, indicating a sequence number of the last segment index of the index file in the response header of the distribution response; the client sending the second score to the server in turn The segment index or the next segment index of the segment index corresponding to a segment program until the distribution request of the last segment index, and the distribution request carries the identifier corresponding to the second segment index or a segment program.
- the next segment index of the segment index is up to the URL of the last segment index; the distribution response returned by the server end is received in turn, and all the acquired segment programs are sequentially stored according to the sequence number of the segment index in the index file.
- an example of transmitting a segmented program in a DASH (Dynamic adaptive streaming over HTTP) system, based on the HTTP protocol, using an MPEG-2 TS stream file as data Source the file name is file.ts.
- the program source is segmented on the server side to generate a plurality of segment indexes and segmentation programs: 1.
- the file file.ts is divided into multiple pieces of segmented data of 10 seconds in length, and each segmented data is an MPEG-2 TS file, and each segmented data is decoded.
- the unit starts with the image key frame, and the obtained plurality of segmented TS files are named l.ts, 2.t S , ..., 100.ts ;
- the client obtains all the segment files, that is, the segment index and its corresponding segmentation program, and parses out the segmentation program from the HTTP protocol response header.
- the file name, the corresponding segmentation program is 2.ts, 3.ts, 4.ts lOO.ts; 4.
- all the obtained segment files are sequentially stored according to the serial number of the index file, or all the obtained segment files are stored according to the segmented program name list.
- the method and apparatus provided by the present embodiment are also suitable for other transmission protocols, such as RTSP, etc., so that the application of the present invention can be extended to other systems of streaming media, not limited to DASH systems.
- the method, the server, and the client for quickly distributing the segmented program provided in the foregoing embodiments are related to the related art.
- the server segment indexes the segment. Simultaneously pushing the corresponding segmented program in the index to the client, reducing the delay of the network segmentation and the resolution of the segmentation index in the traditional continuous segmentation index acquisition segmentation program, and also increasing the utilization of network bandwidth. The user experience is improved, and finally a fast distribution effect is achieved.
- a program to instruct related hardware can be stored in a computer readable storage medium. Such as read-only memory, disk or CD.
- each module/unit in the above embodiment may be implemented in the form of hardware or in the form of a software function module.
- the invention is not limited to any specific form of combination of hardware and software.
- the above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.
- Various other embodiments and modifications can be made in accordance with the present invention without departing from the spirit and scope of the invention. All modifications, equivalent substitutions, improvements, etc., made within the spirit and scope of the invention are intended to be included within the scope of the invention.
- a method, a server, and a client for rapidly distributing a segmented program provided by the embodiments of the present invention have the following beneficial effects:
- the server segment indexes the segment. Simultaneously pushing the corresponding segmented program in the index to the client, reducing the delay of the network segmentation and the resolution of the segmentation index in the traditional continuous segmentation index acquisition segmentation program, and also increasing the utilization of network bandwidth. Improve the user experience and ultimately achieve a fast distribution effect.
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Information Transfer Between Computers (AREA)
Abstract
本发明公开了一种分段节目快速分发的方法、服务器和客户端,其中,该方法包括:将节目源分成多个连续的分段节目和分段索引,建立每个分段索引与一个或多个分段节目的对应关系;接收到客户端对某一分段索引的分发请求;向所述客户端返回分发响应,所述分发响应的响应体中携带有所述分段索引以及该分段索引对应的一个或多个分段节目。本发明的方法、服务器和客户端能够减少整个节目分发的时间,减少对网络带宽的浪费,提高用户体验质量。
Description
一种分段节目快速分发的方法、 服务器及客户端 技术领域 本发明涉及流媒体领域, 具体涉及一种分段节目快速分发的方法、 服务器及客户
背景技术 随着通信技术的发展, 多媒体技术的应用越来越广。 传统的流媒体服务是基于 RTSP (Real Time Streaming Protocol, 实时流协议) /RTP (Real-time Transport Protocol, 实时传输协议) 的。 但是由于这两种协议在穿越防火墙存在问题等缺点, 近几年发展 出基于超文本传输协议来提供流媒体服务, 即 DASH (Dynamic adaptive streaming over HTTP,基于超文本传输协议的动态调整流媒体服务)。与其他流媒体服务一样, DASH 同样支持点播和直播服务。 为了便于实现直播回放和边下载边看的功能, 通常将节目内容在物理或逻辑上分 成很多小分段, 每个分段对应分段索引, 所有的索引串起来形式节目索引表 (Media Presentation Description, MPD, 包含媒体分段的索引等信息), 内容发布时首先获取分 段索引, 然后根据分段索引获取相应分段节目。 这种方式能够方便地对节目内容进行 修改和替换, 而且能够兼容相关技术中的内容分发网络 (Content Delivery Network, 简 称 CDN) 系统。 补充一个相关技术中响应的字段, 内容, 只有响应头和响应体中包含分段索引, 本发明有响应头、 响应体中包含分段索引和分段节目 相关技术中的分段节目的分发流程如图 1所示, 客户端获取一个分段节目时, 首 先获取分段索引, 服务器会向客户端返回分发响应, 该分发响应的结构如图 2所示, 包括: 响应行、 响应头和响应体, 响应体中携带的是分段索引信息, 该分段索引信息 内包含有分段索引对应的分段节目, 然后客户端解析分段索引信息, 根据索引信息获 取相应的分段节目。 但是随着节目源内容的增加会导致分段节目和分段索引的内容增 大, 在网络上, 特别是带宽受限的移动网络上不断地传送分段索引和节目, 整个节目 完全分发的时间越来越大, 不断的传送分段索引和解析索引浪费了网络带宽也增加了 整体时延, 最终降低节目分发的速度, 时效性也不高。
发明内容 本发明需要解决的技术问题是提供一种分段节目快速分发的方法、 服务器和客户 端, 能够减少整个节目分发的时间, 减少对网络带宽的浪费, 提高用户体验质量。 为了解决上述技术问题, 本发明提供了一种分段节目快速分发的方法, 应用于服 务器端, 包括: 将节目源分成多个连续的分段节目和分段索引, 建立每个分段索引与一个或多个 分段节目的对应关系; 接收到客户端对某一分段索引的分发请求; 向所述客户端返回分发响应, 所述分发响应的响应体中携带有所述分段索引以及 该分段索引对应的一个或多个分段节目。 优选地, 在将节目源分成多个连续的分段节目和分段索引, 建立每个分段索引与 一个或多个分段节目的对应关系之后, 还包括: 生成一个统一资源定位符 URL标识所述分段索引, 并通知所述客户端; 接收到所述客户端对某一分段索引的分发请求, 所述分发请求中携带有对应该分 段索引的 URL; 根据所述 URL向所述客户端返回所述分发响应。 优选地, 所述生成一个统一资源定位符 URL标识分段索引, 包括: 生成一个 URL标识第一个分段索引; 或者, 通过与所述客户端交互,生成一个 URL标识所述客户端请求下发的某一分段节目 对应的分段索引。 优选地, 所述方法还包括: 接收到所述客户端的携带有标识第一个分段索引或某一分段节目对应的分段索引 的 URL的分发请求;
向所述客户端返回分发响应, 在所述分发响应的响应头中标识该分段索引是否为 索引文件中最后一个分段索引, 如果是, 则指示本分段索引为索引文件中最后一个分 段索引; 如果不是, 则指示下一个分段索引; 或者, 在所述分发响应的响应头中指示所述索引文件中最后一个分段索引的序列 号。 优选地, 所述某一分段索引为所述索引文件中的第一分段索引或者所述索引文件 中的非第一分段索引, 所述索引文件包括所有的索引分段。 为了解决上述技术问题, 本发明提供了一种分段节目快速分发的方法, 应用于客 户端, 包括: 向服务器端发送获取某一分段索引的分发请求; 接收所述服务器端返回的分发响应, 所述分发响应的响应体中携带有所述分段索 引以及该分段索引对应的一个或多个分段节目; 将所述分段节目按照所述分段索引在索引文件中的序列号依次进行存储。 优选地, 所述向服务器端发送获取某一分段索引的分发请求之前, 包括: 接收所述服务器发送的标识第一个分段索引的统一资源定位符 URL; 或者 通过与所述服务器交互, 接收所述服务器发送的标识所述客户端请求下发的某一 分段节目对应的分段索引的 URL。 优选地, 所述向服务器端发送获取某一分段索引的分发请求时, 在所述分发请求 中携带标识所述某一分段索引的 URL; 所述标识所述某一分段索引的 URL, 包括: 标识第一个分段索引的 URL; 或者, 标识所述客户端请求下发的某一分段节目对应的分段索引的 URL。 优选地, 所述方法还包括:
接收到所述服务器端返回的分发响应, 所述分发响应的响应头中标识有该分段索 引是否为索引文件中最后一个分段索引, 如果是, 则指示本分段索引为索引文件中最 后一个分段索引; 如果不是, 则指示下一个分段索引; 如果所述响应头指示有下一个分段索引, 则向所述服务器发送获取下一个分段索 引的分发请求, 所述分发请求中携带有标识所述下一个分段索引的 URL; 如果所述响 应头指示本分段索引为所述索引文件中最后一个分段索引, 则不向所述服务器发送分 发请求; 将所有获取的分段节目按照分段索引在所述索引文件中的序列号依次进行存储。 优选地, 所述方法还包括: 接收到所述服务器端返回的分发响应, 所述分发响应的响应头中指示有索引文件 的最后一个分段索引的序列号; 所述客户端依次向所述服务器发送获取第二个分段索引或某一分段节目对应的分 段索引的下一个分段索引直到最后一个分段索引的分发请求, 所述分发请求中携带有 标识所述第二个分段索引或某一分段节目对应的分段索引的下一个分段索引直到最后 一个分段索引的 URL; 接收所述服务器端依次返回的分发响应, 并将所有获取的分段节目按照分段索引 在所述索引文件中的序列号依次进行存储。 优选地, 所述方法还包括: 接收到所述服务器端返回的分发响应, 所述分发响应的响应头中携带有分段索引 对应的分段节目的名称列表; 将所述分段节目按照所述分段索引中对应的分段节目的名称列表依次进行存储。 优选地, 所述某一分段索引为所述索引文件中的第一分段索引或者所述索引文件 中的非第一分段索引, 所述索引文件包括所有的索引分段。 为了解决上述技术问题, 本发明还提供了一种服务器, 用于分段节目快速分发, 包括: 分段模块, 设置为将节目源分成多个连续的分段节目和分段索引, 建立每个分段 索引与一个或多个分段节目的对应关系;
接收模块, 设置为接收到客户端对某一分段索引的分发请求; 分发响应模块, 设置为向所述客户端返回分发响应, 所述分发响应的响应体中携 带有所述分段索引以及该分段索引对应的一个或多个分段节目。 进一步地, 所述分段模块, 还设置为在将节目源分成多个连续的分段节目和分段 索引, 建立每个分段索引与一个或多个分段节目的对应关系之后, 生成一个统一资源 定位符 URL标识所述分段索引, 并通知所述客户端; 所述接收模块, 还设置为接收到所述客户端对某一分段索引的分发请求, 所述分 发请求中携带有对应该分段索引的 URL; 所述分发响应模块, 还设置为根据所述 URL向所述客户端返回所述分发响应。 进一步地,所述分段模块,还设置为生成一个统一资源定位符 URL标识分段索引, 包括: 生成一个 URL标识第一个分段索引; 或者, 通过与所述客户端交互,生成一个 URL标识所述客户端请求下发的某一分段节目 对应的分段索引。 进一步地, 所述接收模块, 还设置为接收到所述客户端的携带有标识第一个分段 索引或某一分段节目对应的分段索引的 URL的分发请求; 所述分发响应模块, 还设置为向所述客户端返回分发响应, 在所述分发响应的响 应头中标识该分段索引是否为索引文件中最后一个分段索引, 如果是, 则指示本分段 索引为索引文件中最后一个分段索引; 如果不是, 则指示下一个分段索引; 或者, 在所述分发响应的响应头中指示所述索引文件中最后一个分段索引的序列 号。 进一步地, 所述某一分段索引为所述索引文件中的第一分段索引或者所述索引文 件中的非第一分段索引, 所述索引文件包括所有的索引分段。 为了解决上述技术问题, 本发明还提供了一种客户端, 用于分段节目快速分发, 包括: 分发请求模块, 设置为向服务器端发送获取某一分段索引的分发请求;
接收模块, 设置为接收所述服务器端返回的分发响应, 所述分发响应的响应体中 携带有所述分段索引以及该分段索引对应的一个或多个分段节目; 存储模块, 设置为将所述分段节目按照所述分段索引在索引文件中的序列号进行 存储。 进一步地, 所述客户端还包括与所述分发请求模块相连的交互模块, 其中: 所述交互模块, 设置为接收所述服务器发送的标识第一个分段索引的统一资源定 位符 URL; 或者, 通过与所述服务器交互, 接收所述服务器发送的标识所述客户端请 求下发的某一分段节目对应的分段索引的 URL。 进一步地, 所述分发请求模块, 设置为向服务器端发送获取某一分段索引的分发 请时, 在所述分发请求中携带标识所述分段索引的 URL; 所述标识所述某一分段索引的 URL, 包括: 标识第一个分段索引的 URL; 或者, 标识所述客户端请求下发的某一分段节目对应的分段索引的 URL。 进一步地, 所述接收模块, 还设置为接收所述服务器端返回的分发响应, 其中, 所述分发响应的响应头中标识有该分段索引是否为索引文件中最后一个分段索引, 如 果是, 则指示本分段索引为索引文件中最后一个分段索引; 如果不是, 则指示下一个 分段索引; 所述分发请求模块, 还设置为如果所述响应头指示有下一个分段索引, 则向所述 服务器发送获取下一个分段索引的分发请求, 所述分发请求中携带有标识所述下一个 分段索引的 URL; 如果所述响应头指示本分段索引为所述索引文件中最后一个分段索 弓 I, 则不向所述服务器发送分发请求; 所述存储模块, 还设置为将所有获取的分段节目按照分段索引在所述索引文件中 的序列号依次进行存储。 进一步地, 所述接收模块, 还设置为接收所述服务器端返回的分发响应, 所述分 发响应的响应头中指示有索引文件的最后一个分段索引的序列号; 所述分发请求模块, 还设置为依次向所述服务器发送获取第二个分段索引或某一 分段节目对应的分段索引的下一个分段索引直到最后一个分段索引的分发请求, 所述
分发请求中携带有标识所述第二个分段索引或某一分段节目对应的分段索引的下一个 分段索引直到最后一个分段索引的 URL; 所述存储模块, 设置为将所述服务器端依次返回的分发响应中携带的分段节目按 照分段索引在所述索引文件中的序列号依次进行存储。 进一步地, 所述接收模块, 还设置为接收所述服务器端返回的分发响应, 所述分 发响应的响应头中携带有分段索引对应的分段节目的名称列表; 所述存储模块, 还设置为将所述分段节目按照所述分段索引中对应的分段节目的 名称列表依次进行存储。 进一步地, 所述某一分段索引为所述索引文件中的第一分段索引或者所述索引文 件中的非第一分段索引, 所述索引文件包括所有的索引分段。
与相关技术相比, 本发明提供的分段节目快速分发的方法、 服务器和客户端, 当 客户端请求某一个分段索引时, 服务器端会将分段索引跟索引中对应的分段节目同时 推送给客户端, 减少了传统的不断解析分段索引获取分段节目中的网络时延和解析分 段索引的时延, 也增加了网络带宽的利用率, 提高了用户体验, 最终达到一种快速分 发的效果。 附图说明 图 1 是相关技术中分段节目分发的示意图; 图 2 是相关技术中服务器向客户端返回的分发响应结构示意图; 图 3 是本实施例中分段节目分发的示意图; 图 4 是实施例中服务器的结构图; 图 5是实施例中客户端的结构图; 图 6是实施例中组网示意图; 图 7是实施例中架构示意图; 图 8是实施例中应用于服务器端的分段节目快速分发的方法流程图;
图 9是实施例中应用于客户端的分段节目快速分发的方法流程图。 具体实施方式 为使本发明的目的、 技术方案和优点更加清楚明白, 下文中将结合附图对本发明 的实施例进行详细说明。 需要说明的是, 在不冲突的情况下, 本申请中的实施例及实 施例中的特征可以相互任意组合。 实施例: 本实施的核心思想就是: 在服务器端建立每个分段索引与一个或多个分段节目的 对应关系, 当客户端请求某一个分段索引时, 服务器端通过在响应体中的不同字段中 分别携带分段索引和索引中对应的分段节目, 从而将分段索引跟索引中对应的分段节 目同时推送给客户端, 客户端通过持续请求所有分段索引来实现对全部分段节目的分 发, 如图 3所示, 提供了本实施例中分段节目分发的示意图。 本实施例中分发响应的 字段结构与相关技术中的相同, 如图 2所示, 包括: 响应行、 响应头和响应体, 但是, 对响应头和响应体携带的信息做了改变,在本实施例中, 响应头可以携带了指示信息, 包括: 标识该分段索引是否为索引文件中最后一个分段索引, 如果是, 则指示本分段 索引为索引文件中最后一个分段索引; 如果不是, 则指示下一个分段索引; 或者, 指 示索引文件中最后一个分段索引的序列号; 响应头中还可以携带分段索引对应的分段 节目的名称列表; 分发响应的响应体中携带有分段索引以及该分段索引对应的一个或 多个分段节目 如图 4所示, 本实施例提供了一种服务器, 用于分段节目快速分发, 包括: 分段模块, 设置为将节目源分成多个连续的分段节目和分段索引, 建立每个分段 索引与一个或多个分段节目的对应关系; 接收模块, 设置为接收到客户端对某一分段索引的分发请求; 分发响应模块, 设置为向客户端返回分发响应, 分发响应的响应体中携带有分段 索引以及该分段索引对应的一个或多个分段节目。 其中, 该分段模块, 还设置为在将节目源分成多个连续的分段节目和分段索引, 建立每个分段索引与一个或多个分段节目的对应关系之后, 生成一个统一资源定位符 URL标识分段索引, 并通知客户端; 其中, 生成一个统一资源定位符 URL标识分段索引, 包括:
生成一个 URL标识第一个分段索引; 或者, 通过与客户端交互,生成一个 URL标识客户端请求下发的某一分段节目对应的分 段索引。 该接收模块, 还设置为接收到客户端对某一分段索引的分发请求, 分发请求中携 带有对应该分段索引的 URL; 该分发响应模块, 还设置为根据 URL向客户端返回分发响应。 作为一种优选的方式, 该接收模块, 还设置为接收到客户端的携带有标识第一个 分段索引或某一分段节目对应的分段索引的 URL的分发请求; 该分发响应模块, 还设置为向客户端返回分发响应, 在分发响应的响应头中标识 该分段索引是否为索引文件中最后一个分段索引, 如果是, 则指示本分段索引为索引 文件中最后一个分段索引; 如果不是, 则指示下一个分段索引; 或者, 在分发响应的响应头中指示索引文件中最后一个分段索引的序列号。 其中, 某一分段索引为索引文件中的第一分段索引或者索引文件中的非第一分段 索引, 索引文件包括所有的索引分段。 如图 5所示, 本实施例提供了客户端, 用于分段节目快速分发, 包括: 分发请求模块, 设置为向服务器端发送获取某一分段索引的分发请求; 接收模块, 设置为接收服务器端返回的分发响应, 分发响应的响应体中携带有分 段索引以及该分段索引对应的一个或多个分段节目; 存储模块, 设置为将分段节目按照分段索引在索引文件中的序列号进行存储。 作为一种优选的方式, 客户端还包括与分发请求模块相连的交互模块, 其中: 该交互模块, 设置为接收服务器发送的标识第一个分段索引的统一资源定位符 URL; 或者, 通过与服务器交互, 接收服务器发送的标识客户端请求下发的某一分段 节目对应的分段索引的 URL。 其中, 该分发请求模块,设置为向服务器端发送获取某一分段索引的分发请求时, 在分发请求中携带标识某一分段索引的 URL;
作为一种优选的方式, 标识某一分段索引的 URL, 包括: 标识第一个分段索引的 URL; 或者, 标识客户端请求下发的某一分段节目对应的分段索引的 URL。 此外, 作为一种优选的方式, 接收模块, 还设置为接收服务器端返回的分发响应, 其中, 分发响应的响应头中标识有该分段索引是否为索引文件中最后一个分段索引, 如果是, 则指示本分段索引为索引文件中最后一个分段索引; 如果不是, 则指示下一 个分段索引; 分发请求模块, 还设置为如果响应头指示有下一个分段索引, 则向服务器发送获 取下一个分段索引的分发请求, 分发请求中携带有标识下一个分段索引的 URL; 如果 响应头指示本分段索引为索引文件中最后一个分段索引,则不向服务器发送分发请求; 存储模块, 还设置为将所有获取的分段节目按照分段索引在索引文件中的序列号 依次进行存储。 作为另一种优选的方式, 接收模块, 还设置为接收服务器端返回的分发响应, 分 发响应的响应头中指示有索引文件的最后一个分段索引的序列号; 分发请求模块, 还设置为依次向服务器发送获取第二个分段索引或某一分段节目 对应的分段索引的下一个分段索引直到最后一个分段索引的分发请求, 分发请求中携 带有标识第二个分段索引或某一分段节目对应的分段索弓 I的下一个分段索引直到最后 一个分段索引的 URL; 存储模块, 设置为将服务器端依次返回的分发响应中携带的分段节目按照分段索 引在索引文件中的序列号依次进行存储。 此外, 接收模块, 还设置为接收服务器端返回的分发响应, 分发响应的响应头中 携带有分段索引对应的分段节目的名称列表; 存储模块, 还设置为将分段节目按照分段索引中对应的分段节目的名称列表依次 进行存储。 其中, 某一分段索引为索引文件中的第一分段索引或者索引文件中的非第一分段 索引, 索引文件包括所有的索引分段。
其中, 在实际实施时, 如图 6所示, 中心网络即为本实施例中的服务器端, 边缘 网络即为本实施例中的客户端; 又如图 7所示, 中心节点即为本实施例中的服务器端, 边缘节点即为本实施例中的客户端, 在边缘节点将所有获取的分段节目按照分段索引 在索引文件中的序列号依次存储在磁盘上, 为用户终端提供完整的节目。 用户终端可 以是机顶盒、 VLC播放器或手机等等。 如图 8所示, 本实施例提供了一种分段节目快速分发的方法, 应用于服务器端, 包括以下步骤:
S101 : 将节目源分成多个连续的分段节目和分段索引, 建立每个分段索引与一个 或多个分段节目的对应关系; 其中, 每个分段节目都包含节目解码信息和随机访问单元信息, 保证每一个分段 节目可以独立解码播放, 这样方便分发后的分段节目可以单独提供其他媒体服务, 比 如点播。 被划分的分段节目是连续依次排列的。
S102: 接收到客户端对某一分段索引的分发请求; 其中, 某一分段索引为索引文件中的第一分段索引或者索引文件中的非第一分段 索引, 索引文件包括所有的索引分段。 通过接收客户端段持续的分发请求, 实现对全部分段节目的分发。
S103 : 向客户端返回分发响应, 分发响应的响应体中携带有分段索引以及该分段 索引对应的一个或多个分段节目。 其中,在步骤 S101中,在建立每个分段索引与一个或多个分段节目的对应关系后, 还包括: 生成一个统一资源定位符 URL标识相应的分段索引, 并通知客户端; 在步骤 S102和步骤 S103中, 服务器接收到客户端对某一分段索引的分发请求, 分发请求中携带有对应该分段索引的 URL; 根据 URL向客户端返回分发响应。 其中, 优选地, 生成一个统一资源定位符 URL标识相应的分段索引, 包括: 生成一个 URL 标识分段索引列表, 分段索引列表包含索引文件中所有的分段索 引; 或者,
生成一个 URL标识第一个分段索引; 或者, 通过与客户端交互,生成一个 URL标识客户端请求下发的某一分段节目对应的分 段索引。 比如, 为客户端定制 URL, 客户端向服务器发送 POST消息,请求某一分段节目, 服务器端解析得到该分段节目对应的分段索引,给客户端构造一个 URL标识该分段索 弓 I; 然后, 客户端就可以根据该 URL向服务器请求分段索引了。 作为一种优选的方式,在步骤 S102中,如果接收到客户端的携带有标识第一个分 段索引或某一分段节目对应的分段索引的 URL的分发请求; 在步骤 S103中,服务器向客户端返回分发响应,在分发响应的响应头中标识该分 段索引是否为索引文件中最后一个分段索引, 如果是, 则指示本分段索引为索引文件 中最后一个分段索引; 如果不是, 则指示下一个分段索引; 或者, 在分发响应的响应头中指示索引文件中最后一个分段索引的序列号。 这样客户端就可以根据服务器下发的分发响应获得是否要继续请求分段索引, 以 及得到下一个分段索引的 URL来请求该分段索引及对应的分段节目。 如图 9所示, 本实施例提供了一种分段节目快速分发的方法, 应用于客户端, 包 括以下步骤:
S201 : 向服务器端发送获取某一分段索引的分发请求; 其中, 某一分段索引为索引文件中的第一分段索引或者索引文件中的非第一分段 索引, 索引文件包括所有的索引分段。 其中, 客户端向服务器端发送获取某一分段索引的分发请求时, 在分发请求中携 带标识分段索引的 URL。 标识分段索引的 URL是通过与服务器交互从服务器接收到的,有多种方式,例如, 包括: 标识分段索引列表的 URL,分段索引列表包含索引文件中所有的分段索引;或者, 标识第一个分段索引的 URL; 或者,
通过与服务器交互, 接收服务器发送的标识客户端请求下发的某一分段节目对应 的分段索引的 URL。
S202: 接收服务器端返回的分发响应, 分发响应的响应体中携带有分段索引以及 该分段索引对应的一个或多个分段节目; S203 : 将分段节目按照分段索引在索引文件中的序列号进行存储。 其中, 一种优选的方式是, 接收到服务器端返回的分发响应, 分发响应的响应头 中标识有该分段索引是否为索引文件中最后一个分段索引, 如果是, 则指示本分段索 引为索引文件中最后一个分段索引; 如果不是, 则指示下一个分段索引; 如果响应头指示有下一个分段索引, 则向服务器发送获取下一个分段索引的分发 请求, 分发请求中携带有标识下一个分段索引的 URL; 如果响应头指示本分段索引为 索引文件中最后一个分段索引, 则不向服务器发送分发请求; 将所有获取的分段节目按照分段索引在索引文件中的序列号依次进行存储。 其中, 另一种优选的方式是, 接收到服务器端返回的分发响应, 分发响应的响应 头中指示有索引文件的最后一个分段索引的序列号; 客户端依次向服务器发送获取第二个分段索引或某一分段节目对应的分段索引的 下一个分段索引直到最后一个分段索引的分发请求, 分发请求中携带有标识第二个分 段索引或某一分段节目对应的分段索引的下一个分段索引直到最后一个分段索引的 URL; 接收服务器端依次返回的分发响应, 并将所有获取的分段节目按照分段索引在索 引文件中的序列号依次进行存储。
在一个应用示例中, 以在 DASH (Dynamic adaptive streaming over HTTP, 基于超 文本传输协议的动态调整流媒体服务) 系统中传送分段节目为例, 基于 HTTP协议, 采用 MPEG-2 TS流文件作为数据源, 文件名为 file.ts。 根据本实施例中的方法在服务器端按以下步骤将节目源进行分段, 生成多个分段 索引和分段节目:
1、 从视频图像关键帧的位置开始将文件 file.ts按照时间切分为 10秒长度的多个 分段数据,每一个分段数据均为 MPEG-2 TS文件,每一个分段数据的解码单位均以图 像关键帧开始, 这样得到的多个分段 TS文件, 分别命名为 l.ts,2.tS,...,100.ts;
2、利用 XML格式生成每个小 TS文件对应的索引文件,用来描述小 TS文件的播 放时长, 文件名等信息。 为了简化, 在本应用示例中将分段节目和分段索引的对应关 系设置为一对一, 比如 l.index对应 l.ts;
3、 构造统一资源定位 URL。 将 分段后 的 多 个 小 TS 文件 l.ts,2.ts,... 100.ts 和 分段索 引 文件 l.index,2.index,... 100.index放在 HTTP WEB服务器的存储设备上, 同时生成统一资源 定位 URL标识第一个分段索引。 http://ip:port/path/l .index 根据本实施例中的方法在客户端对节目按以下方法进行分发:
1、 根据统一资源定位 URL通过 HTTP GET方法获取第一个分段索引 l.index和 l.ts; 2、从 HTTP协议响应头和响应体中分别解析出分段节目的文件名和索引文件中最 后一个分段索引的序列号, 在本应用示例中, 得到第一个分段索引对应的分段节目为 l.ts, 索引文件最后一个分段索引的序列号为 100; 客户端在得到最后一个索引文件的序列号后, 就可以从第二个分段索引开始依次 获取索引文件所有的分段索引及其对应的分段节目, 直到最后一个分段索引。 3、 通过以下的 URL获取第二个至最后一个分段索引; http://ip:port/path/2.index http://ip:port/path/3. index
http://ip:port/path/100. index 经过上述过程, 客户端获取到所有分段文件, 即分段索引及其对应的分段节目, 并从 HTTP 协议响应头中解析出分段节目的文件名, 对应的分段节目为 2.ts, 3.ts,4.ts lOO.ts;
4、最后, 将获取的所有分段文件按照索引文件的序列号依次进行存储, 或者将获 取的所有分段文件按照分段节目名称列表进行存储。 本实施提供的方法和装置同样适合其他的传输协议, 比如 RTSP等, 这样本发明 的应用可以推广到流媒体其他系统, 不限于 DASH系统。 从上述实施例可以看出, 相对于相关技术, 上述实施例中提供的分段节目快速分 发的方法、 服务器和客户端, 当客户端请求某一个分段索引时, 服务器端会将分段索 引跟索引中对应的分段节目同时推送给客户端, 减少了传统的不断解析分段索引获取 分段节目中的网络时延和解析分段索引的时延, 也增加了网络带宽的利用率, 提高了 用户体验, 最终达到一种快速分发的效果 本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序来指令相 关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读存储器、 磁盘或光 盘等。可选地,上述实施例的全部或部分步骤也可以使用一个或多个集成电路来实现。 相应地, 上述实施例中的各模块 /单元可以采用硬件的形式实现, 也可以采用软件功能 模块的形式实现。 本发明不限制于任何特定形式的硬件和软件的结合。 以上所述仅为本发明的优选实施例而已, 并非用于限定本发明的保护范围。 根据 本发明的发明内容,还可有其他多种实施例,在不背离本发明精神及其实质的情况下, 熟悉本领域的技术人员当可根据本发明作出各种相应的改变和变形, 凡在本发明的精 神和原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护范围 之内。 工业实用性 如上所述, 本发明实施例提供的一种分段节目快速分发的方法、 服务器及客户端 具有以下有益效果: 当客户端请求某一个分段索引时, 服务器端会将分段索引跟索引 中对应的分段节目同时推送给客户端, 减少了传统的不断解析分段索引获取分段节目 中的网络时延和解析分段索引的时延, 也增加了网络带宽的利用率,提高了用户体验, 最终达到一种快速分发的效果。
Claims
权 利 要 求 书 、 一种分段节目快速分发的方法, 应用于服务器端, 包括: 将节目源分成多个连续的分段节目和分段索引, 建立每个分段索引与一个 或多个分段节目的对应关系;
接收到客户端对某一分段索引的分发请求; 向所述客户端返回分发响应, 所述分发响应的响应体中携带有所述分段索 引以及该分段索引对应的一个或多个分段节目。 、 如权利要求 1所述的方法, 其中: 在将节目源分成多个连续的分段节目和分段 索引, 建立每个分段索引与一个或多个分段节目的对应关系之后, 还包括: 生成一个统一资源定位符 URL标识所述分段索引, 并通知所述客户端; 接收到所述客户端对某一分段索引的分发请求, 所述分发请求中携带有对 应该分段索引的 URL;
根据所述 URL向所述客户端返回所述分发响应。 、 如权利要求 2所述的方法, 其中: 所述生成一个统一资源定位符 URL标识分段索引, 包括:
生成一个 URL标识第一个分段索引; 或者, 通过与所述客户端交互,生成一个 URL标识所述客户端请求下发的某一分 段节目对应的分段索引。 、 如权利要求 3所述的方法, 其中: 所述方法还包括: 接收到所述客户端的携带有标识第一个分段索引或某一分段节目对应的分 段索引的 URL的分发请求; 向所述客户端返回分发响应, 在所述分发响应的响应头中标识该分段索引 是否为索引文件中最后一个分段索引, 如果是, 则指示本分段索引为索引文件 中最后一个分段索引; 如果不是, 则指示下一个分段索引;
或者, 在所述分发响应的响应头中指示所述索引文件中最后一个分段索引 的序列号。
、 如权利要求 1或 2所述的方法, 其中: 所述某一分段索引为所述索引文件中的第一分段索引或者所述索引文件中 的非第一分段索引, 所述索引文件包括所有的索引分段。 、 一种分段节目快速分发的方法, 应用于客户端, 包括: 向服务器端发送获取某一分段索引的分发请求; 接收所述服务器端返回的分发响应, 所述分发响应的响应体中携带有所述 分段索引以及该分段索引对应的一个或多个分段节目;
将所述分段节目按照所述分段索引在索引文件中的序列号依次进行存储。 、 如权利要求 6所述的方法, 其中: 所述向服务器端发送获取某一分段索引的分发请求之前, 包括: 接收所述服务器发送的标识第一个分段索引的统一资源定位符 URL;或者 通过与所述服务器交互, 接收所述服务器发送的标识所述客户端请求下发 的某一分段节目对应的分段索引的 URL。 、 如权利要求 7所述的方法, 其中: 所述向服务器端发送获取某一分段索引的分发请求时, 在所述分发请求中 携带标识所述某一分段索引的 URL;
所述标识所述某一分段索引的 URL, 包括:
标识第一个分段索引的 URL; 或者,
标识所述客户端请求下发的某一分段节目对应的分段索引的 URL。 、 如权利要求 8所述的方法, 其中: 所述方法还包括: 接收到所述服务器端返回的分发响应, 所述分发响应的响应头中标识有该 分段索引是否为索引文件中最后一个分段索引, 如果是, 则指示本分段索引为 索引文件中最后一个分段索引; 如果不是, 则指示下一个分段索引;
如果所述响应头指示有下一个分段索引, 则向所述服务器发送获取下一个 分段索引的分发请求, 所述分发请求中携带有标识所述下一个分段索引的 URL; 如果所述响应头指示本分段索引为所述索引文件中最后一个分段索引, 则不向所述服务器发送分发请求;
将所有获取的分段节目按照分段索引在所述索引文件中的序列号依次进行 存储。 、 如权利要求 8所述的方法, 其中: 所述方法还包括: 接收到所述服务器端返回的分发响应, 所述分发响应的响应头中指示有索 弓 I文件的最后一个分段索弓 I的序列号; 所述客户端依次向所述服务器发送获取第二个分段索引或某一分段节目对 应的分段索引的下一个分段索引直到最后一个分段索引的分发请求, 所述分发 请求中携带有标识所述第二个分段索引或某一分段节目对应的分段索引的下一 个分段索引直到最后一个分段索引的 URL; 接收所述服务器端依次返回的分发响应, 并将所有获取的分段节目按照分 段索引在所述索引文件中的序列号依次进行存储。 、 如权利要求 6~10任意一项权利要求所述的方法, 其中: 所述方法还包括: 接收到所述服务器端返回的分发响应, 所述分发响应的响应头中携带有分 段索引对应的分段节目的名称列表;
将所述分段节目按照所述分段索引中对应的分段节目的名称列表依次进行 存储。 、 如权利要求 6或 7所述的方法, 其中: 所述某一分段索引为所述索引文件中的第一分段索引或者所述索引文件中 的非第一分段索引, 所述索引文件包括所有的索引分段。 、 一种服务器, 用于分段节目快速分发, 包括: 分段模块, 设置为将节目源分成多个连续的分段节目和分段索引, 建立每 个分段索引与一个或多个分段节目的对应关系;
接收模块, 设置为接收到客户端对某一分段索引的分发请求; 分发响应模块, 设置为向所述客户端返回分发响应, 所述分发响应的响应 体中携带有所述分段索引以及该分段索引对应的一个或多个分段节目。 、 如权利要求 13所述的服务器, 其中:
所述分段模块,还设置为在将节目源分成多个连续的分段节目和分段索引, 建立每个分段索引与一个或多个分段节目的对应关系之后, 生成一个统一资源 定位符 URL标识所述分段索引, 并通知所述客户端; 所述接收模块, 还设置为接收到所述客户端对某一分段索引的分发请求, 所述分发请求中携带有对应该分段索引的 URL; 所述分发响应模块,还设置为根据所述 URL向所述客户端返回所述分发响 应。 、 如权利要求 14所述的服务器, 其中: 所述分段模块,还设置为生成一个统一资源定位符 URL标识分段索引,包 括:
生成一个 URL标识第一个分段索引; 或者, 通过与所述客户端交互,生成一个 URL标识所述客户端请求下发的某一分 段节目对应的分段索引。 、 如权利要求 15所述的服务器, 其中: 所述接收模块, 还设置为接收到所述客户端的携带有标识第一个分段索引 或某一分段节目对应的分段索引的 URL的分发请求;
所述分发响应模块, 还设置为向所述客户端返回分发响应, 在所述分发响 应的响应头中标识该分段索引是否为索引文件中最后一个分段索引, 如果是, 则指示本分段索引为索引文件中最后一个分段索引; 如果不是, 则指示下一个 分段索引;
或者, 在所述分发响应的响应头中指示所述索引文件中最后一个分段索引 的序列号。 、 如权利要求 13或 14所述的服务器, 其中: 所述某一分段索引为所述索引文件中的第一分段索引或者所述索引文件中 的非第一分段索引, 所述索引文件包括所有的索引分段。 、 一种客户端, 用于分段节目快速分发, 包括: 分发请求模块, 设置为向服务器端发送获取某一分段索引的分发请求; 接收模块, 设置为接收所述服务器端返回的分发响应, 所述分发响应的响 应体中携带有所述分段索引以及该分段索引对应的一个或多个分段节目;
存储模块, 设置为将所述分段节目按照所述分段索引在索引文件中的序列 号进行存储。 、 如权利要求 18所述的客户端,其中:所述客户端还包括与所述分发请求模块相 连的交互模块, 其中:
所述交互模块, 设置为接收所述服务器发送的标识第一个分段索引的统一 资源定位符 URL; 或者, 通过与所述服务器交互, 接收所述服务器发送的标识 所述客户端请求下发的某一分段节目对应的分段索引的 URL。 、 如权利要求 19所述的客户端, 其中: 所述分发请求模块,设置为向服务器端发送获取某一分段索引的分发请时, 在所述分发请求中携带标识所述分段索引的 URL; 所述标识所述某一分段索引的 URL, 包括:
标识第一个分段索引的 URL; 或者, 标识所述客户端请求下发的某一分段节目对应的分段索引的 URL。 、 如权利要求 20所述的客户端, 其中: 所述接收模块, 还设置为接收所述服务器端返回的分发响应, 其中, 所述 分发响应的响应头中标识有该分段索引是否为索引文件中最后一个分段索引, 如果是, 则指示本分段索引为索引文件中最后一个分段索引; 如果不是, 则指 示下一个分段索引; 所述分发请求模块, 还设置为如果所述响应头指示有下一个分段索引, 则 向所述服务器发送获取下一个分段索引的分发请求, 所述分发请求中携带有标 识所述下一个分段索引的 URL;如果所述响应头指示本分段索引为所述索引文 件中最后一个分段索引, 则不向所述服务器发送分发请求; 所述存储模块, 还设置为将所有获取的分段节目按照分段索引在所述索引 文件中的序列号依次进行存储。 、 如权利要求 20所述的客户端, 其中: 所述接收模块, 还设置为接收所述服务器端返回的分发响应, 所述分发响 应的响应头中指示有索引文件的最后一个分段索引的序列号; 所述分发请求模块, 还设置为依次向所述服务器发送获取第二个分段索引 或某一分段节目对应的分段索引的下一个分段索引直到最后一个分段索引的分
发请求, 所述分发请求中携带有标识所述第二个分段索引或某一分段节目对应 的分段索引的下一个分段索引直到最后一个分段索引的 URL; 所述存储模块, 设置为将所述服务器端依次返回的分发响应中携带的分段 节目按照分段索引在所述索引文件中的序列号依次进行存储。 、 如权利要求 18 22任意一项权利要求所述的客户端, 其中: 所述接收模块, 还设置为接收所述服务器端返回的分发响应, 所述分发响 应的响应头中携带有分段索引对应的分段节目的名称列表;
所述存储模块, 还设置为将所述分段节目按照所述分段索引中对应的分段 节目的名称列表依次进行存储。 、 如权利要求 18或 19所述的客户端, 其中: 所述某一分段索引为所述索引文件中的第一分段索引或者所述索引文件中 的非第一分段索引, 所述索引文件包括所有的索引分段。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410037902.2 | 2014-01-26 | ||
CN201410037902.2A CN103813185B (zh) | 2014-01-26 | 2014-01-26 | 一种分段节目快速分发的方法、服务器及客户端 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015109847A1 true WO2015109847A1 (zh) | 2015-07-30 |
Family
ID=50709313
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/085193 WO2015109847A1 (zh) | 2014-01-26 | 2014-08-26 | 一种分段节目快速分发的方法、服务器及客户端 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN103813185B (zh) |
WO (1) | WO2015109847A1 (zh) |
Families Citing this family (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103813185B (zh) * | 2014-01-26 | 2019-01-25 | 中兴通讯股份有限公司 | 一种分段节目快速分发的方法、服务器及客户端 |
CN103796035B (zh) * | 2014-01-27 | 2019-11-05 | 南京中兴软件有限责任公司 | 一种处理分段节目的方法、服务器及客户端设备 |
CN104320679B (zh) * | 2014-10-11 | 2019-02-15 | 中兴通讯股份有限公司 | 一种基于hls协议的用户信息获取方法和服务器 |
CN105812831B (zh) * | 2014-12-31 | 2020-06-09 | 中兴通讯股份有限公司 | 网络节目的录制方法、装置、系统以及播放方法、装置 |
CN106464985B (zh) * | 2015-04-30 | 2019-04-12 | 华为技术有限公司 | 一种媒体流传输方法及装置 |
CN106685942B (zh) * | 2016-12-20 | 2020-07-24 | 徐亮 | 视频直播回播系统以及视频直播回播方法 |
CN106953892B (zh) * | 2017-02-14 | 2020-08-07 | 北京时间股份有限公司 | 一种获取文件的方法、装置及系统 |
CN107483546A (zh) * | 2017-07-21 | 2017-12-15 | 北京供销科技有限公司 | 一种文件存储方法及文件存储装置 |
CN108347625B (zh) * | 2018-03-09 | 2020-10-13 | 北京数码视讯软件技术发展有限公司 | 一种ts流媒体定位的方法和装置 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101951412A (zh) * | 2010-10-15 | 2011-01-19 | 上海交通大学 | 基于http协议的多子流流媒体传输系统及其传输方法 |
CN102130936A (zh) * | 2010-08-17 | 2011-07-20 | 华为技术有限公司 | 一种在动态http流传输方案中支持时移回看的方法和装置 |
CN102487454A (zh) * | 2010-12-03 | 2012-06-06 | 中兴通讯股份有限公司 | 一种分段节目快速启动的方法及系统 |
CN103813185A (zh) * | 2014-01-26 | 2014-05-21 | 中兴通讯股份有限公司 | 一种分段节目快速分发的方法、服务器及客户端 |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101938483A (zh) * | 2010-09-03 | 2011-01-05 | 中兴通讯股份有限公司 | 一种直播内容分发方法和系统 |
CN102238434B (zh) * | 2011-07-22 | 2017-12-19 | 中兴通讯股份有限公司 | 一种iptv流媒体文件虚拟分段和使用的方法及系统 |
CN102572555B (zh) * | 2012-01-16 | 2014-06-18 | 深圳市龙视传媒有限公司 | 一种实现hls客户端视频直播回看的方法及系统 |
-
2014
- 2014-01-26 CN CN201410037902.2A patent/CN103813185B/zh active Active
- 2014-08-26 WO PCT/CN2014/085193 patent/WO2015109847A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102130936A (zh) * | 2010-08-17 | 2011-07-20 | 华为技术有限公司 | 一种在动态http流传输方案中支持时移回看的方法和装置 |
CN101951412A (zh) * | 2010-10-15 | 2011-01-19 | 上海交通大学 | 基于http协议的多子流流媒体传输系统及其传输方法 |
CN102487454A (zh) * | 2010-12-03 | 2012-06-06 | 中兴通讯股份有限公司 | 一种分段节目快速启动的方法及系统 |
CN103813185A (zh) * | 2014-01-26 | 2014-05-21 | 中兴通讯股份有限公司 | 一种分段节目快速分发的方法、服务器及客户端 |
Also Published As
Publication number | Publication date |
---|---|
CN103813185A (zh) | 2014-05-21 |
CN103813185B (zh) | 2019-01-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2015109847A1 (zh) | 一种分段节目快速分发的方法、服务器及客户端 | |
EP3105903B1 (en) | Requesting multiple chunks from a network node on the basis of a single request message | |
US10116572B2 (en) | Method, device, and system for acquiring streaming media data | |
CN102282825B (zh) | 内容传送网络中流媒体请求地址映射的方法及装置、缓存节点 | |
US9882937B2 (en) | Communication receiver | |
TWI465088B (zh) | 使用位元組範圍請求之視訊資料之網路串流 | |
CN101485170B (zh) | 通过网络呈现用流传输的可重复的数据对象 | |
TW201021573A (en) | Proxy functionality | |
JP2020119497A (ja) | ライブストリーミングセグメント化方法、装置及びシステム | |
WO2014188886A1 (ja) | コンテンツ供給装置、コンテンツ供給方法、プログラム、およびコンテンツ供給システム | |
CN104581374B (zh) | 一种获取切片文件和生成子m3u8文件的方法、节点及服务器 | |
CN102055718B (zh) | 一种在http streaming系统中实现分层请求内容的方法,装置和系统 | |
WO2013078620A1 (zh) | 一种分发直播内容的方法、设备和系统 | |
WO2017080427A1 (zh) | 一种媒体播放方法、终端、系统及计算机存储介质 | |
CN109963171A (zh) | 多媒体信息传输方法、传输设备及存储介质 | |
KR101705898B1 (ko) | 디지털 방송 시스템에서 타임시프트 서비스 제공 방법 및 시스템 | |
JP2005094769A (ja) | マルチメディアコンテンツの高速ダウンロードサービス装置及びその方法 | |
WO2012041039A1 (zh) | 数字电视终端访问互联网视频的方法及相关设备和系统 | |
JP6597604B2 (ja) | 受信装置、送信装置、データ通信方法、およびデータ処理方法 | |
CN103796035B (zh) | 一种处理分段节目的方法、服务器及客户端设备 | |
WO2016090912A1 (zh) | 一种直播视频的生成及播放方法、装置、终端及系统 | |
Burke | Video streaming over named data networking | |
US10523409B2 (en) | Method of synchronization during the processing, by a multimedia player, of an item of multimedia content transmitted by an MBMS service | |
CN112788050A (zh) | 基于内容分发网络实现低延时直播的系统及方法 | |
WO2011143993A1 (zh) | 互联网内容访问方法及相关装置 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14879620 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 14879620 Country of ref document: EP Kind code of ref document: A1 |