WO2018161933A1 - 一种直播流传输方法、装置和系统及其计算机可读存储介质和计算机设备 - Google Patents

一种直播流传输方法、装置和系统及其计算机可读存储介质和计算机设备 Download PDF

Info

Publication number
WO2018161933A1
WO2018161933A1 PCT/CN2018/078389 CN2018078389W WO2018161933A1 WO 2018161933 A1 WO2018161933 A1 WO 2018161933A1 CN 2018078389 W CN2018078389 W CN 2018078389W WO 2018161933 A1 WO2018161933 A1 WO 2018161933A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
stream data
source
cdn
stream
Prior art date
Application number
PCT/CN2018/078389
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 贵州白山云科技有限公司
Publication of WO2018161933A1 publication Critical patent/WO2018161933A1/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/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2181Source of audio or video content, e.g. local disk arrays comprising remotely distributed storage units, e.g. when movies are replicated over a plurality of video servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/40Support for services or applications
    • H04L65/4061Push-to services, e.g. push-to-talk or push-to-video
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/611Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for multicast or broadcast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/75Media network packet handling
    • H04L65/765Media network packet handling intermediate
    • 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/232Content retrieval operation locally within server, e.g. reading video streams from disk arrays

Definitions

  • Embodiments of the present invention relate to, but are not limited to, the field of data transmission, and in particular, to a live streaming method, apparatus, and system, and a computer readable storage medium and computer device thereof.
  • live broadcast is aimed at users with live broadcast requirements, using the Internet (or private network) and advanced multimedia communication technologies to build audio, video, desktop sharing, document sharing, interactive links, etc. on the Internet. Online communication and interaction.
  • the anchor locally pushes the content that is being broadcast live in real time to the server (push stream), and the viewer obtains the live content (pull stream) that the anchor pushes to the server in real time from the server, and finally achieves the purpose of interaction between the anchor and the viewer. .
  • the live broadcast platform usually uses the content distribution network (CDN) acceleration to enable users to obtain the required content as close as possible, thereby reducing response time and improving the real-time interaction.
  • CDN content distribution network
  • the anchor pushes the stream to the live source server through the edge node, and the viewer obtains the live content through the edge node. If the edge node does not have the live content, the edge node needs to return the source.
  • the live source server obtains the live content and provides it to the viewer.
  • the live broadcast source centralized storage policy is usually adopted.
  • the live broadcast source server is deployed in China, and edge nodes are deployed overseas.
  • the anchor broadcasts the traffic to the domestic live broadcast source server through the overseas edge node.
  • the overseas viewer obtains the live content through the overseas edge node. If the overseas edge node does not have the live content, the overseas edge node obtains the live content by returning to the domestic live broadcast server, and the obtained live content is provided to the viewer.
  • the overseas node returns to the domestic live broadcast source server link is unstable, the overseas anchor push flow is unstable, the push stream quality cannot be guaranteed, and when the viewer obtains the live content, it often gets stuck, and even the live content is not obtained, and the live broadcast service cannot be guaranteed. ;
  • Embodiments of the present invention are directed to solving the problems described above.
  • a live streaming method which is applicable to a CDN, and the method includes:
  • the server in the CDN acquires at least two source servers associated with the stream data from the dispatch center server when receiving the request for acquiring the stream data;
  • the server in the CDN selects one source server from the at least two source servers, establishes a connection with the selected source server, and acquires the stream data.
  • the server in the CDN when receiving the request for acquiring the stream data, acquires the at least two source servers associated with the stream data from the dispatch center server, including:
  • the edge server When receiving the request for acquiring the stream data, acquires at least two source servers associated with the stream data from the dispatch center server; or
  • the edge server selects the relay server, and forwards the request to the transit server, and the transit server acquires at least two source servers associated with the stream data from the dispatch center server.
  • the server in the CDN selects one source server from the at least two source servers, specifically:
  • the server in the CDN selects an optimal server from the at least two source servers.
  • the method further includes:
  • the edge server selects at least two source servers, one of which is the source server optimal for the edge server among all the source servers;
  • the edge server generates a unique identifier for the received stream data, and transmits the stream data and the unique identifier to the at least two source servers.
  • the method further includes:
  • the server in the CDN cannot obtain the stream data from the selected source server, select another server from the at least two source servers to re-establish the connection and acquire the stream data.
  • Another aspect of the present invention provides a live streaming method, which is applicable to a CDN, and the method further includes:
  • the dispatch center server records at least two source servers associated with the stream data
  • the scheduling center server when receiving the request of the source server associated with the stream data by the server in the CDN, notifies at least two source servers associated with the stream data to the server in the CDN.
  • the scheduling center server records at least two source servers associated with the stream data, including:
  • the dispatching center server receives the notification message of the source server, where the notification message carries the unique identifier of the stream data received by the source server;
  • the dispatching center server searches for a locally stored stream data record, and associates the source server to the stream data when there is a record that matches the unique identifier in the notification message.
  • the scheduling center server receives the notification message of the source server, and after the step of carrying the unique identifier of the stream data received by the source server in the notification message, the method further includes:
  • the dispatching center server searches for a stream data record stored locally, and when there is no stream data that matches the unique identifier in the notification message, creates a new record, and stores the stream data and the stream data in the record. Uniquely identifies the association with the source server.
  • Another aspect of the present invention provides a live broadcast transmission apparatus, which is applicable to a CDN, and the apparatus includes:
  • the source server query module is configured to acquire, by the dispatch center server, at least two source servers associated with the stream data when receiving the request for acquiring the stream data;
  • the pull module is configured to select one source server from the at least two source servers, establish a connection with the selected source server, and acquire the stream data.
  • the pull module is specifically configured to select an optimal server from the at least two source servers.
  • the device further comprises:
  • the push decision module is configured to, when receiving the push of the stream data, select at least two source servers, one of which is an source server optimal for the live stream transmission device among all the source servers;
  • a data pushing module configured to generate a unique identifier for the received stream data, and transmit the stream data and the unique identifier to the at least two source servers.
  • the pull module is further configured to: when the flow data cannot be obtained from the selected source server, select another server from the at least two source servers to re-establish the connection and acquire the flow data.
  • Another aspect of the present invention provides a live broadcast transmission apparatus, which is applicable to a CDN, and the apparatus includes:
  • a stream record management module configured to record at least two source servers associated with the stream data
  • a stream data management module configured to notify at least two source servers associated with the stream data to the server in the CDN when receiving a request by the server to obtain the source server associated with the stream data in the CDN.
  • the flow recording module comprises:
  • a notification receiving unit configured to receive a notification message of the source server, where the notification message carries a unique identifier of the stream data received by the source server;
  • a recording unit configured to search the locally stored stream data record, and associate the source server to the stream data when there is a record that matches the unique identifier in the notification message.
  • the recording unit is further configured to search for a locally stored stream data record, and when there is no stream data that matches the unique identifier in the notification message, create a new record, and store the stream in the record.
  • Another aspect of the present invention provides a live streaming system suitable for a CDN, the CDN including at least two source servers, the system including a server and a dispatch center server in the CDN;
  • the dispatching center server is configured to record at least two source servers associated with the stream data, and when receiving the request of the source server associated with the stream data by the server in the CDN, notify at least two source servers associated with the stream data a server in the CDN;
  • a server in the CDN configured to acquire at least two source servers associated with the stream data from the dispatch center server when receiving a request to obtain stream data, and select one source server from the two source servers Establishing a connection with the selected source server to obtain the stream data.
  • the server in the CDN is further configured to: when receiving the push of the stream data, select at least two source servers, one of which is the source server optimal for the server among all the source servers, for receiving The obtained stream data generates a unique identifier, and transmits the stream data and the unique identifier to the at least two source servers;
  • the dispatching center server is further configured to receive a notification message of the source server, where the notification message carries a unique identifier of the stream data received by the source server, and searches for the locally stored stream data record, which is carried in the presence and the notification message.
  • the source server is associated to the stream data when it uniquely identifies a matching record.
  • Another aspect of an embodiment of the present invention provides a computer readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the above method.
  • Another aspect of an embodiment of the present invention provides a computer device including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the program The steps of the above method.
  • An embodiment of the present invention provides a live stream transmission method, apparatus, and system.
  • the scheduling center server records at least two source servers associated with the stream data, and the server in the CDN receives the request for acquiring the stream data, and the self-scheduling center
  • the server acquires at least two source servers associated with the stream data, and the dispatching center server notifies the at least two source servers associated with the stream data when receiving the request of the source server associated with the stream data in the CDN.
  • the server in the CDN after which the server in the CDN selects one source server from the two source servers, establishes a connection with the selected source server, and acquires the stream data. Multiple backups of the flow data are implemented by multiple source servers.
  • the source server and the other servers in the CDN are deployed in different scenarios to implement backup of the same stream data on the source servers in different regions, and notify the source server that stores the stream data to the schedule.
  • the central server when the server in the CDN pulls the data, is notified to the server in the CDN by the dispatching center server, so that the server in the CDN can select the most suitable source server from the multiple source servers according to the current situation, and solves the problem.
  • the live streaming push and pull the problem of low quality and efficiency, realizing high-efficiency and high-reliability off-site live streaming.
  • FIG. 1 exemplarily shows a live streaming system architecture provided by Embodiment 1 of the present invention
  • FIG. 2 exemplarily shows a flow of a live streaming method provided by Embodiment 2 of the present invention
  • FIG. 3 exemplarily shows a structure of a live broadcast transmission apparatus according to Embodiment 3 of the present invention
  • FIG. 4 exemplarily shows the structure of still another live stream transmission apparatus according to Embodiment 3 of the present invention.
  • FIG. 5 exemplarily shows an architecture of a live broadcast system provided by Embodiment 3 of the present invention.
  • the live broadcast source centralized storage policy is usually adopted.
  • the live broadcast source server is deployed in China, and edge nodes are deployed overseas.
  • the anchor broadcasts the traffic to the domestic live broadcast source server through the overseas edge node.
  • the overseas viewer obtains the live content through the overseas edge node. If the overseas edge node does not have the live content, the overseas edge node obtains the live content by returning to the domestic live broadcast server, and the obtained live content is provided to the viewer.
  • the overseas node returns to the domestic live broadcast source server link is unstable, the overseas anchor push flow is unstable, the push stream quality cannot be guaranteed, and when the viewer obtains the live content, it often gets stuck, and even the live content is not obtained, and the live broadcast service cannot be guaranteed. ;
  • a CDN may have a single layer (edge server only) or a multi-layer structure.
  • the embodiment of the present invention provides a live broadcast transmission system.
  • the structure is as shown in FIG. 1 , which is composed of a dispatch center server, a source server, an edge server, and a parent server.
  • the edge server and the parent server are installed with a scheduling client, where:
  • the edge server is used to: directly connect with the customer or the user, and when selecting the customer or the user, select the edge server that is “closest” from the customer or the user, and use the “first kilometer” or “last mile” acceleration to avoid the customer or the user.
  • the quality of the live broadcast service is guaranteed due to the failure of the request due to cross-operator and cross-regional access.
  • the parent server is used to connect directly to the edge server and the source server. It is a type of transit server. It is deployed in some important areas.
  • the parent server is smaller than the edge server.
  • the parent server is used for flow aggregation, reducing the number of back-to-source connections and achieving mitigation.
  • the source server is under load to ensure that the live broadcast service is stable.
  • the parent server is deployed in the pull flow scenario.
  • the push flow scenario is not deployed because the audience may be thousands of people. The audience may be distributed throughout the country if all edge servers are back.
  • the server pulls the stream, which easily causes the source server to reach the server bottleneck and affect the live broadcast service.
  • the source server is used to connect to the edge server or the parent server to store the stream data
  • the domestic deployment source cluster is used for the central storage
  • the overseas deployment source server only stores the overseas anchor push stream content
  • the dispatching center server is configured to: interact with the source server and the scheduling client, and store the flow record in the bgp machine room, the source server notifies the dispatch center server of the flow record, and the scheduling client synchronizes the flow record from the dispatch center server;
  • the scheduling client is configured to: interact with the dispatch center server and the edge server, the parent server, store the flow record, and return to the upstream ip schedule, and deploy on the edge server and the parent server;
  • FIG. 1 is exemplified by a two-layer CDN structure with many applications, and the technical solution provided by the embodiment of the present invention is applicable to single-layer and multi-layer CDN, which is not limited by the embodiment of the present invention. .
  • the embodiment of the present invention further provides a live stream transmission method.
  • the embodiment of the present invention takes an overseas live broadcast scenario as an example, and uses the method to complete the live stream.
  • the transmission process is as follows:
  • Edge server A and scheduling client B interact, and scheduling client B selects an optimal source server for edge server A according to the region where the edge server A is located and the operator. For example, select source server C "closest" from edge server A, and domestic source server D for central storage;
  • Edge server A generates a unique identifier flag according to the url of the stream and the current timestamp, and transmits the stream URL data and the unique identifier flag to the source server C and the source server D;
  • the source server C notifies the dispatch center server E that the stream URL has been pushed to the source server C with a unique identifier flag, and the dispatch center server E according to the unique identifier flag, if it is the same as the stream record original record unique identifier flagA, then the flow Add the source server C to the URL record, otherwise the source server in the update stream URL record is C;
  • the source server D notifies the dispatch center server E that the stream URL has been pushed to the source server D, with a unique identifier flag, and the dispatch center server E according to the unique identifier flag, if it is the same as the stream record original record unique identifier flagA, then the flow Add the source server D to the URL record, otherwise the source server in the update stream URL record is D;
  • S6 the source server in the flow URL record has C and D, and the scheduling client G, I, B and the dispatch center server E interact;
  • the edge server F and the scheduling client G interact, and the scheduling client G selects the parent server that is optimal for the edge server F according to the region and the operator of the edge server F, such as selecting the parent server H that is "closest" from the edge server F. ;
  • Edge server F passes the request to the parent server H;
  • the parent server H interacts with the scheduling client I, obtains a record of the stream URL, accurately finds the source servers C and D, and finally selects the server that is optimal for the parent server H, that is, selects the source that is “closest” from the parent server H.
  • Server C
  • S11 The parent server H and the source server C establish a connection, and obtain the flow URL data. If the live content is not obtained, the parent server H and the source server D establish a connection;
  • the edge server F obtains the stream URL data from the parent server H.
  • the domestic audience or overseas audiences who are not in the same area as the overseas anchors obtain the live content through the edge server-parent server (selected)-domestic source server D. If the domestic source server D does not have live content, the parent server obtains the overseas source server C. Live content.
  • step S10 and step S12 in the case that the CDN only has an edge server, the source server and the source can be searched by the edge server.
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer program stores a computer program, and when the program is executed by the processor, the steps of the foregoing method are implemented.
  • the embodiment of the invention further provides a computer device, comprising a memory, a processor and a computer program stored on the memory and operable on the processor, the processor implementing the program to implement the steps of the above method.
  • the embodiment of the invention provides a live stream transmission method, which can perform record management on multiple source servers corresponding to the same stream data, so as to ensure that the optimal server can be selected when the server needs to pull stream data in the CDN.
  • the method of extracting and extracting data maximizes the efficiency of data transmission and solves the problem of low quality and efficiency of live stream push and pull in multiple source server scenarios, especially in off-site live broadcast scenarios.
  • the flow of performing streaming data push and pull management using the live streaming method provided by the embodiment of the present invention is as shown in FIG. 2, and includes:
  • Step 201 When receiving the push of the stream data, the edge server selects at least two source servers, one of which is the source server optimal for the edge server among all the source servers;
  • the edge server selects the source server that is optimal for the edge server according to the region and the carrier, such as selecting the source server that is “closest” from the edge server and another backup source server (for example, for the center). Stored domestic source server).
  • Step 202 The edge server generates a unique identifier for the received stream data, and transmits the stream data and the unique identifier to the at least two source servers.
  • the edge server transmits the stream data together with the unique identifier of the stream data to the at least two source servers.
  • Step 203 The source server that receives the stream data sends a notification message to the scheduling center server.
  • the source server that receives the stream data sends a notification message to the dispatch center server, where the notification message carries the identity information of the unique identifier and the source server.
  • Step 204 The scheduling center server records at least two source servers associated with the stream data.
  • the dispatching center server receives the notification message of the source server, and the notification message carries the unique identifier of the stream data received by the source server. Afterwards, the dispatching center server searches for the locally stored stream data record, and when there is a record that matches the unique identifier in the notification message (that is, the other source server has received the notification message related to the stream data, Recording that the other source server is the source server associated with the source server, and associating the source server with the stream data, that is, adding a source server associated with the stream data, and then the stream data is combined with multiple sources.
  • the server has an association relationship, and the dispatch center server records the association relationship.
  • Step 205 The server in the CDN acquires at least two source servers associated with the stream data from the dispatch center server when receiving the request for acquiring the stream data;
  • the server in the CDN when the server in the CDN receives the stream data request, it first queries the dispatch center to obtain the source server information associated with the stream data.
  • the edge server when receiving a request to obtain streaming data, the edge server selects a parent server (the optimal parent server), and forwards the request to the parent server.
  • the parent server acquires at least two source servers associated with the stream data from the dispatch center server.
  • the edge server when the edge server receives the request for acquiring the stream data, the edge server acquires at least two source servers associated with the stream data from the dispatch center server.
  • the edge server when the edge server receives the request to obtain the stream data, the inbound server of the inbound layer is selected to progress to the innermost layer, and the innermost layer of the transit server is from the dispatching center.
  • the server acquires at least two source servers associated with the stream data.
  • Step 206 The scheduling center server, when receiving the request of the source server associated with the stream data by the server in the CDN, notifying the server in the CDN to at least two source servers associated with the stream data.
  • Step 207 The server in the CDN selects one source server from the at least two source servers, establishes a connection with the selected source server, and acquires the stream data.
  • an optimal server is selected from the two source servers.
  • different selection strategies can also be determined according to the actual needs of the application scenario.
  • the server in the CDN cannot obtain the stream data from the selected source server, select another server from the at least two source servers to re-establish the connection and acquire the stream data.
  • the embodiment of the present invention further provides a computer readable storage medium, where the computer program stores a computer program, and when the program is executed by the processor, the steps of the foregoing method are implemented.
  • the embodiment of the invention further provides a computer device, comprising a memory, a processor and a computer program stored on the memory and operable on the processor, the processor implementing the program to implement the steps of the above method.
  • the embodiment of the present invention provides a live stream transmission device, which is applicable to a CDN, and has a structure as shown in FIG. 3, and includes:
  • the source server query module 301 is configured to acquire, by the dispatch center server, at least two source servers associated with the stream data when receiving the request for acquiring the stream data;
  • the pull module 302 is configured to select one source server from the at least two source servers, establish a connection with the selected source server, and acquire the stream data.
  • the pull module 302 is specifically configured to select an optimal server from the at least two source servers.
  • the device further comprises:
  • the push decision module 303 is configured to, when receiving the push of the stream data, select at least two source servers, one of which is the source server optimal for the live stream transmission device among all the source servers;
  • the data pushing module 304 is configured to generate a unique identifier for the received stream data, and transmit the stream data and the unique identifier to the at least two source servers.
  • the pull module 302 is further configured to: when the flow data cannot be obtained from the selected source server, select another server from the at least two source servers to re-establish the connection and acquire the flow data.
  • the live streaming device shown in FIG. 3 can be integrated on a server in the CDN, and the server performs corresponding functions. Specifically, the live streaming device can be implemented by scheduling a client, and the scheduling client is invoked by running on a server in the CDN.
  • the embodiment of the present invention further provides a live broadcast transmission device, which is applicable to a CDN, and has a structure as shown in FIG. 4, and includes:
  • the stream record management module 401 is configured to record at least two source servers associated with the stream data;
  • the stream data management module 402 is configured to notify at least two source servers associated with the stream data to the server in the CDN when receiving a request by the server to obtain the source server associated with the stream data in the CDN.
  • the flow recording module 401 includes:
  • the notification receiving unit 4011 is configured to receive a notification message of the source server, where the notification message carries a unique identifier of the stream data received by the source server;
  • the recording unit 4012 is configured to search for a locally stored stream data record, and associate the source server to the stream data when there is a record that matches the unique identifier in the notification message.
  • the recording unit 4012 is further configured to search for a locally stored stream data record, and when there is no stream data that matches the unique identifier in the notification message, create a new record, and store the new record in the record.
  • the live streaming device shown in FIG. 4 can be integrated into the dispatch center server, and the corresponding function is completed by the dispatch center server.
  • the embodiment of the present invention further provides a live streaming system, which is applicable to a CDN.
  • the architecture thereof is as shown in FIG. 5.
  • the CDN includes at least two source servers, and also includes a server and a dispatch center server in the CDN.
  • the at least two source servers are in different places, such as overseas and domestic.
  • the dispatching center server is configured to record at least two source servers associated with the stream data, and when receiving the request of the source server associated with the stream data by the server in the CDN, notify at least two source servers associated with the stream data a server in the CDN;
  • a server in the CDN configured to acquire at least two source servers associated with the stream data from the dispatch center server when receiving a request to obtain stream data, and select one source server from the two source servers Establishing a connection with the selected source server to obtain the stream data.
  • the server in the CDN is further configured to: when receiving the push of the stream data, select at least two source servers, one of which is the source server optimal for the server among all the source servers, for receiving The obtained stream data generates a unique identifier, and transmits the stream data and the unique identifier to the at least two source servers;
  • the dispatching center server is further configured to receive a notification message of the source server, where the notification message carries a unique identifier of the stream data received by the source server, and searches for the locally stored stream data record, which is carried in the presence and the notification message.
  • the source server is associated to the stream data when it uniquely identifies a matching record.
  • the selection of the "optimal" source server involved in the embodiment of the present invention may be specifically filtered according to the following factors:
  • the specific screening method can be configured according to actual application requirements.
  • An embodiment of the present invention provides a live stream transmission method, apparatus, and system.
  • the scheduling center server records at least two source servers associated with the stream data, and the server in the CDN receives the request for acquiring the stream data, and the self-scheduling center
  • the server acquires at least two source servers associated with the stream data, and the dispatching center server notifies the at least two source servers associated with the stream data when receiving the request of the source server associated with the stream data in the CDN.
  • the server in the CDN after which the server in the CDN selects one source server from the two source servers, establishes a connection with the selected source server, and acquires the stream data. Multiple backups of the flow data are implemented by multiple source servers.
  • the source server and the other servers in the CDN are deployed in different scenarios to implement backup of the same stream data on the source servers in different regions, and notify the source server that stores the stream data to the schedule.
  • the central server when the server in the CDN pulls the data, is notified to the server in the CDN by the dispatching center server, so that the server in the CDN can select the most suitable source server from the multiple source servers according to the current situation, and solves the problem.
  • the live streaming push and pull the problem of low quality and efficiency, realizing high-efficiency and high-reliability off-site live streaming.
  • computer storage medium includes volatile and nonvolatile, implemented in any method or technology for storing information, such as computer readable instructions, data structures, program modules or other data. Sex, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridge, magnetic tape, magnetic disk storage or other magnetic storage device, or may Any other medium used to store the desired information and that can be accessed by the computer.
  • communication media typically includes computer readable instructions, data structures, program modules, or other data in a modulated data signal, such as a carrier wave or other transport mechanism, and can include any information delivery media. .
  • multiple backups of the flow data are implemented by multiple source servers, and the backup of the same stream data on the source server in different regions is implemented in the scenario where the source server and the other servers in the CDN are located in different scenarios, and the stream is stored.
  • the source server of the data is notified to the dispatch center server, and then the server in the CDN is notified to the server in the CDN when the server in the CDN pulls the data, so that the server in the CDN can select the most from the plurality of source servers according to the current situation.
  • the suitable source server solves the problem of low-quality and high-efficiency live broadcast push and pull in the live broadcast scenario, and achieves high-efficiency and high-reliability off-site live streaming.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Databases & Information Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本发明提供了一种直播流传输方法、装置和系统及其计算机可读存储介质和计算机设备。涉及数据传输领域;解决了异地源服务器场景下,直播流推送及拉取质量与效率双低的问题。该方法包括:所述CDN中的服务器在接收到获取流数据的请求时,自调度中心服务器获取所述流数据关联的至少两个源服务器;所述CDN中的服务器从所述至少两个源服务器中选择一个源服务器,与选择的源服务器建立连接,获取所述流数据。本发明提供的技术方案适用于异地源服务器数据传输,实现了高效高可靠性的异地直播流传输。

Description

一种直播流传输方法、装置和系统及其计算机可读存储介质和计算机设备
本申请要求在2017年03月09日提交中国专利局、申请号为201710138374.3、发明名称为“一种直播流传输方法、装置和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明实施例涉及但不限于数据传输领域,尤其涉及一种直播流传输方法、装置和系统及其计算机可读存储介质和计算机设备。
背景技术
直播作为当下最火的应用之一,是针对有现场直播需求的用户,利用互联网(或专网)和先进的多媒体通信技术,在网上构建音频、视频、桌面共享、文档共享、互动环节等的在线交流与互动。以视频直播为例,主播在本地将自己正在实时直播的内容推送给服务器(推流),观众从服务器实时获取主播推送给服务器的直播内容(拉流),最后达到主播与观众进行交互的目的。
为了适应高效内容分发的需求,直播平台通常会使用内容分发网络(CDN)加速,使用户尽可能近的获取所需的内容,从而降低响应时间,提高交互的实时性。
在直播传输CDN加速应用场景下,主播通过边缘节点将流推到直播源服务器上,观众再通过边缘节点获取直播内容,如果该边缘节点没有该直播内容,则该边缘节点需要进行回源,从直播源服务器获得该直播内容并提供给观众。
在异地直播(如海外直播)加速应用场景下,通常采用直播源集中存储策略,具体地,直播源服务器部署在国内,在海外部署边缘节点,主播通过海外边缘节点将流推到国内直播源服务器上,海外观众通过海外边缘节点获取直播内容,如果该海外边缘节点没有该直播内容,海外边缘节点通过回国内直播服务器获取直播内容,获取到的直播内容提供给观众。
但该策略存在以下缺点:
1)海外节点回国内直播源服务器链路不稳定,海外主播推流不稳定,推流 质量保证不了,观众获取直播内容时,往往卡顿,甚至获取不到直播内容,直播服务得不到保证;
2)对于主播和观众在同一海外地区的情况,主播需要推流到国内,观众需要从国内获取直播内容,传统策略增加了传输“距离”,降低了直播服务质量,同时服务稳定性不能保证。
发明内容
本发明实施例旨在解决上面描述的问题。
根据本发明实施例的一方面,提供了一种直播流传输方法,适用于CDN,该方法包括:
所述CDN中的服务器在接收到获取流数据的请求时,自调度中心服务器获取所述流数据关联的至少两个源服务器;
所述CDN中的服务器从所述至少两个源服务器中选择一个源服务器,与选择的源服务器建立连接,获取所述流数据。
优选的,所述CDN中的服务器在接收到获取流数据的请求时,自调度中心服务器获取所述流数据关联的至少两个源服务器包括:
边缘服务器在接收到获取流数据的请求时,自所述调度中心服务器获取所述流数据关联的至少两个源服务器;或,
边缘服务器在接收到获取流数据的请求时,选择中转服务器,向所述中转服务器转发所述请求,所述中转服务器自所述调度中心服务器获取所述流数据关联的至少两个源服务器。
优选的,所述CDN中的服务器从所述至少两个源服务器中选择一个源服务器具体为:
所述CDN中的服务器从所述至少两个源服务器中选择最优的服务器。
优选的,该方法还包括:
边缘服务器在接收到流数据的推送时,选择至少两个源服务器,其中一个为所有源服务器中对所述边缘服务器来说最优的源服务器;
所述边缘服务器为接收到的流数据生成唯一标识,并将所述流数据与所述 唯一标识均传输给所述至少两个源服务器。
优选的,该方法还包括:
所述CDN中的服务器在无法从选择的源服务器中获取所述流数据时,从所述至少两个源服务器中选择其他服务器重新建立连接并获取所述流数据。
本发明实施例的另一方面提供了一种直播流传输方法,适用于CDN,该方法还包括:
调度中心服务器记录流数据关联的至少两个源服务器;
所述调度中心服务器在接收所述CDN中服务器获取流数据关联的源服务器的请求时,将所述流数据关联的至少两个源服务器告知所述CDN中的服务器。
优选的,调度中心服务器记录流数据关联的至少两个源服务器包括:
调度中心服务器接收源服务器的通知消息,在所述通知消息中携带源服务器接收的流数据的唯一标识;
所述调度中心服务器查找本地存储的流数据记录,在存在与所述通知消息中携带唯一标识匹配的记录时,将所述源服务器关联至所述流数据。
优选的,调度中心服务器接收源服务器的通知消息,在所述通知消息中携带源服务器接收的流数据的唯一标识的步骤之后还包括:
所述调度中心服务器查找本地存储的流数据记录,在不存在与所述通知消息中携带唯一标识匹配的流数据时,建立新的记录,在该记录中存储所述流数据、该流数据的唯一标识与所述源服务器之间的关联关系。
本发明实施例的另一方面提供了一种直播流传输装置,适用于CDN,该装置包括:
源服务器查询模块,设置为在接收到获取流数据的请求时,自调度中心服务器获取所述流数据关联的至少两个源服务器;
拉取模块,设置为从所述至少两个源服务器中选择一个源服务器,与选择的源服务器建立连接,获取所述流数据。
优选的,所述拉取模块,具体设置为从所述至少两个源服务器中选择最优的服务器。
优选的,该装置还包括:
推送决策模块,设置为在接收到流数据的推送时,选择至少两个源服务器,其中一个为所有源服务器中对所述直播流传输装置来说最优的源服务器;
数据推送模块,设置为为接收到的流数据生成唯一标识,并将所述流数据与所述唯一标识均传输给所述至少两个源服务器。
优选的,所述拉取模块,还设置为在无法从选择的源服务器中获取所述流数据时,从所述至少两个源服务器中选择其他服务器重新建立连接并获取所述流数据。
本发明实施例的另一方面提供了一种直播流传输装置,适用于CDN,该装置包括:
流记录管理模块,设置为记录流数据关联的至少两个源服务器;
流数据管理模块,设置为在接收所述CDN中服务器获取流数据关联的源服务器的请求时,将所述流数据关联的至少两个源服务器告知所述CDN中的服务器。
优选的,所述流记录模块包括:
通知接收单元,设置为接收源服务器的通知消息,在所述通知消息中携带源服务器接收的流数据的唯一标识;
记录单元,设置为查找本地存储的流数据记录,在存在与所述通知消息中携带唯一标识匹配的记录时,将所述源服务器关联至所述流数据。
优选的,所述记录单元,还设置为查找本地存储的流数据记录,在不存在与所述通知消息中携带唯一标识匹配的流数据时,建立新的记录,在该记录中存储所述流数据、该流数据的唯一标识与所述源服务器之间的关联关系。
本发明实施例的另一方面提供了一种直播流传输系统,适用于CDN,该CDN中包含至少两个源服务器,该系统包括CDN中的服务器和调度中心服务器;
所述调度中心服务器,设置为记录流数据关联的至少两个源服务器,在接收所述CDN中服务器获取流数据关联的源服务器的请求时,将所述流数据关联的至少两个源服务器告知所述CDN中的服务器;
所述CDN中的服务器,设置为在接收到获取流数据的请求时,自所述调度中心服务器获取所述流数据关联的至少两个源服务器,从所述两个源服务器中 选择一个源服务器,与选择的源服务器建立连接,获取所述流数据。
优选的,所述CDN中的服务器,还设置为在接收到流数据的推送时,选择至少两个源服务器,其中一个为所有源服务器中对所述服务器来说最优的源服务器,为接收到的流数据生成唯一标识,并将所述流数据与所述唯一标识均传输给所述至少两个源服务器;
所述调度中心服务器,还设置为接收源服务器的通知消息,在所述通知消息中携带源服务器接收的流数据的唯一标识,查找本地存储的流数据记录,在存在与所述通知消息中携带唯一标识匹配的记录时,将所述源服务器关联至所述流数据。
本发明实施例的另一方面提供了一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述程序被处理器执行时实现上述方法的步骤。
本发明实施例的另一方面提供了一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现上述方法的步骤。
本发明的实施例提供了一种直播流传输方法、装置和系统,通过调度中心服务器记录流数据关联的至少两个源服务器,CDN中的服务器在接收到获取流数据的请求时,自调度中心服务器获取所述流数据关联的至少两个源服务器,而调度中心服务器在接收所述CDN中服务器获取流数据关联的源服务器的请求时,将所述流数据关联的至少两个源服务器告知所述CDN中的服务器,之后,所述CDN中的服务器从所述两个源服务器中选择一个源服务器,与选择的源服务器建立连接,获取所述流数据。通过多个源服务器实现流数据的多重备份,在源服务器与CDN中的其他服务器分处异地场景下,实现不同地区源服务器上同一流数据的备份,将存储有流数据的源服务器通知给调度中心服务器,再在CDN中的服务器拉取数据时由调度中心服务器通知给CDN中的服务器,以使得CDN中的服务器能够根据当前的情况从多个源服务器中选取最适合的源服务器,解决了异地直播场景下,直播流推送及拉取质量与效率双低的问题,实现了高效高可靠性的异地直播流传输。
参照附图来阅读对于示例性实施例的以下描述,本发明的其他特性特征和优点将变得清晰。
附图说明
并入到说明书中并且构成说明书的一部分的附图示出了本发明的实施例,并且与描述一起用于解释本发明的原理。在这些附图中,类似的附图标记用于表示类似的要素。下面描述中的附图是本发明的一些实施例,而不是全部实施例。对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,可以根据这些附图获得其他的附图。
图1示例性地示出了本发明的实施例一提供的一种直播流传输系统架构;
图2示例性的示出了本发明的实施例二提供的一种直播流传输方法的流程;
图3示例性的示出了本发明的实施例三提供的一种直播流传输装置的结构;
图4示例性的示出了本发明的实施例三提供的又一种直播流传输装置的结构;
图5示例性的示出了本发明的实施例三提供的一种直播流传输系统的架构。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。
在异地直播(如海外直播)加速应用场景下,通常采用直播源集中存储策略,具体地,直播源服务器部署在国内,在海外部署边缘节点,主播通过海外边缘节点将流推到国内直播源服务器上,海外观众通过海外边缘节点获取直播内容,如果该海外边缘节点没有该直播内容,海外边缘节点通过回国内直播服务器获取直播内容,获取到的直播内容提供给观众。
但该策略存在以下缺点:
1)海外节点回国内直播源服务器链路不稳定,海外主播推流不稳定,推流质量保证不了,观众获取直播内容时,往往卡顿,甚至获取不到直播内容,直 播服务得不到保证;
2)对于主播和观众在同一海外地区的情况,主播需要推流到国内,观众需要从国内获取直播内容,传统策略增加了传输“距离”,降低了直播服务质量,同时服务稳定性不能保证。
为了解决上述问题,本发明的实施例提供了一种直播流传输方法、装置和系统。本发明的实施例涉及的CDN可以具有单层(仅有边缘服务器)或多层结构。下面结合附图,对本发明的实施例进行详细说明。
首先结合附图,对本发明的实施例一进行说明。
本发明实施例提供了一种直播流传输系统,其结构如图1所示,由调度中心服务器、源服务器、边缘服务器、父服务器组成,边缘服务器与父服务器上安装有调度客户端,其中:
边缘服务器用于:与客户或用户直接相连,客户或用户的请求时,选择离客户或用户“最近”的边缘服务器,用于“第一公里”或“最后一公里”加速,避免客户或用户由于跨运营商、跨地区访问造成请求失败的情况,保证直播服务质量。
父服务器用于:与边缘服务器和源服务器直接相连,为中转服务器的一种,在部分重要地区部署,父服务器较边缘服务器数量少,父服务器用于流聚合,减少回源连接数,达到缓解源服务器承载压力,保证直播服务稳定;父服务器部署在拉流场景下,推流场景不部署,因为一路流的观众可能成千上万,观众可能分布在全国各地,如果所有边缘服务器都回源服务器拉流,容易造成源服务器达到服务器瓶颈,影响直播服务;
源服务器用于:与边缘服务器或父服务器相连,用于存储流数据,国内部署源集群用于中心存储,海外部署源服务器仅存储海外主播推流内容;
调度中心服务器用于:与源服务器和调度客户端交互,用于存储流记录,部署在bgp机房,源服务器将流记录通知调度中心服务器,调度客户端从调度中心服务器同步流记录;
调度客户端用于:与调度中心服务器和边缘服务器、父服务器交互,用于存储流记录,以及回上游ip调度,部署在边缘服务器和父服务器上;
需要说明的是,为方便说明,图1以应用较多的两层CDN结构为例,本发明的实施例提供的技术方案适用于单层及多层CDN,本发明的实施例对此不作 限定。
在图1所示直播流传输系统的基础之上,本发明的实施例还提供了一种直播流传输方法,为了便于说明,本发明实施例以海外直播场景为例,使用该方法完成直播流传输的流程如下:
S1:海外主播根据域名解析结果,将流URL推至边缘服务器A;
S2:边缘服务器A和调度客户端B(即边缘服务器A调用调度客户端B)交互,调度客户端B根据边缘服务器A所在地区和运营商,选择对边缘服务器A来说最优的源服务器,如选择离边缘服务器A“最近”的源服务器C,以及用于中心存储的国内源服务器D;
S3:边缘服务器A根据流的url和当前时间戳生成唯一标识flag,并将流URL数据和唯一标识flag传输至源服务器C和源服务器D;
S4:源服务器C通知调度中心服务器E,流URL已推至该源服务器C,带有唯一标识flag,调度中心服务器E根据唯一标识flag,如果与流URL原有记录唯一标识flagA相同,则流URL记录中添加源服务器C,否则更新流URL记录中源服务器为C;
S5:源服务器D通知调度中心服务器E,流URL已推至该源服务器D,带有唯一标识flag,调度中心服务器E根据唯一标识flag,如果与流URL原有记录唯一标识flagA相同,则流URL记录中添加源服务器D,否则更新流URL记录中源服务器为D;
S6:流URL记录中的源服务器有C和D,调度客户端G、I、B和调度中心服务器E交互;
S7:海外观众请求访问流URL,根据域名解析结果,请求到达边缘服务器F;
S8:边缘服务器F和调度客户端G交互,调度客户端G根据边缘服务器F所在地区和运营商,选择对边缘服务器F最优的父服务器,如选择离边缘服务器F“最近”的父服务器H;
S9:边缘服务器F将请求传至父服务器H;
S10:父服务器H和调度客户端I交互,获取流URL的记录,精确找到源服务器C和D,最终选择对于父服务器H来说最优的服务器,即选择离父服务器H“最近”的源服务器C;
S11:父服务器H和源服务器C建立连接,获取流URL数据,如果获取不到直播内容,则父服务器H和源服务器D建立连接;
S12:边缘服务器F从父服务器H获取流URL数据;
S13:海外观众从边缘服务器F获取流(URL)数据。
国内观众或与海外主播不在同一地区的海外观众,通过边缘服务器-父服务器(选优)-国内源服务器D获取直播内容,如果国内源服务器D没有直播内容,父服务器则到海外源服务器C获取直播内容。
对于步骤S10与步骤S12,在CDN只具有边缘服务器的情况下,可由边缘服务器寻找源服务器及回源。
本发明实施例还提供了一种计算机可读存储介质,此存储介质上存储有计算机程序,所述程序被处理器执行时实现上述方法的步骤。
本发明实施例还提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行此程序时实现上述方法的步骤。
下面结合附图,对本发明的实施例二进行说明。
本发明实施例提供了一种直播流传输方法,使用该方法,能够对同一流数据对应的多个源服务器进行记录管理,以保证在CDN中服务器需要拉取流数据时能够选择最优的服务器完成拉取,最大限度的提高数据传输效率,解决了多个源服务器场景下,尤其是异地直播场景下,直播流推送及拉取质量与效率双低的问题。
使用本发明的实施例提供的直播流传输方法完成流数据推送拉取管理的流程如图2所示,包括:
步骤201、边缘服务器在接收到流数据的推送时,选择至少两个源服务器,其中一个为所有源服务器中对所述边缘服务器来说最优的源服务器;
本步骤中,边缘服务器根据其所在地区和运营商,选择对该边缘服务器来说最优的源服务器,如选择离边缘服务器“最近”的源服务器,以及另一备份源服务器(如用于中心存储的国内源服务器)。
步骤202、边缘服务器为接收到的流数据生成唯一标识,并将所述流数据与所述唯一标识均传输给所述至少两个源服务器;
本步骤中,边缘服务器将流数据与该流数据的唯一标识一并传输给所述至少两个源服务器。
步骤203、接收到流数据的源服务器向调度中心服务器发送通知消息;
本步骤中,接收到流数据的源服务器向调度中心服务器发送通知消息,在所述通知消息中携带该唯一标识与本源服务器的身份信息。
步骤204、调度中心服务器记录流数据关联的至少两个源服务器;
本步骤中,调度中心服务器接收源服务器的通知消息,在所述通知消息中携带源服务器接收的流数据的唯一标识。之后,所述调度中心服务器查找本地存储的流数据记录,在存在与所述通知消息中携带唯一标识匹配的记录时(即,已接收到过其他源服务器发送与该流数据相关的通知消息,记录了其他源服务器为与该源服务器关联的源服务器),将所述源服务器关联至所述流数据,即新增了与该流数据关联的源服务器,此后该流数据就与多个源服务器存在关联关系,而调度中心服务器记录该关联关系。
在调度中心服务器本地不存在与所述通知消息中携带唯一标识匹配的流数据时,建立新的记录,在该记录中存储所述流数据、该流数据的唯一标识与所述源服务器之间的关联关系。
步骤205、所述CDN中的服务器在接收到获取流数据的请求时,自调度中心服务器获取所述流数据关联的至少两个源服务器;
本步骤中,CDN中的服务器接收到流数据请求时,首先向调度中心查询获取该流数据关联的源服务器信息。
对于典型的两层CDN架构(包含父服务器和边缘服务器),边缘服务器在接收到获取流数据的请求时,选择父服务器(最优的父服务器),向所述父服务器转发所述请求,所述父服务器自所述调度中心服务器获取所述流数据关联的至少两个源服务器。
对于单层CDN架构(仅包含边缘服务器),由边缘服务器在接收到获取流数据的请求时,自所述调度中心服务器获取所述流数据关联的至少两个源服务器。
对于多层CDN架构,由边缘服务器在接收到获取流数据的请求时,选择向内一层的中转服务器,逐层递进,直至最内层,由最内层的中转服务器自所述 调度中心服务器获取所述流数据关联的至少两个源服务器。
步骤206、调度中心服务器在接收所述CDN中服务器获取流数据关联的源服务器的请求时,将所述流数据关联的至少两个源服务器告知所述CDN中的服务器。
步骤207、CDN中的服务器从所述至少两个源服务器中选择一个源服务器,与选择的源服务器建立连接,获取所述流数据;
本步骤中,优选的,从所述两个源服务器中选择最优的服务器。当然,也可根据应用场景的实际需求,确定不同的选择策略。
CDN中的服务器在无法从选择的源服务器中获取所述流数据时,从所述至少两个源服务器中选择其他服务器重新建立连接并获取所述流数据。
本发明实施例还提供了一种计算机可读存储介质,此存储介质上存储有计算机程序,所述程序被处理器执行时实现上述方法的步骤。
本发明实施例还提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行此程序时实现上述方法的步骤。
下面结合附图,对本发明的实施例三进行说明。
本发明实施例提供了一种直播流传输装置,适用于CDN,其结构如图3所示,包括:
源服务器查询模块301,设置为在接收到获取流数据的请求时,自调度中心服务器获取所述流数据关联的至少两个源服务器;
拉取模块302,设置为从所述至少两个源服务器中选择一个源服务器,与选择的源服务器建立连接,获取所述流数据。
优选的,所述拉取模块302,具体设置为从所述至少两个源服务器中选择最优的服务器。
优选的,该装置还包括:
推送决策模块303,设置为在接收到流数据的推送时,选择至少两个源服务器,其中一个为所有源服务器中对所述直播流传输装置来说最优的源服务器;
数据推送模块304,设置为为接收到的流数据生成唯一标识,并将所述流数 据与所述唯一标识均传输给所述至少两个源服务器。
优选的,所述拉取模块302,还设置为在无法从选择的源服务器中获取所述流数据时,从所述至少两个源服务器中选择其他服务器重新建立连接并获取所述流数据。
图3所示的直播流传输装置,可集成于CDN中的服务器上,由该服务器执行相应功能。具体的,可以通过调度客户端实现该直播流传输装置,在CDN中的服务器上运行调用该调度客户端。
本发明实施例还提供了一种直播流传输装置,适用于CDN,其结构如图4所示,包括:
流记录管理模块401,设置为记录流数据关联的至少两个源服务器;
流数据管理模块402,设置为在接收所述CDN中服务器获取流数据关联的源服务器的请求时,将所述流数据关联的至少两个源服务器告知所述CDN中的服务器。
优选的,所述流记录模块401包括:
通知接收单元4011,设置为接收源服务器的通知消息,在所述通知消息中携带源服务器接收的流数据的唯一标识;
记录单元4012,设置为查找本地存储的流数据记录,在存在与所述通知消息中携带唯一标识匹配的记录时,将所述源服务器关联至所述流数据。
优选的,所述记录单元4012,还设置为查找本地存储的流数据记录,在不存在与所述通知消息中携带唯一标识匹配的流数据时,建立新的记录,在该记录中存储所述流数据、该流数据的唯一标识与所述源服务器之间的关联关系。
图4所示的直播流传输装置,可集成于调度中心服务器中,由调度中心服务器完成相应功能。
本发明实施例还提供了一种直播流传输系统,适用于CDN,其架构如图5所示,该CDN中包含至少两个源服务器,还包括CDN中的服务器和调度中心服务器。
优选的,所述至少两个源服务器处于异地,如海外与国内。
所述调度中心服务器,设置为记录流数据关联的至少两个源服务器,在接 收所述CDN中服务器获取流数据关联的源服务器的请求时,将所述流数据关联的至少两个源服务器告知所述CDN中的服务器;
所述CDN中的服务器,设置为在接收到获取流数据的请求时,自所述调度中心服务器获取所述流数据关联的至少两个源服务器,从所述两个源服务器中选择一个源服务器,与选择的源服务器建立连接,获取所述流数据。
优选的,所述CDN中的服务器,还设置为在接收到流数据的推送时,选择至少两个源服务器,其中一个为所有源服务器中对所述服务器来说最优的源服务器,为接收到的流数据生成唯一标识,并将所述流数据与所述唯一标识均传输给所述至少两个源服务器;
所述调度中心服务器,还设置为接收源服务器的通知消息,在所述通知消息中携带源服务器接收的流数据的唯一标识,查找本地存储的流数据记录,在存在与所述通知消息中携带唯一标识匹配的记录时,将所述源服务器关联至所述流数据。
本发明的实施例中涉及的选择“最优”源服务器具体可根据如下因素筛选:
地理位置、时延、丢包等。
可根据单一因素进行判断(如地理位置最近、时延最小等),也可根据多个因素综合判断,具体筛选方式可根据实际应用需求配置。
本发明的实施例提供了一种直播流传输方法、装置和系统,通过调度中心服务器记录流数据关联的至少两个源服务器,CDN中的服务器在接收到获取流数据的请求时,自调度中心服务器获取所述流数据关联的至少两个源服务器,而调度中心服务器在接收所述CDN中服务器获取流数据关联的源服务器的请求时,将所述流数据关联的至少两个源服务器告知所述CDN中的服务器,之后,所述CDN中的服务器从所述两个源服务器中选择一个源服务器,与选择的源服务器建立连接,获取所述流数据。通过多个源服务器实现流数据的多重备份,在源服务器与CDN中的其他服务器分处异地场景下,实现不同地区源服务器上同一流数据的备份,将存储有流数据的源服务器通知给调度中心服务器,再在CDN中的服务器拉取数据时由调度中心服务器通知给CDN中的服务器,以使得CDN中的服务器能够根据当前的情况从多个源服务器中选取最适合的源服务器,解决了异地直播场景下,直播流推送及拉取质量与效率双低的问题,实现 了高效高可靠性的异地直播流传输。
上面描述的内容可以单独地或者以各种方式组合起来实施,而这些变型方式都在本发明的保护范围之内。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制。尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些组件或所有组件可以被实施为由处理器,如数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。
工业实用性
在本发明实施例中,通过多个源服务器实现流数据的多重备份,在源服务器与CDN中的其他服务器分处异地场景下,实现不同地区源服务器上同一流数据的备份,将存储有流数据的源服务器通知给调度中心服务器,再在CDN中的 服务器拉取数据时由调度中心服务器通知给CDN中的服务器,以使得CDN中的服务器能够根据当前的情况从多个源服务器中选取最适合的源服务器,解决了异地直播场景下,直播流推送及拉取质量与效率双低的问题,实现了高效高可靠性的异地直播流传输。

Claims (19)

  1. 一种直播流传输方法,适用于内容分发网络CDN,该方法包括:
    所述CDN中的服务器在接收到获取流数据的请求时,自调度中心服务器获取所述流数据关联的至少两个源服务器;
    所述CDN中的服务器从所述至少两个源服务器中选择一个源服务器,与选择的源服务器建立连接,获取所述流数据。
  2. 根据权利要求1所述的直播流传输方法,其中,所述CDN中的服务器在接收到获取流数据的请求时,自调度中心服务器获取所述流数据关联的至少两个源服务器包括:
    边缘服务器在接收到获取流数据的请求时,自所述调度中心服务器获取所述流数据关联的至少两个源服务器;或,
    边缘服务器在接收到获取流数据的请求时,选择中转服务器,向所述中转服务器转发所述请求,所述中转服务器自所述调度中心服务器获取所述流数据关联的至少两个源服务器。
  3. 根据权利要求1所述的直播流传输方法,其中,所述CDN中的服务器从所述至少两个源服务器中选择一个源服务器具体为:
    所述CDN中的服务器从所述至少两个源服务器中选择最优的服务器。
  4. 根据权利要求1所述的直播流传输方法,其中,该方法还包括:
    边缘服务器在接收到流数据的推送时,选择至少两个源服务器,其中一个为所有源服务器中对于所述边缘服务器来说最优的源服务器;
    所述边缘服务器为接收到的流数据生成唯一标识,并将所述流数据与所述唯一标识均传输给所述至少两个源服务器。
  5. 根据权利要求1所述的直播流传输方法,其中,该方法还包括:
    所述CDN中的服务器在无法从选择的源服务器中获取所述流数据时,从所述至少两个源服务器中选择其他服务器重新建立连接并获取所述流数据。
  6. 一种直播流传输方法,适用于CDN,该方法还包括:
    调度中心服务器记录流数据关联的至少两个源服务器;
    所述调度中心服务器在接收所述CDN中服务器获取流数据关联的源服务 器的请求时,将所述流数据关联的至少两个源服务器告知所述CDN中的服务器。
  7. 根据权利要求6所述的直播流传输方法,其中,调度中心服务器记录流数据关联的至少两个源服务器包括:
    调度中心服务器接收源服务器的通知消息,在所述通知消息中携带源服务器接收的流数据的唯一标识;
    所述调度中心服务器查找本地存储的流数据记录,在存在与所述通知消息中携带唯一标识匹配的记录时,将所述源服务器关联至所述流数据。
  8. 根据权利要求7所述的直播流传输方法,其中,调度中心服务器接收源服务器的通知消息,在所述通知消息中携带源服务器接收的流数据的唯一标识的步骤之后还包括:
    所述调度中心服务器查找本地存储的流数据记录,在不存在与所述通知消息中携带唯一标识匹配的流数据时,建立新的记录,在该记录中存储所述流数据、该流数据的唯一标识与所述源服务器之间的关联关系。
  9. 一种直播流传输装置,适用于CDN,该装置包括:
    源服务器查询模块,设置为在接收到获取流数据的请求时,自调度中心服务器获取所述流数据关联的至少两个源服务器;
    拉取模块,设置为从所述至少两个源服务器中选择一个源服务器,与选择的源服务器建立连接,获取所述流数据。
  10. 根据权利要求9所述的直播流传输装置,其中,
    所述拉取模块,具体设置为从所述至少两个源服务器中选择最优的服务器。
  11. 根据权利要求9所述的直播流传输装置,其中,该装置还包括:
    推送决策模块,设置为在接收到流数据的推送时,选择至少两个源服务器,其中一个为所有源服务器中对所述直播流传输装置来说最优的源服务器;
    数据推送模块,设置为为接收到的流数据生成唯一标识,并将所述流数据与所述唯一标识均传输给所述至少两个源服务器。
  12. 根据权利要求9所述的直播流传输装置,其中,
    所述拉取模块,还设置为在无法从选择的源服务器中获取所述流数据时,从所述至少两个源服务器中选择其他服务器重新建立连接并获取所述流数据。
  13. 一种直播流传输装置,适用于CDN,该装置包括:
    流记录管理模块,设置为记录流数据关联的至少两个源服务器;
    流数据管理模块,设置为在接收所述CDN中服务器获取流数据关联的源服务器的请求时,将所述流数据关联的至少两个源服务器告知所述CDN中的服务器。
  14. 根据权利要求13所述的直播流传输装置,其中,所述流记录模块包括:
    通知接收单元,设置为接收源服务器的通知消息,在所述通知消息中携带源服务器接收的流数据的唯一标识;
    记录单元,设置为查找本地存储的流数据记录,在存在与所述通知消息中携带唯一标识匹配的记录时,将所述源服务器关联至所述流数据。
  15. 根据权利要求13所述的直播流传输装置,其中,
    所述记录单元,还设置为查找本地存储的流数据记录,在不存在与所述通知消息中携带唯一标识匹配的流数据时,建立新的记录,在该记录中存储所述流数据、该流数据的唯一标识与所述源服务器之间的关联关系。
  16. 一种直播流传输系统,适用于CDN,该CDN中包含至少两个源服务器,该系统包括CDN中的服务器和调度中心服务器;
    所述调度中心服务器,设置为记录流数据关联的至少两个源服务器,在接收所述CDN中服务器获取流数据关联的源服务器的请求时,将所述流数据关联的至少两个源服务器告知所述CDN中的服务器;
    所述CDN中的服务器,设置为在接收到获取流数据的请求时,自所述调度中心服务器获取所述流数据关联的至少两个源服务器,从所述两个源服务器中选择一个源服务器,与选择的源服务器建立连接,获取所述流数据。
  17. 根据权利要求16所述的直播流传输系统,其中,
    所述CDN中的服务器,还设置为在接收到流数据的推送时,选择至少两个源服务器,其中一个为所有源服务器中对所述服务器来说最优的源服务器,为接收到的流数据生成唯一标识,并将所述流数据与所述唯一标识均传输给所述至少两个源服务器;
    所述调度中心服务器,还设置为接收源服务器的通知消息,在所述通知消息中携带源服务器接收的流数据的唯一标识,查找本地存储的流数据记录,在 存在与所述通知消息中携带唯一标识匹配的记录时,将所述源服务器关联至所述流数据。
  18. 一种计算机可读存储介质,所述存储介质上存储有计算机程序,所述程序被处理器执行时实现权利要求1至5中任意一项所述方法的步骤和/或权利要求6至8中任意一项所述方法的步骤。
  19. 一种计算机设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述程序时实现权利要求1至5中任意一项所述方法的步骤和/或权利要求6至8中任意一项所述方法的步骤。
PCT/CN2018/078389 2017-03-09 2018-03-08 一种直播流传输方法、装置和系统及其计算机可读存储介质和计算机设备 WO2018161933A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710138374.3 2017-03-09
CN201710138374.3A CN107707926A (zh) 2017-03-09 2017-03-09 一种直播流传输方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2018161933A1 true WO2018161933A1 (zh) 2018-09-13

Family

ID=61169544

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/078389 WO2018161933A1 (zh) 2017-03-09 2018-03-08 一种直播流传输方法、装置和系统及其计算机可读存储介质和计算机设备

Country Status (2)

Country Link
CN (1) CN107707926A (zh)
WO (1) WO2018161933A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363651A (zh) * 2022-01-04 2022-04-15 上海哔哩哔哩科技有限公司 直播流处理方法及装置
CN114466210A (zh) * 2022-01-27 2022-05-10 广州方硅信息技术有限公司 直播质量检测处理方法及其装置、设备、介质、产品
CN114584561A (zh) * 2022-03-15 2022-06-03 联想(北京)有限公司 一种信息处理方法、装置和电子设备

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107707926A (zh) * 2017-03-09 2018-02-16 贵州白山云科技有限公司 一种直播流传输方法、装置和系统
CN110324377B (zh) * 2018-03-30 2022-03-25 武汉斗鱼网络科技有限公司 一种推送交互方法、装置、电子设备及介质
CN108737405B (zh) 2018-05-10 2020-02-18 网宿科技股份有限公司 一种对直播视频流进行导流的方法、ccl服务器和系统
CN109618241A (zh) * 2018-12-21 2019-04-12 网宿科技股份有限公司 音视频流分发系统中的音视频流分发方法及动态父节点
CN110324406B (zh) * 2019-06-03 2022-07-26 网宿科技股份有限公司 一种获取业务数据的方法和云服务系统
CN111245852B (zh) * 2020-01-16 2022-11-29 腾讯云计算(北京)有限责任公司 流数据传输方法、装置、系统、接入设备及存储介质
CN111464759B (zh) * 2020-03-26 2022-03-18 广州虎牙科技有限公司 一种直播导播方法、装置、存储介质及设备
CN112087644B (zh) * 2020-09-21 2022-10-04 北京金山云网络技术有限公司 拉流请求处理方法、装置、系统、电子设备和存储介质
CN112738202B (zh) * 2020-12-25 2023-05-26 广州虎牙科技有限公司 一种数据处理方法和相关装置以及存储介质
CN112752115B (zh) * 2020-12-29 2023-09-08 广州博冠信息科技有限公司 直播数据传输方法、装置、设备及介质

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752381A (zh) * 2012-06-28 2012-10-24 北京邮电大学 一种应用于分布式存储的多活动副本机制及其存取方法
CN103561049A (zh) * 2013-09-05 2014-02-05 乐视网信息技术(北京)股份有限公司 一种处理终端调度请求的方法、系统及装置
CN104967873A (zh) * 2015-06-29 2015-10-07 上海帝联信息科技股份有限公司 流媒体直播调度方法、系统和调度服务器
CN105872572A (zh) * 2015-12-14 2016-08-17 乐视云计算有限公司 直播视频的处理方法及装置
CN106375471A (zh) * 2016-09-29 2017-02-01 北京奇艺世纪科技有限公司 一种边缘节点确定方法及装置
CN106453328A (zh) * 2016-10-18 2017-02-22 乐视控股(北京)有限公司 直播视频文件的推流方法、客户端及边缘流媒体服务器
CN107707926A (zh) * 2017-03-09 2018-02-16 贵州白山云科技有限公司 一种直播流传输方法、装置和系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2002213046A1 (en) * 2000-10-04 2002-04-15 Routefree, Inc. Adaptive predictive delivery of information
CN101064841B (zh) * 2006-04-30 2010-11-10 武汉烽火网络有限责任公司 网络电视机顶盒、网络电视系统及其流媒体提供方法
CN101179494B (zh) * 2007-12-03 2010-09-01 浙江大学 面向网络多媒体传输服务的资源分发方法
US7822869B2 (en) * 2008-10-15 2010-10-26 Patentvc Ltd. Adaptation of data centers' bandwidth contribution to distributed streaming operations

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102752381A (zh) * 2012-06-28 2012-10-24 北京邮电大学 一种应用于分布式存储的多活动副本机制及其存取方法
CN103561049A (zh) * 2013-09-05 2014-02-05 乐视网信息技术(北京)股份有限公司 一种处理终端调度请求的方法、系统及装置
CN104967873A (zh) * 2015-06-29 2015-10-07 上海帝联信息科技股份有限公司 流媒体直播调度方法、系统和调度服务器
CN105872572A (zh) * 2015-12-14 2016-08-17 乐视云计算有限公司 直播视频的处理方法及装置
CN106375471A (zh) * 2016-09-29 2017-02-01 北京奇艺世纪科技有限公司 一种边缘节点确定方法及装置
CN106453328A (zh) * 2016-10-18 2017-02-22 乐视控股(北京)有限公司 直播视频文件的推流方法、客户端及边缘流媒体服务器
CN107707926A (zh) * 2017-03-09 2018-02-16 贵州白山云科技有限公司 一种直播流传输方法、装置和系统

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363651A (zh) * 2022-01-04 2022-04-15 上海哔哩哔哩科技有限公司 直播流处理方法及装置
CN114363651B (zh) * 2022-01-04 2023-06-06 上海哔哩哔哩科技有限公司 直播流处理方法及装置
CN114466210A (zh) * 2022-01-27 2022-05-10 广州方硅信息技术有限公司 直播质量检测处理方法及其装置、设备、介质、产品
CN114466210B (zh) * 2022-01-27 2024-04-16 广州方硅信息技术有限公司 直播质量检测处理方法及其装置、设备、介质
CN114584561A (zh) * 2022-03-15 2022-06-03 联想(北京)有限公司 一种信息处理方法、装置和电子设备

Also Published As

Publication number Publication date
CN107707926A (zh) 2018-02-16

Similar Documents

Publication Publication Date Title
WO2018161933A1 (zh) 一种直播流传输方法、装置和系统及其计算机可读存储介质和计算机设备
EP3595268B1 (en) Streaming media resource distribution method, system, edge node and central dispatching system
US10530847B2 (en) Virtual application delivery chassis system
US11074226B2 (en) Hierarchical computing network and methods thereof
US11284126B2 (en) Method and system for streaming media live broadcast
US7978631B1 (en) Method and apparatus for encoding and mapping of virtual addresses for clusters
CN108574666B (zh) 一种数据流调度方法、装置和系统
US8812718B2 (en) System and method of streaming data over a distributed infrastructure
WO2009021374A1 (fr) Système de réseau de pair à pair de service vidéo intégré
US20130097277A1 (en) Method and apparatus for load balancing of content-centric network
US10284381B1 (en) Low latency data distribution in a computing service environment
US20200404035A1 (en) Extensible Resource Management for Hybrid Cloud-Based Media Production
US20220070507A1 (en) Method for distributing audio/video stream in audio/video stream distribution system, and dynamic parent node
US10397069B2 (en) Self-adaptive service management method and system thereof
Nahrstedt et al. Next generation session management for 3D teleimmersive interactive environments
CN110149365A (zh) 服务适配方法、设备、系统以及计算机可读介质
US20150172735A1 (en) Program source data processing method and device
CN110557611B (zh) 信息同步方法、装置及存储介质
CN110063050A (zh) 一种业务调度方法及系统
CN110324477B (zh) 一种通讯录的处理方法和装置
EP3618349A1 (en) Conference cascading method based on software media server, and server and storage medium
CN110958426B (zh) 一种基于视联网的更新主消息号的方法及装置
KR20210153466A (ko) 방송 서비스 방법 및 그 시스템
CN115174955A (zh) 基于未来网络的数字电影全国高速发行系统
CN115941985A (zh) 一种推流方法、装置、介质及设备

Legal Events

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

Ref document number: 18763074

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18763074

Country of ref document: EP

Kind code of ref document: A1