WO2017166484A1 - 进行hls丢片补偿的方法及系统 - Google Patents

进行hls丢片补偿的方法及系统 Download PDF

Info

Publication number
WO2017166484A1
WO2017166484A1 PCT/CN2016/088882 CN2016088882W WO2017166484A1 WO 2017166484 A1 WO2017166484 A1 WO 2017166484A1 CN 2016088882 W CN2016088882 W CN 2016088882W WO 2017166484 A1 WO2017166484 A1 WO 2017166484A1
Authority
WO
WIPO (PCT)
Prior art keywords
request
slice
server
lost
compensation
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2016/088882
Other languages
English (en)
French (fr)
Inventor
刘斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Le Holdings Beijing Co Ltd
LeCloud Computing Co Ltd
Original Assignee
Le Holdings Beijing Co Ltd
LeCloud Computing Co Ltd
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 Le Holdings Beijing Co Ltd, LeCloud Computing Co Ltd filed Critical Le Holdings Beijing Co Ltd
Priority to US15/246,243 priority Critical patent/US20170288816A1/en
Publication of WO2017166484A1 publication Critical patent/WO2017166484A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/23Processing of content or additional data; Elementary server operations; Server middleware
    • H04N21/24Monitoring of processes or resources, e.g. monitoring of server load, available bandwidth, upstream requests
    • H04N21/2407Monitoring of transmitted content, e.g. distribution time, number of downloads
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management 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/262Content 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network 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/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/647Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
    • H04N21/64746Control signals issued by the network directed to the server or the client
    • H04N21/64761Control signals issued by the network directed to the server or the client directed to the server
    • H04N21/64776Control signals issued by the network directed to the server or the client directed to the server for requesting retransmission, e.g. of data packets lost or corrupted during transmission from server

Definitions

  • the embodiments of the present invention relate to the field of video live broadcast technologies, and in particular, to a method and system for performing HLS disc loss compensation.
  • HLS HTTP Live Streaming
  • the transmission content consists of two parts, one is the m3u8 description file, and the other is the TS media file.
  • the HLS live broadcast solution in the industry is usually transmitted through the Internet TCP protocol, but due to the uncertainty of the network status, the communication between the internal nodes of the relay distribution network occasionally has connection jitter, and some discrepancies will occur at this time. As a result, the user loses frames during playback, which seriously affects the user experience.
  • the inventors have found that the prior art has at least the following problems: since the communication between the upper layer and the lower layer is based on one-way notification in the architecture in the prior art, even if the lower layer knows which one is lost, A piece of information cannot be notified to the upper-layer server of the higher layer, so that the compensated slice cannot be obtained in time.
  • the embodiment of the invention provides a method and a system for performing HLS discarding compensation, so as to solve the problem that the traditional HLS live broadcast scheme is prone to losing discs, and the slice that cannot be compensated in time when the disc is lost occurs, realizing the real-time compensation of the lost disc. Improve the terminal playback experience.
  • An embodiment of the present invention provides a method for performing HLS disc loss compensation, including:
  • the lower layer server sends a subscription request to the corresponding plurality of upper layer servers, and acquires a slice published by the message publishing pool of the plurality of upper layer servers according to the subscription request;
  • the lower layer server performs a lost chip detection on the received slice information, and generates a disk loss request when detecting the occurrence of the lost slice;
  • the compensation requesting agent sends the generated lost content request to the plurality of upper layer servers.
  • Another embodiment of the present invention provides a system for performing HLS discarding compensation, including a lower layer server, each lower layer server corresponding to a plurality of upper layer servers, wherein the upper layer server performs slice publishing through a message publishing pool, and the lower layer server includes a slice obtaining module, configured to send a subscription request to the plurality of upper-layer servers, and acquire a slice that is published by the message publishing pool of the multiple upper-layer servers according to the subscription request, where the lower-layer server is further configured with a compensation request agent and a lost chip detection module, wherein
  • the lost disc detection module is configured to perform discard detection on the received slice information, and generate a disc loss request when detecting a discrepanion occurs;
  • the compensation requesting proxy is configured to send the generated lost content request to the plurality of upper layer servers.
  • the method and system for performing the HLS discarding compensation provided by the embodiment of the present invention can configure the compensation request proxy on the lower layer server to send a discarding request to the upper layer server in time when the discarding occurs, and obtain compensation in time to reduce The Caton phenomenon enhances the terminal playback experience.
  • FIG. 1 is a system frame structure diagram of a live broadcast solution in the prior art
  • FIG. 2 is a schematic structural diagram of an embodiment of a system for performing HLS disc loss compensation according to the present invention
  • FIG. 3 is a flow chart of an embodiment of a method for performing HLS disc loss compensation according to the present invention.
  • FIG. 4 is a schematic structural diagram of an apparatus 400 for performing a method for performing HLS disc loss compensation according to an embodiment of the present invention.
  • Fig. 1 schematically shows the framework of a system of a live broadcast scheme in the prior art.
  • each lower-layer server 2 in the framework corresponds to a plurality of upper-layer servers 1, and a subscription request is sent to the upper-layer server 1, and the upper-layer server 1 issues a new m3u8 file when the m3u8 file is updated, and The corresponding lower layer server 2 sends a release notification, and the lower layer server 2 obtains the corresponding slice 3 through the message distribution of its corresponding upper layer server 1.
  • each lower layer server 2 sends a subscription request to its corresponding upper layer server 1 only when it is first requested, and then passively waits for the release notification to update slice 3.
  • the lower layer server 2 and its corresponding upper layer server 1 are one-way notifications, that is, after the lower layer server 2 sends the subscription request, it passively waits for the announcement of the upper layer server 1, and thus the lower layer server knows even if the fragmentation occurs. If you lose a specific slice, you can't notify the corresponding upper-layer server of the lost file, and you can't get compensation in time, which will bring a very bad playback experience to the terminal.
  • the present invention proposes a system and method for performing HLS disc loss compensation to solve the defects existing in the conventional live broadcast architecture and mode.
  • Fig. 2 schematically shows the frame structure of a system for performing HLS disc loss compensation according to an embodiment of the present invention.
  • the system includes a lower layer server 2 and an upper layer server 1.
  • the upper layer server 1 has a message publishing pool 11 for publishing slice information acquired from a server of a higher layer.
  • the lower layer server 2 includes a slice acquisition module 20, and the lower layer server 2 sends a subscription request to the corresponding plurality of upper layer servers 1 through the slice acquisition module 20, and receives a message notification of the upper layer server, thereby acquiring message publications of the plurality of upper layer servers 1 according to the subscription request.
  • Each lower layer server 2 corresponds to multiple upper layer servers 1 to reduce the probability of losing a slice.
  • a compensation requesting agent 21 and a lost chip detecting module 22 are disposed on the lower layer server 2.
  • the discarding detection module 22 is configured to perform discard detection on the slice information that is sent by the plurality of upper-layer servers that are received, and generate a discard request when detecting the occurrence of the discard.
  • the compensation requesting agent 21 is configured to send the generated disk loss request to the plurality of upper layer servers 1 to obtain lost chip compensation.
  • the system of the embodiment of the present invention adds a discard detection module 22 and compensation to the lower layer server 2
  • the agent 21 can detect the lost file situation in time, and when detecting the occurrence of the lost file, the upper layer server sends a lost disk request, and realizes the full duplex communication of the upper server and the lower server, which can meet the requirement of real-time compensation.
  • the lower layer server is a server or a server cluster, and each module may be a separate server or a server cluster.
  • the interaction between the modules is represented by a server or a server cluster corresponding to each module.
  • the plurality of servers or server clusters together form a system for performing HLS disc loss compensation of the present invention.
  • the system in which the plurality of servers or server clusters together constitute the HLS discard compensation of the present invention includes:
  • the server obtains a server or a server cluster, and configures a plurality of upper-layer servers to send a subscription request, and receives a message notification of the upper-layer server, and acquires a slice published by the message publishing pool of the upper-layer server according to the subscription request;
  • the discard detection server or the server cluster is configured to perform discard detection on the slice information of the received upper-layer servers, and generate a discard request when the discard occurs.
  • Compensating the requesting proxy server or server cluster configured to send the generated lost disk request to multiple upper-layer servers for discard compensation.
  • the slice acquisition module constitutes a first server or a first server cluster
  • the lost disk detection module and the compensation request agent jointly form a second server or a second server cluster.
  • the interaction between the modules is represented by an interaction between the first server and each of the second servers or an interaction between the first server cluster and the second server cluster, the first server and the second server or the first The server cluster and the second server cluster together constitute the system for performing HLS disc loss compensation of the present invention.
  • the lost disc detection module 22 includes a dump unit 221 and a disc loss request generating unit 222.
  • the dump unit 221 is configured to store the slice information locally according to the name of the acquired slice.
  • the discarding request generating unit 222 is configured to match the serial number of the slice with the serial number of the stored slice. When the matching result is that the serial number is not continuous, a discard request is generated and sent to the compensation requesting agent 21.
  • the discard request includes the detected missing slice serial number.
  • the slices are numbered, and each slice corresponds to a unique serial number, and the serial number is continuous, such as The serial number of one slice is 1, the serial number of the second slice is 2, ..., and the serial number of the Nth slice is N.
  • the slice unit 221 After the lower layer server 2 receives the slice, the slice unit 221 first stores the slice to a local storage module (such as a database), and then detects the serial number of the slice by the disk loss request generation unit 222. Specifically, the slice is received. The serial number of the slice to be compared is compared with the serial number of the received slice stored in the database. If the serial number is not continuous, such as the currently received serial number is 5, and the closest sequence stored in the database If the number is 3, the slice with serial number 4 has lost. At this time, a discard request is generated according to the serial number of the slice, and the discard request includes the serial number corresponding to the lost slice. After the discard request is generated, the discard request generation unit 222 sends the disc loss request to the compensation request proxy 21.
  • a local storage module such as a database
  • the compensation requesting agent 21 includes a connection establishing unit 211 and a request broadcasting unit 212.
  • the connection establishing unit 211 establishes a TCP long connection between the message publishing pool of the plurality of upper-layer servers corresponding to the lower-layer server and the local compensation requesting agent 21.
  • the request broadcast unit 212 broadcasts the disk loss request to the message publishing pool of the corresponding multiple layer servers through the TCP connection.
  • the lower layer server can broadcast to all upper-layer servers when the disk is lost, and realize full-duplex communication between the lower server and the upper server.
  • the lost chip detection module may be a server or a server cluster, where each of the above units may be a separate server or a server cluster.
  • the interaction between the units is represented by the servers corresponding to the units. Interaction.
  • one or both of the dump unit and the lost disc request generation unit may be combined to form a server or server cluster.
  • the compensation requesting agent may be a server or a server cluster, where each of the above units may be a separate server or a server cluster.
  • the interaction between the units is represented by the interaction between the servers corresponding to the units. .
  • connection establishment unit and the request broadcast unit may be combined to form a server or cluster of servers.
  • the upper layer server 1 further includes a storage module 10 and a monitoring agent 12.
  • the storage module 10 is configured to store the slice information according to the serial number, and may use a redis database (an open source key-value high performance no-sql database, that is, a key-value based high performance sql-free database).
  • the monitoring agent 12 is configured to listen to the loss request of the lower server, according to the receipt of the lost file request. Loss of disk compensation for the underlying server.
  • the monitoring agent 12 continuously monitors whether the message publishing pool 11 of the local machine receives the disk loss request sent by the lower layer server 2, and when the message publishing pool 11 that monitors the local machine receives the disk loss request, according to the lost film
  • the serial number in the request is searched for the corresponding slice from the memory modulo 10 block of the local machine.
  • the monitoring agent 12 will publish the corresponding slice information to the message publishing pool 11 of the local machine, to be performed by the local message publishing pool. release.
  • the corresponding slice is not queried, it indicates that the machine has lost the slice when acquiring the slice from the upper-layer server.
  • the machine acts as the lower-layer server, and discards the request to the upper-layer server, thus monitoring the agent. 12 will send the lost request to the compensation requesting agent of the local machine to make a lost request to the upper server corresponding to the local machine.
  • real-time disk loss compensation for the lower layer server can be achieved, the probability of losing the disk is reduced, and the live broadcast experience of the terminal is improved.
  • FIG. 3 is a schematic diagram showing the flow of a method for performing HLS disc loss compensation according to an embodiment of the present invention. As shown in FIG. 3, the method includes:
  • Step S301 Configure a compensation request agent on the lower layer server.
  • the compensation requesting agent is configured on the lower-layer server to establish a TCP long-term connection with the message publishing pool of the upper-layer server, and broadcast the lost-volume request to the message publishing pool of all the upper-layer servers corresponding to the local device.
  • Step S302 The lower layer server sends a subscription request to the corresponding multiple upper-layer servers, and acquires the slices published by the message publishing pools of the plurality of upper-layer servers according to the subscription request.
  • the lower-layer server sends a subscription request to its corresponding upper-layer servers according to requirements.
  • the message publishing pool of the upper-layer server posts the slice to the corresponding topic according to the received subscription request, and sends a release notification to the lower-layer server.
  • the lower-layer server receives the advertisement notification from the upper-layer server, and obtains the slice according to the message published by the message publishing pool of the upper-layer server.
  • Step S303 The lower layer server performs discard detection according to the received slice information, and generates a disc loss request when detecting the occurrence of the discard.
  • the lower server After the lower server obtains the slice, it stores the slice in the local database according to the name of the slice. At the same time, the received slice is subjected to discard detection, specifically, the serial number of the received slice is compared with the serial number of the slice stored in the database, and the serial number of the newly received slice is stored in the database. When the serial number of the slice closest to the serial number is discontinuous, the occurrence occurs. Slices are generated to generate a lost request. The discard request includes the serial number of the lost slice.
  • Step S304 The compensation requesting agent sends the generated disk loss request to a plurality of upper layer servers.
  • the compensation requesting agent broadcasts the generated lost disk request to all its corresponding upper-layer servers through the established TCP long connection, and the upper-layer server receives the lost request of the lower-layer server through its message publishing pool according to the established TCP long connection.
  • step S305 the monitoring agent is configured on the upper server to listen to the lost request of the lower server, and when the lost request is detected, the lower server is lost.
  • the monitoring agent is configured on the upper server, and the deployed monitoring agent monitors the message publishing pool of the local device. When it detects that the local message publishing pool receives the disk loss request, according to the sequence of the lost slice in the disk loss request. Number, get the corresponding slice from the database of the machine. If there is a corresponding slice in the database of the local machine, the slice is sent to the message publishing pool for re-publishing. If there is no corresponding slice, the local device also loses the slice. In this case, the local device As a lower-level server, the compensation request agent will make a compensation request to its upper-layer server.
  • the system and method of the embodiments of the present invention can implement full-duplex communication between the lower-layer server and the upper-layer server through the compensation request agent configured on the lower-layer server, and the long-connected full-duplex communication can reduce the number of requests of the lower-layer server and lower the upper layer.
  • the pressure on servers and core production equipment Thereby, the dependence of the lower layer server on the single core production source is reduced, real-time compensation for the lost file is realized, the discarding frequency when the intermediate network condition is interrupted is reduced, and the playback experience of the device terminal is improved.
  • a related function module can be implemented by a hardware processor.
  • the present invention provides a non-transitory computer readable storage medium having stored therein one or more programs including execution instructions that can be executed by an electronic device with a control interface
  • execution instructions for example:
  • the generated lost content request is sent to the plurality of upper layer servers.
  • FIG. 4 is a schematic structural diagram of an apparatus 400 for performing a method for performing HLS disc loss compensation according to an embodiment of the present invention.
  • the specific embodiment of the present invention does not limit the specific implementation of the device 400.
  • the device 400 can include:
  • a processor 410 a communications interface 420, a memory 430, and a communication bus 440. among them:
  • the processor 410, the communication interface 420, and the memory 430 complete communication with each other via the communication bus 440.
  • the communication interface 420 is configured to communicate with a network element such as a client.
  • the processor 410 is configured to execute the program 432 in the memory 430 to perform the related steps in the foregoing method embodiments.
  • program 432 can include program code, the program code including computer operating instructions.
  • the processor 410 may be a central processing unit CPU, or an Application Specific Integrated Circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
  • CPU central processing unit
  • ASIC Application Specific Integrated Circuit
  • the memory 430 is configured to store the program 432.
  • the memory 430 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
  • Program 432 can be specifically configured to cause device 400 to perform the following operations:
  • Configuration steps configure the compensation request agent
  • a step of acquiring a subscription sending a subscription request to the corresponding plurality of upper-layer servers, and acquiring a slice published by the message publishing pool of the plurality of upper-layer servers according to the subscription request;
  • the discarding detection step performing discard detection on the received slice information, and generating a discarding request when detecting the occurrence of the discarding;
  • the compensation request step sending the generated lost content request to the plurality of upper layer servers.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may be or The person may not be a physical unit, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment. Those of ordinary skill in the art can understand and implement without deliberate labor.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)

Abstract

本发明实施例提供一种进行HLS丢片补偿的方法及系统,该方法包括:在下层服务器上配置补偿请求代理;所述下层服务器向其对应的多个上层服务器发送订阅请求,并根据所述订阅请求获取所述多个上层服务器的消息发布池发布的切片;所述下层服务器对接收到的切片信息进行丢片检测,并在检测到发生丢片时,生成丢片请求;所述补偿请求代理将生成的所述丢片请求发送至所述多个上层服务器。本发明实施例的方法和系统提升了线上设备的负载能力和消息发布池对外发布消息的能力,降低了生产流的组件与消息发布池之间的对接难度。

Description

进行HLS丢片补偿的方法及系统 技术领域
本发明实施例涉及视频直播技术领域,尤其涉及一种进行HLS丢片补偿的方法及系统。
背景技术
HLS(HTTP Live Streaming)是由Apple公司定义的用于实时流传输的协议,基于HTTP协议实现,传输内容包括两部分,一是m3u8描述文件,二是TS媒体文件。目前行业中的HLS直播方案通常通过互联网TCP协议传输,但是由于网络状况的不确定性,中继分发网络的内部节点间的通讯偶尔也会出现连接抖动,此时就会出现一些丢片的情况,导致用户在播放时发生卡顿丢帧的现象,严重影响用户体验。
在实现本发明的过程中,发明人发现现有技术至少存在以下问题:由于现有技术中的架构中,上层和下层之间的通讯是基于单向通知的,下层即使知道丢了具体的哪一片,也无法把丢片的信息通知给更高层的上层服务器,因而无法及时获得补偿的切片。
发明内容
本发明实施例提供一种进行HLS丢片补偿的方法和系统,以解决传统的HLS直播方案容易发生丢片,而在发生丢片时无法及时获得补偿的切片的问题,实现丢片的实时补偿,提升终端播放体验。
本发明实施例一方面提供一种进行HLS丢片补偿的方法,包括:
在下层服务器上配置补偿请求代理;
所述下层服务器向其对应的多个上层服务器发送订阅请求,并根据所述订阅请求获取所述多个上层服务器的消息发布池发布的切片;
所述下层服务器对接收到的切片信息进行丢片检测,并在检测到发生丢片时,生成丢片请求;
所述补偿请求代理将生成的所述丢片请求发送至所述多个上层服务器。
本发明实施例另一方面提供一种进行HLS丢片补偿的系统,包括下层服务器,每个下层服务器对应多个上层服务器,所述上层服务器通过消息发布池进行切片发布,所述下层服务器上包括切片获取模块,用于向所述多个上层服务器发送订阅请求,并根据所述订阅请求获取所述多个上层服务器的消息发布池发布的切片,其特征在于,所述下层服务器上还配置有补偿请求代理和丢片检测模块,其中,
所述丢片检测模块,用于对接收到的切片信息进行丢片检测,并在检测到发生丢片时,生成丢片请求;
所述补偿请求代理用于将生成的所述丢片请求发送至所述多个上层服务器。
本发明实施例提供的进行HLS丢片补偿的方法及系统,通过在下层服务器上配置补偿请求代理,可以在检测到发生丢片时,及时向上层服务器发送丢片请求,以及时获得补偿,减少卡顿现象,提升终端播放体验。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为现有技术中直播方案的系统框架结构图;
图2为本发明进行HLS丢片补偿的系统的实施例结构示意图;
图3为本发明进行HLS丢片补偿的方法的实施例流程图;
图4为实施本发明实施例的进行HLS丢片补偿的方法的设备400的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于 本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
以下结合附图,对本发明实施例做更详细的阐述。
图1示意性地显示了现有技术中直播方案的系统的框架结构。如图1所示,该框架中每个下层服务器2对应多个上层服务器1,通过向上层服务器1发送订阅请求,上层服务器1在m3u8文件发生更新时,将新的m3u8文件进行发布,并向其对应的下层服务器2发送发布通知,下层服务器2通过其对应的上层服务器1的消息发布,获取对应的切片3。由该架构可以看出,现有技术中,每个下层服务器2只有在首次请求时,才向其对应的上层服务器1发送一次订阅请求,之后就是被动地等待发布通知,以更新切片3。这种模式下,一旦网络发生抖动,中间就可能会出现丢片。并且,由于下层服务器2和其对应的上层服务器1之间是单向通知,即下层服务器2发送订阅请求后,就被动地等待上层服务器1的发布通知,因而发生丢片时,下层服务器即使知道丢了具体的哪一个切片,也无法把丢片的信息通知给其对应的上层服务器,更无法及时获得补偿,这将给终端带来非常不好的播放体验。
因而本发明提出一种进行HLS丢片补偿的系统和方法,以解决传统直播架构和方式中存在的缺陷。
图2示意性地显示了本发明实施例的进行HLS丢片补偿的系统的框架结构。如图2所示,该系统包括下层服务器2和上层服务器1,上层服务器1上有消息发布池11,用于对从更上层的服务器获取的切片信息进行发布。下层服务器2包括切片获取模块20,下层服务器2通过切片获取模块20向对应的多个上层服务器1发送订阅请求,并接收上层服务器的消息通知,从而根据订阅请求获取多个上层服务器1的消息发布池11发布的切片。其中,每个下层服务器2对应多个上层服务器1,以降低丢片的概率。
如图2所示,本发明实施例在下层服务器2上配置有补偿请求代理21和丢片检测模块22。丢片检测模块22用于对接收到的多个上层服务器发布的切片信息进行丢片检测,并在检测到发生丢片时,生成丢片请求。补偿请求代理21用于将生成的丢片请求发送至多个上层服务器1,以获得丢片补偿。本发明实施例的系统,通过在下层服务器2上增加丢片检测模块22和补偿请 求代理21,能够及时对丢片情况进行检测,并在检测到发生丢片时,向上层服务器发送丢片请求,实现了上层服务器和下层服务器的全双工通讯,能够满足实时补偿的需求。
本实施例中,下层服务器为一个服务器或者服务器集群,其中每个模块可以是单独的服务器或者服务器集群,此时,上述模块之间的交互表现为各模块所对应的服务器或者服务器集群之间的交互,所述多个服务器或服务器集群共同构成本发明的进行HLS丢片补偿的系统。
具体地,所述多个服务器或服务器集群共同构成本发明的进行HLS丢片补偿的系统包括:
切片获取服务器或者服务器集群,配置以对应的多个上层服务器发送订阅请求,并接收上层服务器的消息通知,根据订阅请求获取多个上层服务器的消息发布池发布的切片;
丢片检测服务器或者服务器集群,配置以对接收到的多个上层服务器发布的切片信息进行丢片检测,并在检测到发生丢片时,生成丢片请求;
补偿请求代理服务器或者服务器集群,配置以将生成的丢片请求发送至多个上层服务器,以获得丢片补偿。
在一种替代实施例中,可以是上述多个模块中的几个模块共同组成一个服务器或者服务器集群。例如:切片获取模块构成第一服务器或者第一服务器集群,丢片检测模块和补偿请求代理共同组成第二服务器或者第二服务器集群。
此时,上述模块之间的交互表现为第一服务器和各第二服务器之间的交互或者第一服务器集群和第二服务器集群之间的交互,所述第一服务器和第二服务器或第一服务器集群和第二服务器集群共同构成本发明的进行HLS丢片补偿的系统。
如图2所示,丢片检测模块22中包括转储单元221和丢片请求生成单元222。转储单元221用于根据获取到的切片的名称,在本地存储切片信息。丢片请求生成单元222用于将切片的序列号与存储的切片的序列号进行匹配,当匹配结果为序列号不连续时,生成丢片请求,发送给补偿请求代理21。其中,丢片请求包括检测到的缺失的切片序列号。本发明实施例的系统中,会对切片进行编号,每个切片都对应一个唯一的序列号,序列号是连续,如第 一个切片的序列号为1,第二个切片的序列号为2,…,第N个切片的序列号为N。当下层服务器2收到切片后,首先由转储单元221将切片存储到本地的存储模块(如数据库中),然后通过丢片请求生成单元222对切片的序列号进行检测,具体为,将收到的切片的序列号与数据库中存储的已接收到的切片的序列号进行比较,如果发生序列号不连续的情况,如当前接收到的序列号为5,而数据库中存储的最接近的序列号为3,则说明序列号为4的切片发生了丢片。此时,会根据切片的序列号生成丢片请求,丢片请求中包括该丢失的切片对应的序列号。生成丢片请求后,丢片请求生成单元222将丢片请求发送给补偿请求代理21。补偿请求代理21中包括连接建立单元211和请求广播单元212。其中,连接建立单元211会在下层服务器对应的多个上层服务器的消息发布池和本地的补偿请求代理21之间建立一个TCP长连接。在补偿请求代理21接收到丢片请求后,请求广播单元212就会将丢片请求通过TCP连接广播给对应的多个层服务器的消息发布池。由此,就可以下层服务器在发生丢片时,就能够广播给所有的上层服务器,实现下层服务器和上层服务器的全双工通讯。
本实施例中丢片检测模块可以为一个服务器或者服务器集群,其中上述每一个单元可以是单独的服务器或者服务器集群,此时,上述单元之间的交互表现为各单元所对应的服务器之间的交互。
在一种替代实施例中,可以是转储单元和丢片请求生成单元中的一个或者两个共同组成一个服务器或者服务器集群。
本实施例中补偿请求代理可以为一个服务器或者服务器集群,其中上述每一个单元可以是单独的服务器或者服务器集群,此时,上述单元之间的交互表现为各单元所对应的服务器之间的交互。
在一种替代实施例中,可以是连接建立单元和请求广播单元中的一个或者两个共同组成一个服务器或者服务器集群。
如图2所示,上层服务器1中还包括有存储模块10和监听代理12。存储模块10用于根据序列号来存储切片信息,可以选用redis数据库(一种开源的key-value高性能no-sql数据库,即基于键-值的高性能无sql的数据库)。监听代理12用于对下层服务器的丢片请求进行监听,根据接收到丢片请求, 对下层服务器进行丢片补偿。在具体应用中,监听代理12持续监控本机的消息发布池11是否接收到下层服务器2发来的丢片请求,在监控到本机的消息发布池11接收到丢片请求时,根据丢片请求中的序列号,从本机的存储模10块中查找对应的切片。当查询到对应的切片时(即存储模块中存在序列号匹配的切片条目),监听代理12会将对应的切片信息发布到本机的消息发布池11,以由本机的消息发布池进行再发布。而当未查询到对应的切片时,说明本机在从更上层的服务器获取切片时也发生了丢片现象,此时本机就作为下层服务器,向其上层服务器进行丢片请求,因而监控代理12会将该丢片请求发送给本机的补偿请求代理,以向本机对应的上层服务器进行丢片请求。由此,就可以实现对下层服务器的实时的丢片补偿,降低丢片的概率,提升终端的直播体验。
图3示意性地显示了本发明实施例的进行HLS丢片补偿的方法流程。如图3所示,该方法包括:
步骤S301:在下层服务器上配置补偿请求代理。
在下层服务器上配置补偿请求代理,用于和上层服务器的消息发布池建立TCP长连接,并在发生丢片时,将丢片请求广播给本机对应的全部上层服务器的消息发布池。
步骤S302:下层服务器向对应的多个上层服务器发送订阅请求,并根据订阅请求获取多个上层服务器的消息发布池发布的切片。
下层服务器根据需求向其对应的多个上层服务器发送订阅请求,上层服务器的消息发布池会根据收到的订阅请求将切片发布到相应的主题,并向其下层服务器发送发布通知。下层服务器接收到上层服务器的发布通知,根据上层服务器的消息发布池发布的消息,获取切片。
步骤S303:下层服务器根据接收到的切片信息进行丢片检测,并在检测到发生丢片时,生成丢片请求。
下层服务器在获取到切片后,根据该切片的名称,将该切片存储到本地的数据库中。同时,会对收到的切片进行丢片检测,具体为,将收到的切片的序列号和数据库中存储的切片的序列号进行比对,当新收到的切片的序列号与数据库中存储于该序列号最接近的切片的序列号为不连续时,说明发生 了切片,则生成丢片请求。其中,丢片请求中包括丢失的切片的序列号。
步骤S304:补偿请求代理将生成的丢片请求发送到多个上层服务器。
补偿请求代理将生成的丢片请求通过建立的TCP长连接广播到其对应的全部上层服务器上,上层服务器根据建立的TCP长连接通过其消息发布池接收下层服务器的丢片请求。
步骤S305:在上层服务器上配置监听代理,对下层服务器的丢片请求进行监听,并在监听到丢片请求时,对下层服务器进行丢片补偿。
在上层服务器上配置监听代理,部署的监听代理会对本机的消息发布池进行监听,当检测到本机的消息发布池接收到了丢片请求时,根据丢片请求中的所丢失的切片的序列号,从本机的数据库中获取对应的切片。如果本机的数据库中存在相应的切片,则将该切片发给消息发布池以进行再发布,如果不存在相应的切片,则说明本机也发生了该切片的丢片,此时,本机将作为下层服务器,通过补偿请求代理向其上层服务器进行补偿请求。
本发明实施例的系统和方法,能够通过在下层服务器上配置的补偿请求代理实现下层服务器和上层服务器的全双工通信,且长连接的全双工通讯能够减少下层服务器的请求次数,降低上层服务器以及核心生产设备的压力。由此进而减少下层服务器对单核心生产源的依赖,实现对丢片的实时补偿,降低在中间网络状况发生中断时的丢片频率,提高设备终端的播放体验。
本发明实施例中可以通过硬件处理器(hardware processor)来实现相关功能模块。
本发明提供一种非瞬时性(non-transitory)计算机可读存储介质,所述存储介质中存储有一个或多个包括执行指令的程序,所述执行指令能够被带有控制界面的电子设备执行,以用于执行上述方法实施例中的相关步骤,例如:
配置补偿请求代理;
向其对应的多个上层服务器发送订阅请求,并根据所述订阅请求获取所述多个上层服务器的消息发布池发布的切片;
对接收到的切片信息进行丢片检测,并在检测到发生丢片时,生成丢片请求;
将生成的所述丢片请求发送至所述多个上层服务器。
图4是实施本发明实施例的进行HLS丢片补偿的方法的设备400的结构示意图,本发明具体实施例并不对设备400的具体实现做限定。如图4所示,该设备400可以包括:
处理器(processor)410、通信接口(Communications Interface)420、存储器(memory)430、以及通信总线440。其中:
处理器410、通信接口420、以及存储器430通过通信总线440完成相互间的通信。
通信接口420,用于与比如客户端等的网元通信。
处理器410,用于执行存储器430中的程序432,以执行上述方法实施例中的相关步骤。
具体地,程序432可以包括程序代码,所述程序代码包括计算机操作指令。
处理器410可能是一个中央处理器CPU,或者是特定集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本发明实施例的一个或多个集成电路。
存储器430,用于存放程序432。存储器430可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。程序432具体可以用于使得设备400执行以下操作:
配置步骤:配置补偿请求代理;
切片获取步骤:向其对应的多个上层服务器发送订阅请求,并根据所述订阅请求获取所述多个上层服务器的消息发布池发布的切片;
丢片检测步骤:对接收到的切片信息进行丢片检测,并在检测到发生丢片时,生成丢片请求;
补偿请求步骤:将生成的所述丢片请求发送至所述多个上层服务器。
程序432中各步骤的具体实现可以参见上述实施例中的相应步骤和单元中对应的描述,在此不赘述。所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的设备和模块的具体工作过程,可以参考前述方法实施例中的对应过程描述,在此不再赘述。
以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或 者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性的劳动的情况下,即可以理解并实施。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到各实施方式可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件。基于这样的理解,上述技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在计算机可读存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行各个实施例或者实施例的某些部分所述的方法。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (10)

  1. 一种进行HLS丢片补偿的方法,其特征在于,包括:
    在下层服务器上配置补偿请求代理;
    所述下层服务器向其对应的多个上层服务器发送订阅请求,并根据所述订阅请求获取所述多个上层服务器的消息发布池发布的切片;
    所述下层服务器对接收到的切片信息进行丢片检测,并在检测到发生丢片时,生成丢片请求;
    所述补偿请求代理将生成的所述丢片请求发送至所述多个上层服务器。
  2. 根据权利要求1所述的方法,其中,所述下层服务器对接收到的切片信息进行丢片检测,并在检测到发生丢片时,生成丢片请求包括:
    所述下层服务器根据获取到的切片的名称,在本地存储所述切片;
    所述下层服务器将所述切片的序列号与存储的切片的序列号进行匹配,当匹配结果为序列号不连续时,生成丢片请求,所述丢片请求包括检测到的缺失的切片序列号。
  3. 根据权利要求1所述的方法,其中,所述下层服务器的补偿请求代理将生成的丢片请求发送至所述多个上层服务器包括:
    在所述下层服务器对应的多个上层服务器的消息发布池和所述补偿请求代理之间建立TCP长连接;
    所述补偿请求代理将所述丢片请求通过所述TCP连接广播给对应的多个层服务器的消息发布池。
  4. 根据权利要求1至3任一项所述的方法,其特征在于,还包括:
    在上层服务器上配置监听代理,通过所述监听代理对下层服务器的丢片请求进行监听,在监听到丢片请求时,对所述下层服务器进行丢片补偿。
  5. 根据权利要求4所述的方法,其中,所述通过所述监听代理对下层服务器的丢片请求进行监听,在监听到丢片请求时,对所述下层服务器进行丢片补偿包括:
    所述多个上层服务器的监听代理监控本机的消息发布池是否接收到下层服务器发来的丢片请求,在监控到本机的消息发布池接收到丢片请求时,根据丢片信息从本机的存储模块中查找对应的切片,根据查找结果
    -当查询到对应的切片时,将所述切片信息发布到本机的消息发布池;
    -当未查询到对应的切片时,向本机对应的上层服务器进行丢片请求。
  6. 一种进行HLS丢片补偿的系统,包括下层服务器,每个下层服务器对应多个上层服务器,所述上层服务器通过消息发布池进行切片发布,所述下层服务器上包括切片获取模块,用于向所述多个上层服务器发送订阅请求,并根据所述订阅请求获取所述多个上层服务器的消息发布池发布的切片,其特征在于,所述下层服务器上还配置有补偿请求代理和丢片检测模块,其中,
    所述丢片检测模块,用于对接收到的切片信息进行丢片检测,并在检测到发生丢片时,生成丢片请求;
    所述补偿请求代理用于将生成的所述丢片请求发送至所述多个上层服务器。
  7. 根据权利要求6所述的系统,其特征在于,所述丢片检测模块包括
    转储单元,用于根据获取到的切片的名称,在本地存储所述切片;和
    丢片请求生成单元,用于将所述切片的序列号与存储的切片的序列号进行匹配,当匹配结果为序列号不连续时,生成丢片请求,所述丢片请求包括检测到的缺失的切片序列号。
  8. 根据权利要求6所述系统,其中,所述补偿请求代理包括
    连接建立单元,用于在所述下层服务器对应的多个上层服务器的消息发布池和所述补偿请求代理之间建立TCP长连接;和
    请求广播单元,用于将所述丢片请求通过所述TCP连接广播给对应的多个层服务器的消息发布池。
  9. 根据权利要求6至8任一项所述的系统,其特征在于,所述上层服务器上配置有监听代理,用于对下层服务器的丢片请求进行监听,根据接收到 所述丢片请求,对所述下层服务器进行丢片补偿。
  10. 根据权利要求9所述的系统,其特征在于,所述监听代理用于监控本机的消息发布池是否接收到下层服务器发来的丢片请求,在监控到本机的消息发布池接收到丢片请求时,根据丢片信息从本机的存储模块中查找对应的切片,根据查找结果
    -当查询到对应的切片时,将所述切片信息发布到本机的消息发布池;
    -当未查询到对应的切片时,向本机对应的上层服务器进行丢片请求。
PCT/CN2016/088882 2016-03-30 2016-07-06 进行hls丢片补偿的方法及系统 Ceased WO2017166484A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US15/246,243 US20170288816A1 (en) 2016-03-30 2016-08-24 Method and system for compensating hls slice loss

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610192827.6A CN105872613A (zh) 2016-03-30 2016-03-30 进行hls丢片补偿的方法及系统
CN201610192827.6 2016-03-30

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/246,243 Continuation US20170288816A1 (en) 2016-03-30 2016-08-24 Method and system for compensating hls slice loss

Publications (1)

Publication Number Publication Date
WO2017166484A1 true WO2017166484A1 (zh) 2017-10-05

Family

ID=56626619

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/088882 Ceased WO2017166484A1 (zh) 2016-03-30 2016-07-06 进行hls丢片补偿的方法及系统

Country Status (2)

Country Link
CN (1) CN105872613A (zh)
WO (1) WO2017166484A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110519613A (zh) * 2019-08-27 2019-11-29 咪咕视讯科技有限公司 直播录制处理方法、系统、电子设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848236A (zh) * 2010-05-06 2010-09-29 北京邮电大学 具有分布式网络架构的实时数据分发系统及其工作方法
CN104363472A (zh) * 2014-10-20 2015-02-18 中兴通讯股份有限公司 基于hls的能力控制方法及服务系统和slb服务器
CN105187950A (zh) * 2014-05-29 2015-12-23 中国移动通信集团内蒙古有限公司 一种视频文件播放的方法、设备和系统
US9270724B1 (en) * 2015-06-25 2016-02-23 Amarone Partners, Llc System and method for content streaming with feature detection
CN105430046A (zh) * 2015-10-29 2016-03-23 合一网络技术(北京)有限公司 一种利用虚拟化技术实现的cdn加速系统及方法

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4767443B2 (ja) * 2001-07-04 2011-09-07 富士通株式会社 ネットワーク蓄積型ビデオカメラシステム
CN103634610B (zh) * 2012-08-24 2018-02-16 中兴通讯股份有限公司 直播内容分发系统及方法
US9681155B2 (en) * 2013-03-15 2017-06-13 Sony Interactive Entertainment America Llc Recovery from packet loss during transmission of compressed video streams

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101848236A (zh) * 2010-05-06 2010-09-29 北京邮电大学 具有分布式网络架构的实时数据分发系统及其工作方法
CN105187950A (zh) * 2014-05-29 2015-12-23 中国移动通信集团内蒙古有限公司 一种视频文件播放的方法、设备和系统
CN104363472A (zh) * 2014-10-20 2015-02-18 中兴通讯股份有限公司 基于hls的能力控制方法及服务系统和slb服务器
US9270724B1 (en) * 2015-06-25 2016-02-23 Amarone Partners, Llc System and method for content streaming with feature detection
CN105430046A (zh) * 2015-10-29 2016-03-23 合一网络技术(北京)有限公司 一种利用虚拟化技术实现的cdn加速系统及方法

Also Published As

Publication number Publication date
CN105872613A (zh) 2016-08-17

Similar Documents

Publication Publication Date Title
US9578081B2 (en) System and method for providing an actively invalidated client-side network resource cache
US9794201B2 (en) Messaging based signaling for communications sessions
US8799400B2 (en) System and method for managing multiple queues of non-persistent messages in a networked environment
CN102932352B (zh) 和客户端进行通信的方法以及服务器
CN104604189B (zh) 大型企业的高效状态发布机制
CN104009938B (zh) 基于路由层面的长连接的方法和系统
WO2017088384A1 (zh) 一种直播视频的上传方法、装置及系统
US20140188801A1 (en) Method and system for intelligent load balancing
WO2017088381A1 (zh) 一种直播视频的播放方法、装置及系统
CN110120961B (zh) 一种分布式服务集群及其路由同步的方法
WO2019084972A1 (zh) 流媒体直播方法及系统
CN105379295A (zh) 分段内容的流送
RU2608469C2 (ru) Способ и устройство высокоэффективной доставки уведомлений в реальном времени с малым временем задержки
US11005975B2 (en) Rapid optimization of media stream bitrate
US8966107B2 (en) System and method of streaming data over a distributed infrastructure
US20190007473A1 (en) Peer-to-peer network live streaming system and node management method
US10284381B1 (en) Low latency data distribution in a computing service environment
US20170359187A1 (en) Scalable real-time videoconferencing over WebRTC
US20220070507A1 (en) Method for distributing audio/video stream in audio/video stream distribution system, and dynamic parent node
AU2024200824A1 (en) Systems and methods for generating synthetic data packets
CN111131843A (zh) 一种网络直播系统和方法
CN104348700B (zh) 用于发布微博的方法和系统
US20140095604A1 (en) Managing an electronic conference session
WO2017166484A1 (zh) 进行hls丢片补偿的方法及系统
US20170288816A1 (en) Method and system for compensating hls slice loss

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16896257

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 16896257

Country of ref document: EP

Kind code of ref document: A1