WO2019169681A1 - 一种提供直播服务的方法和系统 - Google Patents

一种提供直播服务的方法和系统 Download PDF

Info

Publication number
WO2019169681A1
WO2019169681A1 PCT/CN2018/081457 CN2018081457W WO2019169681A1 WO 2019169681 A1 WO2019169681 A1 WO 2019169681A1 CN 2018081457 W CN2018081457 W CN 2018081457W WO 2019169681 A1 WO2019169681 A1 WO 2019169681A1
Authority
WO
WIPO (PCT)
Prior art keywords
transcoding
target
server
live broadcast
data
Prior art date
Application number
PCT/CN2018/081457
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 EP18889956.1A priority Critical patent/EP3567859A4/en
Priority to US16/455,704 priority patent/US20190327496A1/en
Publication of WO2019169681A1 publication Critical patent/WO2019169681A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/40Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
    • 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/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed
    • 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/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234309Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by transcoding between formats or standards, e.g. from MPEG-2 to MPEG-4 or from Quicktime to Realvideo
    • 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/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234354Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering signal-to-noise ratio parameters, e.g. requantization
    • 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/234Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs
    • H04N21/2343Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements
    • H04N21/234363Processing of video elementary streams, e.g. splicing of video streams or manipulating encoded video stream scene graphs involving reformatting operations of video signals for distribution or compliance with end-user requests or end-user device requirements by altering the spatial resolution, e.g. for clients with a lower screen resolution
    • 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
    • H04N21/64322IP
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/156Availability of hardware or computational resources, e.g. encoding based on power-saving criteria

Definitions

  • the present application relates to the field of video processing technologies, and in particular, to a method and system for providing a live broadcast service.
  • the live broadcast service is deployed in the background of the active and standby servers.
  • the live server is provided by the primary server. If the primary server fails, the standby server continues to provide live broadcast services to ensure the stability of live video playback.
  • the live broadcast data can be simultaneously provided to the primary server and the standby server, and the primary server and the standby server can follow the specified transcoding rule (ie, the specified resolution).
  • the code rate transcodes the obtained live data, and encapsulates part of the live data that has been transcoded in real time.
  • the management server can feed back the encapsulated live broadcast data to the outside world.
  • the live broadcast service background needs to perform the same transcoding processing for multiple broadcast transcoding servers according to different transcoding rules. Due to the large number of live broadcast sources, the high hardware cost of the transcoding server, and the limited transcoding capability of the transcoding server, the live broadcast service background often needs to set a large number of transcoding servers, so the cost of providing live broadcast services is relatively high.
  • embodiments of the present application provide a method and system for providing a live broadcast service.
  • the technical solution is as follows:
  • a method of providing a live broadcast service comprising:
  • the management server After obtaining the transcoding request of the target live data, the management server generates N transcoding tasks for the target live data according to the N types of transcoding rules carried in the transcoding request.
  • the management server sends the N transcoding tasks to the target transcoding server, and sends the encapsulation task of the target live data to the target standby server;
  • the target transcoding server acquires the target live broadcast data, transcodes the target live broadcast data according to the at least one transcoding rule, and encapsulates the transcoded target live broadcast data;
  • the target standby server acquires the target live broadcast data, and encapsulates the target live broadcast data
  • the target transcoding server and/or the target standby server provide a live broadcast service through a preset target VIP based on the encapsulated target live broadcast data.
  • the management server sends the encapsulation task of the target live broadcast data to the target standby server, including:
  • the management server sends the encapsulation task of the target live data to the target standby server.
  • the management server sends the N transcoding tasks to the target transcoding server, including:
  • the management server determines M transcoding servers that do not perform transcoding processing on the target live broadcast data
  • the management server determines N target transcoding servers with the lowest load among the M transcoding servers, and sends the N transcoding tasks to the N target transcoding servers respectively. ;
  • the management server determines the lowest load NM among all the transcoding servers after transmitting the M transcoding tasks of the N transcoding tasks to the M transcoding servers respectively.
  • the target transcoding server sends the remaining NM transcoding tasks of the N transcoding tasks to the NM target transcoding servers.
  • the method further includes:
  • the management server determines, according to the pre-stored transcoding task weight table, the weights of all transcoding tasks currently performed by each transcoding server;
  • the management server determines the sum of the weights of all transcoding tasks currently executed by each transcoding server as the weight of each transcoding server;
  • the management server determines the level of the load of each transcoding server according to the weight of each transcoding server.
  • the target transcoding server and/or the target standby server provide a live broadcast service by using a preset target VIP based on the encapsulated target live broadcast data, including:
  • the target transcoding server When the target transcoding server works normally, the target transcoding server provides a live broadcast service through the created target VIP based on the encapsulated target live broadcast data;
  • the target standby server provides a live broadcast service through the created target VIP based on the encapsulated target live broadcast data.
  • a system for providing a live broadcast service comprising a management server, a target transcoding server, and a target standby server, wherein:
  • the management server is configured to generate N transcoding tasks for the target live data according to the N types of transcoding rules carried in the transcoding request after obtaining the transcoding request of the target live data. Transmitting, by the target transcoding server, the N transcoding tasks, and sending the encapsulation task of the target live data to the target standby server;
  • the target transcoding server is configured to obtain the target live broadcast data, transcode the target live broadcast data according to the at least one transcoding rule, and encapsulate the transcoded target live broadcast data, after the encapsulation Target live data, providing live broadcast service through a preset target VIP;
  • the target standby server is configured to acquire the target live broadcast data, and encapsulate the target live broadcast data, and provide a live broadcast service by using a preset target VIP based on the encapsulated target live broadcast data.
  • the management server is specifically configured to:
  • the encapsulation task of the target live broadcast data is sent to the target standby server.
  • the management server is specifically configured to:
  • M is greater than or equal to N, determining N target transcoding servers with the lowest load in the M transcoding servers, and transmitting the N transcoding tasks to the N target transcoding servers respectively;
  • the NM target transcoding servers with the lowest load are determined among all the transcoding servers. And sending the remaining NM transcoding tasks of the N transcoding tasks to the NM target transcoding servers.
  • the management server is further configured to:
  • the level of the load of each transcoding server is determined according to the weight of each transcoding server.
  • the target transcoding server is specifically configured to provide a live broadcast service by using a preset target VIP according to the encapsulated target live broadcast data when the target transcoding server works normally;
  • the target standby server is specifically configured to provide a live broadcast service by using a preset target VIP according to the encapsulated target live broadcast data when the target transcoding server fails.
  • the management server after obtaining the transcoding request of the target live data, the management server generates N transcoding tasks for the target live data according to the N types of transcoding rules carried in the transcoding request, and the management server turns to the target.
  • the code server sends N transcoding tasks, and sends the target live data encapsulation task to the target standby server.
  • the target transcoding server obtains the target live data, transcodes the target live data according to at least one transcoding rule, and transcodes the target.
  • the target standby server After the target live broadcast data is encapsulated, the target standby server obtains the target live broadcast data, and encapsulates the target live broadcast data, and the target transcoding server and/or the target standby server are based on the encapsulated target live broadcast data, and provide live broadcast through the preset target VIP. service.
  • an ordinary server with a lower hardware cost can be used as a standby server, and multiple transcoding servers that transcode the same live data can use the same server as a standby server, thereby reducing the transcoding server required for the live broadcast service background. Quantity, which can reduce the cost of providing live broadcast services.
  • FIG. 1 is a schematic diagram of a system framework for providing a live broadcast service according to an embodiment of the present application
  • FIG. 2 is a flowchart of a method for providing a live broadcast service according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of a VIP of a transcoding server and a standby server according to an embodiment of the present application
  • FIG. 4 is a schematic diagram of a system framework for providing a live broadcast service according to an embodiment of the present application
  • FIG. 5 is a schematic diagram of a system framework for providing a live broadcast service according to an embodiment of the present application.
  • the embodiment of the present application provides a method for providing a live broadcast service, which may be implemented by a management server, a transcoding server, and a standby server in a live data processing system.
  • the management server may be configured to receive a transcoding request for the live data, generate a corresponding transcoding task, and allocate the transcoding task; the transcoding server may be a server of the transcoding server group in the live data processing system, and may be used for The transcoding server group can be transcoded and encapsulated.
  • the transcoding server group can include multiple transcoding servers.
  • the standby server can be used as a backup server group in the live data processing system.
  • the server group can contain multiple standby servers.
  • the specific system framework can be seen in Figure 1.
  • Each of the foregoing servers may include a processor, a memory, and a transceiver.
  • the processor may be configured to perform a process of providing a live broadcast service in the following process
  • the memory may be used to store data and generated data in the following processing process, and send and receive data.
  • the device can be used to receive and transmit relevant data in the following processing.
  • Step 201 After receiving the transcoding request of the target live data, the management server generates N transcoding tasks for the target live data according to the N types of transcoding rules carried in the transcoding request.
  • the management server may obtain a transcoding request of the target live broadcast data.
  • the live data processing system is a built-in system in the background of the live broadcast service
  • the above-mentioned transcoding request may be manually set by the technical personnel in the background of the live broadcast service on the management server, or sent by other servers in the background of the live broadcast service.
  • the live data processing system is independent of the system of the live broadcast service
  • the above transcoding request may be sent by the live broadcast service backend system to the management server.
  • the above transcoding request may carry N (N is a positive integer) transcoding rules, and each transcoding rule records a specified target resolution and a target bit rate.
  • the management server may extract N types of transcoding rules in the transcoding request, and may generate a transcoding task of the target live data according to each transcoding rule, so that a total of N transcoding tasks may be generated, wherein
  • Each transcoding task may include a URL (Uniform Resource Locator) of the target live data, a target resolution, and a target bit rate.
  • the live data corresponding to each transcoding task can be identified by the identification information.
  • the transcoding tasks of different live data may have different identification information, and the identification information of the transcoding task of the same live data is the same.
  • the identification information can be set by the management server or can be set by a third party system.
  • Step 202 The management server sends N transcoding tasks to the target transcoding server, and sends a package task of the target live data to the target standby server.
  • the management server may select at least one target transcoding server in the transcoding server group, and then send the N transcoding tasks to the at least one target transcoding server. .
  • the management server may select at least one target standby server in the standby server group, and then send the package task of the target live broadcast data to the at least one target standby server.
  • the transcoding task includes transcoding and encapsulation processing of the live data.
  • the encapsulation task only includes encapsulation processing of the live data. Therefore, the target standby server does not need to transcode the live data, and the performance can be selected to be low.
  • the server device of the target transcoding server can reduce the equipment input cost.
  • Step 203 The target transcoding server obtains the target live broadcast data, transcodes the target live broadcast data according to at least one transcoding rule, and encapsulates the transcoded target live broadcast data.
  • the target transcoding server may receive the transcoding task sent by the management server, and then obtain the target live broadcast data from the live broadcast source based on the URL of the target live data included in the transcoding task. Afterwards, the target transcoding server may transcode the resolution and code rate of the target live data into the target resolution and the target code rate specified in the transcoding rule according to the transcoding rules included in the received transcoding task. Further, the target transcoding server may encapsulate the transcoded target live broadcast data. It should be noted that the target transcoding server in this step may be multiple, and each target transcoding server may perform one or more transcoding tasks in each of the N transcoding tasks according to this step, and each transcoding is performed. The task is only responsible for one target transcoding server.
  • Step 204 The target standby server acquires target live broadcast data, and encapsulates the target live broadcast data.
  • the target standby server may receive the encapsulation task sent by the management server, and then obtain the target live broadcast data from the live broadcast source based on the URL of the target live broadcast data included in the encapsulation task. Afterwards, the target standby server can encapsulate the obtained target live broadcast data, thereby obtaining encapsulated live broadcast data of the original code rate and the original resolution. It should be noted that the target standby server in this step may be a group that includes multiple standby servers, and each standby server in the group may perform the same encapsulation process on the target live data.
  • the standby server group includes multiple groups, and different groups handle the encapsulation tasks of different live data, and multiple standby servers in the same group process the same encapsulation task. Therefore, when the processing capacity of the standby server group reaches the upper limit.
  • the expansion can be done by adding a group.
  • the group when the group is idle, the group can be deleted, thereby saving equipment.
  • Step 205 The target transcoding server and/or the target standby server provide a live broadcast service by using a preset target VIP (Virtual IP Address) based on the encapsulated target live broadcast data.
  • a preset target VIP Virtual IP Address
  • a VIP Virtual IP Address
  • the VIP shared between the standby server and each existing transcoding server is also created, so that there is a preset target VIP between each target transcoding server and each target standby server currently deployed.
  • the target transcoding server and the target standby server can provide a live broadcast service through the corresponding preset target VIP based on the encapsulated target live broadcast data, so that the two can be switched at will.
  • multiple target standby servers may form a group, and each target transcoding server creates a different target VIP with the group.
  • each target transcoding server creates a different target VIP with the group.
  • FIG. 3 Shown.
  • the management server does not need to send the encapsulation task to the standby server again after receiving the transcoding request of the target live data, and directly determines that the standby server that processes the encapsulation task is
  • the target standby server correspondingly, the partial processing of step 202 may be as follows: if the transcoding request of the target live data is not received before the transcoding request of the target live broadcast data is received, the management server sends the target to the target standby server. The task of packaging live data.
  • the management server may detect whether the management server has received the transcoding request of the same target live broadcast data before the transcoding request of the live broadcast data of the current destination. If the corresponding transcoding request has not been received, the management server may send the encapsulation task of the target live data to the target standby server; if the corresponding transcoding request has been received, the management server has sent the target live broadcast data to the standby server group.
  • the encapsulation task in turn, the management server only needs to determine the standby server that encapsulates the target live data as the target standby server, so as to determine the VIP shared between each target transcoding server and the target standby server, thereby providing a live broadcast service through these VIPs. .
  • the management server may divide the different transcoding tasks of the same live data into all the transcoding servers.
  • the partial processing of step 202 may be as follows: the management server determines that the target live data is not transcoded. Transcoding server; if M is greater than or equal to N, the management server determines the N target transcoding servers with the lowest load among the M transcoding servers, and sends the N transcoding tasks to the N target transcoding servers respectively; If M is less than N, the management server determines the NM target transcoding servers with the lowest load among all the transcoding servers after transmitting the M transcoding tasks of the N transcoding tasks to the M transcoding servers respectively. The remaining NM transcoding tasks are sent to these target transcoding servers, respectively. In this way, the load of each transcoding server can be balanced to some extent.
  • the management server may first determine that M (M is a natural number) of the plurality of transcoding servers that are not currently transcoding the target live data.
  • a code server ie, a transcoding server for all transcoding tasks that are not assigned live broadcast data. If M is greater than or equal to N, the management server may determine the N target transcoding servers with the lowest load among the M transcoding servers, and then send the N transcoding tasks to the N target transcoding servers respectively, that is, one target rotation.
  • the code server assigns a transcoding task.
  • the management server may first send any M transcoding tasks of the N transcoding tasks to the M transcoding servers, and then determine the lowest loaded NM target transcoding among all the transcoding servers. The server then sends the remaining NM transcoding tasks to the NM target transcoding servers respectively. Similarly, when the management server selects the target standby server, it can also select multiple standby servers with lower load.
  • the load of each transcoding server may be determined according to the currently performed transcoding task, and the corresponding processing may be as follows: the management server determines, according to the pre-stored transcoding task weight table, the current current of each transcoding server. The weight of all transcoding tasks performed; the management server determines the sum of the weights of all transcoding tasks currently executed by each transcoding server as the weight of each transcoding server; the management server follows each transcoding server The size of the weight determines the level of load of each transcoding server.
  • the technician of the live data processing system can determine the load size of the transcoding server occupied by different transcoding tasks according to the original resolution, the original code rate, the target resolution and the target bit rate corresponding to the transcoding task, and The weight is expressed in the form of a weight, so that a transcoding task weight table can be created (refer to Table 1), and then the transcoding task weight table is stored in the management server.
  • the management server may first determine the weights of all transcoding tasks currently executed by each transcoding server according to the transcoding task weight table, and then transcode each The sum of the weights of all transcoding tasks currently executed by the server is determined as the weight of each transcoding server. Further, the management server can determine the level of the load of each transcoding server according to the weight of each transcoding server, wherein the smaller the weight, the lower the load of the transcoding server.
  • the target standby server may continue to provide the live broadcast service instead of the target transcoding server when the target transcoding server fails.
  • the processing of step 205 may be as follows: when the target transcoding server works normally, the target transcoding server Based on the encapsulated target live broadcast data, the live broadcast service is provided through the preset target VIP. When the target transcoding server fails, the target standby server provides the live broadcast service through the preset target VIP based on the encapsulated target live broadcast data.
  • the terminal may send an acquisition request of the target live broadcast data to the target VIP. If the target transcoding server is in a normal working state and the target VIP is directed to the target transcoding server, the target transcoding server may receive the foregoing obtaining request, and then the encapsulated target live broadcast data may be fed back to the terminal. If the target transcoding server is in a fault state, the target VIP is directed to the target standby server, and the target standby server can receive the foregoing obtaining request, and then the encapsulated target live broadcast data can be fed back to the terminal.
  • the active/standby service software can be installed on the target transcoding server and the target standby server.
  • the active and standby service software can be used to adjust the IP displayed by the server. Specifically, when the target transcoding server works normally, the active/standby service software on the target transcoding server modifies the externally displayed IP to the preset target VIP, and the active and standby service software on the target standby server will display the IP setting of the external display. If the target transcoding server fails, the active/standby service software on the target transcoding server sets the externally displayed IP to the local IP address, and the active/standby service software on the target standby server will modify the IP displayed externally. The target VIP for the preset.
  • the backup switching of the target transcoding server in the event of a failure can be achieved, so that the user can smoothly obtain the live data, thereby reducing the bad user experience caused by the failure as much as possible, and when the target transcoding server returns to normal, It can be switched back to the target transcoding server from the target standby server in time to restore the normal bit rate and resolution display as soon as possible, thus ensuring the user experience.
  • the transcoding request of the target live data received by the management server is converted into different transcoding tasks according to the specified different target resolution and target code rate, and is allocated to at least one
  • the target transcoding server sets a target standby server for each transcoding task corresponding to the target live broadcast data to provide a backup service when any target transcoding server fails, that is, each transcoding task corresponding to the same live data. They all correspond to the same target backup server, and do not need to allocate a standby server for each transcoding task to process the backup task, thereby saving the backup server resources, and can be guaranteed by the scheduling policy setting and the management of the standby server group.
  • the utilization of the standby server is not be used to allocate a standby server for each transcoding task to process the backup task.
  • the management server after obtaining the transcoding request of the target live data, the management server generates N transcoding tasks for the target live data according to the N types of transcoding rules carried in the transcoding request, and the management server turns to the target.
  • the code server sends N transcoding tasks, and sends the target live data encapsulation task to the target standby server.
  • the target transcoding server obtains the target live data, transcodes the target live data according to at least one transcoding rule, and transcodes the target.
  • the target standby server After the target live broadcast data is encapsulated, the target standby server obtains the target live broadcast data, and encapsulates the target live broadcast data, and the target transcoding server and/or the target standby server are based on the encapsulated target live broadcast data, and provide live broadcast through the preset target VIP. service.
  • an ordinary server with a lower hardware cost can be used as a standby server, and multiple transcoding servers that transcode the same live data can use the same server as a standby server, thereby reducing the transcoding server required for the live broadcast service background. Quantity, which can reduce the cost of providing live broadcast services.
  • the embodiment of the present application further provides a system for providing a live broadcast service, where the system includes a management server, a target transcoding server, and a target standby server, where:
  • the management server is configured to generate N transcoding tasks for the target live data according to the N types of transcoding rules carried in the transcoding request after obtaining the transcoding request of the target live data. Transmitting, by the target transcoding server, the N transcoding tasks, and sending the encapsulation task of the target live data to the target standby server;
  • the target transcoding server is configured to obtain the target live broadcast data, transcode the target live broadcast data according to the at least one transcoding rule, and encapsulate the transcoded target live broadcast data, after the encapsulation Target live data, providing live broadcast service through a preset target VIP;
  • the target standby server is configured to acquire the target live broadcast data, and encapsulate the target live broadcast data, and provide a live broadcast service by using a preset target VIP based on the encapsulated target live broadcast data.
  • the management server is specifically configured to:
  • the encapsulation task of the target live broadcast data is sent to the target standby server.
  • the management server is specifically configured to:
  • M is greater than or equal to N, determining N target transcoding servers with the lowest load in the M transcoding servers, and transmitting the N transcoding tasks to the N target transcoding servers respectively;
  • the NM target transcoding servers with the lowest load are determined among all the transcoding servers. And sending the remaining NM transcoding tasks of the N transcoding tasks to the NM target transcoding servers.
  • the management server is further configured to:
  • the level of the load of each transcoding server is determined according to the weight of each transcoding server.
  • the target transcoding server is specifically configured to provide a live broadcast service by using a preset target VIP according to the encapsulated target live broadcast data when the target transcoding server works normally;
  • the target standby server is specifically configured to provide a live broadcast service by using a preset target VIP according to the encapsulated target live broadcast data when the target transcoding server fails.
  • the above system may be a live data processing system, and the system may include a management server, a transcoding server group, and a standby server group.
  • the transcoding server group may include multiple transcoding servers, and each transcoding server.
  • the transcoding and encapsulation tasks of multiple live data can be performed.
  • the standby server group can include multiple standby servers, and each standby server can perform multiple encapsulation tasks of live data.
  • the function of each of the above transcoding servers can be implemented by a transcoding server group composed of a plurality of transcoding servers.
  • the functions of each standby server can also be performed by multiple devices.
  • the backup server group formed by the server is implemented.
  • the transcoding server group/standby server group can be expanded to increase the capacity. Accordingly, when the transcoding server group is used.
  • the processing capacity of the standby server group is excessive, some groups in the idle state can be deleted, thereby saving the device.
  • the management server after obtaining the transcoding request of the target live data, the management server generates N transcoding tasks for the target live data according to the N types of transcoding rules carried in the transcoding request, and the management server turns to the target.
  • the code server sends N transcoding tasks, and sends the target live data encapsulation task to the target standby server.
  • the target transcoding server obtains the target live data, transcodes the target live data according to at least one transcoding rule, and transcodes the target.
  • the target standby server After the target live broadcast data is encapsulated, the target standby server obtains the target live broadcast data, and encapsulates the target live broadcast data, and the target transcoding server and/or the target standby server are based on the encapsulated target live broadcast data, and provide live broadcast through the preset target VIP. service.
  • an ordinary server with a lower hardware cost can be used as a standby server, and multiple transcoding servers that transcode the same live data can use the same server as a standby server, thereby reducing the transcoding server required for the live broadcast service background. Quantity, which can reduce the cost of providing live broadcast services.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本申请公开了一种提供直播服务的方法和系统,属于视频处理技术领域。所述方法包括:管理服务器在获取到目标直播数据的转码请求后,根据转码请求中携带的N种转码规则对应生成对于目标直播数据的N个转码任务;管理服务器向目标转码服务器发送N个转码任务,并向目标备服务器发送目标直播数据的封装任务;目标转码服务器获取目标直播数据,按照至少一种转码规则对目标直播数据进行转码,并对转码后的目标直播数据进行封装;目标备服务器获取目标直播数据,并对目标直播数据进行封装;目标转码服务器和/或目标备服务器基于封装后的目标直播数据,通过预设的目标VIP提供直播服务。采用本申请,可以降低提供直播服务的成本。

Description

一种提供直播服务的方法和系统 技术领域
本申请涉及视频处理技术领域,特别涉及一种提供直播服务的方法和系统。
背景技术
目前直播服务后台多采用主备服务器的部署方式,一般情况下由主服务器提供直播服务,如果主服务器出现故障,则由备服务器继续提供直播服务,以保证直播视频的播放稳定性。
具体来说,直播服务后台的管理服务器从直播源获取到直播数据后,可以将直播数据同时提供给主服务器和备服务器,主服务器和备服务器可以按照指定的转码规则(即指定的分辨率和码率)对获取到的直播数据进行转码处理,并实时对已转码完的部分直播数据进行封装。这样,管理服务器在接收到外界对于直播数据的获取请求后,可以向外界反馈封装后的直播数据。
在实现本申请的过程中,发明人发现现有技术至少存在以下问题:
受播放终端多样、用户需求不同的影响,直播服务后台需要对同一直播数据,通过多个转码服务器分别按照不同的转码规则进行多种转码处理。而由于直播源的数量较多、转码服务器的硬件成本较高、转码服务器的并行转码能力有限等,直播服务后台往往需要设置大量的转码服务器,故而提供直播服务的成本较高。
发明内容
为了解决现有技术的问题,本申请实施例提供了一种提供直播服务的方 法和系统。所述技术方案如下:
第一方面,提供了一种提供直播服务的方法,所述方法包括:
管理服务器在获取到目标直播数据的转码请求后,根据所述转码请求中携带的N种转码规则对应生成对于所述目标直播数据的N个转码任务;
所述管理服务器向目标转码服务器发送所述N个转码任务,并向目标备服务器发送所述目标直播数据的封装任务;
所述目标转码服务器获取所述目标直播数据,按照所述至少一种转码规则对所述目标直播数据进行转码,并对转码后的目标直播数据进行封装;
所述目标备服务器获取所述目标直播数据,并对所述目标直播数据进行封装;
所述目标转码服务器和/或所述目标备服务器基于封装后的目标直播数据,通过预设的目标VIP提供直播服务。
可选的,所述管理服务器向目标备服务器发送所述目标直播数据的封装任务,包括:
如果在本次接收所述目标直播数据的转码请求之前,未接收到所述目标直播数据的转码请求,所述管理服务器则向目标备服务器发送所述目标直播数据的封装任务。
可选的,所述管理服务器向目标转码服务器发送所述N个转码任务,包括:
所述管理服务器确定未对所述目标直播数据进行转码处理的M个转码服务器;
如果M大于或等于N,所述管理服务器则在M个转码服务器中确定负载最低的N个目标转码服务器,并将所述N个转码任务分别发送至所述N个目标转码服务器;
如果M小于N,所述管理服务器则在将所述N个转码任务中的M个转码任务分别发送至所述M个转码服务器之后,在所有转码服务器中确定负载最 低的N-M个目标转码服务器,并将所述N个转码任务中剩余的N-M个转码任务分别发送至所述N-M个目标转码服务器。
可选的,所述方法还包括:
所述管理服务器根据预先存储的转码任务权值表,确定每个转码服务器当前执行的所有转码任务的权值;
所述管理服务器将每个转码服务器当前执行的所有转码任务的权值之和,确定为每个转码服务器的权值;
所述管理服务器按照每个转码服务器的权值的大小判断每个转码服务器的负载的高低。
可选的,所述目标转码服务器和/或所述目标备服务器基于封装后的目标直播数据,通过预设的目标VIP提供直播服务,包括:
当所述目标转码服务器正常工作时,所述目标转码服务器基于封装后的目标直播数据,通过创建的目标VIP提供直播服务;
当所述目标转码服务器出现故障时,所述目标备服务器基于封装后的目标直播数据,通过创建的目标VIP提供直播服务。
第二方面,提供了一种提供直播服务的系统,所述系统包括管理服务器、目标转码服务器和目标备服务器,其中:
所述管理服务器,用于在获取到目标直播数据的转码请求后,根据所述转码请求中携带的N种转码规则对应生成对于所述目标直播数据的N个转码任务,向所述目标转码服务器发送所述N个转码任务,并向所述目标备服务器发送所述目标直播数据的封装任务;
所述目标转码服务器,用于获取所述目标直播数据,按照所述至少一种转码规则对所述目标直播数据进行转码,并对转码后的目标直播数据进行封装,基于封装后的目标直播数据,通过预设的目标VIP提供直播服务;
所述目标备服务器,用于获取所述目标直播数据,并对所述目标直播数 据进行封装,基于封装后的目标直播数据,通过预设的目标VIP提供直播服务。
可选的,所述管理服务器,具体用于:
如果在本次接收所述目标直播数据的转码请求之前,未接收到所述目标直播数据的转码请求,则向目标备服务器发送所述目标直播数据的封装任务。
可选的,所述管理服务器,具体用于:
确定未对所述目标直播数据进行转码处理的M个转码服务器;
如果M大于或等于N,则在M个转码服务器中确定负载最低的N个目标转码服务器,并将所述N个转码任务分别发送至所述N个目标转码服务器;
如果M小于N,则在将所述N个转码任务中的M个转码任务分别发送至所述M个转码服务器之后,在所有转码服务器中确定负载最低的N-M个目标转码服务器,并将所述N个转码任务中剩余的N-M个转码任务分别发送至所述N-M个目标转码服务器。
可选的,所述管理服务器,还用于:
根据预先存储的转码任务权值表,确定每个转码服务器当前执行的所有转码任务的权值;
将每个转码服务器当前执行的所有转码任务的权值之和,确定为每个转码服务器的权值;
按照每个转码服务器的权值的大小判断每个转码服务器的负载的高低。
可选的,所述目标转码服务器,具体用于当所述目标转码服务器正常工作时,基于封装后的目标直播数据,通过预设的目标VIP提供直播服务;
所述目标备服务器,具体用于当所述目标转码服务器出现故障时,基于封装后的目标直播数据,通过预设的目标VIP提供直播服务。
本申请实施例提供的技术方案带来的有益效果是:
本申请实施例中,管理服务器在获取到目标直播数据的转码请求后,根据转码请求中携带的N种转码规则对应生成对于目标直播数据的N个转码任务,管理服务器向目标转码服务器发送N个转码任务,并向目标备服务器发送目标 直播数据的封装任务,目标转码服务器获取目标直播数据,按照至少一种转码规则对目标直播数据进行转码,并对转码后的目标直播数据进行封装,目标备服务器获取目标直播数据,并对目标直播数据进行封装,目标转码服务器和/或目标备服务器基于封装后的目标直播数据,通过预设的目标VIP提供直播服务。这样,可以采用硬件成本较低的普通服务器作为备服务器,同时对相同直播数据进行转码的多个转码服务器,可以采用同一服务器作为备服务器,减少了直播服务后台所需的转码服务器的数量,从而可以降低提供直播服务的成本。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本申请实施例提供的一种提供直播服务的系统框架示意图;
图2是本申请实施例提供的一种提供直播服务的方法流程图;
图3是本申请实施例提供的一种转码服务器和备服务器的VIP示意图;
图4是本申请实施例提供的一种提供直播服务的系统框架示意图;
图5是本申请实施例提供的一种提供直播服务的系统框架示意图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
本申请实施例提供了一种提供直播服务的方法,该方法可以由直播数据处理系统中的管理服务器、转码服务器和备服务器共同实现。其中,管理服务器可以用于接收对于直播数据的转码请求,生成相应的转码任务,并对转码任务进行分配;转码服务器可以是直播数据处理系统中转码服务器组的服务器, 可以用于对直播数据进行转码、封装等处理,转码服务器组中可以包含有多个转码服务器;备服务器可以属于直播数据处理系统中的备服务器组,可以用于对直播数据进行封装处理,备服务器组中可以包含有多个备服务器,具体的系统框架可以参照图1所示。上述服务器中均可以包括处理器、存储器、收发器,处理器可以用于进行下述流程中的提供直播服务的处理,存储器可以用于存储下述处理过程中需要的数据以及产生的数据,收发器可以用于接收和发送下述处理过程中的相关数据。
下面将结合具体实施方式,对图2所示的处理流程进行详细的说明,内容可以如下:
步骤201,管理服务器在接收到目标直播数据的转码请求后,根据转码请求中携带的N种转码规则对应生成对于目标直播数据的N个转码任务。
在实施中,当需要对某直播频道的直播数据(如目标直播数据)进行转码处理时,管理服务器可以获取到目标直播数据的转码请求。在一种情况下,如果直播数据处理系统为直播服务后台的内置系统,则上述转码请求可以是直播服务后台的技术人员在管理服务器上手动设置的,或者是由直播服务后台的其他服务器发送给管理服务器的;在另一种情况下,如果直播数据处理系统为独立于直播服务后台之外的系统,则上述转码请求可以是直播服务后台系统发送至管理服务器的。
上述转码请求中可以携带有N(N为正整数)种转码规则,每种转码规则都记录有指定的目标分辨率和目标码率。之后,管理服务器可以提取该转码请求中的N种转码规则,并可以基于每一种转码规则,对应生成一个目标直播数据的转码任务,进而总共可以生成N个转码任务,其中,每个转码任务可以包含目标直播数据的URL(Uniform Resource Locator,统一资源定位符)、目标分辨率和目标码率。值得一提的是,可以通过标识信息来标识每个转码任务所对应的直播数据,不同直播数据的转码任务可以有不同的标识信息,同一直播数据的转码任务的标识信息相同,该标识信息可以由管理服务器设定,或者可 以由第三方系统设定。
步骤202,管理服务器向目标转码服务器发送N个转码任务,并向目标备服务器发送目标直播数据的封装任务。
在实施中,管理服务器在基于转码请求生成了N个转码任务后,可以在转码服务器组中选择至少一个目标转码服务器,然后向至少一个目标转码服务器发送上述N个转码任务。同时,管理服务器可以在备服务器组中选择至少一个目标备服务器,然后向至少一个目标备服务器发送目标直播数据的封装任务。
值得一提的是,转码任务包含对于直播数据的转码和封装处理,封装任务仅包含对于直播数据的封装处理,故而目标备服务器无需对直播数据进行转码处理,则可以选用性能远低于目标转码服务器的服务器设备,如此一来,可降低设备投入成本。
步骤203,目标转码服务器获取目标直播数据,按照至少一种转码规则对目标直播数据进行转码,并对转码后的目标直播数据进行封装。
在实施中,目标转码服务器可以接收到管理服务器发送的转码任务,然后可以基于转码任务中包含的目标直播数据的URL,从直播源处获取目标直播数据。之后,目标转码服务器可以按照接收到的转码任务中包含的转码规则,将目标直播数据的分辨率和码率转码为转码规则中指定的目标分辨率和目标码率。进而,目标转码服务器可以对转码后的目标直播数据进行封装。需要说明的是,本步骤中的目标转码服务器可以为多个,每个目标转码服务器可以按照本步骤进行N个转码任务中的一个或多个转码任务的处理,每个转码任务仅由一个目标转码服务器负责。
步骤204,目标备服务器获取目标直播数据,并对目标直播数据进行封装。
在实施中,目标备服务器可以接收到管理服务器发送的封装任务,然后可以基于封装任务中包含的目标直播数据的URL,从直播源处获取目标直播数据。之后,目标备服务器可以对获取到的目标直播数据进行封装,从而获得原始码率、原始分辨率的封装直播数据。需要说明的是,本步骤中的目标备服务 器可以为包含多个备服务器的小组,其中小组中的每个备服务器可以对目标直播数据进行同样的封装处理。
进一步的,备服务器组中包含有多个小组,不同小组处理不同直播数据的封装任务,而同一小组内部的多个备服务器处理相同的封装任务,因此,当备服务器组的处理能力达到上限时,可通过增加小组的方式来进行扩容,相应的,当小组处于空闲状态时,可将该小组进行删除,从而节省设备。
步骤205,目标转码服务器和/或目标备服务器基于封装后的目标直播数据,通过预设的目标VIP(Virtual IP Address,虚拟IP地址)提供直播服务。
具体的,在部署每一个转码服务器时,都会分别对应创建该转码服务器与每个备服务器之间共用的VIP(Virtual IP Address,虚拟IP地址),同样的,在新增一个备服务器时,也会分别创建该备服务器与现存的每个转码服务器之间共用的VIP,从而使得当前部署的每一个目标转码服务器与每一个目标备服务器之间都会有一个预设的目标VIP。这样,目标转码服务器和目标备服务器可以基于封装后的目标直播数据,通过对应的预设目标VIP提供直播服务,如此两者之间可进行随意切换。
考虑上述多个目标转码服务器和多个目标备服务器的情况,多个目标备服务器可以构成一个小组,每个目标转码服务器均与该小组创建有各自不同的目标VIP,具体可以参考图3所示。
可选的,如果当前目标直播数据的封装任务已存在,管理服务器则在接收到该目标直播数据的转码请求后无需再次向备服务器发送封装任务,而直接确定处理该封装任务的备服务器为目标备服务器,相应的,步骤202的部分处理可以如下:如果在本次接收目标直播数据的转码请求之前,未接收到该目标直播数据的转码请求,管理服务器则向目标备服务器发送目标直播数据的封装任务。
在实施中,管理服务器在接收到目标直播数据的转码请求后,可以检测在本次接收目标直播数据的转码请求之前,管理服务器是否已接收过同一目标 直播数据的转码请求。如果未接收过相应的转码请求,管理服务器则可以向目标备服务器发送目标直播数据的封装任务;如果已接收过相应的转码请求,则表示管理服务器已向备服务器组发送过目标直播数据的封装任务,进而,管理服务器只需确定对目标直播数据进行封装处理的备服务器为目标备用服务器,以便确定各目标转码服务器与目标备服务器之间共用的VIP,从而通过这些VIP提供直播服务。
可选的,管理服务器可以将同一直播数据的不同转码任务均分到所有转码服务器中,相应的,步骤202的部分处理可以如下:管理服务器确定未对目标直播数据进行转码处理的M个转码服务器;如果M大于或等于N,管理服务器则在M个转码服务器中确定负载最低的N个目标转码服务器,并将N个转码任务分别发送至N个目标转码服务器;如果M小于N,管理服务器则在将N个转码任务中的M个转码任务分别发送至M个转码服务器之后,在所有转码服务器中确定负载最低的N-M个目标转码服务器,并将剩余的N-M个转码任务分别发送至这些目标转码服务器。如此一来,可以在一定程度上均衡各转码服务器的负载。
在实施中,管理服务器在多个转码服务器中选择目标转码服务器的过程中,可以先确定多个转码服务器中当前未对目标直播数据进行转码处理的M(M为自然数)个转码服务器(即所有未被分配目标直播数据的转码任务的转码服务器)。如果M大于或等于N,管理服务器则可以在M个转码服务器中确定负载最低的N个目标转码服务器,然后将N个转码任务分别发送至N个目标转码服务器,即一个目标转码服务器分配一个转码任务。如果M小于N,管理服务器则可以先将N个转码任务中的任意M个转码任务分别发送至M个转码服务器,再在所有转码服务器中确定出负载最低的N-M个目标转码服务器,然后将剩余的N-M个转码任务分别发送至上述N-M个目标转码服务器。同理,管理服务器在选择目标备服务器时,也可以选取负载较低的多个备服务器。
可选的,可以根据当前执行的转码任务来判断每个转码服务器的负载的 高低,相应的处理可以如下:管理服务器根据预先存储的转码任务权值表,确定每个转码服务器当前执行的所有转码任务的权值;管理服务器将每个转码服务器当前执行的所有转码任务的权值之和,确定为每个转码服务器的权值;管理服务器按照每个转码服务器的权值的大小判断每个转码服务器的负载的高低。
在实施中,直播数据处理系统的技术人员可以根据转码任务对应的原分辨率、原码率、目标分辨率和目标码率,确定不同转码任务占用的转码服务器的负载大小,并以权值的形式来体现该负载大小,从而可以创建转码任务权值表(可参考表1),然后将转码任务权值表存储在管理服务器中。
表1
Figure PCTCN2018081457-appb-000001
这样,在判断各转码服务器的负载的高低时,管理服务器先可以根据上述转码任务权值表,确定每个转码服务器当前执行的所有转码任务的权值,再将每个转码服务器当前执行的所有转码任务的权值之和,确定为每个转码服务器的权值。进而,管理服务器可以按照每个转码服务器的权值的大小判断每个转码服务器的负载的高低,其中,权值越小则转码服务器的负载越低。
可选的,目标备服务器可以在目标转码服务器发生故障时,代替目标转码服务器继续提供直播服务,相应的,步骤205的处理可以如下:当目标转码服务器正常工作时,目标转码服务器基于封装后的目标直播数据,通过预设的目标VIP提供直播服务;当目标转码服务器出现故障时,目标备服务器基于封 装后的目标直播数据,通过预设的目标VIP提供直播服务。
在实施中,当用户想要通过终端获取目标直播数据时,终端可以向目标VIP发送目标直播数据的获取请求。如果目标转码服务器处于正常工作状态,目标VIP指向目标转码服务器,目标转码服务器则可以接收到上述获取请求,进而可以将封装后的目标直播数据反馈给终端。而如果目标转码服务器处于故障状态,目标VIP指向目标备服务器,目标备服务器则可以接收到上述获取请求,进而可以将封装后的目标直播数据反馈给终端。此处,目标转码服务器和目标备服务器上均可以安装有主备服务软件,该主备服务软件可以用于调整服务器对外展示的IP。具体的,当目标转码服务器正常工作时,目标转码服务器上的主备服务软件将对外展示的IP修改为预设的目标VIP,目标备服务器上的主备服务软件将对外展示的IP设置为本机IP;当目标转码服务器出现故障时,目标转码服务器上的主备服务软件将对外展示的IP设置为本机IP,目标备服务器上的主备服务软件将对外展示的IP修改为预设的目标VIP。
通过上述方法,可实现目标转码服务器在发生故障时的备份切换,以保证用户可以顺利获取直播数据,从而尽可能的降低故障带来的不良用户体验,并且当目标转码服务器恢复正常时,可及时从目标备服务器切换回目标转码服务器,以尽快恢复正常的码率、分辨率显示,从而保证了用户体验。
值得注意的是,本申请实施例中,管理服务器接收到的目标直播数据的转码请求,根据指定的不同的目标分辨率和目标码率,转化成不同的转码任务,并分配到至少一个目标转码服务器上,并针对该目标直播数据对应的各转码任务设置一个目标备服务器来为任一目标转码服务器出现故障时提供备份服务,也就是说同一直播数据对应的各转码任务都对应到同一目标备份服务器上,而无需为每个转码任务都分配一台备服务器来处理备份任务,从而节省了备服务器资源,并可以通过调度策略的设置以及备服务器组的管理来保证备服务器的利用率。
本申请实施例中,管理服务器在获取到目标直播数据的转码请求后,根 据转码请求中携带的N种转码规则对应生成对于目标直播数据的N个转码任务,管理服务器向目标转码服务器发送N个转码任务,并向目标备服务器发送目标直播数据的封装任务,目标转码服务器获取目标直播数据,按照至少一种转码规则对目标直播数据进行转码,并对转码后的目标直播数据进行封装,目标备服务器获取目标直播数据,并对目标直播数据进行封装,目标转码服务器和/或目标备服务器基于封装后的目标直播数据,通过预设的目标VIP提供直播服务。这样,可以采用硬件成本较低的普通服务器作为备服务器,同时对相同直播数据进行转码的多个转码服务器,可以采用同一服务器作为备服务器,减少了直播服务后台所需的转码服务器的数量,从而可以降低提供直播服务的成本。
基于相同的技术构思,本申请实施例还提供了一种提供直播服务的系统,所述系统包括管理服务器、目标转码服务器和目标备服务器,其中:
所述管理服务器,用于在获取到目标直播数据的转码请求后,根据所述转码请求中携带的N种转码规则对应生成对于所述目标直播数据的N个转码任务,向所述目标转码服务器发送所述N个转码任务,并向所述目标备服务器发送所述目标直播数据的封装任务;
所述目标转码服务器,用于获取所述目标直播数据,按照所述至少一种转码规则对所述目标直播数据进行转码,并对转码后的目标直播数据进行封装,基于封装后的目标直播数据,通过预设的目标VIP提供直播服务;
所述目标备服务器,用于获取所述目标直播数据,并对所述目标直播数据进行封装,基于封装后的目标直播数据,通过预设的目标VIP提供直播服务。
可选的,所述管理服务器,具体用于:
如果在本次接收所述目标直播数据的转码请求之前,未接收到所述目标直播数据的转码请求,则向目标备服务器发送所述目标直播数据的封装任务。
可选的,所述管理服务器,具体用于:
确定未对所述目标直播数据进行转码处理的M个转码服务器;
如果M大于或等于N,则在M个转码服务器中确定负载最低的N个目 标转码服务器,并将所述N个转码任务分别发送至所述N个目标转码服务器;
如果M小于N,则在将所述N个转码任务中的M个转码任务分别发送至所述M个转码服务器之后,在所有转码服务器中确定负载最低的N-M个目标转码服务器,并将所述N个转码任务中剩余的N-M个转码任务分别发送至所述N-M个目标转码服务器。
可选的,所述管理服务器,还用于:
根据预先存储的转码任务权值表,确定每个转码服务器当前执行的所有转码任务的权值;
将每个转码服务器当前执行的所有转码任务的权值之和,确定为每个转码服务器的权值;
按照每个转码服务器的权值的大小判断每个转码服务器的负载的高低。
可选的,所述目标转码服务器,具体用于当所述目标转码服务器正常工作时,基于封装后的目标直播数据,通过预设的目标VIP提供直播服务;
所述目标备服务器,具体用于当所述目标转码服务器出现故障时,基于封装后的目标直播数据,通过预设的目标VIP提供直播服务。
如图4所示,上述系统可以是直播数据处理系统,该系统可以包含一台管理服务器、转码服务器组和备服务器组,转码服务器组可以包括多台转码服务器,每台转码服务器可以执行多个直播数据的转码及封装任务,备服务器组可以包括多台备服务器,每台备服务器可以执行多个直播数据的封装任务。在一种情况下,如图5所示,上述每台转码服务器的功能可以由多台转码服务器构成的转码服务器小组来实现,同样,每台备服务器的功能也可以由多台备服务器构成的备服务器小组来实现,当转码服务器组/备服务器组的处理能力达到上限时,可通过增加转码服务器小组/备服务器小组的方式来进行扩容,相应的,当转码服务器组/备服务器组的处理能力过剩时,可删除处于空闲状态的部分小组,从而达到节省设备的目的。系统的具体功能实现,可以参考上述方法实施例。
本申请实施例中,管理服务器在获取到目标直播数据的转码请求后,根据转码请求中携带的N种转码规则对应生成对于目标直播数据的N个转码任务,管理服务器向目标转码服务器发送N个转码任务,并向目标备服务器发送目标直播数据的封装任务,目标转码服务器获取目标直播数据,按照至少一种转码规则对目标直播数据进行转码,并对转码后的目标直播数据进行封装,目标备服务器获取目标直播数据,并对目标直播数据进行封装,目标转码服务器和/或目标备服务器基于封装后的目标直播数据,通过预设的目标VIP提供直播服务。这样,可以采用硬件成本较低的普通服务器作为备服务器,同时对相同直播数据进行转码的多个转码服务器,可以采用同一服务器作为备服务器,减少了直播服务后台所需的转码服务器的数量,从而可以降低提供直播服务的成本。
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。
以上所述仅为本申请的较佳实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (10)

  1. 一种提供直播服务的方法,其特征在于,所述方法包括:
    管理服务器在获取到目标直播数据的转码请求后,根据所述转码请求中携带的N种转码规则对应生成对于所述目标直播数据的N个转码任务;
    所述管理服务器向目标转码服务器发送所述N个转码任务,并向目标备服务器发送所述目标直播数据的封装任务;
    所述目标转码服务器获取所述目标直播数据,按照所述至少一种转码规则对所述目标直播数据进行转码,并对转码后的目标直播数据进行封装;
    所述目标备服务器获取所述目标直播数据,并对所述目标直播数据进行封装;
    所述目标转码服务器和/或所述目标备服务器基于封装后的目标直播数据,通过预设的目标VIP提供直播服务。
  2. 根据权利要求1所述的方法,其特征在于,所述管理服务器向目标备服务器发送所述目标直播数据的封装任务,包括:
    如果在本次接收所述目标直播数据的转码请求之前,未接收到所述目标直播数据的转码请求,所述管理服务器则向目标备服务器发送所述目标直播数据的封装任务。
  3. 根据权利要求1所述的方法,其特征在于,所述管理服务器向目标转码服务器发送所述N个转码任务,包括:
    所述管理服务器确定未对所述目标直播数据进行转码处理的M个转码服务器;
    如果M大于或等于N,所述管理服务器则在M个转码服务器中确定负载最低的N个目标转码服务器,并将所述N个转码任务分别发送至所述N个目标转码服务器;
    如果M小于N,所述管理服务器则在将所述N个转码任务中的M个转码 任务分别发送至所述M个转码服务器之后,在所有转码服务器中确定负载最低的N-M个目标转码服务器,并将所述N个转码任务中剩余的N-M个转码任务分别发送至所述N-M个目标转码服务器。
  4. 根据权利要求3所述的方法,其特征在于,所述方法还包括:
    所述管理服务器根据预先存储的转码任务权值表,确定每个转码服务器当前执行的所有转码任务的权值;
    所述管理服务器将每个转码服务器当前执行的所有转码任务的权值之和,确定为每个转码服务器的权值;
    所述管理服务器按照每个转码服务器的权值的大小判断每个转码服务器的负载的高低。
  5. 根据权利要求1所述的方法,其特征在于,所述目标转码服务器和/或所述目标备服务器基于封装后的目标直播数据,通过预设的目标VIP提供直播服务,包括:
    当所述目标转码服务器正常工作时,所述目标转码服务器基于封装后的目标直播数据,通过预设的目标VIP提供直播服务;
    当所述目标转码服务器出现故障时,所述目标备服务器基于封装后的目标直播数据,通过预设的目标VIP提供直播服务。
  6. 一种提供直播服务的系统,其特征在于,所述系统包括管理服务器、目标转码服务器和目标备服务器,其中:
    所述管理服务器,用于在获取到目标直播数据的转码请求后,根据所述转码请求中携带的N种转码规则对应生成对于所述目标直播数据的N个转码任务,向所述目标转码服务器发送所述N个转码任务,并向所述目标备服务器发送所述目标直播数据的封装任务;
    所述目标转码服务器,用于获取所述目标直播数据,按照所述至少一种转码规则对所述目标直播数据进行转码,并对转码后的目标直播数据进行封装,基于封装后的目标直播数据,通过预设的目标VIP提供直播服务;
    所述目标备服务器,用于获取所述目标直播数据,并对所述目标直播数据进行封装,基于封装后的目标直播数据,通过预设的目标VIP提供直播服务。
  7. 根据权利要求6所述的系统,其特征在于,所述管理服务器,具体用于:
    如果在本次接收所述目标直播数据的转码请求之前,未接收到所述目标直播数据的转码请求,则向目标备服务器发送所述目标直播数据的封装任务。
  8. 根据权利要求6所述的系统,其特征在于,所述管理服务器,具体用于:
    确定未对所述目标直播数据进行转码处理的M个转码服务器;
    如果M大于或等于N,则在M个转码服务器中确定负载最低的N个目标转码服务器,并将所述N个转码任务分别发送至所述N个目标转码服务器;
    如果M小于N,则在将所述N个转码任务中的M个转码任务分别发送至所述M个转码服务器之后,在所有转码服务器中确定负载最低的N-M个目标转码服务器,并将所述N个转码任务中剩余的N-M个转码任务分别发送至所述N-M个目标转码服务器。
  9. 根据权利要求8所述的系统,其特征在于,所述管理服务器,还用于:
    根据预先存储的转码任务权值表,确定每个转码服务器当前执行的所有转码任务的权值;
    将每个转码服务器当前执行的所有转码任务的权值之和,确定为每个转码服务器的权值;
    按照每个转码服务器的权值的大小判断每个转码服务器的负载的高低。
  10. 根据权利要求6所述的系统,其特征在于,所述目标转码服务器,具体用于当所述目标转码服务器正常工作时,基于封装后的目标直播数据,通过预设的目标VIP提供直播服务;
    所述目标备服务器,具体用于当所述目标转码服务器出现故障时,基于封装后的目标直播数据,通过预设的目标VIP提供直播服务。
PCT/CN2018/081457 2018-03-09 2018-03-30 一种提供直播服务的方法和系统 WO2019169681A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18889956.1A EP3567859A4 (en) 2018-03-09 2018-03-30 METHOD AND SYSTEM FOR PROVIDING LIVE CONTINUOUS BROADCASTING SERVICE
US16/455,704 US20190327496A1 (en) 2018-03-09 2019-06-27 Method and system for providing a live-broadcasting service

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810193385.6A CN108495136B (zh) 2018-03-09 2018-03-09 一种提供直播服务的方法和系统
CN201810193385.6 2018-03-09

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/455,704 Continuation US20190327496A1 (en) 2018-03-09 2019-06-27 Method and system for providing a live-broadcasting service

Publications (1)

Publication Number Publication Date
WO2019169681A1 true WO2019169681A1 (zh) 2019-09-12

Family

ID=63338385

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/081457 WO2019169681A1 (zh) 2018-03-09 2018-03-30 一种提供直播服务的方法和系统

Country Status (4)

Country Link
US (1) US20190327496A1 (zh)
EP (1) EP3567859A4 (zh)
CN (1) CN108495136B (zh)
WO (1) WO2019169681A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11871052B1 (en) * 2018-09-27 2024-01-09 Apple Inc. Multi-band rate control
CN111083521B (zh) * 2019-12-27 2022-02-01 杭州当虹科技股份有限公司 一种rtmp发布主备快速切换方法
CN111901620B (zh) * 2020-07-24 2022-07-29 北京达佳互联信息技术有限公司 一种直播的回放视频生成方法、装置、电子设备及存储介质
CN112188285A (zh) * 2020-09-28 2021-01-05 北京达佳互联信息技术有限公司 视频转码方法、装置、系统及存储介质
CN113014950A (zh) * 2021-05-24 2021-06-22 北京创新乐知网络技术有限公司 一种直播同步的方法、系统和电子设备

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103124220A (zh) * 2011-11-21 2013-05-29 苏州达联信息科技有限公司 一种视频分发网络全局服务器的主备同步协议
CN103139661A (zh) * 2011-12-01 2013-06-05 苏州达联信息科技有限公司 一种视频分发网络节点服务器的冗余保护方法及装置
US8843594B2 (en) * 2010-03-26 2014-09-23 Dan Fiul Time shifted transcoded streaming (TSTS) system and method
CN104243998A (zh) * 2014-09-29 2014-12-24 广州华多网络科技有限公司 一种数据处理方法、装置及相关服务器
CN104902289A (zh) * 2015-06-29 2015-09-09 秦永红 一种rtmp流媒体直播系统热备份的设计方法及其系统
US9165473B2 (en) * 2008-07-25 2015-10-20 ArtistWorks, Inc. Video management system for interactive online instruction
CN106817628A (zh) * 2017-01-26 2017-06-09 成都市亚丁胡杨科技股份有限公司 一种网络直播平台

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9716856B2 (en) * 2012-03-07 2017-07-25 Echostar Technologies L.L.C. Adaptive bit rate transcode and caching for off air television programming delivery
CN107438012B (zh) * 2016-05-27 2020-07-28 北京金山云网络技术有限公司 一种负载均衡服务转发方法、系统、均衡装置和宿主机
CN106330967A (zh) * 2016-10-24 2017-01-11 北京小米移动软件有限公司 直播数据处理方法及装置
US10531134B2 (en) * 2017-11-10 2020-01-07 Akamai Technologies, Inc. Determining a time budget for transcoding of video

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9165473B2 (en) * 2008-07-25 2015-10-20 ArtistWorks, Inc. Video management system for interactive online instruction
US8843594B2 (en) * 2010-03-26 2014-09-23 Dan Fiul Time shifted transcoded streaming (TSTS) system and method
CN103124220A (zh) * 2011-11-21 2013-05-29 苏州达联信息科技有限公司 一种视频分发网络全局服务器的主备同步协议
CN103139661A (zh) * 2011-12-01 2013-06-05 苏州达联信息科技有限公司 一种视频分发网络节点服务器的冗余保护方法及装置
CN104243998A (zh) * 2014-09-29 2014-12-24 广州华多网络科技有限公司 一种数据处理方法、装置及相关服务器
CN104902289A (zh) * 2015-06-29 2015-09-09 秦永红 一种rtmp流媒体直播系统热备份的设计方法及其系统
CN106817628A (zh) * 2017-01-26 2017-06-09 成都市亚丁胡杨科技股份有限公司 一种网络直播平台

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3567859A4 *

Also Published As

Publication number Publication date
US20190327496A1 (en) 2019-10-24
CN108495136A (zh) 2018-09-04
EP3567859A4 (en) 2020-02-19
CN108495136B (zh) 2019-12-31
EP3567859A1 (en) 2019-11-13

Similar Documents

Publication Publication Date Title
WO2019169681A1 (zh) 一种提供直播服务的方法和系统
US10110425B2 (en) Differentiated service-based graceful degradation layer
US20180027035A1 (en) Redirection apparatus and method
WO2022206229A1 (zh) 数据处理方法、装置、设备和存储介质
CN108965884B (zh) 一种转码任务的分配方法及调度设备、转码设备
AU2011274249B2 (en) Systems and methods for storing digital content
WO2019084972A1 (zh) 流媒体直播方法及系统
CN102196033B (zh) 一种传送和接收远程呈现数据的方法和系统
CN103763209A (zh) 一种cdn服务器的调度方法与装置
KR20160066228A (ko) 분산 렌더링 시스템
US11316916B2 (en) Packet processing method, related device, and computer storage medium
AU2013201256B2 (en) Differentiated service-based graceful degradation layer
CN110933357A (zh) 一种视讯会议系统融合监控系统的方法和系统
US10892984B1 (en) Framework for routing media streams in a provider network
WO2018032499A1 (zh) 一种负载均衡的方法及相关装置
KR102024642B1 (ko) 라이브 스트리밍 서버 장치 및 이의 운용 방법
CN109391663B (zh) 一种访问请求的处理方法与设备
KR102492793B1 (ko) 가상 데스크탑 서비스 제공 시스템 및 가상 데스크탑 서비스 제공 방법
US11770431B2 (en) Network-adaptive live media encoding system
JP5195585B2 (ja) 通信品質優先度設定システム、方法、装置、及びプログラム
CN112073358B (zh) 基于Kubernetes的协议转换处理方法和设备
US11985072B2 (en) Multimedia data stream processing method, electronic device, and storage medium
CN112073449B (zh) 基于Kubernetes的环境切换处理方法和设备
KR102007669B1 (ko) 방송 수신기 및 이의 운용 방법
KR101799835B1 (ko) 클라우드 기반의 동적 작업 관리 시스템 및 방법

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2018889956

Country of ref document: EP

Effective date: 20190626

ENP Entry into the national phase

Ref document number: 2018889956

Country of ref document: EP

Effective date: 20190626

NENP Non-entry into the national phase

Ref country code: DE