WO2016062089A1 - 基于hls的能力控制方法及服务系统和slb服务器 - Google Patents

基于hls的能力控制方法及服务系统和slb服务器 Download PDF

Info

Publication number
WO2016062089A1
WO2016062089A1 PCT/CN2015/080342 CN2015080342W WO2016062089A1 WO 2016062089 A1 WO2016062089 A1 WO 2016062089A1 CN 2015080342 W CN2015080342 W CN 2015080342W WO 2016062089 A1 WO2016062089 A1 WO 2016062089A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
hls
request
http
video server
Prior art date
Application number
PCT/CN2015/080342
Other languages
English (en)
French (fr)
Inventor
熊伟
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to EP15852270.6A priority Critical patent/EP3211902B1/en
Publication of WO2016062089A1 publication Critical patent/WO2016062089A1/zh

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/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/258Client or end-user data management, e.g. managing client capabilities, user preferences or demographics, processing of multiple end-users preferences to derive collaborative data
    • 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/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content 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/21Server components or server architectures
    • H04N21/222Secondary servers, e.g. proxy server, cable television Head-end
    • 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/21Server components or server architectures
    • H04N21/226Characteristics of the server or Internal components of the server
    • H04N21/2265Server identification by a unique number or address, e.g. serial number
    • 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/239Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests
    • H04N21/2393Interfacing the upstream path of the transmission network, e.g. prioritizing client content requests involving handling client 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
    • 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/2408Monitoring of the upstream path of the transmission network, e.g. client 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/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/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
    • H04N21/26208Content 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 the scheduling operation being performed under constraints
    • 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/643Communication protocols

Definitions

  • This paper deals with Video Content Distribution Network (CDN) technology, especially an HLS-based capability control method and service system and SLB server.
  • CDN Video Content Distribution Network
  • the traditional Video Content Distribution Network provides the Real Time Streaming Protocol (RTSP) service.
  • the service is provided by the Transmission Control Protocol (TCP).
  • TCP Transmission Control Protocol
  • the online user number and capability logic control are relatively simple. That is to say, only the RTSP inherent method can be used to count the number of users. It is cumbersome to obtain the number of real-time users, and logic development is required.
  • HLS Hypertext Transfer Protocol
  • HLS Hypertext Transfer Protocol
  • HTTP Hypertext Transfer Protocol
  • HLS real-time streaming
  • m3u8 file is an extension of the m3u file, which can achieve multi-rate adaptation.
  • the client will select a m3u8 file suitable for its own bit rate to play, to ensure the smooth flow of the video; ts short connection is the HTTP connection.
  • This paper provides an HLS-based capability control method and service system and SLB server, which can be applied to HTTP-based m3u8 and ts short-connected video service systems.
  • An HLS-based capability control service system comprising: a server load balancing SLB server, one or more real-time streaming HLS video servers based on a hypertext transfer protocol HTTP; wherein
  • the SLB server is configured to: receive an HLS HTTP request from the terminal, redirect to the HLS video server, and return the service address of the specified HLS video server to the terminal;
  • the HLS video server is configured to: receive an HLS HTTP request from the terminal, return the requested m3u8 index file to the terminal, and establish an HTTP connection with the terminal; monitor the request status of each terminal in real time, and count the online terminal user according to the terminal that initiated the request.
  • the SLB server is configured to: receive an HLS HTTP request from the terminal, and allocate a session identifier SessionID to the request;
  • the HLS video server is selected, and the assigned SessionID and the service address of the selected HLS video server are returned to the terminal by using an HTTP 302 redirect message.
  • the HLS server is set to:
  • the request status of the terminal is monitored in real time. If the session ID is not carried in the request and a new request is not received within the preset time, it is determined that the terminal has gone offline.
  • the SLB server includes a service analysis module, a session session control module, an HTTP redirection module, and a load balancing control module, where
  • the service analysis module is configured to: parse the HLS HTTP request from the terminal, analyze the request related information corresponding to the terminal request, and output the obtained request related information to the session control module and the load balancing control module;
  • the session control module is configured to: allocate a SessionID to the terminal request according to the request related information, and output the same to the HTTP redirecting module;
  • the load balancing control module is configured to: according to the request related information, in combination with the performance index reported by the HLS video server under the control of the SLB server, select a currently suitable HLS video server for the terminal, and output the same to the HTTP redirection module;
  • the HTTP redirection module is configured to: return an HTTP 302 redirect message to the terminal, and in the HTTP header information of the message, the Location field carries the service address of the selected HLS video server, and the parameter of the service address includes the SessionID information assigned to the terminal. .
  • the load balancing control module is configured to:
  • an HLS video server with the lowest current load is selected to provide a service, and is output to the HTTP redirection module.
  • the load balancing control module is further configured to:
  • An SLB server includes a service analysis module, a session control module, an HTTP redirection module, and a load balancing control module, where
  • the service analysis module is configured to: parse the HLS HTTP request from the terminal, analyze the request related information corresponding to the terminal request, and output the obtained request related information to the session control module and the load balancing control module;
  • the session control module is configured to: allocate a SessionID to the terminal request according to the request related information, and output the same to the HTTP redirecting module;
  • the load balancing control module is configured to: according to the request related information, in combination with the performance index reported by the HLS video server under the control of the SLB server, select a currently suitable HLS video server for the terminal, and output the same to the HTTP redirection module;
  • the HTTP redirection module is configured to: return an HTTP 302 redirect message to the terminal, and in the HTTP header information of the message, the Location field carries the service address of the selected HLS video server, and the parameter of the service address includes the SessionID information assigned to the terminal. .
  • the load balancing control module is configured to:
  • the HTTP GET request is used to request performance indicators from each HLS video server under the jurisdiction of the SLB server;
  • the terminal When the terminal initiates an HLS HTTP request to the SLB server, according to the obtained performance index of each HLS video server, selecting a HLS video server with the lowest current load to mention For the service, and output to the HTTP redirect module.
  • the load balancing control module is further configured to:
  • An HLS-based capability control method including:
  • the SLB server receives the HLS HTTP request from the terminal, redirects to the HLS video server, and returns the service address of the specified HLS video server to the terminal;
  • the HLS video server receives the HLS HTTP request from the terminal, returns the requested m3u8 index file to the terminal, and establishes an HTTP connection with the terminal; monitors the request status of each terminal in real time, and counts the online terminal user according to the terminal that initiated the request.
  • the redirecting to the HLS video server and returning the service address of the specified HLS video server to the terminal includes:
  • the HLS video server is selected, and the assigned SessionID and the service address of the selected HLS video server are returned to the terminal by using an HTTP 302 redirect message.
  • the HLS server returns the requested m3u8 index file to the terminal and establishes an HTTP connection with the terminal, including:
  • the terminal After receiving the m3u8 index file response, the terminal parses the included ts connection list, and initiates an HTTP connection request to the HLS video server. The terminal initiates the request to the HLS video server to carry the terminal. The corresponding SessionID.
  • the request status of the terminal is monitored in real time. If the session ID is not carried in a request and no new request is sent to the HLS video server within the preset time, it is determined that the terminal has gone offline.
  • the statistical online terminal user includes:
  • the request sent by the terminal to the HLS video server carries a SessionID, and the HLS video server records the SessionID of the terminal.
  • a terminal requests to the HLS video server using a URL carrying a SessionID,
  • the HLS video server Determining whether the HLS video server itself records the SessionID, if yes, increasing the number of concurrent corresponding to the SessionID by one; if not, creating a record of the SessionID, and recording the corresponding number of records as 1; The HLS video server will update the latest time;
  • the HLS video server After the HLS video server completes a http request response corresponding to a SessionID, the number of concurrent requests is decreased by one, and the latest time is updated;
  • the HLS video server periodically scans all the SessionID information. When the number of concurrent Session IDs is 0, and the latest time has exceeded the offline threshold time, it is determined that the terminal corresponding to the SessionID has gone offline, and the Session state is set to the offline.
  • a computer readable storage medium storing computer executable instructions for performing the method of any of the above.
  • the technical solution herein includes an SLB server, one or more HLS video servers, wherein the SLB server is configured to: receive an HLS HTTP request from the terminal, redirect to the HLS video server in HTTP 302 mode, and The service address of the specified HLS video server is returned to the terminal; the HLS video server is configured to: receive an HTTP short connection request from the terminal, monitor the request status of each terminal in real time, and count the online terminal user according to the terminal that initiated the request.
  • the HLS-based capability control system provided in this paper is applicable to HTTP-based m3u8 and ts short-connected video service systems, and it also implements statistics on the number of online users of HLS video servers.
  • FIG. 1 is a schematic diagram of a component connection of an HLS-based capability control service system according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a component connection of an SLB server according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of an embodiment of an HLS-based capability control method according to an embodiment of the present invention.
  • FIG. 1 is a schematic diagram of a component connection of an HLS-based capability control service system according to an embodiment of the present invention. As shown in FIG. 1, at least a server load balancing (SLB) server 101, one or more HLS video servers 102 are included;
  • SLB server load balancing
  • the SLB server 101 is configured to: receive an HLS HTTP request from the terminal 103, such as redirecting to the HLS video server 102 in HTTP 302 mode, and returning the service address of the specified HLS video server to the terminal 103;
  • the HLS video server 102 is configured to receive an HLS HTTP request from the terminal 103, return the requested m3u8 index file to the terminal 103, and establish an HTTP connection with the terminal 103; monitor the request status of each terminal 103 in real time, according to the terminal 103 that initiated the request. Statistics online end users.
  • the SLB server 101 is configured to: receive an HLS HTTP request from the terminal, assign a session identifier (SessionID) to the request; select the HLS video server 102 according to the performance indicator of the HLS video server under its jurisdiction, and use the HTTP 302 redirect message
  • SessionID session identifier
  • the assigned SessionID and the service address of the selected HLS video server are returned to the terminal 103;
  • the HLS HTTP request is directly from the terminal 103, and the terminal 103 requests the m3u8 index file from the selected HLS video server 102 according to the service address carried in the HTTP 302 redirect message; after receiving the m3u8 index file response, Parsing the included ts connection list, and initiating an HTTP connection request to the HLS video server 102; wherein the request initiated by the terminal 103 to the HLS video server 102 carries the SessionID corresponding to the terminal 103;
  • the HLS video server 102 is configured to: receive a message requesting the m3u8 index file from the terminal 103, record the session ID corresponding to the terminal 103, and return an m3u8 index file response carrying the ts connection list to the terminal 103, where the session ID of the terminal 103 is carried; And establishing an HTTP connection with the terminal 103; monitoring the request situation of the terminal 103 in real time, if there is no SessionID in a request and there is no new request sent to the HLS video server 102 within the preset time, the terminal 103 is considered to have gone offline to count Online terminal users.
  • the HLS-based capability control system provided by the embodiment of the present invention is applicable to an HTTP-based m3u8 and ts short-connected video service system, and implements statistics on the number of online users of the HLS video server.
  • the SLB server can clearly know the number of users allocated by each terminal, which facilitates the allocation of the user's own node when the new user goes online, and the system performs real-time user allocation according to the corresponding load situation of each node, thereby realizing The node with the least load and the most resources is allocated to the user for use, which facilitates resource allocation and cluster scheduling of the entire system.
  • the user's SessionID realizes the accurate positioning of the node where the attack starts and the information of the attacker, which facilitates the security defense of the system and the locking of the hacker.
  • FIG. 2 is a schematic diagram of a component connection of an SLB server according to an embodiment of the present invention. As shown in FIG. 2, the service analysis module 201, a session control module 202, an HTTP redirection module 203, and a load balancing control module 204 are included.
  • the service analysis module 201 is configured to: parse the HLS HTTP request from the terminal, analyze the request related information such as the CP, the service type, the user personal information, and the attribution information of the user, and output the obtained request related information.
  • the HLS HTTP request includes a series of user personal information such as a user terminal ID, an IP address, a port number, a user-owned area information, a user name, and a password, and the attribution information of the user.
  • a part of the information needs to be output to the session control module 202, such as the user terminal ID number, the user name, the password, and the like.
  • the session control module 202 uses the information to assign a SessionID to the user; other information such as requesting the corresponding CP, service type,
  • the related information such as the area information and the IP address information of the user needs to be output to the load balancing control module 204.
  • the load balancing control module 204 uses the information to distribute the server, thereby facilitating load balancing control.
  • the session control module 202 is configured to: assign a SessionID to the terminal request according to the request related information, and output the result to the HTTP redirecting module 203;
  • the load balancing control module 204 is configured to: according to the request related information, in combination with the performance index reported by the HLS video server under the control of the SLB server, select a currently most suitable HLS video server for the terminal, and output it to the HTTP redirection module 203;
  • the HTTP redirection module 203 is configured to: return an HTTP 302 redirect message to the terminal, and in the HTTP header information of the message, the Location field carries the service address of the selected HLS video server, and the parameter of the service address includes the SessionID assigned to the terminal. information.
  • the SessionID is included in a valid service address, the number of online users is accurately counted, and the most reasonable load distribution is performed.
  • the load balancing control module 204 is configured to:
  • the HTTP GET request is used to periodically request performance metrics for each HLS video server under the jurisdiction of the SLB server, where performance indicators include, but are not limited to, the maximum bandwidth allowed by the server, the current bandwidth of the server, and the maximum concurrent number allowed by the server. , the current number of concurrent servers, the maximum number of online users allowed by the server, the current number of online users, etc.
  • an HLS video server with the lowest current load is selected to provide the service, and is output to the HTTP redirection module 203.
  • a dynamic algorithm can be used to select the HLS video server.
  • the algorithm can use a weighted allocation method to perform weighted comparison on all HLS video servers: the weighting calculation is performed according to the capabilities of each HLS video server. For example, the weighting of the HLS video server with strong service capability and the HLS video server with poor service capability are different.
  • the decentralization algorithm is processed according to the information of the terminal; finally, the final weight is obtained according to the sum of the two weights for the HLS video server allocation. If there are two cases with the same weight, enter another algorithm with the same weight, compare the capabilities of the HLS video server, and then compare the other indicators for allocation.
  • the load balancing control module 204 is further configured to: notify the service analysis module 201 to reject the HLS HTTP request of the terminal until the HLS video server under its jurisdiction When the load indicator drops to be serviceable, a new HLS HTTP request is accepted through the service analysis module 201.
  • the method for controlling the capability of the HLS based on the embodiment of the present invention includes: the SLB server receives the HLS HTTP request from the terminal, for example, redirects to the HLS video server by using HTTP 302, and specifies the HLS video server.
  • the service address is returned to the terminal;
  • the HLS video server receives the HLS HTTP request from the terminal and returns the request to the terminal.
  • the m3u8 index file establishes an HTTP connection with the terminal; monitors the request status of each terminal in real time, and counts the online terminal user according to the terminal that initiated the request.
  • FIG. 3 is a flowchart of an embodiment of an HLS-based capability control method according to an embodiment of the present invention. As shown in FIG. 3, the method includes:
  • Step 300 The terminal initiates an HTTP Get request to the SLB server, requesting an HLS m3u8 index file. At the same time, the request is assigned a SessionID.
  • Step 301 The SLB server initiates an HTTP Get request to each HLS video server under its jurisdiction to obtain performance indicators of each HLS video server.
  • Step 302 Each HLS video server reports its performance indicator to the SLB server.
  • the performance indicator here indicates the current running status of the HLS video server, and is used by the SLB server to apply the weighting algorithm to allocate the indicators used by the HLS server, including the current online users of the HLS video server (ie, the number of independent sessions), the current number of concurrent connections, and the server network. Information such as adapter traffic.
  • Step 303 The SLB server determines the performance indicator of each server according to the preset weighted allocation manner, selects the current most suitable HLS video server, and points the service URL to the HLS video server; and uses the HTTP 302 redirect message to be the terminal.
  • the assigned SessionID and the service address of the selected HLS video server are returned to the terminal to redirect the terminal request to the selected HLS video server.
  • a dynamic algorithm can be used to select the HLS video server.
  • weighted comparison is performed on all HLS video servers by weighted allocation: decentralization calculation is performed according to the capabilities of each HLS video server. For example, the weighting of the HLS video server with strong service capability and the HLS video server with poor service capability are different. The obtained results are also different; after the decentralization of the HLS video server, the decentralization algorithm is processed according to the information of the terminal; finally, the final weight is obtained according to the sum of the two weights for the HLS video server allocation. If there are two cases with the same weight, enter another algorithm with the same weight, compare the capabilities of the HLS video server, and then compare the other indicators for allocation.
  • Step 304 The terminal re-initiates an HTTP GET request for the m3u8 index file to the selected HLS video server according to the service address carried in the HTTP 302 redirect message.
  • Step 305 The HLS video server records the SessionID requested by the terminal and returns to the terminal.
  • the m3u8 index file responds, and the ts request information in the content of the m3u8 index file carries the SessionID of the terminal.
  • Step 306 After receiving the m3u8 index file, the terminal parses out the ts connection list included therein, and initiates an HTTP connection request to the HLS video server, where the request carries the session ID of the terminal.
  • the HLS video server monitors the request status of each terminal in real time.
  • the request in the service does not carry the SessionID, and no new request has been sent to the HLS video server within the preset time, it is determined. The end user has gone offline.
  • the session ID is carried in the request initiated by the terminal to the HLS video server, and the HLS video server records the session ID of the terminal.
  • a terminal requests to the HLS video server by using a URL carrying a SessionID, it first determines whether the HLS video server itself records the SessionID, and if so, increases the number of concurrent corresponding to the SessionID by one; if not, creates the SessionID. Record and record the corresponding number of concurrent records as 1. At the same time, the HLS video server will update the latest time.
  • the HLS video server When the HLS video server completes a http request response corresponding to a SessionID, it decrements its concurrent number by one and updates the latest time.
  • the HLS video server periodically scans all the SessionID information. When the number of concurrent Session IDs is 0, and the latest time has exceeded the offline threshold time, it is determined that the terminal corresponding to the SessionID has gone offline, and the Session state is set to the offline.
  • all or part of the steps of the above embodiments may also be implemented by using an integrated circuit. These steps may be separately fabricated into individual integrated circuit modules, or multiple modules or steps may be fabricated into a single integrated circuit module. achieve.
  • the device/function module/functional unit in the above embodiments may be implemented by using a general-purpose computing device, which may be concentrated on a single computing device or distributed in multiple computing devices. On the network.
  • the device/function module/functional unit in the above embodiment When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the HLS-based capability control system provided in this paper is applicable to HTTP-based m3u8 and ts short-connected video service systems, and implements statistics on the number of online users of HLS video servers.
  • the SLB server can clearly know the number of users allocated by each terminal, which facilitates the allocation of the user's own node when the new user goes online, and the system performs real-time user allocation according to the corresponding load situation of each node, thereby realizing The node with the least load and the most resources is allocated to the user for use, which facilitates resource allocation and cluster scheduling of the entire system.
  • the user's SessionID realizes the accurate positioning of the node where the attack starts and the information of the attacker, which facilitates the security defense of the system and the locking of the hacker.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Graphics (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

一种基于HLS的能力控制方法及服务系统和SLB服务器,包括SLB服务器、一个或一个以上HLS视频服务器;其中,SLB服务器设置为:接收来自终端的HLS HTTP请求,以HTTP 302方式重定向到HLS视频服务器,并将指定的HLS视频服务器的服务地址返回给终端;HLS视频服务器设置为:接收来自终端的HTTP短连接请求,实时监控每个终端的请求情况,根据发起请求的终端统计在线终端用户。

Description

基于HLS的能力控制方法及服务系统和SLB服务器 技术领域
本文涉及视频内容分发网络(CDN,Content Delivery Network)技术,尤指一种基于HLS的能力控制方法及服务系统和SLB服务器。
背景技术
传统的视频内容分发网络(CDN,Content Delivery Network)提供实时流传输协议(RTSP,Real Time Streaming Protocol)服务,为用户提供服务时使用的是传输控制协议(TCP,Transmission Control Protocol)长连接,统计在线用户数和能力逻辑控制比较单一,也就是说,只能应用RTSP固有的方法统计用户数目,想要获取实时用户数目比较繁琐,需要进行逻辑开发。
随着互联网视频的发展,视频CDN开始大量提供基于超文本传输协议(HTTP,Hyper Text Transfer Protocol)的实时流传输(HLS,Http Live Streaming)的协议的视频服务。HLS的视频服务都是基于HTTP的m3u8和ts短连接,无法再使用RTSP时代的方法来统计在线用户和控制节点服务能力。其中,m3u8文件是m3u文件的扩展,可以实现多码率的适配。根据网络带宽,客户端会选择一个适合自己码率的m3u8文件进行播放,以保证视频流的流畅;ts短连接即HTTP连接。
发明内容
本文提供一种基于HLS的能力控制方法及服务系统和SLB服务器,能够适用于基于HTTP的m3u8和ts短连接的视频服务系统。
一种基于HLS的能力控制服务系统,包括:服务器负载均衡SLB服务器、一个或一个以上基于超文本传输协议HTTP的实时流传输HLS视频服务器;其中,
SLB服务器,设置为:接收来自终端的HLS HTTP请求,重定向到HLS视频服务器,并将指定的HLS视频服务器的服务地址返回给终端;
HLS视频服务器,设置为:接收来自终端的HLS HTTP请求,向终端返回请求的m3u8索引文件并与终端建立HTTP连接;实时监控每个终端的请求情况,根据发起请求的终端统计在线终端用户。
可选地,所述SLB服务器是设置为:接收来自所述终端的HLS HTTP请求,为该请求分配会话标识SessionID;
根据所述SLB服务器自身管辖下的HLS视频服务器的性能指标,选择HLS视频服务器,并采用HTTP 302重定向消息将分配的SessionID和选择出的HLS视频服务器的服务地址返回给所述终端。
可选地,所述HLS服务器是设置为:
接收来自终端的请求m3u8索引文件的消息,记录所述终端对应的SessionID;向所述终端返回携带有ts连接列表的m3u8索引文件响应,其中携带有终端的SessionID;并与所述终端建立HTTP连接;
实时监控所述终端的请求情况,如果在请求中未携带SessionID且预设时间内没有接收到新请求,确定该终端已下线。
可选地,所述SLB服务器包括业务分析模块、会话Session控制模块、HTTP重定向模块,负载均衡控制模块,其中,
业务分析模块,设置为:解析来自终端的HLS HTTP请求,分析出终端请求对应的请求相关信息,并将得到的请求相关信息输出给Session控制模块和负载均衡控制模块;
Session控制模块,设置为:根据请求相关信息为终端请求分配SessionID,并输出给HTTP重定向模块;
负载均衡控制模块,设置为:根据请求相关信息,结合自身所在SLB服务器管辖的HLS视频服务器上报的性能指标,为终端选择一个当前最适合的HLS视频服务器,并输出给HTTP重定向模块;
HTTP重定向模块,设置为:向终端返回HTTP 302重定向消息,并在消息的HTTP头信息中Location字段携带选择出的HLS视频服务器的服务地址,服务地址的参数中包含给终端分配的SessionID信息。
可选地,所述负载均衡控制模块是设置为:
按照预先设置的周期,定时使用HTTP GET请求向其所在SLB服务器管辖下的每个HLS视频服务器请求性能指标;
当所述终端发起HLS HTTP请求到所述SLB服务器时,根据获得的每个HLS视频服务器的性能指标,选择一个当前负载最低的HLS视频服务器来提供服务,并输出给所述HTTP重定向模块。
可选地,如果当前每个HLS视频服务器的负载都已达到预先设置的上限阈值时,所述负载均衡控制模块还设置为:
通知所述业务分析模块拒绝终端的HLS HTTP请求,直到所述SLB服务器管辖下的HLS视频服务器的负载指标下降到可以服务时,通知所述业务分析模块接受新的HLS HTTP请求。
一种SLB服务器,包括业务分析模块、Session控制模块、HTTP重定向模块,负载均衡控制模块,其中,
业务分析模块,设置为:解析来自终端的HLS HTTP请求,分析出终端请求对应的请求相关信息,并将得到的请求相关信息输出给Session控制模块和负载均衡控制模块;
Session控制模块,设置为:根据请求相关信息为终端请求分配SessionID,并输出给HTTP重定向模块;
负载均衡控制模块,设置为:根据请求相关信息,结合自身所在SLB服务器管辖的HLS视频服务器上报的性能指标,为终端选择一个当前最适合的HLS视频服务器,并输出给HTTP重定向模块;
HTTP重定向模块,设置为:向终端返回HTTP 302重定向消息,并在消息的HTTP头信息中Location字段携带选择出的HLS视频服务器的服务地址,服务地址的参数中包含给终端分配的SessionID信息。
可选地,所述负载均衡控制模块是设置为:
按照预先设置的周期,定时使用HTTP GET请求向自身所在SLB服务器管辖下的每个HLS视频服务器请求性能指标;
当所述终端发起HLS HTTP请求到所述SLB服务器时,根据获得的每个HLS视频服务器的性能指标,选择一个当前负载最低的HLS视频服务器来提 供服务,并输出给HTTP重定向模块。
可选地,如果当前每个HLS视频服务器的负载都已达到预先设置的上限阈值时,所述负载均衡控制模块还设置为:
通知所述业务分析模块拒绝终端的HLS HTTP请求,直到所述SLB服务器管辖下的HLS视频服务器的负载指标下降到可以服务时,通知所述业务分析模块接受新的HLS HTTP请求。
一种基于HLS的能力控制方法,包括:
SLB服务器接收来自终端的HLS HTTP请求,重定向到HLS视频服务器,并将指定的HLS视频服务器的服务地址返回给终端;
HLS视频服务器接收到来自终端的HLS HTTP请求,向终端返回请求的m3u8索引文件并与终端建立HTTP连接;实时监控每个终端的请求情况,根据发起请求的终端统计在线终端用户。
可选地,所述重定向到HLS视频服务器,并将指定的HLS视频服务器的服务地址返回给终端包括:
分配会话标识SessionID;
根据所述SLB服务器自身管辖下的HLS视频服务器的性能指标,选择HLS视频服务器,并采用HTTP 302重定向消息将分配的SessionID和选择出的HLS视频服务器的服务地址返回给所述终端。
可选地,所述HLS服务器向终端返回请求的m3u8索引文件并与终端建立HTTP连接包括:
接收来自所述终端的请求m3u8索引文件的消息,记录所述终端对应的SessionID;向所述终端返回携带有ts连接列表的m3u8索引文件响应,其中携带有终端的SessionID;
所述终端收到m3u8索引文件响应后解析出包含的ts连接列表,并向所述HLS视频服务器发起建立HTTP连接请求;其中,所述终端向HLS视频服务器发起的请求中均携带有所述终端对应的SessionID。
可选地,实时监控终端的请求情况,如果在一个请求中未携带SessionID且预设时间内没有新请求发至HLS视频服务器,确定该终端已下线。
可选地,所述统计在线终端用户包括:
所述终端向HLS视频服务器发起的请求中携带SessionID,所述HLS视频服务器记录终端的SessionID。当一个终端使用携带有SessionID的URL请求到该HLS视频服务器时,
判断所述HLS视频服务器自身是否记录有该SessionID,如果有,则将该SessionID对应的并发数量加1;如果未存储,创建该SessionID的记录,并将对应的发数量记为1;同时,所述HLS视频服务器会更新最新时间;
当所述HLS视频服务器完成一个SessionID对应的http请求响应后,将其并发数量减1,并更新最新时间;
所述HLS视频服务器定时扫描所有SessionID信息,当一SessionID的并发数量为0,并且最新时间已经超过离线阈值时间,则确定该SessionID对应的终端已经下线,将Session状态置为下线。
一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述任一项的方法。
与相关技术相比,本文技术方案包括SLB服务器、一个或一个以上HLS视频服务器;其中,SLB服务器,设置为:接收来自终端的HLS HTTP请求,以HTTP 302方式重定向到HLS视频服务器,并将指定的HLS视频服务器的服务地址返回给终端;HLS视频服务器,设置为:接收来自终端的HTTP短连接请求,实时监控每个终端的请求情况,根据发起请求的终端统计在线终端用户。本文提供的基于HLS的能力控制系统适用于基于HTTP的m3u8和ts短连接的视频服务系统,而且,实现了对HLS视频服务器的在线用户数的统计。
附图概述
图1为本发明实施例基于HLS的能力控制服务系统的组成连接示意图;
图2为本发明实施例SLB服务器的组成连接示意图;
图3为本发明实施例基于HLS的能力控制方法的实施例的流程图。
本发明的实施方式
下文中将结合附图对本发明的实施方式进行详细说明。需要说明的是,在不冲突的情况下,本文中的实施例及实施例中的特征可以相互任意组合。
图1为本发明实施例基于HLS的能力控制服务系统的组成连接示意图,如图1所示,至少包括服务器负载均衡(SLB)服务器101、一个或一个以上HLS视频服务器102;其中,
SLB服务器101,设置为:接收来自终端103的HLS HTTP请求,如以HTTP 302方式重定向到HLS视频服务器102,并将指定的HLS视频服务器的服务地址返回给终端103;
HLS视频服务器102,设置为:接收来自终端103的HLS HTTP请求,向终端103返回请求的m3u8索引文件并与终端103建立HTTP连接;实时监控每个终端103的请求情况,根据发起请求的终端103统计在线终端用户。
SLB服务器101设置为:接收来自终端的HLS HTTP请求,为该请求分配会话标识(SessionID);根据自身管辖下的HLS视频服务器的性能指标,选择HLS视频服务器102,并采用HTTP 302重定向消息将分配的SessionID和选择出的HLS视频服务器的服务地址返回给终端103;
其中,HLS HTTP请求是直接来自于终端103的,而且,终端103会根据HTTP 302重定向消息中携带的服务地址,向选择出的HLS视频服务器102请求m3u8索引文件;收到m3u8索引文件响应后解析出包含的ts连接列表,并向HLS视频服务器102发起建立HTTP连接请求;其中,终端103向HLS视频服务器102发起的请求中均携带有终端103对应的SessionID;
HLS视频服务器102是设置为:接收来自终端103的请求m3u8索引文件的消息,记录终端103对应的SessionID,向终端103返回携带有ts连接列表的m3u8索引文件响应,其中携带有终端103的SessionID;并与终端103建立HTTP连接;实时监控终端103的请求情况,如果在一个请求中未携带SessionID且预设时间内存在没有新请求发至HLS视频服务器102,认为该终端103已下线,以统计在线终端用户。
本发明实施例提供的基于HLS的能力控制系统适用于基于HTTP的m3u8和ts短连接的视频服务系统,而且,实现了对HLS视频服务器的在线用户数的统计。
由于根据SessionID信息,SLB服务器可以清楚的获知每个终端分配的用户数目,这样就方便了新用户上线时用户的所属节点的分配,系统根据每个节点相应的负载情况进行实时用户分配,从而实现了选取负载最少,资源最多的节点分配给用户使用,便于整个系统的资源分配,集群调度。当系统受到攻击时,通过用户的SessionID实现了对攻击开始的节点的准确定位以及攻击者的信息,便于系统的安全防御和黑客的锁定。
图2为本发明实施例SLB服务器的组成连接示意图,如图2所示,包括业务分析模块201、会话(Session)控制模块202、HTTP重定向模块203,负载均衡控制模块204,其中,
业务分析模块201,设置为:解析来自终端的HLS HTTP请求,分析出终端请求对应的CP、业务类型、用户个人信息及用户所述归属地信息等请求相关信息,并将得到的请求相关信息输出给Session控制模块202和负载均衡控制模块204;
在HLS HTTP请求中包括有用户终端ID、IP地址、端口号、用户所属区域信息、用户名、密码等一系列用户个人信息,以及用户所属归属地信息。这些信息一部分需要输出给Session控制模块202,比如用户终端ID号、用户名、密码等相关信息,Session控制模块202用这些信息为用户分配一个SessionID;另一些信息比如请求对应的CP、业务类型、用户所属区域信息、IP地址信息等相关信息,需要输出给负载均衡控制模块204,负载均衡控制模块204用这些信息来进行服务器的分发,便于进行负载均衡的控制。
Session控制模块202,设置为:根据请求相关信息为终端请求分配SessionID,并输出给HTTP重定向模块203;
负载均衡控制模块204,设置为:根据请求相关信息,结合自身所在SLB服务器管辖的HLS视频服务器上报的性能指标,为终端选择一个当前最适合的HLS视频服务器,并输出给HTTP重定向模块203;
HTTP重定向模块203,设置为:向终端返回HTTP 302重定向消息,并在消息的HTTP头信息中Location字段携带选择出的HLS视频服务器的服务地址,服务地址的参数中包含给终端分配的SessionID信息。
本发明实施例中,由于在一个有效的服务地址中包含有SessionID,实现了精确统计在线用户数,以及进行最合理的负载分发。
其中,负载均衡控制模块204是设置为:
按照预先设置的周期,定时使用HTTP GET请求向其所在SLB服务器管辖下的每个HLS视频服务器请求性能指标,其中性能指标包括但不限于:服务器允许最大带宽、服务器当前带宽、服务器允许最大并发数、服务器当前并发数,服务器允许最大在线用户数,当前在线用户数等;
当终端发起HLS HTTP请求到SLB服务器时,根据获得的每个HLS视频服务器的性能指标,选择一个当前负载最低的HLS视频服务器来提供服务,并输出给HTTP重定向模块203。
其中,可以采用动态的算法进行对HLS视频服务器的选择。比如算法可以采用加权分配方式对所有HLS视频服务器进行加权比较:根据每台HLS视频服务器的能力进行分权计算,比如服务能力强的HLS视频服务器和服务能力差的HLS视频服务器所用的加权是不同的,得到的结果也是不同的;HLS视频服务器分权结束后,再根据终端的信息进行分权算法处理;最后,根据两者权值相加得到最终的权值进行HLS视频服务器分配。如果出现两个权值相同的情况,进入另一个权值相同的算法,比较HLS视频服务器的能力,然后再比较其他指标进行分配。如果当前每个HLS视频服务器的负载都已经达到预先设置的上限阈值时,负载均衡控制模块204,还设置为:通知业务分析模块201拒绝终端的HLS HTTP请求,直到其管辖下的HLS视频服务器的负载指标下降到可以服务时,通过业务分析模块201接受新的HLS HTTP请求。
对应本发明实施例能力控制系统,本发明实施例基于HLS的能力控制方法包括:SLB服务器接收来自终端的HLS HTTP请求,如以HTTP 302方式重定向到HLS视频服务器,并将指定的HLS视频服务器的服务地址返回给终端;HLS视频服务器接收到来自终端的HLS HTTP请求,向终端返回请求的 m3u8索引文件并与终端建立HTTP连接;实时监控每个终端的请求情况,根据发起请求的终端统计在线终端用户。
图3为本发明实施例基于HLS的能力控制方法的实施例的流程图,如图3所示,包括:
步骤300:终端向SLB服务器发起HTTP Get请求,请求HLS m3u8索引文件。同时,为该请求分配SessionID。
步骤301:SLB服务器向自身管辖下的每个HLS视频服务器发起HTTP Get请求,以获取每个HLS视频服务器的性能指标。
步骤302:每个HLS视频服务器将自身的性能指标上报给SLB服务器。这里性能指标表明了HLS视频服务器当前的运行状态,用于SLB服务器应用加权算法而进行分配HLS服务器所用指标,包含HLS视频服务器当前在线用户数(即独立session数)、当前并发连接数、服务器网络适配器流量等信息。
步骤303:SLB服务器根据预先设置的加权分配方式,判断每个服务器的性能指标,选择出当前最合适的HLS视频服务器,并将服务URL指向该HLS视频服务器;使用HTTP 302重定向消息将为终端分配的SessionID和选择出的HLS视频服务器的服务地址返回给终端,以使终端请求重定向到选择出的HLS视频服务器。
其中,可以采用动态的算法进行对HLS视频服务器的选择。比如采用加权分配方式对所有HLS视频服务器进行加权比较:根据每台HLS视频服务器的能力进行分权计算,比如服务能力强的HLS视频服务器和服务能力差的HLS视频服务器所用的加权是不同的,得到的结果也是不同的;HLS视频服务器分权结束后,再根据终端的信息进行分权算法处理;最后,根据两者权值相加得到最终的权值进行HLS视频服务器分配。如果出现两个权值相同的情况,进入另一个权值相同的算法,比较HLS视频服务器的能力,然后再比较其他指标进行分配。
步骤304:终端根据HTTP 302重定向消息中携带的服务地址,重新向选定的HLS视频服务器发起请求m3u8索引文件的HTTP GET请求。
步骤305:HLS视频服务器记录下终端请求的SessionID并向终端返回 m3u8索引文件响应,在m3u8索引文件内容中的ts请求信息中携带有该终端的SessionID。
步骤306:终端收到m3u8索引文件后,解析出其中包含的ts连接列表,并向该HLS视频服务器发起建立HTTP连接请求,请求中携带有终端的SessionID。
HLS视频服务器在后续与终端的交互中,实时监控每个终端的请求情况,当在服务中的请求中未携带SessionID,且已有预设时间内未有新请求发至HLS视频服务器,则确定该终端用户已下线。
终端向HLS视频服务器发起的请求中都会携带SessionID,HLS视频服务器会记录终端的SessionID。当一个终端使用携带有SessionID的URL请求到该HLS视频服务器时,首先判断HLS视频服务器自身是否记录有该SessionID,如果有,则将该SessionID对应的并发数量加1;如果未存储,创建该SessionID的记录,并将对应的并发数量记为1。同时,HLS视频服务器会更新最新时间。
当HLS视频服务器完成了一个SessionID对应的http请求响应后,将其并发数量减1,并更新最新时间。
HLS视频服务器定时扫描所有SessionID信息,当一SessionID的并发数量为0,并且最新时间已经超过离线阈值时间,则确定该SessionID对应的终端已经下线,将Session状态置为下线。
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件等)执行,在执行时,包括方法实施例的步骤之一或其组合。
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。
上述实施例中的装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成 的网络上。
上述实施例中的装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。
工业实用性
本文提供的基于HLS的能力控制系统适用于基于HTTP的m3u8和ts短连接的视频服务系统,而且实现了对HLS视频服务器的在线用户数的统计。由于根据SessionID信息,SLB服务器可以清楚的获知每个终端分配的用户数目,这样就方便了新用户上线时用户的所属节点的分配,系统根据每个节点相应的负载情况进行实时用户分配,从而实现了选取负载最少,资源最多的节点分配给用户使用,便于整个系统的资源分配,集群调度。当系统受到攻击时,通过用户的SessionID实现了对攻击开始的节点的准确定位以及攻击者的信息,便于系统的安全防御和黑客的锁定。

Claims (15)

  1. 一种基于HLS的能力控制服务系统,包括:服务器负载均衡SLB服务器、一个或一个以上基于超文本传输协议HTTP的实时流传输HLS视频服务器;其中,
    SLB服务器,设置为:接收来自终端的HLS HTTP请求,重定向到HLS视频服务器,并将指定的HLS视频服务器的服务地址返回给终端;
    HLS视频服务器,设置为:接收来自终端的HLS HTTP请求,向终端返回请求的m3u8索引文件并与终端建立HTTP连接;实时监控每个终端的请求情况,根据发起请求的终端统计在线终端用户。
  2. 根据权利要求1所述的能力控制服务系统,其中,所述SLB服务器是设置为:接收来自所述终端的HLS HTTP请求,为该请求分配会话标识SessionID;根据所述SLB服务器自身管辖下的HLS视频服务器的性能指标,选择HLS视频服务器,并采用HTTP 302重定向消息将分配的SessionID和选择出的HLS视频服务器的服务地址返回给所述终端。
  3. 根据权利要求2所述的能力控制服务系统,其中,所述HLS服务器是设置为:
    接收来自终端的请求m3u8索引文件的消息,记录所述终端对应的SessionID;向所述终端返回携带有ts连接列表的m3u8索引文件响应,其中携带有终端的SessionID;并与所述终端建立HTTP连接;
    实时监控所述终端的请求情况,如果在请求中未携带SessionID且预设时间内没有接收到新请求,确定该终端已下线。
  4. 根据权利要求1所述的能力控制服务系统,其中,所述SLB服务器包括业务分析模块、会话Session控制模块、HTTP重定向模块,负载均衡控制模块,其中,
    业务分析模块,设置为:解析来自终端的HLS HTTP请求,分析出终端请求对应的请求相关信息,并将得到的请求相关信息输出给Session控制模块和负载均衡控制模块;
    Session控制模块,设置为:根据请求相关信息为终端请求分配SessionID,并输出给HTTP重定向模块;
    负载均衡控制模块,设置为:根据请求相关信息,结合自身所在SLB服务器管辖的HLS视频服务器上报的性能指标,为终端选择一个当前最适合的HLS视频服务器,并输出给HTTP重定向模块;
    HTTP重定向模块,设置为:向终端返回HTTP 302重定向消息,并在消息的HTTP头信息中Location字段携带选择出的HLS视频服务器的服务地址,服务地址的参数中包含给终端分配的SessionID信息。
  5. 根据权利要求4所述的能力控制服务系统,其中,所述负载均衡控制模块是设置为:
    按照预先设置的周期,定时使用HTTP GET请求向自身所在SLB服务器管辖下的每个HLS视频服务器请求性能指标;
    当所述终端发起HLS HTTP请求到所述SLB服务器时,根据获得的每个HLS视频服务器的性能指标,选择一个当前负载最低的HLS视频服务器来提供服务,并输出给所述HTTP重定向模块。
  6. 根据权利要求5所述的能力控制服务系统,其中,如果当前每个HLS视频服务器的负载都已达到预先设置的上限阈值时,所述负载均衡控制模块还设置为:
    通知所述业务分析模块拒绝终端的HLS HTTP请求,直到所述SLB服务器管辖下的HLS视频服务器的负载指标下降到可以服务时,通知所述业务分析模块接受新的HLS HTTP请求。
  7. 一种SLB服务器,包括业务分析模块、Session控制模块、HTTP重定向模块,负载均衡控制模块,其中,
    业务分析模块,设置为:解析来自终端的HLS HTTP请求,分析出终端请求对应的请求相关信息,并将得到的请求相关信息输出给Session控制模块和负载均衡控制模块;
    Session控制模块,设置为:根据请求相关信息为终端请求分配SessionID,并输出给HTTP重定向模块;
    负载均衡控制模块,设置为:根据请求相关信息,结合自身所在SLB服务器管辖的HLS视频服务器上报的性能指标,为终端选择一个当前最适合的HLS视频服务器,并输出给HTTP重定向模块;
    HTTP重定向模块,设置为:向终端返回HTTP 302重定向消息,并在消息的HTTP头信息中Location字段携带选择出的HLS视频服务器的服务地址,服务地址的参数中包含给终端分配的SessionID信息。
  8. 根据权利要求7所述的SLB服务器,其中,所述负载均衡控制模块是设置为:
    按照预先设置的周期,定时使用HTTP GET请求向自身所在SLB服务器管辖下的每个HLS视频服务器请求性能指标;
    当所述终端发起HLS HTTP请求到所述SLB服务器时,根据获得的每个HLS视频服务器的性能指标,选择一个当前负载最低的HLS视频服务器来提供服务,并输出给HTTP重定向模块。
  9. 根据权利要求8所述的SLB服务器,其中,如果当前每个HLS视频服务器的负载都已达到预先设置的上限阈值时,所述负载均衡控制模块还设置为:
    通知所述业务分析模块拒绝终端的HLS HTTP请求,直到所述SLB服务器管辖下的HLS视频服务器的负载指标下降到可以服务时,通知所述业务分析模块接受新的HLS HTTP请求。
  10. 一种基于HLS的能力控制方法,包括:
    SLB服务器接收来自终端的HLS HTTP请求,重定向到HLS视频服务器,并将指定的HLS视频服务器的服务地址返回给终端;
    HLS视频服务器接收到来自终端的HLS HTTP请求,向终端返回请求的m3u8索引文件并与终端建立HTTP连接;实时监控每个终端的请求情况,根据发起请求的终端统计在线终端用户。
  11. 根据权利要求10所述的能力控制方法,其中,所述重定向到HLS视频服务器,并将指定的HLS视频服务器的服务地址返回给终端包括:
    分配会话标识SessionID;
    根据所述SLB服务器自身管辖下的HLS视频服务器的性能指标,选择HLS视频服务器,并采用HTTP 302重定向消息将分配的SessionID和选择出的HLS视频服务器的服务地址返回给所述终端。
  12. 根据权利要求11所述的能力控制方法,其中,所述HLS服务器向终端返回请求的m3u8索引文件并与终端建立HTTP连接包括:
    接收来自所述终端的请求m3u8索引文件的消息,记录所述终端对应的SessionID;向所述终端返回携带有ts连接列表的m3u8索引文件响应,其中携带有终端的SessionID;
    所述终端收到m3u8索引文件响应后解析出包含的ts连接列表,并向所述HLS视频服务器发起建立HTTP连接请求;其中,所述终端向HLS视频服务器发起的请求中均携带有所述终端对应的SessionID。
  13. 根据权利要求10所述的能力控制方法,其中,实时监控终端的请求情况,如果在一个请求中未携带SessionID且预设时间内没有新请求发至HLS视频服务器,确定该终端已下线。
  14. 根据权利要求12所述的能力控制方法,其中,所述统计在线终端用户包括:
    所述终端向HLS视频服务器发起的请求中携带SessionID,所述HLS视频服务器记录终端的SessionID;当一个终端使用携带有SessionID的URL请求到该HLS视频服务器时,
    判断所述HLS视频服务器自身是否记录有该SessionID,如果有,则将该SessionID对应的并发数量加1;如果未存储,创建该SessionID的记录,并将对应的发数量记为1;同时,所述HLS视频服务器会更新最新时间;
    当所述HLS视频服务器完成一个SessionID对应的http请求响应后,将其并发数量减1,并更新最新时间;
    所述HLS视频服务器定时扫描所有SessionID信息,当一SessionID的并发数量为0,并且最新时间已经超过离线阈值时间,则确定该SessionID对应的终端已经下线,将Session状态置为下线。
  15. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机 可执行指令用于执行权利要求10-14任一项的方法。
PCT/CN2015/080342 2014-10-20 2015-05-29 基于hls的能力控制方法及服务系统和slb服务器 WO2016062089A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP15852270.6A EP3211902B1 (en) 2014-10-20 2015-05-29 Hls-based capability control method, hls-based capability control service system, and slb server

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410559390.6A CN104363472A (zh) 2014-10-20 2014-10-20 基于hls的能力控制方法及服务系统和slb服务器
CN201410559390.6 2014-10-20

Publications (1)

Publication Number Publication Date
WO2016062089A1 true WO2016062089A1 (zh) 2016-04-28

Family

ID=52530691

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/080342 WO2016062089A1 (zh) 2014-10-20 2015-05-29 基于hls的能力控制方法及服务系统和slb服务器

Country Status (3)

Country Link
EP (1) EP3211902B1 (zh)
CN (1) CN104363472A (zh)
WO (1) WO2016062089A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110855787A (zh) * 2019-11-18 2020-02-28 上海新炬网络技术有限公司 基于Consul实现OpenResty动态负载均衡的方法
CN114640655A (zh) * 2020-12-16 2022-06-17 慧盾信息安全科技(北京)有限公司 一种基于hls视频播放的安全视频调阅系统和方法

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104363472A (zh) * 2014-10-20 2015-02-18 中兴通讯股份有限公司 基于hls的能力控制方法及服务系统和slb服务器
CN105657578B (zh) * 2015-10-29 2018-06-29 乐视致新电子科技(天津)有限公司 基于hls协议的直播方法、系统及客户端
CN105681838A (zh) * 2015-12-30 2016-06-15 深圳市云宙多媒体技术有限公司 一种hls直播在线用户统计方法和系统
CN105872613A (zh) * 2016-03-30 2016-08-17 乐视控股(北京)有限公司 进行hls丢片补偿的方法及系统
CN108512865B (zh) * 2017-02-23 2021-04-16 北京宝兰德软件股份有限公司 一种Java应用服务器的EJB容器系统的数据传输方法及装置
CN109818997A (zh) * 2017-11-21 2019-05-28 中兴通讯股份有限公司 一种负载均衡方法、系统及存储介质
CN110620802B (zh) * 2018-06-20 2021-04-09 华为技术有限公司 一种负载均衡方法和装置
CN109005217B (zh) * 2018-07-05 2019-10-25 山东九州信泰信息科技股份有限公司 云计算环境下利用只读变量解决并发冲突的方法
CN109995880A (zh) * 2019-04-15 2019-07-09 苏州浪潮智能科技有限公司 数据访问请求的处理方法、装置及相关设备
CN113259413B (zh) * 2021-04-16 2023-05-09 卓望数码技术(深圳)有限公司 Cdn调度方法、调度系统及存储介质
CN112995234B (zh) * 2021-05-20 2021-07-20 武汉中科通达高新技术股份有限公司 一种媒体传输链路管理方法及装置
CN113873301A (zh) * 2021-09-22 2021-12-31 深圳市商汤科技有限公司 视频流的获取方法及装置、服务器和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103517157A (zh) * 2013-09-27 2014-01-15 武汉市烽视威科技有限公司 实现hls频道时移播放的方法及系统
CN103648019A (zh) * 2013-11-29 2014-03-19 乐视致新电子科技(天津)有限公司 一种基于hls协议的视频下载方法及其装置
CN104080011A (zh) * 2014-07-08 2014-10-01 浪潮软件集团有限公司 一种基于hls协议实现时移系统的方法
CN104079983A (zh) * 2014-06-26 2014-10-01 江苏省邮电规划设计院有限责任公司 一种hls节目录制和服务的系统和方法
CN104363472A (zh) * 2014-10-20 2015-02-18 中兴通讯股份有限公司 基于hls的能力控制方法及服务系统和slb服务器

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7990847B1 (en) * 2005-04-15 2011-08-02 Cisco Technology, Inc. Method and system for managing servers in a server cluster
CN101997822A (zh) * 2009-08-26 2011-03-30 中国移动通信集团公司 一种流媒体内容分发方法、系统和设备
EP3068102B1 (en) * 2011-12-29 2017-11-08 Koninklijke KPN N.V. Network-initiated content streaming control
US9118569B2 (en) * 2013-04-06 2015-08-25 Citrix System, Inc. Systems and methods for TCP Westwood hybrid approach

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103517157A (zh) * 2013-09-27 2014-01-15 武汉市烽视威科技有限公司 实现hls频道时移播放的方法及系统
CN103648019A (zh) * 2013-11-29 2014-03-19 乐视致新电子科技(天津)有限公司 一种基于hls协议的视频下载方法及其装置
CN104079983A (zh) * 2014-06-26 2014-10-01 江苏省邮电规划设计院有限责任公司 一种hls节目录制和服务的系统和方法
CN104080011A (zh) * 2014-07-08 2014-10-01 浪潮软件集团有限公司 一种基于hls协议实现时移系统的方法
CN104363472A (zh) * 2014-10-20 2015-02-18 中兴通讯股份有限公司 基于hls的能力控制方法及服务系统和slb服务器

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110855787A (zh) * 2019-11-18 2020-02-28 上海新炬网络技术有限公司 基于Consul实现OpenResty动态负载均衡的方法
CN114640655A (zh) * 2020-12-16 2022-06-17 慧盾信息安全科技(北京)有限公司 一种基于hls视频播放的安全视频调阅系统和方法
CN114640655B (zh) * 2020-12-16 2024-05-14 慧盾信息安全科技(北京)有限公司 一种基于hls视频播放的安全视频调阅系统和方法

Also Published As

Publication number Publication date
CN104363472A (zh) 2015-02-18
EP3211902A4 (en) 2017-08-30
EP3211902A1 (en) 2017-08-30
EP3211902B1 (en) 2020-06-17

Similar Documents

Publication Publication Date Title
WO2016062089A1 (zh) 基于hls的能力控制方法及服务系统和slb服务器
US12095850B2 (en) Method and system for transmitting data in a computer network
WO2017088381A1 (zh) 一种直播视频的播放方法、装置及系统
US10129122B2 (en) User defined objects for network devices
WO2017088384A1 (zh) 一种直播视频的上传方法、装置及系统
US9549010B2 (en) Method and apparatus for media session identification, tracking, and analysis
EP4362422A2 (en) Network traffic identification method and related device
US9203888B2 (en) Server-side class-of-service-based bandwidth management in over-the-top video delivery
JP5010677B2 (ja) グループトークQoEを実現する方法、システム及び装置
CN102891804A (zh) 控制策略的调整方法及系统
US11640368B2 (en) Acceleration system for facilitating processing of API calls
US20210160294A1 (en) Methods, devices, and systems for live video streaming from a remote location based on a received request utilizing keep alive messages
EP3735768B1 (en) Improving qoe for video and web services using cross-layer information
CN107211035B (zh) 用于在内容递送网络中监测服务的方法和网络节点
Chen et al. Client-driven network-level QoE fairness for encrypted'DASH-S'
WO2016180188A1 (zh) 分发建链方法、装置和系统
CN113099252A (zh) 一种基于sip与rtmp的远程投食器视频推送系统
KR101758065B1 (ko) 부하분산 시스템, 그 제어방법 및 이를 수행하기 위한 기록매체
CN106686034B (zh) Cdn调度增强方法、装置及系统
US20150229734A1 (en) Transparent internet cache and method for providing transparent internet cache
Phan-Xuan et al. Efficiency of QoE-driven network management in adaptive streaming over HTTP
WO2020208393A1 (en) A communication entity and a method for transmitting a video data stream
Nomoto et al. Distributed storage VOD system using XDMS: Implementation and performance evaluation
WO2020204801A1 (en) Method and server for controlling a streaming session of a media asset
KR20130021729A (ko) 분산형 네트워크에서 동적 컨텍스트를 활용한 콘텐츠/서비스 제공 시스템 및 그 방법

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: 15852270

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2015852270

Country of ref document: EP