WO2010045811A1 - 流媒体业务的处理方法、装置及系统 - Google Patents

流媒体业务的处理方法、装置及系统 Download PDF

Info

Publication number
WO2010045811A1
WO2010045811A1 PCT/CN2009/072998 CN2009072998W WO2010045811A1 WO 2010045811 A1 WO2010045811 A1 WO 2010045811A1 CN 2009072998 W CN2009072998 W CN 2009072998W WO 2010045811 A1 WO2010045811 A1 WO 2010045811A1
Authority
WO
WIPO (PCT)
Prior art keywords
slice
standby
stream
client
data
Prior art date
Application number
PCT/CN2009/072998
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 WO2010045811A1 publication Critical patent/WO2010045811A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/40Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass for recovering from a failure of a protocol instance or entity, e.g. service redundancy protocols, protocol state redundancy or protocol service redirection
    • 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/612Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for unicast

Definitions

  • the present invention relates to the field of communications technologies, and in particular, to a method, an apparatus, and a system for processing a streaming media service. Background technique
  • Streaming Media refers to a media format that is streamed over the Internet (Internet).
  • the Living Broadcast service usually consists of three components: the headend, the central platform, and the client.
  • the live data stream of the head end is distributed to the media server of the central platform in the form of a live channel. After the channel is successfully released, the center platform is displayed to the user through the client through the live channel and is used by the user.
  • the central platform dispatches the user to the media server and the media server provides the user with a live streaming service.
  • the client receives the live data stream sent by the media server and completes decoding and display of the live stream.
  • Streaming live broadcast services usually use the central node and edge node schemes to provide streaming services to users.
  • a central node and multiple edge nodes are usually included.
  • the central node may include a Center Control System (CCS) and a number of Center Servers (CSs), and the edge nodes may include a number of Edge Servers (ESs).
  • CCS Center Control System
  • CSs Center Servers
  • ESs Edge Servers
  • the CS is responsible for accessing and distributing the live stream data streams to the edge nodes.
  • the ES is responsible for receiving data streams from the CS and distributing the data streams to the client.
  • the CS In the prior art, in the case where the CS or the ES fails, there is a method of ensuring the transmission reliability problem of the live broadcast service.
  • the first case is that the CS is faulty.
  • the solution at this time mainly uses the Active Backup CS method to solve the problem that the live service may be interrupted for a long time when a single CS fails.
  • the channel needs to be released.
  • the active and standby CSs, and the active and standby CSs need to start the channel at the same time.
  • the ES can obtain data from the standby CS.
  • the live data stream is sent from the encoder (Encoder) to the client (Client) via the primary CS and ES.
  • the primary CS fails, the Encoder and the primary CS, the primary CS, and the ES will be caused. Inter-data channel interruption, because the Encoder data stream can not send ES through CS, will eventually lead to the interruption of the data flow between Client and ES; Client can not receive The data is thus in a state of waiting for data; when the ES detects that the data channel with the primary CS is interrupted, the address and port of the standby CS are acquired; the ES establishes a data channel to the standby CS; after the data channel is successfully established, the standby CS will broadcast the data.
  • the stream is sent to the ES; if the data channel between the ES and the client is not interrupted, the ES sends the data stream to the client; the client receives the live stream and completes decoding and display. It should be noted that if the client waits for a timeout, the data channel with the ES is disconnected, and the playback is stopped. For the implementation process of the solution, reference may be made to the signaling flowchart shown in FIG.
  • the ES fails.
  • the failure of the ES will cause the data channel between the active CS and the ES, ES and the client to be interrupted. Since the failure of the ES does not affect the data channel between the Encoder and the CS, the Encoder and the CS are The data flow remains normal, but the data channel and data flow between the client and the ES are interrupted, causing the client's playback to be interrupted.
  • the user re-requests the channel;
  • CCS determines the user's home area according to the IP of the client, and determines The edge node of the service;
  • CCS can select the ES with the lightest load in the edge node according to the load balancing principle, and the ES provides services for the user; wherein, because there are multiple live channels carried by the ES, and the number of users serving There are also many, then another ES may be selected in the next load balancing;
  • CCS returns the signaling address and signaling port of the newly selected ES to the client according to the result of load balancing; the client initiates to the ES according to the address and port.
  • the channel play request includes the channel identifier (Channel ID) of the live channel; after the ES receives the play request of the client, according to Clie The channel ID of the nt request finds the local channel distribution record; the CCS queries the service address and port of the channel in the CS and other information of the channel (such as the coding mode and the code rate) according to the channel ID requested by the ES; the data is successfully obtained after the CCS query succeeds.
  • the source IP, port, and channel parameters are sent to the ES; after receiving the response to the request message, the ES allocates a service port for the channel, and the service port is used to provide a live data stream for the client; after the service port is successfully assigned, each ES is based on the message.
  • the channel parameter MSID (the ID of the ES itself), the IP of the CS, the data port, the channel ID, the code rate, the encoding mode, the resolution, etc. create a live channel; after the ES channel is successfully created, the CCS is notified, and the CCS increases the channel distribution to the ES.
  • the ES establishes a data channel to the CS according to the address and port of the CS; after the data channel is successfully established, the CS sends the data stream to the ES; the ES sends a play request response message to the client, where the message carries the channel ID, ES Service address, ES service port, code rate, encoding mode, etc.; Number of ESs established after the client receives the playback response message.
  • the ES sends the data stream to the client, and the implementation process of the solution can refer to the signaling flowchart shown in FIG. 2.
  • the ES cannot obtain data that needs to be transmitted from the standby CS when the primary CS fails, and the data received by the ES from the standby CS may be duplicated or lost, causing the user to pause during viewing. Black screen or mosaic phenomenon, affecting the user experience;
  • the embodiment of the invention provides a method, a device and a system for processing a streaming media service, so as to solve the problem that the user cannot continue to obtain a live data stream from the CS or the ES when the CS or the ES is faulty, so as to improve the user experience in the streaming media service. .
  • an embodiment of the present invention provides a method for processing a streaming media service, including:
  • the standby CS maintains the correspondence between the synchronization point and the slice identifier according to the packet synchronization point and the slice identifier sent by the primary center server CS.
  • the standby CS acquires the slice identifier of the packet interruption point; according to the slice identifier, the standby CS starts to slice the data packet from the corresponding message synchronization point;
  • the standby CS transmits the subsequent slice of the slice identifier to the client through the edge server ES Stream.
  • An embodiment of the present invention provides a processing device for a streaming media service, including:
  • a maintenance unit configured to maintain a correspondence between the synchronization point and the slice identifier according to the packet synchronization point and the slice identifier sent by the primary center server CS;
  • a first acquiring unit configured to acquire a slice identifier of a packet break point when the primary CS fails
  • a slicing unit configured to slice a data packet from a corresponding message synchronization point according to the slice identifier
  • a transmitting unit configured to transmit, by the edge server ES, a subsequent slice stream of the slice identifier to the client.
  • An embodiment of the present invention provides a processing system for a streaming media service, including:
  • a first service processing device configured to maintain a correspondence between the synchronization point and the slice identifier according to the synchronization information and the slice identifier sent by the active central server CS, and when the primary CS fails Obtaining a slice identifier of the packet break point; and, according to the slice identifier, starting the data packet from the corresponding packet synchronization point; and transmitting, by the edge server ES, the subsequent slice stream of the slice identifier to the client;
  • the primary CS is configured to determine a message synchronization point of the live data stream, and start to slice according to the message synchronization point, and send the message synchronization point and the slice identifier to the service processing device.
  • the embodiment of the invention further provides a processing method for a streaming media service, including:
  • the client obtains the slice identifier of the packet break point
  • the client sends a request to the standby ES, where the request is used to obtain a subsequent slice stream according to the slice identifier;
  • the client receives the subsequent slice stream sent by the standby ES.
  • the embodiment of the invention further provides a processing device for a streaming media service, including:
  • a second acquiring unit configured to acquire a slice identifier of a packet break point when the primary edge server ES fails
  • a sending requesting unit configured to send a request to the standby ES, where the request is used to obtain a subsequent slice stream according to the slice identifier;
  • the receiving unit is configured to receive a subsequent slice stream sent by the standby ES.
  • the embodiment of the invention further provides a processing system for a streaming media service, including:
  • the second service processing device is configured to: when the primary edge server ES fails, obtain a slice identifier of the packet interruption point; send a request to the standby ES, where the request is used to obtain a subsequent slice stream according to the slice identifier; and receive the standby Subsequent slice stream sent by the ES;
  • the standby ES is configured to send, according to the request sent by the service processing device, a subsequent slice stream to the service processing device according to the slice identifier.
  • the embodiment of the invention further provides a processing method for a streaming media service, including:
  • the third ES connected to the client acquires the slice identifier of the packet interruption point, and requests the data source from the central control system CCS;
  • the third ES establishes a data channel with the second ES according to the data source address returned by the CCS, where the second ES is the upper ES of the first ES;
  • the third ES forwards the subsequent slice stream of the slice identifier sent by the second ES to the client.
  • the embodiment of the invention further provides a processing device for a streaming media service, including:
  • a third acquiring unit configured to acquire a slice identifier of a breakpoint in the packet when the first ES in the topology structure fails, and request a data source from the central control system CCS;
  • a establishing unit configured to establish a data channel with the second ES according to the data source address returned by the CCS, where the second ES is an upper ES of the first ES;
  • a forwarding unit configured to forward the subsequent slice stream of the slice identifier sent by the second ES to the client.
  • the embodiment of the invention further provides a processing system for a streaming media service, including:
  • a third service processing device configured to acquire a slice identifier of a packet break point when the first ES in the topology structure fails, and request a data source from the central control system CCS; according to the data source address returned by the CCS, Establishing a data channel with the second ES, where the second ES is the upper ES of the first ES; and forwarding the subsequent slice stream of the slice identifier sent by the second ES to the client;
  • a second ES configured to send, according to the request of the service processing device, a subsequent slice stream of the slice identifier to the service processing device.
  • the slice identifier sent when the fault occurs may be determined, and then according to the slice identifier, the spare CS is used to send the slice through the data channel between the standby CS and the client.
  • the embodiment of the present invention sends data in the form of a slice stream, so that the live streaming data can not lose data when the primary CS fails, and the user can continue to obtain the live data stream from the standby CS or ES, so that the user can continue to obtain the live data stream from the standby CS or the ES. Online users will not experience pauses, mosaics, etc., which improves the user's viewing experience.
  • FIG. 1 is a signaling flow diagram of a service processing method when a primary CS fails in the prior art
  • FIG. 2 is a signaling flowchart of a service processing method when an ES fails in the prior art
  • FIG. 3 is a flowchart of an embodiment of a method for processing a streaming media service according to the present invention
  • FIG. 4 is a schematic diagram of an embodiment of a connection manner of an ES topology in an edge node;
  • FIG. 5 is a flowchart of another embodiment of a method for processing a streaming media service according to the present invention;
  • FIG. 6 is a streaming medium of the present invention;
  • FIG. 7 is a flowchart of the startup signaling of the central server channel;
  • Figure 8 is a flow chart of the initiation signaling of the edge server channel
  • FIG. 10 is a schematic structural diagram of an embodiment of a processing device for streaming media services according to the present invention
  • FIG. 11 is a schematic structural diagram of an embodiment of a processing device for streaming media services according to the present invention
  • FIG. 12 is a flowchart of a processing system for streaming media services according to the present invention.
  • FIG. 13 is a schematic structural diagram of an embodiment of a processing method of a streaming media service according to the present invention
  • FIG. 14 is a flowchart of an embodiment of a method for processing a streaming media service according to the present invention;
  • FIG. 15 is a signaling flowchart of an embodiment of a method for processing a streaming media service according to the present invention
  • 16 is a schematic structural diagram of an embodiment of a processing device for streaming media services according to the present invention
  • FIG. 17 is a schematic structural diagram of an embodiment of a processing device for streaming media services according to the present invention
  • FIG. 18 is a flowchart of a processing system for streaming media services according to the present invention.
  • FIG. 19 is a schematic structural diagram of an embodiment of a processing method of a streaming media service according to the present invention
  • FIG. 20 is a flowchart of an embodiment of a processing method of a streaming media service according to the present invention;
  • FIG. 21 is a signaling flowchart of an embodiment of a method for processing a streaming media service according to the present invention
  • FIG. 22 is a schematic structural diagram of an embodiment of a processing device for streaming media services according to the present invention
  • FIG. 23 is a processing device for streaming media services according to the present invention
  • FIG. 24 is a schematic structural diagram of an embodiment of a processing system of a streaming media service according to the present invention.
  • the method required to implement the embodiment of the present invention mainly includes the following steps:
  • Step 301 The standby CS maintains a correspondence between the synchronization point and the slice identifier of the packet according to the packet synchronization point and the slice identifier sent by the primary center server CS.
  • Step 302 When the primary CS fails, the standby CS acquires the slice identifier of the packet interruption point;
  • Step 303 The standby CS starts to slice the data packet from the corresponding message synchronization point according to the slice identifier.
  • Step 304 The standby CS transmits the subsequent slice stream of the slice identifier to the client through the edge server ES.
  • both the primary CS and the standby CS are receiving the live data stream sent by the encoder, but in order to ensure the consistency of the primary CS and the alternate CS slice identifier, only the primary The data packet is sliced by the CS. Since both the active and standby CSs receive the data stream at the same time, the active and standby CSs need to ensure that the standby CS starts to be cut by transmitting the message synchronization point. Continuity and consistency of the slice-time slice; It should be noted that the message synchronization point may be based on the timestamp, the message sequence number, and the message identifier in the message, and the primary CS determines the message synchronization point.
  • the data packet can be sliced according to the equal-length algorithm.
  • the synchronization point and the slice identifier of the packet are sent to the standby CS, and the standby CS only performs the packet buffer operation, and The corresponding relationship between the latest packet synchronization point and the slice identifier can be maintained.
  • the standby CS can obtain the slice identifier of the packet interruption point according to the corresponding relationship maintained by itself; and according to the slice identifier, the subsequent The data message begins to be sliced, and then the subsequent slice stream of the slice identifier is sent to the client through the edge server ES.
  • the standby CS has the function of synchronizing data with the active CS, and can quickly process the data packet according to the packet synchronization point and the slice identifier sent by the primary CS. And it is consistent with the slice of the main CS. Therefore, for the client, the phenomenon that the client is duplicated or lost is not caused, and the user experience is improved.
  • the ES in the edge node may use the connection manner of the topology structure.
  • the edge nodes each include four edge servers ES1, ES2, ES3, ES4, and there are two live channels Channel-1 and Channel-2 on the central server CS201.
  • the ES topology of the live channel Channel-1 is CS-ES1-ES3-ES2-ES4
  • the ES topology of the live channel Channel-2 is CS-ES2-ES4-ES1.
  • the ES topology of the live channel Channel-1 is CS-ES3-ES2-ES1-ES4, and the ES topology of the live channel Channel-2 is CS-ES4-ES2-E31-ES1;
  • Channel Channel-1, CS and edge node 1 only have one live stream, and there is only one live stream between CS and edge node 2.
  • For the live channel Channel-2 there is only one live stream in the CS and the edge node 1, and only one live stream exists between the CS and the edge node 2.
  • the ES1, ES2, ES3, and ES4 in each edge node form a chain. Service topology.
  • ES3 is the client of ESI
  • ES2 is the client of ES3
  • ES1 is the server of ES1 server.
  • P2P Peer to Peer
  • Service model Referring to the flowchart of FIG. 5, and the signaling flowchart of FIG. 6, in the method embodiment of the present invention, the method provided in Embodiment 2 of the present invention may include the following steps:
  • Step 501 Perform a startup process of the primary CS channel and the standby CS channel;
  • the startup process of the central server channel may be as shown in FIG. 7.
  • the step 501 may specifically include the following sub-steps:
  • Sub-step A1 The primary CS and the standby CS receive the live data stream sent by the encoder through the data channel established with the encoder;
  • Sub-step A2 The active CS and the standby CS buffer the live data stream and save the data message in an internal buffer;
  • the primary CS When the primary CS receives the live data stream, it buffers the message and saves the message in the internal buffer area;
  • Sub-step A3 The primary CS determines the message synchronization point, and slices the data message according to the equal-length slice algorithm
  • each channel maintains a slice counter, each slice is assigned a separate slice ID, and the slice ID is sequentially incremented according to the step speed equal to one;
  • Sub-step A4 The primary CS sends the message synchronization point and the slice identifier to the standby CS; after the slice is completed, the primary CS puts the slice into the slice buffer; the temporarily stored data in the buffer is usually buffered. Time correlation, and the channel code rate determines the maximum number of slices N to be accommodated in the buffer; when the number of slices in the buffer is greater than N, the longest slice will be replaced; the main CS datagram
  • the synchronization point and the slice identifier of the packet are sent to the standby CS, and the standby CS updates the correspondence between the latest ⁇ synchronization point and the slice identifier, and in the subsequent step, the standby CS is synchronized according to the packet.
  • the slice identifier the slice can be started quickly and accurately, and is consistent with the slice of the primary CS; in this embodiment, the standby CS can maintain the correspondence between multiple messages and the slice header;
  • Step 502 Perform an edge server ES channel startup process
  • Step 302 may specifically include the following sub-steps: Sub-step Bl: establishing a data channel between the ES and the CS;
  • the operator selects the channel to be activated through the interface, and then submits the CCS after the determination, and the message includes the Channel ID corresponding to the live channel; the CCS notifies the ES channel to start, and the start message carries the Channel ID; after receiving the channel start message of the CCS, the ES sends the CCS to the CCS. Request the address and port of the data source; CCS checks the ES topology table corresponding to the channel. When the channel has no ES connected to the CS, CS is used as the data source. It should be noted that the topology of the ES is according to the chain.
  • the request ES is a central server CS; sub-step B2: CS sends a slice stream of the buffer to the ES through a fast buffering mechanism;
  • the CS sends the buffer data to the ES through the fast buffering mechanism, and when the buffer is completely transmitted, it is converted to the normal rate and the slice is sent to the ES;
  • the user can watch the live channel program on the Internet by selecting the channel and determining the play;
  • Step 503 According to the message synchronization point and the slice identifier sent by the active central server CS, the CS is used to maintain the correspondence between the synchronization point and the slice identifier.
  • both the primary CS and the standby CS receive the data stream from the Encoder, and the primary CS completes the packet slicing, while the standby CS only performs the packet buffer processing; the primary CS slice needs to synchronize the packet. And the slice identifier is synchronized to the standby CS, and the standby CS can update the correspondence between the packet synchronization point and the slice identifier in time;
  • the live stream stream is sent from the primary CS to the ES1, and then sent by ES1 to the ESn, and the ESn provides the data service for the client.
  • the topology relationship is (CS-ESl-ESn).
  • ESI may also provide services for other clients at this time; when the primary CS fails, the data channel between ES1 and the primary CS is interrupted. When ES1 detects the primary CS failure, the channel is received before the interruption.
  • the latest slice identification (ID) it should be noted that ES1 only needs to record the channel related to the fault CS;
  • the slice identifier of the data packet may be reversely determined along the time axis, for example: taking the first 2 ⁇ 3 packets that identify the packet identifier, and the packets arrive at the buffer of the standby CS first. Area; Step 504: When the primary CS fails, the standby CS acquires a slice identifier of the packet interruption point.
  • the primary CS and the standby CS switching mechanism may depend on the two-party software of the third party, such as the VCS software; in this step, the dual-machine software can quickly switch to the standby CS, and the standby CS rises to the primary CS. ;
  • Step 505 The standby CS finds a data packet that has been sent by the primary CS according to the packet synchronization point corresponding to the slice identifier.
  • the standby CS finds a data packet that has been sent by the primary CS according to the packet synchronization point corresponding to the slice identifier.
  • step 7 can be used to determine the first 2 ⁇ 3 messages of the message, and these messages first reach the buffer of the standby CS;
  • Step 507 Establish a data channel of the edge server ES to the standby CS;
  • Step 508 The edge server ES requests the standby CS to start sending a subsequent slice stream from the slice identifier.
  • Step 509 The edge server ES sends the received subsequent slice stream to the client.
  • the standby CS sends the slice stream to the ES according to the initial slice of the ES request, and in this embodiment, according to the ES topology relationship, the slice remains first.
  • ESI ES1 sends the slice stream to ESn
  • ESN sends the slice stream to the client.
  • the data packet that is sliced by the standby CS is repeated, which inevitably causes the slice to repeat.
  • the slice received by ES1 is repeated, it needs to be updated.
  • the local buffer is sliced; and, because the primary CS fails, the ESn slice stream is interrupted, not the upper-level data source ES1 is faulty.
  • This embodiment may further include: The client restores the slice stream to the original data message in a first-in, first-out manner, and decodes and plays.
  • the client channel request processing flow can be referred to FIG.
  • the active hot standby can be implemented by using the mechanism of the primary CS and the standby CS, and the primary CS processes the live data packet, and synchronizes the slice identifier and the packet identifier to the standby CS.
  • CS Updates the correspondence between the message identifier and the slice identifier.
  • the standby CS finds the corresponding packet according to the packet identifier and then starts slicing according to the slice identifier; wherein, the switching mechanism between the primary CS and the standby CS may depend on the third-party software implementation; After the recovery, it becomes the standby CS, and the original standby CS rises to the primary CS; when the new primary CS starts to slice, the 4 ⁇ identifier and the slice identifier are synchronized to the new standby CS; the primary CS completes the packet slicing work, and the standby CS No slicing work is performed before becoming the primary CS, and only the slice identifier and the message identifier synchronized by the primary CS are maintained; the slicing mechanism of the primary CS can be sliced by the same length method, or sliced based on multiple image frames.
  • the identifier may include parameter information such as a version number, a slice length, a serial number, and a start position of the first frame; the primary CS fails to be restored to the standby CS, and the original standby CS rises to the primary CS; wherein, the standby CS ⁇ The method of backing up N messages along the time axis and then starting the slice avoids the problem of slice inconsistency that may occur after the master/slave CS switchover, where the specific number of N can be The self-setting according to the network conditions does not affect the implementation of the embodiment of the present invention.
  • the embodiment of the present invention further provides a processing device for a streaming media service, where the device may include:
  • the maintenance unit 1001 is configured to maintain a correspondence between the synchronization point and the slice identifier according to the packet synchronization point and the slice identifier sent by the active central server CS.
  • the device may be integrated into the standby CS, or may be implemented directly by using the CS, or may be separately used as an entity connected to the CS;
  • the packet synchronization point may be based on the timestamp, the message sequence number, and the packet identifier in the packet.
  • the active CS may slice the data packet according to the equal length algorithm.
  • the synchronization point and the slice identifier of the packet are sent to the standby CS, and the standby CS only performs the packet buffer operation, and can maintain the latest packet synchronization point and Correspondence of slice identifiers;
  • the first obtaining unit 1002 is configured to acquire a slice identifier of a packet break point when the primary CS fails.
  • the standby CS can obtain the slice identifier of the packet interruption point according to the corresponding relationship maintained by itself;
  • the slicing unit 1003 is configured to slice the data packet from the corresponding message synchronization point according to the slice identifier
  • the transmitting unit starts to slice the subsequent data packet according to the slice identifier, and the transmitting unit 1004 is configured to transmit, by using the edge server ES, the subsequent slice stream of the slice identifier to the client.
  • the subsequent slice stream of the slice identification is then sent by the transmission unit 1004 to the client via the edge server ES.
  • the standby CS has the function of synchronizing data with the active CS, and can quickly process the data packet according to the packet synchronization point and the slice identifier sent by the primary CS. And it is consistent with the slice of the main CS. Therefore, for the client, the phenomenon that the client is duplicated or lost is not caused, and the user experience is improved.
  • the device may specifically include:
  • the maintenance unit 1101 is configured to maintain a correspondence between the synchronization point and the slice identifier according to the packet synchronization point and the slice identifier sent by the primary center server CS.
  • the first obtaining unit 1102 is configured to acquire a slice identifier of a packet break point when the primary CS fails;
  • the slicing unit 1103 is configured to slice the data packet from the corresponding synchronization point according to the slice identifier
  • the slicing unit 1103 may include:
  • the locating unit 11031 is configured to find, according to the packet synchronization point corresponding to the slice identifier, a data packet that has been sent by the primary CS.
  • a transmitting unit 1104 configured to transmit, by using an edge server ES, a subsequent slice stream of the slice identifier to a client;
  • the transmission unit 1104 may specifically include:
  • a first establishing subunit 11041 configured to establish a data channel to the edge server ES
  • a first request subunit 11042 configured to receive a request for the ES to start sending a subsequent slice stream from the slice identifier
  • the first sending subunit 11043 is configured to send the received subsequent slice stream to the ES.
  • the active hot standby can be implemented by using the mechanism of the primary CS and the standby CS, and the primary CS processes the live data packet, and synchronizes the slice identifier and the packet identifier to the standby CS.
  • CS Updates the correspondence between the message identifier and the slice identifier.
  • the standby CS finds the corresponding packet according to the packet identifier and then starts slicing according to the slice identifier; wherein, the switching mechanism between the primary CS and the standby CS may depend on the third-party software implementation; After the recovery, it becomes the standby CS, and the original standby CS rises to the primary CS; when the new primary CS starts to slice, the 4 ⁇ identifier and the slice identifier are synchronized to the new standby CS; the primary CS completes the packet slicing work, and the standby CS No slicing work is performed before becoming the primary CS, and only the slice identifier and the message identifier synchronized by the primary CS are maintained; the slicing mechanism of the primary CS can be sliced by the same length method, or sliced based on multiple image frames.
  • the identifier may include parameter information such as a version number, a slice length, a serial number, and a start position of the first frame; the primary CS fails to be restored to the standby CS, and the original standby CS rises to the primary CS; wherein, the standby CS ⁇ The method of backing up N messages along the time axis and then starting the slice avoids the problem of slice inconsistency that may occur after the master/slave CS switchover, where the specific number of N can be The self-setting according to the network conditions does not affect the implementation of the embodiment of the present invention.
  • the embodiment of the present invention further provides a processing system for a streaming media service, where the system specifically includes:
  • the first service processing device 1201 is configured to maintain, according to the message synchronization point and the slice identifier sent by the active central server CS, the correspondence between the synchronization point and the slice identifier, and the primary CS When a fault occurs, the slice identifier of the packet break point is obtained. According to the slice identifier, the data packet is sliced from the corresponding packet synchronization point; and the subsequent slice of the slice identifier is transmitted to the client by the edge server ES. flow;
  • the first service processing device 1201 may be integrated on the standby CS, or may be directly implemented by using the standby CS.
  • both the primary CS and the secondary CS are receiving the live data stream sent by the encoder, but in order to ensure the consistency between the primary CS and the alternate CS slice identifier, only the primary CS pair data packet is used. If the primary and secondary CSs receive the data stream at the same time, the active and standby CSs need to ensure the continuity and consistency of the slice when the standby CS starts to slice by transmitting the message synchronization point.
  • the primary CS1202 is configured to determine a message synchronization point of the live data stream, and start to slice according to the packet synchronization point, and send the message synchronization point and the slice identifier to the first service processing device.
  • the packet synchronization point may be based on the timestamp, the message sequence number, and the packet identifier in the packet, and the primary CS may determine the packet synchronization point according to the equal length algorithm.
  • the data is sliced, and after the data packet of the primary CS is sliced, the synchronization point and the slice identifier of the message are sent to the standby CS, and the standby CS only performs the message buffering operation, and can maintain the latest message synchronization point and slice.
  • the standby CS can obtain the slice identifier of the packet breakpoint according to the corresponding relationship maintained by itself; and according to the slice identifier, the subsequent data packet is sliced, and then passes through the edge.
  • the server ES sends a subsequent slice stream of the slice identifier to the client.
  • the CS has the function of data synchronization, and can quickly process the data packet according to the message synchronization point and the slice identifier sent by the primary CS, and keeps the same with the slice of the primary CS. Therefore, for the client, it will not The phenomenon of duplication or loss of data on the client is enhanced, and the user experience is improved.
  • the system may include:
  • a first service processing device 1301 wherein the service processing device is configured to be based on an active center server
  • the synchronization point and the slice identifier sent by the CS are used to maintain the correspondence between the synchronization point and the slice identifier.
  • the slice identifier of the packet break point is obtained.
  • the corresponding packet synchronization point begins to slice the data packet; and passes through the edge server.
  • the ES transmits a subsequent slice stream of the slice identifier to the client;
  • the first service processing device 1301 may specifically include:
  • the maintenance unit 13011 is configured to maintain, according to the message synchronization point and the slice identifier sent by the active central server CS, the correspondence between the synchronization point and the slice identifier.
  • the first obtaining unit 13012 is configured to acquire a slice identifier of a packet break point when the primary CS fails.
  • the slicing unit 13013 is configured to slice the data packet from the corresponding synchronization point according to the slice identifier
  • each channel maintains a slice counter, each slice is assigned a separate slice ID, and the slice ID is sequentially incremented according to the step speed equal to one;
  • the transmitting unit 13014 is configured to transmit, by using the edge server ES, a subsequent slice stream of the slice identifier to the client;
  • the primary CS1302 is configured to determine a message synchronization point of the live data stream, and start to slice according to the packet synchronization point, and send the message synchronization point and the slice identifier to the first service processing device 1301;
  • the main CS puts the slice into the slice buffer; the data temporarily stored in the buffer is usually related to the buffer time, and the size of the channel code rate determines the maximum number of slices N to be accommodated in the buffer; When the number of slices in the buffer is greater than N, the longest slice will be replaced.
  • the data packet of the primary CS is sliced, the synchronization point and slice identifier of the packet are sent to the standby CS, and the standby CS is updated.
  • the correspondence between the latest 4 ⁇ synchronization point and the slice identifier may be, in a subsequent step, the standby CS may start the slice quickly and accurately according to the message synchronization point and the slice identifier, and keep consistent with the slice of the primary CS; In this embodiment, the standby CS can maintain a correspondence between the plurality of ⁇ ⁇ and the slice header;
  • the slice identifier of the data packet may be determined in the reverse direction along the time axis, for example: taking the first 2 ⁇ 3 packets that identify the packet identifier, and the packets arrive first. Buffer of the alternate CS;
  • the system can also include:
  • the executing unit 1303 is configured to execute a startup process of the primary CS channel and the standby CS channel.
  • the executing unit 1303 may specifically include:
  • the first receiving subunit 13031 is configured to receive, by using the established data channel, a live data stream sent by the encoder;
  • the buffer processing sub-unit 13032 is configured to buffer the live data stream to save the data message in an internal buffer
  • a message slicing subunit 13033 configured to determine a message synchronization point, and slice the data packet according to the same length slicing algorithm
  • the synchronization subunit 13034 is configured to synchronize the synchronization point and the slice identifier to the standby CS.
  • a second receiving sub-unit 13035 configured to receive, by using the established data channel, a live data stream sent by the encoder;
  • the buffer processing sub-unit 13036 is configured to buffer the live data stream, and save the data message in an internal buffer
  • the third receiving subunit 13037 is configured to receive a message synchronization point and a slice identifier sent by the primary CS.
  • the first playing unit 1304 is configured to restore the slice stream to a data message according to a first in first out manner, and perform decoding and playing.
  • the data packet in the streaming media is transmitted in the form of a slice stream.
  • the client client establishes a data channel to the primary ES, and the data stream is sent from the primary ES to the client;
  • the server ES fails, under the CCS scheduling, the ESs in the edge nodes form a P2P network.
  • all ESs of the CS and edge nodes form a data service chain of 1 drag 1; ES start or channel start, ES request
  • the CCS allocates a data source, and the upper-level data source can be CS or ES; the upper-level ES/CS detects that the data channel of the lower-level ES is synchronized to the lower level through the fast buffering mechanism (N times the original rate).
  • the ES After the fast buffering is completed, the content of all the ES buffers of the edge node is consistent with that of the CS; in this embodiment, the ES only maintains the slice and has no original live data packet; when the user requests the live broadcast service from the CCS, CCS selects multiple ESs according to the load balancing principle, and addresses of multiple ESs And the port is returned to the client, the first ES is the primary ES, and the other ES is the standby ES.
  • the method for implementing the method embodiment of the present invention may specifically include the following steps:
  • Step 1401 When the primary edge server ES fails, the client obtains the slice identifier of the packet interruption point;
  • the client can temporarily keep the playback uninterrupted because the data in the internal buffer of the client can provide data.
  • the client determines the last received slice identifier before the primary ES failure.
  • Step 1402 The client sends a request to the standby ES, where the request is used to obtain a subsequent slice stream according to the slice identifier.
  • Step 1403 The client receives the subsequent slice stream sent by the standby ES.
  • the client when the primary ES fails, the client can establish a data channel to the standby ES, and the standby ES provides a continuous data stream; when the client receives the data stream sent by the ES, the original broadcast is restored according to the slice identifier. The data packet is buffered and decoded.
  • the client When the primary ES fails, the client establishes the data channel of the standby ES, and requests the standby ES to provide data flow according to the data slice identifier before the interruption; the client maintains the state of the primary and backup ES.
  • the primary ES fails, the client switches the primary ES to the standby state.
  • the process of sending the slice by the client requesting the standby ES is very short, and the slice of the buffer is much smaller than that of the client. Time, so the slice stream can be re-received before the client buffer is exhausted, so that playback can continue without affecting the viewing experience of the client.
  • the step 1402 may specifically include:
  • Sub-step C1 establishing a data channel from the client to the standby ES according to the standby ES list provided by the central control system CCS;
  • the client establishes a data channel to the standby ES according to the standby ES list provided by the CCS, and can also establish a data channel with multiple standby ESs;
  • Sub-step C2 The client sends a request to the standby ES through the data channel.
  • the client sends a request to the standby ES, requesting to send the slice stream according to the slice identifier;
  • the standby ES After the data channel between the client and the standby ES is successfully established, the standby ES is requested to fail from the primary ES.
  • the slice number indicated by the slice identifier is sent to the slice stream;
  • the client When the client receives the slice stream, it performs a repetitive check according to the slice identifier. If the slice is repeated, the slice in the buffer is updated. If the slice is found to be lost, the missing ES is requested from the standby ES; and the slice of the buffer is followed. The first-in-first-out method is restored to the original data message and decoded and played.
  • the present invention further provides a processing device for a streaming media service. Referring to FIG. 16, the device may include:
  • a second obtaining unit 1601 configured to acquire a slice identifier of a message interruption point when the primary edge server ES fails;
  • the data of the internal buffer of the client can still provide data, so the client can temporarily maintain the playback without interruption; the client determines the last received slice identifier before the primary ES failure;
  • the device can be integrated into the client, or it can be directly implemented by the client, or it can be used as a separate entity connected to the client.
  • the sending request unit 1602 is configured to send a request to the standby ES, where the request is used to obtain a subsequent slice stream according to the slice identifier;
  • the receiving unit 1603 is configured to receive a subsequent slice stream sent by the standby ES.
  • the client when the primary ES fails, can establish a data channel to the standby ES, and the standby ES provides a continuous data stream; when the client receives the data stream sent by the ES, the original broadcast is restored according to the slice identifier.
  • the data packet is buffered and decoded.
  • the client When the primary ES fails, the client establishes the data channel of the standby ES, and requests the standby ES to provide data flow according to the data slice identifier before the interruption; the client maintains the state of the primary and backup ES.
  • the primary ES fails, the client switches the primary ES to the standby state.
  • the process of sending the slice by the client requesting the standby ES is very short, and the slice of the buffer is much smaller than that of the client.
  • the device may specifically include: a second obtaining unit 1701, configured to acquire a slice identifier of a packet break point when the primary edge server ES fails;
  • a sending request unit 1702 configured to send a request to the standby ES, where the request is used to obtain a subsequent slice stream according to the slice identifier;
  • the sending request unit 1702 may specifically include:
  • a second establishing subunit 17021, configured to establish a data channel from the client to the standby ES according to the standby ES list provided by the central control system CCS;
  • a second sending subunit 17022 configured to send a request to the standby ES by using the data channel
  • the receiving unit 1703 is configured to receive a subsequent slice stream sent by the standby ES.
  • the apparatus may further include:
  • the checking unit 1704 is configured to perform repetitive checking on the received slice stream according to the slice identifier. If the slice is repeated, the slice in the buffer is updated, and if the slice is found to be lost, the missing slice is requested from the standby ES.
  • the present invention further provides a processing system for a streaming media service. Referring to FIG. 18, the system may include:
  • the second service processing device 1801 is configured to: when the primary edge server ES fails, obtain a slice identifier of the packet interruption point; send a request to the standby ES, where the request is used to obtain a subsequent slice stream according to the slice identifier; and receive a subsequent slice stream sent by the standby ES;
  • the data of the internal buffer of the client can still provide data, so the client can temporarily maintain the playback without interruption; the client determines the last received slice identifier before the primary ES failure;
  • the device can be integrated into the client, or directly implemented by the client, or as a separate entity connected to the client;
  • the second service processing device 1801 may be integrated into the client, or may be directly implemented by using the client, or may be connected to the client as a separate entity.
  • the standby ES 1802 is configured to send, according to the request sent by the second service processing device, a subsequent slice stream to the service processing device according to the slice identifier.
  • the client when the primary ES fails, the client can establish data to the standby ES.
  • the channel is provided with a continuous data stream by the standby ES.
  • the client receives the data stream sent by the ES, the original live data packet is restored according to the slice identifier, and the buffer is decoded and played.
  • the primary ES fails, the client establishes the standby.
  • the embodiment may specifically include:
  • the second service processing device 1901 is configured to: when the primary edge server ES fails, obtain a slice identifier of the packet interruption point; send a request to the standby ES, where the request is used to obtain a subsequent slice stream according to the slice identifier; and receive a subsequent slice stream sent by the standby ES;
  • the second service processing device 1901 may specifically include:
  • a second obtaining unit 19011 configured to acquire a slice identifier of a message interruption point when the primary edge server ES fails;
  • a sending request unit 19012 configured to send a request to the standby ES, where the request is used to obtain a subsequent slice stream according to the slice identifier;
  • the receiving unit 19013 is configured to receive a subsequent slice stream sent by the standby ES.
  • the client establishes a data channel to the primary ES, and the data stream is sent from the primary ES to the client.
  • the ES in the edge node forms a P2P network, for a certain channel.
  • CS and edge nodes all ESs constitute a data service chain of 1 drag 1; when ES starts or channel starts, ES requests CCS to allocate data source, the upper data source can be CS or ES; upper ES/CS detects the data channel of lower ES After the establishment, the data in the buffer is synchronized to the lower level ES through the fast buffering mechanism (N times the original rate); after the fast buffering is completed, the contents of all the ES buffers of the edge node are consistent with the CS; The ES only maintains the slice and does not have the original live data packet.
  • the CCS selects multiple ESs according to the load balancing principle, and returns the address and port of multiple ESs to the client.
  • the first ES is the primary ES and the other ES is the standby ES.
  • the standby ES1902 is configured to send, according to the request sent by the service processing device, a subsequent slice stream to the service processing device according to the slice identifier.
  • the embodiment may further include:
  • the second playing unit 1903 is configured to restore the slice of the buffer to the original data message in a first-in-first-out manner, and decode and play.
  • the client when the primary ES fails, the client switches the primary ES to the standby state.
  • the process of the client detecting the primary ES failure and the client requesting the alternate ES to send the slice is very short, and is much smaller than the buffer of the client.
  • the continuous play time of the slice of the zone so that the slice stream can be re-received before the client buffer is exhausted, so that playback can continue without affecting the viewing experience of the client.
  • the slice stream is sent from the CS to the ESI, the ESI is sent to the ES2, and the ES2 is sent to the ESn, and finally the slice is sliced by the ESn.
  • the intermediate node in the topology chain such as ES2
  • the ES2 is the first ES.
  • the second ES is ES1
  • the third ES is ESn.
  • Step 2001 When the first ES in the topology structure fails, the third ES connected to the client acquires the slice identifier of the packet interruption point, and requests the data source from the central control system CCS; Step 2002: The third The ES establishes a data channel with the second ES according to the data source address returned by the CCS, where the second ES is the upper ES of the first ES;
  • Step 2003 The third ES forwards the subsequent slice stream of the slice identifier sent by the second ES to the client.
  • the step 2003 may specifically include:
  • Sub-step D1 the third ES requests the second ES to start sending a subsequent slice stream from the slice identifier
  • Sub-step D2 the third ES receives the second ES returned by the fast buffer mechanism The subsequent slice stream;
  • Sub-step D3 The third ES sends the subsequent slice stream to the client.
  • ESn requests data source from CCS due to ESB and ESn data channel interruption;
  • CCS queries ES topology relationship table to select data source server for ES2, according to topology relationship table, CCS selects ES1 as ESn;
  • CCS will ESI data address And returning the port to the ESn; establishing a data channel between the ES1 and the ESn according to the data address and the port;
  • the ESn requesting the ES1 to start sending the slice stream from the slice identifier; and then the ES1 passes the fast according to the request
  • the buffering mechanism sends the subsequent slice stream to the ESn;
  • the ESI sends the slice stream to the ESn through a fast buffering mechanism according to the starting slice sequence number of the ESn request;
  • the ESn sends the subsequent slice stream to the client.
  • ESn sends the slice stream to the client, and the client can continue to complete the playback process. Because ESn detects the ES2 failure, the process of ESn requesting the data source to send the slice is very short and much smaller than the buffer of ESn. The continuous play time of the slice of the zone, so that the slice stream can be re-received before the client buffer is exhausted, so that playback can continue without affecting the playback experience of the client.
  • the embodiment may further include the following steps:
  • the ES2 After the fault is rectified, the ES2 restarts and starts the channel according to the channel record.
  • the ES2 channel requests the upper-level data source to the CCS during the startup process.
  • the CCS queries the ES topology relationship table to select the data source server for the ES2. According to the topology relationship table, CCS selects the ESn.
  • CCS returns the ESn data address and port to ES2;
  • ES2 establishes the data channel to ESn;
  • ESn sends the slice stream in the buffer to ES2 through the fast buffer mechanism; ES2 performs slice buffering.
  • the subsequent slice stream is sent to the client, so that the service flow interruption caused by the server failure can be effectively solved, and the problem that the large-scale user service is interrupted and the live broadcast service cannot be used is avoided. Further, the method can be effectively The bandwidth requirement of the central node to the edge node is reduced.
  • the primary CS fails, the data sent by the standby CS to the ES is reduced. No repetition or loss, there is no pause or mosaic phenomenon when online users watch live video. For live channels, the active and standby CSs only need to send a data stream to the edge node to save network bandwidth. The business is not interrupted.
  • the present invention further provides a processing device for a streaming media service. Referring to FIG. 22, the device may specifically include:
  • the third obtaining unit 2201 is configured to: when the first ES in the topology structure fails, obtain a slice identifier of the packet interruption point, and request a data source from the central control system CCS;
  • the slice stream is sent from the CS to the ES1, the ESI is sent to the ES2, and the ES2 is sent to the ESn, and finally the ESn sends the slice stream to the ESN.
  • Client when the intermediate node in the topology chain fails, such as ES2, will cause the interruption of the data channel between ES1 and ES2, ES2 and ESn.
  • the ES2 is the first ES
  • the second ES is ES1
  • the third ES is ESn;
  • the establishing unit 2202 is configured to establish a data channel with the second ES according to the data source address returned by the CCS, where the second ES is the upper ES of the first ES;
  • the forwarding unit 2203 is configured to forward the subsequent slice stream of the slice identifier sent by the second ES to the client.
  • the device in this embodiment may be integrated into the third ES connected to the client, or directly implemented by the third ES, or may be a separate entity connected to the third ES.
  • ESn detects an ES2 fault, it records the latest slice sequence number sent when the ES2 fault occurs. At the same time, the ES2 fault does not affect the data channel between ESn and the client, and ESn can continuously send the buffer data to the client. The Client can keep the data uninterrupted and continue to play;
  • ESn requests data source from CCS due to ESB and ESn data channel interruption;
  • CCS queries ES topology relationship table to select data source server for ES2, according to topology relationship table, CCS selects ES1 as ESn;
  • CCS will ESI data address And returning the port to the ESn; establishing a data channel between the ES1 and the ESn according to the data address and the port;
  • the ESn requesting the ES1 to start sending the slice stream from the slice identifier; and then the ES1 passes the fast according to the request
  • the buffering mechanism sends the subsequent slice stream to the ESn;
  • the ESI sends the slice stream to the ESn through a fast buffering mechanism according to the starting slice sequence number of the ESn request;
  • the ESn sends the subsequent slice stream To the client.
  • the device may specifically include:
  • the third obtaining unit 2301 is configured to: when the first ES in the topology structure fails, obtain a slice identifier of the packet interruption point, and request a data source from the central control system CCS;
  • the establishing unit 2302 is configured to establish, according to the data source address returned by the CCS, a data channel with the second ES, where the second ES is the upper ES of the first ES;
  • the forwarding unit 2303 is configured to forward the subsequent slice stream of the slice identifier sent by the second ES to the client.
  • the forwarding unit 2303 may specifically include:
  • a second request subunit 23031 configured to request the second ES to start sending a subsequent slice stream from the slice identifier
  • a fourth receiving subunit 23032 configured to receive the subsequent slice stream returned by the second ES by using a fast buffering mechanism
  • the third sending subunit 23033 is configured to send the subsequent slice stream to the client.
  • the subsequent slice stream is sent to the client, so that the service flow interruption caused by the server failure can be effectively solved, and the problem that the large-scale user service is interrupted and the live broadcast service cannot be used is avoided. Further, the method can be effectively The bandwidth requirement of the central node to the edge node is reduced.
  • the primary CS fails, the data sent by the standby CS to the ES is not duplicated or lost, and the online user does not pause or mosaic when watching the live video;
  • the active and standby CSs only need to send a data stream to the edge node to save network bandwidth.
  • the present invention further provides a processing system for a streaming media service.
  • the system may specifically include:
  • the third service processing device 2401 is configured to: when the first ES in the topology structure fails, acquire a slice identifier of the packet interruption point, and request a data source from the central control system CCS; according to the data source address returned by the CCS Establishing a data channel with the second ES, where the second ES is the upper ES of the first ES, and forwarding the subsequent identifier of the slice identifier sent by the second ES Slice the stream to the client;
  • the second ES2402 is configured to send, according to the request of the third service processing device, a subsequent slice stream of the slice identifier to the third service processing device.
  • the third service processing device 2401 may specifically include:
  • a third acquiring unit configured to acquire a slice identifier of a breakpoint in the packet when the first ES in the topology structure fails, and request a data source from the central control system CCS;
  • a establishing unit configured to establish a data channel with the second ES according to the data source address returned by the CCS, where the second ES is an upper ES of the first ES;
  • a forwarding unit configured to forward the subsequent slice stream of the slice identifier sent by the second ES to the client.
  • the embodiment of the present invention does not need to introduce independent functional components, and can be implemented by means of software plus a necessary general hardware platform.
  • the technical solution of the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product.
  • the computer software product is stored in a storage medium and includes a plurality of instructions. The methods described in various embodiments of the invention are performed.
  • the storage medium referred to herein is, for example, a ROM/RAM, a magnetic disk, an optical disk, or the like.
  • the subsequent slice stream is sent to the client, so that the service flow interruption caused by the server failure can be effectively solved, and the problem that a large-scale user service interruption and the live broadcast service cannot be used are avoided.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Description

流媒体业务的处理方法、 装置及系统
本申请要求于 2008 年 10 月 23 日提交中国专利局、 申请号为 200810171781.5、 发明名称为"一种流媒体业务的处理方法、 装置和系统,,的中 国专利申请的优先权, 其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信技术领域,尤其涉及流媒体业务的处理方法、装置及系统。 背景技术
流媒体 ( Streaming Media )是指釆用流式传输的方式在因特网 ( Internet ) 上播放的媒体格式。 一般来讲, 流媒体直播(Living Broadcast )业务通常包括 三大组成部分: 头端、 中心平台和客户端。 头端的直播数据流以直播频道的形 式发布到中心平台的媒体服务器,频道发布成功后中心平台通过直播频道的方 式通过客户端展示给用户并供用户使用。 当用户请求直播业务时, 中心平台将 用户调度到媒体服务器并由媒体服务器为用户提供直播流媒体服务。客户端接 收媒体服务器发送的直播数据流并完成直播流的解码和展示。
流媒体直播业务通常釆用中心节点和边缘节点的方案为用户提供流媒体 业务。 在这种方案中, 通常包括一个中心节点和多个边缘节点。 中心节点可以 包括中心控制系统( Center Control System, CCS )和若干个中心服务器( Center Server, CS ), 边缘节点可以包括若干个边缘服务器 (Edge Server, ES )。 CS 负责若干直播频道数据流的接入并分发到边缘节点, ES 负责从 CS接收数据 流并将数据流分发到客户端。
现有技术中在 CS或 ES出现故障的情况时, 存在保证直播业务的传输 可靠性问题的方法。第一种情况为 CS出现故障,此时的解决方案主要釆用 主备(Active Backup ) CS的方式解决单个 CS故障时可能出现直播业务长 时间中断的问题, 在本方案中, 需要发布频道到主备 CS , 并且主备 CS需 要同时启动频道, 当主用 CS故障时, ES可以到备用 CS获取数据。 在正 常情况下, 直播数据流从编码器 (Encoder ) 经主用 CS、 ES发送到客户端 ( Client ) 的, 如果主用 CS发生故障, 将导致 Encoder与主用 CS、 主用 CS与 ES之间的数据通道中断, 由于 Encoder的数据流无法通过 CS发送 ES, 将最终导致 Client与 ES的数据流出现中断现象; Client由于接收不到 数据因而处于等待数据的状态;当 ES检测到与主用 CS的数据通道中断时, 获取备用 CS的地址和端口; ES建立到备用 CS的数据通道; 数据通道建 立成功后, 备用 CS将直播数据流发送到 ES; 如果 ES与 Client之间的数 据通道未中断, ES将数据流发送到 Client; Client接收直播数据流并完成 解码和展示。 需要说明的是, 如果 Client等待超时, 将断开与 ES的数据通 道, 停止播放; 该方案的实现过程可以参考图 1所示的信令流程图。
第二种情况为 ES发生故障, ES的故障将导致主用 CS与 ES、 ES与 Client之间的数据通道中断; 由于 ES的故障不影响 Encoder与 CS之间的 数据通道, 因此 Encoder与 CS之间的数据流保持正常, 但是 Client与 ES 之间的数据通道和数据流中断, 就导致客户端的播放中断, 此时, 用户重 新请求频道; CCS根据 Client的 IP确定用户的归属区域, 并确定为其服务 的边缘节点; CCS可以根据负载均衡原则为用户选择边缘节点内负载最轻 的 ES,并由该 ES为用户提供服务;其中,由于 ES承载的直播频道有多个, 而且服务的用户数量也较多, 那么下次负载均衡时可能选择的是另外一个 ES; CCS根据负载均衡的结果将新选择 ES的信令地址和信令端口返回给 Client; Client根据所述地址和端口向 ES发起频道播放请求, 播放请求中 包括了直播频道的频道标识( Channel ID ); ES接收到 Client的播放请求后, 根据 Client请求的 Channel ID查找本地的频道分布记录; CCS根据 ES请 求的频道 ID 查询 CS 中该频道的服务地址和端口以及该频道的其他信息 (如编码方式、 码率); CCS 查询成功后将数据源 IP、 端口及频道参数发 送到 ES; ES接收到请求消息的响应后, 为该频道分配服务端口, 该服务 端口用于为客户端提供直播数据流; 服务端口分配成功后, 各 ES根据消息 中的频道参数 MSID ( ES 自身的 ID )、 CS的 IP、 数据端口、 频道 ID、 码 率、编码方式、解析度等创建直播频道; ES频道创建成功后通知 CCS , CCS 增加频道分布到 ES的分发记录; ES根据 CS的地址和端口建立到 CS之间 的数据通道; 数据通道建立成功后, CS将数据流发送到 ES; ES将播放请 求响应消息发送到 Client, 消息中携带频道 ID、 ES服务地址、 ES服务端 口、 码率、 编码方式等信息; Client接收到播放响应消息后建立到 ES的数 据通道, 并 ES将数据流发送到 Client, 其中, 该方案的实现过程可以参考 图 2所示的信令流程图。
可以从上述过程中看出, 在 CS或者 ES出现故障时釆用主备 CS的方 法存在缺点, 首先, 由于主备 CS之间并没有釆用一定的保持数据同步的措 施, 当主用 CS故障时, ES从备用 CS接收到的数据会出现重复或者丟失 现象, 导致用户在观看时出现图像停顿、 黑屏或者马赛克现象, 影响用户 的观看体验;
其次, 由于缺乏报文识别机制, 主用 CS故障时 ES无法从备用 CS获 取需要继续传输的数据, ES从备用 CS接收到的数据会出现重复或者丟失 现象, 导致用户在观看时出现图像停顿、 黑屏或者马赛克现象, 影响用户 体验;
再次, 由于边缘节点各 ES之间缺乏数据同步机制, 当某个直播频道分 布在边缘节点的 M个 ES时, 主备 CS需要发送 M份数据流到边缘节点, 网络带宽浪费较大;
最后, 由于到客户端的数据流缺乏故障恢复机制, 当为用户提供服务 的 ES发生故障时, 在线用户的业务被中断或者出现较长时间的黑屏现象, 影响用户体验。
发明内容
本发明实施例提供流媒体业务的处理方法、 装置及系统, 以解决在 CS或 者 ES出现故障时,用户无法继续从 CS或者 ES获取直播数据流的问题, 以改 善在流媒体业务中的用户体验。
为解决上述技术问题, 本发明实施例提供了一种流媒体业务的处理方法, 包括:
根据主用中心服务器 CS发送的报文同步点和切片标识,备用 CS维护 所述 ^艮文同步点和切片标识的对应关系;
当主用 CS出现故障时, 备用 CS获取报文中断点的切片标识; 依据所述切片标识,备用 CS从对应的报文同步点开始对数据报文进行 切片;
备用 CS 通过边缘服务器 ES 向客户端传输所述切片标识的后续切片 流。
本发明实施例提供了一种流媒体业务的处理装置, 包括:
维护单元, 用于根据主用中心服务器 CS 发送的报文同步点和切片标 识, 维护所述才艮文同步点和切片标识的对应关系;
第一获取单元,用于当主用 CS出现故障时,获取报文中断点的切片标 识;
切片单元, 用于依据所述切片标识, 从对应的报文同步点开始对数据 报文进行切片;
传输单元,用于通过边缘服务器 ES向客户端传输所述切片标识的后续 切片流。
本发明实施例提供了一种流媒体业务的处理系统, 包括:
第一业务处理装置, 所述业务处理装置用于根据主用中心服务器 CS 发送的 4艮文同步点和切片标识, 维护所述 4艮文同步点和切片标识的对应关 系, 当主用 CS出现故障时, 获取报文中断点的切片标识; 依据所述切片标 识, 从对应的报文同步点开始对数据报文进行切片; 并通过边缘服务器 ES 向客户端传输所述切片标识的后续切片流;
主用 CS , 用于确定直播数据流的报文同步点, 并依据所述报文同步点 开始切片, 将所述报文同步点和切片标识发送至所述业务处理装置。
本发明实施例还提供了一种流媒体业务的处理方法, 包括:
当主用边缘服务器 ES 出现故障时, 客户端获取报文中断点的切片标 识;
客户端向备用 ES发送请求,所述请求用于根据所述切片标识获取后续 切片流;
客户端接收备用 ES发送的后续切片流。
本发明实施例还提供了一种流媒体业务的处理装置, 包括:
第二获取单元, 用于当主用边缘服务器 ES出现故障时, 获取报文中断 点的切片标识;
发送请求单元, 用于向备用 ES发送请求, 所述请求用于根据所述切片 标识获取后续切片流; 接收单元, 用于接收备用 ES发送的后续切片流。
本发明实施例还提供了一种流媒体业务的处理系统, 包括:
第二业务处理装置, 用于当主用边缘服务器 ES出现故障时, 获取报文 中断点的切片标识; 向备用 ES发送请求, 所述请求用于根据所述切片标识 获取后续切片流; 并接收备用 ES发送的后续切片流;
备用 ES , 用于根据所述业务处理装置发送的请求, 根据所述切片标识 向所述业务处理装置发送后续切片流。
本发明实施例还提供了一种流媒体业务的处理方法, 包括:
当拓朴结构中的第一 ES出现故障时, 与客户端相连的第三 ES获取报 文中断点的切片标识, 并向中心控制系统 CCS请求数据源;
所述第三 ES根据所述 CCS返回的数据源地址,建立与第二 ES之间的 数据通道, 所述第二 ES为所述第一 ES的上级 ES;
所述第三 ES转发所述第二 ES发送的所述切片标识的后续切片流至客 户端。
本发明实施例还提供了一种流媒体业务的处理装置, 包括:
第三获取单元, 用于当拓朴结构中的第一 ES出现故障时, 获取报文中 断点的切片标识, 并向中心控制系统 CCS请求数据源;
建立单元, 用于根据所述 CCS返回的数据源地址, 建立与第二 ES之 间的数据通道, 所述第二 ES为所述第一 ES的上级 ES;
转发单元,用于转发所述第二 ES发送的所述切片标识的后续切片流至 客户端。
本发明实施例还提供了一种流媒体业务的处理系统, 包括:
第三业务处理装置, 用于当拓朴结构中的第一 ES出现故障时, 获取报 文中断点的切片标识, 并向中心控制系统 CCS请求数据源; 根据所述 CCS 返回的数据源地址, 建立与第二 ES之间的数据通道, 所述第二 ES为所述 第一 ES的上级 ES;并转发所述第二 ES发送的所述切片标识的后续切片流 至客户端;
第二 ES , 用于根据所述业务处理装置的请求, 发送所述切片标识的后 续切片流至所述业务处理装置。 本发明实施例具有以下优点:
根据本发明实施例, 在直播业务中, 当主用 CS出现故障时, 可以确定 出现故障时发送的切片标识, 然后根据切片标识,通过备用 CS与客户端之 间的数据通道,备用 CS来发送切片流至客户端,本发明实施例以切片流的 形式发送数据,使得流媒体直播数据可以在主用 CS出现故障时不会丟失数 据, 用户也可以继续从备用 CS或者 ES获取直播数据流, 使得在线用户观 看时不会出现停顿、 马赛克等现象, 提高了用户的观看体验。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对 实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员 来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的 附图。
图 1 是现有技术中当主用 CS 出现故障时的业务处理方法的信令流程 图;
图 2是现有技术中当 ES出现故障时的业务处理方法的信令流程图; 图 3是本发明的流媒体业务的处理方法实施例的流程图;
图 4是边缘节点中的 ES釆用拓朴结构的连接方式实施例的示意图; 图 5是在本发明的流媒体业务的处理方法另一实施例的流程图; 图 6是本发明的流媒体业务的处理方法另一实施例的信令流程图; 图 7是中心服务器频道的启动信令流程图;
图 8是边缘服务器频道的启动信令流程图;
图 9是 Client频道请求处理流程的信令流程图;
图 10是本发明的流媒体业务的处理装置实施例的结构示意图; 图 11是本发明的流媒体业务的处理装置实施例的结构示意图; 图 12是本发明的流媒体业务的处理系统实施例的结构示意图; 图 13是本发明的流媒体业务的处理系统实施例的结构示意图; 图 14是本发明的流媒体业务的处理方法实施例的流程图;
图 15是本发明的流媒体业务的处理方法实施例的信令流程图; 图 16是本发明的流媒体业务的处理装置实施例的结构示意图; 图 17是本发明的流媒体业务的处理装置实施例的结构示意图; 图 18是本发明的流媒体业务的处理系统实施例的结构示意图; 图 19是本发明的流媒体业务的处理系统实施例的结构示意图; 图 20是本发明的流媒体业务的处理方法实施例的流程图;
图 21是本发明的流媒体业务的处理方法实施例的信令流程图; 图 22是本发明的流媒体业务的处理装置实施例的结构示意图; 图 23是本发明的流媒体业务的处理装置实施例的结构示意图; 图 24是本发明的流媒体业务的处理系统实施例的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进 行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没 有作出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的 范围。
在本发明方法实施例中, 参考图 3所示, 实现本发明实施例需要的方 法主要包括以下步骤:
步骤 301 : 备用 CS根据主用中心服务器 CS发送的报文同步点和切片 标识, 维护所述才艮文同步点和切片标识的对应关系;
步骤 302: 当主用 CS出现故障时, 备用 CS获取报文中断点的切片标 识;
步骤 303 : 备用 CS依据所述切片标识, 从对应的报文同步点开始对数 据报文进行切片;
步骤 304: 备用 CS通过边缘服务器 ES向客户端传输所述切片标识的 后续切片流。
在本实施例中, 当所述主用 CS正常工作时, 主用 CS和备用 CS都在 接收编码器发送的直播数据流,但是为了保证主用 CS和备用 CS切片标识 的一致性, 只有主用 CS对数据报文进行切片, 由于主备 CS双方同时接收 数据流, 因此主备 CS需要通过传输报文同步点的方式确保备用 CS开始切 片时切片的连续性和一致性; 需要说明的是, 所述报文同步点可以以报文 中的时间戳、 报文序号、 报文标识为选择依据, 主用 CS在确定报文同步点 后,可以依据等长算法对数据报文进行切片,主用 CS的数据报文切片完成 后, 将报文的同步点及切片标识发送到备用 CS , 备用 CS仅仅执行报文緩 冲操作, 并可以维护最新的报文同步点和切片标识的对应关系, 当主用 CS 出现故障时,备用 CS可以根据自身维护的对应关系获取报文中断点的切片 标识; 并根据所述切片标识, 对后续的数据报文开始进行切片, 然后通过 边缘服务器 ES将所述切片标识的后续切片流发送至客户端。
可以看出, 即便进行切片的主用 CS 出现故障, 备用 CS 由于和主用 CS具有数据同步的功能, 可以根据主用 CS发送的报文同步点和切片标识 对数据报文迅速进行切片处理, 并与主用 CS的切片保持一致, 因此, 对于 客户端来讲, 不会使客户端出现数据重复或者丟失的现象, 提升了用户的 使用体验。
需要说明的是, 在本发明各个实施例中, 边缘节点中的 ES可以釆用拓 朴结构的连接方式, 可以参考图 4所示, 存在边缘节点 A202和边缘节点 B203两个边缘节点,每个边缘节点各包含 4个边缘服务器 ES1、 ES2、 ES3、 ES4 , 中心服务器 CS201上存在两个直播频道 Channel— 1和 Channel— 2。 经 过 CCS的拓朴调度, 在边缘节点 1 中, 直播频道 Channel— 1的 ES拓朴为 CS-ES1-ES3-ES2-ES4 , 直 播 频 道 Channel— 2 的 ES 拓 朴 为 CS-ES2-ES4-ES1-ES3 ; 在边缘节点 2 , 直播频道 Channel— 1 的 ES拓朴为 CS-ES3-ES2-ES1-ES4 , 直 播 频 道 Channel— 2 的 ES 拓 朴 为 CS-ES4-ES2-E31-ES1 ; 对于直播频道 Channel— 1 , CS与边缘节点 1仅存在 一份直播流, CS 与边缘节点 2 之间也仅存在一份直播流。 对于直播频道 Channel— 2 , CS与边缘节点 1仅存在一份直播流, CS与边缘节点 2之间也 仅存在一份直播流, 各边缘节点内的 ES1、 ES2、 ES3、 ES4构成了链状的 服务拓朴。 在边缘节点内部, 对于直播频道 Channel— 1 , ES3是 ESI的客户 端, ES2是 ES3的客户端, 对于直播频道 Channel— 2 , ES3是 ES3是 ES1 的客户端, 而 ES2是 ES1服务器的服务器, 各 ES之间并无严格的客户端 和服务器之分, 边缘节点内的 ES构成了点对点 ( Peer to Peer, P2P ) 式的 服务模型。 参考图 5的流程图, 以及图 6的信令流程图, 在本发明方法实施例中, 实现本发明实施例二所提供的方法可以包括以下步骤:
步骤 501 : 执行主用 CS频道和备用 CS频道的启动流程;
其中, 中心服务器频道的启动流程可以参考图 7 所示, 所述步骤 501 具体可以包括以下子步骤:
子步骤 A1 : 主用 CS和备用 CS通过与编码器建立的数据通道, 接收 编码器发送的直播数据流;
子步骤 A2: 主用 CS和备用 CS对所述直播数据流进行緩冲, 并将数 据报文保存在内部緩冲区中;
主用 CS接收到直播数据流时进行报文緩冲 ,将报文保存在内部的緩冲 区中;
子步骤 A3: 主用 CS确定报文同步点, 并依据等长切片算法对所述数 据报文进行切片;
需要说明的是, 每个频道维护一个切片计数器, 每个切片被分配一个 独立的切片 ID, 切片 ID按照步进速度等于 1的方式顺序递增;
子步骤 A4: 主用 CS将所述报文同步点和切片标识发送至备用 CS; 切片完成后,主用 CS将切片放入切片緩冲区; 緩冲区中暂存的数据通 常与緩冲的时间相关, 而频道码率的大小, 决定緩冲区最大容纳的切片数 量 N; 当緩冲区中的切片数量大于 N时, 时间最长的切片将会被替换; 主用 CS的数据报文切片完成后,将报文的同步点及切片标识发送到备 用 CS , 备用 CS更新最新的 4艮文同步点和切片标识的对应关系, 可以在后 续步骤中, 使得备用 CS根据报文同步点和切片标识, 可以迅速、 准确地开 始切片, 并与主用 CS的切片保持一致; 在本实施例中, 备用 CS可以维护 多个报文与切片头的对应关系;
步骤 502: 执行边缘服务器 ES频道的启动流程;
其中, 边缘服务器频道启动流程可以参考图 8所示, 步骤 302具体可 以包括以下子步骤: 子步骤 Bl : 建立 ES与 CS之间的数据通道;
操作员通过界面选择需要启动的频道, 确定后提交 CCS , 消息中包含 直播频道对应的 Channel ID; CCS 通知 ES 频道启动, 启动消息中携带 Channel ID; ES接收到 CCS的频道启动消息后, 向 CCS请求数据源的地 址和端口; CCS检查该频道对应的 ES拓朴关系表, 当该频道没有 ES连接 到 CS时, 则由 CS作为数据源; 需要说明的是, ES的拓朴关系是按照链 的方式进行管理的; 当该频道已经由 ES连接到 CS , 则将拓朴关系表中最 后一个 ES作为请求者的数据源; 确定后数据源后, CCS将数据源的数据 地址和端口返回给请求 ES,在本实施例中,所述请求 ES为中心服务器 CS; 子步骤 B2: CS通过快速緩冲机制将緩冲区的切片流发送至所述 ES;
CS通过快速緩冲机制将緩冲区的数据发送到 ES , 当緩冲区的切片全 部发送完成后, 转变为正常速率将切片发送到 ES;
CS频道和 ES频道都启动之后, 用户通过选定频道并确定播放, 可以 在网上观看直播频道的节目;
步骤 503 : 根据主用中心服务器 CS发送的报文同步点和切片标识, 备 用 CS维护所述^艮文同步点和切片标识的对应关系;
当服务器正常的情况下,主用 CS和备用 CS都从 Encoder接收数据流, 主用 CS完成报文切片, 而备用 CS仅进行报文緩冲处理; 主用 CS切片时 需要将报文同步点及切片标识同步到备用 CS , 备用 CS可以及时更新报文 同步点和切片标识的对应关系;
需要说明的是, 在本实施例中, 直播切片流从主用 CS发送到 ES1 , 再 由 ES1 发送到 ESn, 由 ESn为 Client提供数据服务; 本例中拓朴关系为 ( CS-ESl-ESn-Client ), ESI此时也可能为其他 Client提供服务; 主用 CS 出现故障时, 导致 ES1 与主用 CS之间的数据通道中断, ES1检测到主用 CS 故障时, 记录中断前各频道接收到的最新切片标识 (ID ), 需要说明的 是, 这里 ES1只需要记录与故障 CS相关的频道;
在确定切片标识时,可以沿时间轴反向确定所述数据报文的切片标识 , 例如: 取确定报文标识的前 2~3个报文, 这几个报文先到达备用 CS的緩 冲区; 步骤 504: 当主用 CS出现故障时, 备用 CS获取报文中断点的切片标 识;
在本实施例中, 主用 CS和备用 CS切换机制可以取决于第三方的双机 软件, 例如 VCS软件; 在本步骤中, 双机软件可以迅速切换到备用 CS , 备用 CS上升为主用 CS;
步骤 505 : 备用 CS根据所述切片标识对应的报文同步点, 查找到主用 CS已经发送的数据报文; 在本实施例中, 为了防止主用 CS和备用 CS切片可能出现数据不一致 的现象, 可以沿, 例如, 可以取第 7步确定报文的前 2~3个报文, 这几个 报文先到达备用 CS的緩冲区;
步骤 507 : 建立边缘服务器 ES到备用 CS的数据通道;
步骤 508: 边缘服务器 ES请求所述备用 CS从所述切片标识开始发送 后续的切片流;
步骤 509: 边缘服务器 ES将接收到的所述后续切片流发送至客户端。 需要说明的是, 参考图 6所示, 可以看出, 备用 CS根据 ES请求的起 始切片发送切片流至 ES , 而在本实施例中, 根据 ES拓朴关系可以得知, 切片留首先到 ESI , ES1将切片流发送到 ESn, 再由 ESn将切片流发送到 Client; 由于备用 CS开始切片的数据报文出现重复, 不可避免地造成切片 重复, 当 ES1接收到的切片重复时, 需要更新本地緩冲区的切片; 并且, 由于主用 CS故障, 引发 ESn的切片流中断, 不是其上级数据源 ES1故障, 即使 ESn在检测到数据超时的时候, 也不需要关闭数据通道, 而是继续等 待数据的到来; 由于 ESn緩冲区中緩冲了较长时间的切片, 在緩冲区数据 耗尽的情况下仍能继续为 Client提供数据; 因而 Client能够继续緩冲数据 并播放; 客户端继续完成播放处理, 由于 ES1检测到主用 CS故障, 备用 CS启动切片, 以及, ES1请求备用 CS发送切片的过程非常短暂, 并且远 小于 ESn的緩冲区的切片的持续播放时间, 因此能够在客户端緩冲区耗尽 前重新接收到切片流, 从而可以继续播放而不影响用户的观看体验。
本实施例还可以进一步包括: 客户端将所述切片流按照先进先出的方式恢复为原始数据报文, 并解 码播放。
Client频道请求处理流程可以参考图 9所示。
可以看出, 在实施例中, 通过主用 CS和备用 CS的机制可以实现直播 热备,主用 CS对直播数据报文进行切片处理, 并将切片标识和报文标识同 步到备用 CS , 备用 CS 更新报文标识及切片标识的对应关系。 当主用 CS 和备用 CS切换时,备用 CS根据报文标识找到对应的报文然后根据切片标 识开始切片; 其中, 主用 CS和备用 CS的切换机制可依赖于第三方软件实 现; 主用 CS故障恢复后转变为备用 CS , 原备用 CS上升为主用 CS; 新主 用 CS开始切片时将 4艮文标识和切片标识同步到新备用 CS; 主用 CS完成 报文的切片工作, 而备用 CS在成为主用 CS前不进行切片工作, 仅维护主 用 CS同步过来的切片标识和报文标识; 主用 CS的切片机制可以釆用等长 切片法, 或者基于多个图像帧的方式, 切片标识中可以包含版本号、 切片 长度、 序列号、 第一个帧的起始位置等参数信息; 主用 CS故障恢复后转变 为备用 CS , 原备用 CS上升为主用 CS; 其中, 备用 CS釆用沿时间轴后退 N个报文然后开始切片的方式避免主备 CS切换后可能发生的切片不一致 问题, 其中, N 的具体数字可以依据网络情况自主设定, 并不影响本发明 实施例的实现。 与上述本发明所提供的方法实施例相对应, 参见图 10 , 本发明实施例 还提供了一种流媒体业务的处理装置, 该装置可以包括:
维护单元 1001 , 用于根据主用中心服务器 CS发送的报文同步点和切 片标识, 维护所述 4艮文同步点和切片标识的对应关系;
所述装置可以集成到备用 CS上, 也可以直接釆用 CS实现, 还可以单 独作为一个与所述 CS相连的实体;
所述报文同步点可以以报文中的时间戳、 报文序号、 报文标识为选择 依据,主用 CS在确定报文同步点后,可以依据等长算法对数据报文进行切 片,主用 CS的数据报文切片完成后,将报文的同步点及切片标识发送到备 用 CS , 备用 CS仅仅执行报文緩冲操作, 并可以维护最新的报文同步点和 切片标识的对应关系;
第一获取单元 1002 , 用于当主用 CS 出现故障时, 获取报文中断点的 切片标识;
当主用 CS出现故障时,备用 CS可以根据自身维护的对应关系获取报 文中断点的切片标识;
切片单元 1003 , 用于依据所述切片标识, 从对应的报文同步点开始对 数据报文进行切片;
所述传输单元根据所述切片标识, 对后续的数据报文开始进行切片; 传输单元 1004 , 用于通过边缘服务器 ES向客户端传输所述切片标识 的后续切片流。
然后由所述传输单元 1004通过边缘服务器 ES将所述切片标识的后续 切片流发送至客户端。
可以看出, 即便进行切片的主用 CS 出现故障, 备用 CS 由于和主用 CS具有数据同步的功能, 可以根据主用 CS发送的报文同步点和切片标识 对数据报文迅速进行切片处理, 并与主用 CS的切片保持一致, 因此, 对于 客户端来讲, 不会使客户端出现数据重复或者丟失的现象, 提升了用户的 使用体验。 参考图 11所示, 在本发明的一种流媒体业务的处理装置实施例中, 该 装置具体可以包括:
维护单元 1101 , 用于根据主用中心服务器 CS发送的报文同步点和切 片标识, 维护所述 4艮文同步点和切片标识的对应关系;
第一获取单元 1102 , 用于当主用 CS 出现故障时, 获取报文中断点的 切片标识;
切片单元 1103 , 用于依据所述切片标识, 从对应的 ^艮文同步点开始对 数据报文进行切片;
所述切片单元 1103可以包括:
查找子单元 11031 ,用于根据所述切片标识对应的报文同步点, 查找到 主用 CS已经发送的数据报文; 理;
传输单元 1104 , 用于通过边缘服务器 ES向客户端传输所述切片标识 的后续切片流;
所述传输单元 1104具体可以包括:
第一建立子单元 11041 , 用于建立到边缘服务器 ES的数据通道; 第一请求子单元 11042 , 用于接收所述 ES从所述切片标识开始发送后 续的切片流的请求;
第一发送子单元 11043 , 用于将接收到的所述后续切片流发送至 ES。 可以看出, 在实施例中, 通过主用 CS和备用 CS的机制可以实现直播 热备,主用 CS对直播数据报文进行切片处理, 并将切片标识和报文标识同 步到备用 CS , 备用 CS 更新报文标识及切片标识的对应关系。 当主用 CS 和备用 CS切换时,备用 CS根据报文标识找到对应的报文然后根据切片标 识开始切片; 其中, 主用 CS和备用 CS的切换机制可依赖于第三方软件实 现; 主用 CS故障恢复后转变为备用 CS , 原备用 CS上升为主用 CS; 新主 用 CS开始切片时将 4艮文标识和切片标识同步到新备用 CS; 主用 CS完成 报文的切片工作, 而备用 CS在成为主用 CS前不进行切片工作, 仅维护主 用 CS同步过来的切片标识和报文标识; 主用 CS的切片机制可以釆用等长 切片法, 或者基于多个图像帧的方式, 切片标识中可以包含版本号、 切片 长度、 序列号、 第一个帧的起始位置等参数信息; 主用 CS故障恢复后转变 为备用 CS , 原备用 CS上升为主用 CS; 其中, 备用 CS釆用沿时间轴后退 N个报文然后开始切片的方式避免主备 CS切换后可能发生的切片不一致 问题, 其中, N 的具体数字可以依据网络情况自主设定, 并不影响本发明 实施例的实现。 与上述本发明所提供的方法实施例相对应, 参见图 12 , 本发明实施例 还提供了一种流媒体业务的处理系统, 该系统具体可以包括:
第一业务处理装置 1201 , 用于根据主用中心服务器 CS发送的报文同 步点和切片标识, 维护所述^艮文同步点和切片标识的对应关系, 当主用 CS 出现故障时, 获取报文中断点的切片标识; 依据所述切片标识, 从对应的 报文同步点开始对数据报文进行切片;并通过边缘服务器 ES向客户端传输 所述切片标识的后续切片流;
在本实施例中, 所述第一业务处理装置 1201可以集成在备用 CS上, 也可以直接釆用备用 CS实现;
当所述主用 CS正常工作时, 主用 CS和备用 CS都在接收编码器发送 的直播数据流, 但是为了保证主用 CS和备用 CS切片标识的一致性, 只有 主用 CS对数据报文进行切片, 由于主备 CS双方同时接收数据流, 因此主 备 CS需要通过传输报文同步点的方式确保备用 CS开始切片时切片的连续 性和一致性;
主用 CS1202 , 用于确定直播数据流的报文同步点, 并依据所述报文同 步点开始切片, 将所述报文同步点和切片标识发送至所述第一业务处理装 置。
需要说明的是, 所述报文同步点可以以报文中的时间戳、 报文序号、 报文标识为选择依据,主用 CS在确定报文同步点后,可以依据等长算法对 数据报文进行切片,主用 CS的数据报文切片完成后,将报文的同步点及切 片标识发送到备用 CS , 备用 CS仅仅执行报文緩冲操作, 并可以维护最新 的报文同步点和切片标识的对应关系, 当主用 CS出现故障时, 备用 CS可 以根据自身维护的对应关系获取报文中断点的切片标识; 并根据所述切片 标识,对后续的数据报文开始进行切片, 然后通过边缘服务器 ES将所述切 片标识的后续切片流发送至客户端。
可以看出, 即便进行切片的主用 CS 出现故障, 备用 CS 由于和主用
CS具有数据同步的功能, 可以根据主用 CS发送的报文同步点和切片标识 对数据报文迅速进行切片处理, 并与主用 CS的切片保持一致, 因此, 对于 客户端来讲, 不会使客户端出现数据重复或者丟失的现象, 提升了用户的 使用体验。
参考图 13所示, 在本发明的一种流媒体业务的处理系统实施例中, 该 系统可以包括:
第一业务处理装置 1301 , 所述业务处理装置用于根据主用中心服务器 CS发送的 4艮文同步点和切片标识, 维护所述^艮文同步点和切片标识的对应 关系, 当主用 CS出现故障时, 获取报文中断点的切片标识; 依据所述切片 标识, 从对应的报文同步点开始对数据报文进行切片; 并通过边缘服务器
ES向客户端传输所述切片标识的后续切片流;
所述第一业务处理装置 1301具体可以包括:
维护单元 13011 , 用于根据主用中心服务器 CS发送的报文同步点和切 片标识, 维护所述 ^艮文同步点和切片标识的对应关系;
第一获取单元 13012 , 用于当主用 CS出现故障时, 获取报文中断点的 切片标识;
切片单元 13013 , 用于依据所述切片标识, 从对应的才艮文同步点开始 对数据报文进行切片;
需要说明的是, 每个频道维护一个切片计数器, 每个切片被分配一个 独立的切片 ID, 切片 ID按照步进速度等于 1的方式顺序递增;
传输单元 13014 , 用于通过边缘服务器 ES向客户端传输所述切片标识 的后续切片流;
主用 CS1302 , 用于确定直播数据流的报文同步点, 并依据所述报文同 步点开始切片, 将所述报文同步点和切片标识发送至所述第一业务处理装 置 1301 ;
切片完成后,主用 CS将切片放入切片緩冲区; 緩冲区中暂存的数据通 常与緩冲的时间相关, 而频道码率的大小, 决定緩冲区最大容纳的切片数 量 N; 当緩冲区中的切片数量大于 N时, 时间最长的切片将会被替换; 主 用 CS的数据报文切片完成后,将报文的同步点及切片标识发送到备用 CS, 备用 CS 更新最新的 4艮文同步点和切片标识的对应关系, 可以在后续步骤 中,使得备用 CS根据报文同步点和切片标识,可以迅速、准确地开始切片, 并与主用 CS的切片保持一致; 在本实施例中, 备用 CS可以维护多个 4艮文 与切片头的对应关系;
需要说明的是, 在确定切片标识时, 可以沿时间轴反向确定所述数据 报文的切片标识, 例如: 取确定报文标识的前 2~3个报文, 这几个报文先 到达备用 CS的緩冲区; 所述系统还可以包括:
执行单元 1303 ,用于执行所述主用 CS频道和备用 CS频道的启动流程。 所述执行单元 1303具体可以包括:
第一接收子单元 13031 , 用于通过建立的数据通道, 接收编码器发送 的直播数据流;
緩冲处理子单元 13032 , 用于对所述直播数据流进行緩冲, 以将数据 报文保存在内部緩冲区中;
报文切片子单元 13033 , 用于确定报文同步点, 并依据等长切片算法 对数据报文进行切片;
同步子单元 13034 ,用于将 4艮文同步点和切片标识同步到所述备用 CS。 第二接收子单元 13035 , 用于通过建立的数据通道, 接收编码器发送 的直播数据流;
緩冲处理子单元 13036 , 用于对所述直播数据流进行緩冲, 将数据报 文保存在内部緩冲区中;
第三接收子单元 13037 , 用于接收主用 CS发送的报文同步点和切片标 识。
本实施例还可以包括:
第一播放单元 1304 , 用于将所述切片流按照先进先出的方式, 将所述 切片流恢复为数据报文, 并进行解码播放。
在本实施例中, 流媒体中的数据报文以切片流的形式进行传输, 正常 情况下, 客户端 Client建立到主用 ES的数据通道, 数据流从主用 ES发送 到 Client; 当主用边缘服务器 ES 出现故障时, 在 CCS的调度下, 边缘节 点内的 ES组成 P2P网络, 针对某个频道, CS和边缘节点所有 ES组成 1 拖 1的数据服务链; ES启动或者频道启动时, ES请求 CCS分配数据源, 上级数据源可以是 CS或者是 ES; 上级 ES/CS检测到下级 ES的数据通道 建立后通过快速緩冲机制 (原速率的 N倍) 将緩冲区中的数据同步到下级 ES; 快速緩冲完成后,边缘节点所有 ES緩冲区的内容与 CS保持一致; 在 本实施例中, ES 仅维护切片, 没有原始的直播数据报文; 当用户向 CCS 请求直播服务时, CCS根据负载均衡原则选择多个 ES , 并多个 ES的地址 和端口返回给客户端, 第一个 ES为主用 ES, 其他的 ES为备用 ES。 参考图 14所示的流程图和图 15所示的信令流程图, 实现本发明方法 实施例的方法具体可以包括以下步骤:
步骤 1401 : 当主用边缘服务器 ES 出现故障时, 客户端获取报文中断 点的切片标识;
当主用 ES故障时, 由于 Client内部緩冲区的数据尚能提供数据, 因此 Client能够暂时保持播放不中断; Client确定主用 ES故障前最后接收到的 切片标识;
步骤 1402: 客户端向备用 ES发送请求, 所述请求用于根据所述切片 标识获取后续切片流;
步骤 1403: 客户端接收备用 ES发送的后续切片流。
在本实施例中, 当主用 ES故障时, 客户端能够建立到备用 ES的数据 通道,并由备用 ES提供连续的数据流;客户端接收到 ES发送的数据流时, 根据切片标识恢复原始直播数据报文,緩冲后解码播放;当主用 ES故障时, 客户端建立的备用 ES的数据通道, 并请求备用 ES根据中断前的数据切片 标识提供数据流; 客户端维护主备用 ES的状态, 当主用 ES故障时, 客户 端将主用 ES切换为备用状态; 由于 Client检测到主用 ES故障、 Client请 求备用 ES发送切片的过程非常短暂,而且远小于 Client的緩冲区的切片的 持续播放时间, 因此能够在客户端緩冲区耗尽前重新接收到切片流, 从而 可以继续播放而不影响客户端的观看体验。
所述步骤 1402具体可以包括:
子步骤 C1 : 根据中心控制系统 CCS提供的备用 ES列表, 建立客户端 到备用 ES的数据通道;
Client根据 CCS提供的备用 ES列表, 建立到备用 ES的数据通道, 也 可以与多个备用 ES建立数据通道;
子步骤 C2: 客户端通过所述数据通道向所述备用 ES发送请求。
客户端向备用 ES发送请求, 请求依据所述切片标识发送切片流;
Client与备用 ES的数据通道建立成功后,请求备用 ES从主用 ES故障 时的切片标识所示的切片序号发送切片流;
本实施例还可以包括:
Client接收到切片流时根据切片标识进行重复性检查, 若切片重复时, 则更新緩冲区中的切片; 若发现切片丟失, 则向备用 ES请求缺失的切片; 并将緩冲区的切片按照先进先出的方式恢复为原始数据报文,并解码播放。 与本发明实施例提供的方法实施例相对应, 本发明还提供了一种流媒 体业务的处理装置, 参考图 16所示, 该装置可以包括:
第二获取单元 1601 , 用于当主用边缘服务器 ES 出现故障时, 获取报 文中断点的切片标识;
当主用 ES故障时, 由于 Client内部緩冲区的数据尚能提供数据, 因此 Client能够暂时保持播放不中断; Client确定主用 ES故障前最后接收到的 切片标识; 其中, 本实施例所述的装置可以集成到客户端上, 也可以直接 釆用客户端实现, 还可以作为一个与客户端相连的单独的实体。
发送请求单元 1602 , 用于向备用 ES发送请求, 所述请求用于根据所 述切片标识获取后续切片流;
接收单元 1603 , 用于接收备用 ES发送的后续切片流。
在本实施例中, 当主用 ES故障时, 客户端能够建立到备用 ES的数据 通道,并由备用 ES提供连续的数据流;客户端接收到 ES发送的数据流时, 根据切片标识恢复原始直播数据报文,緩冲后解码播放;当主用 ES故障时, 客户端建立的备用 ES的数据通道, 并请求备用 ES根据中断前的数据切片 标识提供数据流; 客户端维护主备用 ES的状态, 当主用 ES故障时, 客户 端将主用 ES切换为备用状态; 由于 Client检测到主用 ES故障、 Client请 求备用 ES发送切片的过程非常短暂,而且远小于 Client的緩冲区的切片的 持续播放时间, 因此能够在客户端緩冲区耗尽前重新接收到切片流, 从而 可以继续播放而不影响客户端的观看体验。 参考图 17所示, 在本发明的一种流媒体业务的处理装置实施例中, 该 装置具体可以包括: 第二获取单元 1701 , 用于当主用边缘服务器 ES 出现故障时, 获取报 文中断点的切片标识;
发送请求单元 1702 , 用于向备用 ES发送请求, 所述请求用于根据所 述切片标识获取后续切片流;
所述发送请求单元 1702 , 具体可以包括:
第二建立子单元 17021 , 用于根据中心控制系统 CCS提供的备用 ES 列表, 建立客户端到备用 ES的数据通道;
第二发送子单元 17022 , 用于通过所述数据通道向所述备用 ES发送请 求;
接收单元 1703 , 用于接收备用 ES发送的后续切片流;
在本发明的另一个实施例中, 所述装置还可以包括:
检查单元 1704 ,用于对接收到的切片流根据切片标识进行重复性检查, 若切片重复, 更新緩冲区中的切片, 若发现切片丟失, 则向备用 ES请求缺 失的切片。 与本发明实施例提供的方法实施例相对应, 本发明还提供了一种流媒 体业务的处理系统, 参考图 18所示, 该系统可以包括:
第二业务处理装置 1801 , 用于当主用边缘服务器 ES 出现故障时, 获 取报文中断点的切片标识; 向备用 ES发送请求, 所述请求用于根据所述切 片标识获取后续切片流; 并接收备用 ES发送的后续切片流;
当主用 ES故障时, 由于 Client内部緩冲区的数据尚能提供数据, 因此 Client能够暂时保持播放不中断; Client确定主用 ES故障前最后接收到的 切片标识; 其中, 本实施例所述的装置可以集成到客户端上, 也可以直接 釆用客户端实现, 还可以作为一个与客户端相连的单独的实体;
其中, 所述第二业务处理装置 1801可以集成到客户端上, 也可以直接 釆用客户端实现, 还可以作为一个单独的实体和客户端相连;
备用 ES1802, 用于根据所述第二业务处理装置发送的请求, 根据所述 切片标识向所述业务处理装置发送后续切片流。
在本实施例中, 当主用 ES故障时, 客户端能够建立到备用 ES的数据 通道,并由备用 ES提供连续的数据流;客户端接收到 ES发送的数据流时, 根据切片标识恢复原始直播数据报文,緩冲后解码播放;当主用 ES故障时, 客户端建立的备用 ES的数据通道, 并请求备用 ES根据中断前的数据切片 标识提供数据流; 客户端维护主备用 ES的状态, 当主用 ES故障时, 客户 端将主用 ES切换为备用状态; 由于 Client检测到主用 ES故障、 Client请 求备用 ES发送切片的过程非常短暂,而且远小于 Client的緩冲区的切片的 持续播放时间, 因此能够在客户端緩冲区耗尽前重新接收到切片流, 从而 可以继续播放而不影响客户端的观看体验。 参考图 19所示, 在本发明的一种流媒体业务的处理系统实施例中, 该 实施例具体可以包括:
第二业务处理装置 1901 , 用于当主用边缘服务器 ES 出现故障时, 获 取报文中断点的切片标识; 向备用 ES发送请求, 所述请求用于根据所述切 片标识获取后续切片流; 并接收备用 ES发送的后续切片流;
所述第二业务处理装置 1901具体可以包括:
第二获取单元 19011 , 用于当主用边缘服务器 ES出现故障时, 获取报 文中断点的切片标识;
发送请求单元 19012 , 用于向备用 ES发送请求, 所述请求用于根据所 述切片标识获取后续切片流;
接收单元 19013 , 用于接收备用 ES发送的后续切片流。
在本实施例中, 正常情况下, Client建立到主用 ES的数据通道, 数据 流从主用 ES发送到 Client; 在 CCS的调度下, 边缘节点内的 ES组成 P2P 网络, 针对某个频道, CS和边缘节点所有 ES组成 1拖 1的数据服务链; ES启动或者频道启动时, ES请求 CCS分配数据源, 上级数据源可以是 CS 或者是 ES; 上级 ES/CS检测到下级 ES的数据通道建立后通过快速緩冲机 制 (原速率的 N倍) 将緩冲区中的数据同步到下级 ES; 快速緩冲完成后, 边缘节点所有 ES緩冲区的内容与 CS保持一致; 在本实施例中, ES仅维 护切片, 没有原始的直播数据报文; 当用户向 CCS请求直播服务时, CCS 根据负载均衡原则选择多个 ES , 并多个 ES的地址和端口返回给客户端, 第一个 ES为主用 ES , 其他的 ES为备用 ES。
备用 ES1902, 用于根据所述业务处理装置发送的请求, 根据所述切片 标识向所述业务处理装置发送后续切片流。
在实际应用中, 本实施例还可以包括:
第二播放单元 1903 , 用于将緩冲区的切片按照先进先出的方式恢复为 原始数据报文, 并解码播放。
在本实施例中, 当主用 ES故障时,客户端将主用 ES切换为备用状态; 由于 Client检测到主用 ES故障、 Client请求备用 ES发送切片的过程非常 短暂, 而且远小于 Client的緩冲区的切片的持续播放时间, 因此能够在客 户端緩冲区耗尽前重新接收到切片流, 从而可以继续播放而不影响客户端 的观看体验。 在本发明的方法实施例中 , 假如 CCS 维护的 ES 拓朴为 CS-ESl-ES2-ESn-Client, 切片流从 CS发送到 ESI、 ESI发送到 ES2、 ES2 发送到 ESn, 最终由 ESn将切片流发送到 Client, 当拓朴链中的中间节点 如 ES2发生故障, 将导致 ES1与 ES2、 ES2与 ESn之间数据通道的中断; 则在本实施例中, 所述 ES2为第一 ES , 所述第二 ES为 ES1 , 所述第三 ES 为 ESn, 则参考图 20所示的流程图和图 21所示的信令流程图, 当所述第 一 ES产生故障时, 实现本实施例的方案包括以下步骤:
步骤 2001 : 当拓朴结构中的第一 ES 出现故障时, 与客户端相连的第 三 ES获取报文中断点的切片标识, 并向中心控制系统 CCS请求数据源; 步骤 2002: 所述第三 ES根据所述 CCS返回的数据源地址, 建立与第 二 ES之间的数据通道, 所述第二 ES为所述第一 ES的上级 ES;
步骤 2003 :所述第三 ES转发所述第二 ES发送的所述切片标识的后续 切片流至客户端。
所述步骤 2003具体可以包括:
子步骤 D1 : 所述第三 ES请求所述第二 ES从所述切片标识开始发送 后续切片流;
子步骤 D2: 所述第三 ES接收所述第二 ES通过快速緩冲机制返回的 所述后续切片流;
子步骤 D3 : 所述第三 ES将所述后续切片流发送至客户端。
在本实施例中, 可以参考图 16所示的信令流程图, 当 ESn检测到 ES2 故障后,记录 ES2故障时发送的最新切片序号; 同时, ES2故障不影响 ESn 与 Client之间的数据通道, 而且 ESn能够将緩冲区的数据持续不断地发送 到 Client, 因此 Client能够保持数据不中断而继续播放;
同时,由于 ES2与 ESn的数据通道中断, ESn向 CCS请求数据源; CCS 查询 ES拓朴关系表为 ES2选择数据源服务器, 根据拓朴关系表, CCS选 择 ES1作为 ESn; CCS将 ESI的数据地址和端口返回给 ESn; 依据所述数 据地址和端口建立 ES1 和 ESn之间的数据通道; 所述 ESn请求所述 ES1 从所述切片标识开始发送切片流; 然后所述 ES1根据所述请求通过快速緩 冲机制将后续的切片流发送至 ESn; ESI根据 ESn请求的起始切片序号通 过快速緩冲机制将切片流发送到 ESn; 所述 ESn将所述后续的切片流发送 至客户端。
可以看出, 在本实施例中, ESn将切片流发送到 Client, 客户端可以继 续完成播放处理, 由于 ESn检测到 ES2故障、 ESn请求数据源发送切片的 过程非常短暂而且远小于 ESn的緩冲区的切片的持续播放时间, 因此能够 在客户端緩冲区耗尽前重新接收到切片流, 从而可以继续播放而不影响客 户端的播放体验。
在实际应用中, 本实施例还可以包括以下步骤:
ES2 在故障排除后重新启动, 并根据频道记录启动频道; ES2 频道启 动过程中向 CCS请求上级数据源; CCS查询 ES拓朴关系表为 ES2选择数 据源服务器, 根据拓朴关系表, CCS选择 ESn作为数据源; CCS将 ESn的 数据地址和端口返回给 ES2; ES2建立到 ESn的数据通道; ESn将緩冲区 中的切片通过快速緩冲机制将切片流发送到 ES2; ES2进行切片緩冲。
本发明实施例通过发送后续的切片流给客户端, 从而可以有效解决服 务器故障导致业务流中断的情况, 避免了大范围的用户业务中断, 直播业 务无法使用等问题, 进一步的, 还可以有效地减少了中心节点到边缘节点 的带宽需求; 在本发明实施例中, 主用 CS故障时, 备用 CS发送到 ES的数据 无重复或者丟失, 在线用户观看直播视频时无停顿或者马赛克现象; 对于 直播频道, 主备 CS仅需要发送一份数据流到边缘节点, 节省网络带宽; 通 过主备 ES机制实现 ES故障时在线用户的业务不中断。 与本发明实施例提供的方法实施例相对应, 本发明还提供了一种流媒 体业务的处理装置, 参考图 22所示, 所述装置具体可以包括:
第三获取单元 2201 , 用于当拓朴结构中的第一 ES 出现故障时, 获取 报文中断点的切片标识, 并向中心控制系统 CCS请求数据源;
在本实施例中, 假如 CCS维护的 ES拓朴为 CS-ESl-ES2-ESn-Client, 切片流从 CS发送到 ES1、 ESI发送到 ES2、 ES2发送到 ESn, 最终由 ESn 将切片流发送到 Client, 当拓朴链中的中间节点如 ES2发生故障, 将导致 ES1与 ES2、 ES2与 ESn之间数据通道的中断; 则在本实施例中, 所述 ES2 为第一 ES , 所述第二 ES为 ES1 , 所述第三 ES为 ESn;
建立单元 2202 , 用于根据所述 CCS 返回的数据源地址, 建立与第二 ES之间的数据通道, 所述第二 ES为所述第一 ES的上级 ES;
转发单元 2203 , 用于转发所述第二 ES发送的所述切片标识的后续切 片流至客户端。
本实施例所述的装置可以集成到与客户端相连的第三 ES上,也可以直 接釆用第三 ES实现, 还可以作为一个与第三 ES相连的单独实体。 当 ESn 检测到 ES2故障后, 记录 ES2故障时发送的最新切片序号; 同时, ES2故 障不影响 ESn与 Client之间的数据通道, 而且 ESn能够将緩冲区的数据持 续不断地发送到 Client, 因此 Client能够保持数据不中断而继续播放;
同时,由于 ES2与 ESn的数据通道中断, ESn向 CCS请求数据源; CCS 查询 ES拓朴关系表为 ES2选择数据源服务器, 根据拓朴关系表, CCS选 择 ES1作为 ESn; CCS将 ESI的数据地址和端口返回给 ESn; 依据所述数 据地址和端口建立 ES1 和 ESn之间的数据通道; 所述 ESn请求所述 ES1 从所述切片标识开始发送切片流; 然后所述 ES1根据所述请求通过快速緩 冲机制将后续的切片流发送至 ESn; ESI根据 ESn请求的起始切片序号通 过快速緩冲机制将切片流发送到 ESn; 所述 ESn将所述后续的切片流发送 至客户端。
参考图 23所示, 在本发明的一种流媒体业务的处理装置实施例中, 该 装置具体可以包括:
第三获取单元 2301 , 用于当拓朴结构中的第一 ES 出现故障时, 获取 报文中断点的切片标识, 并向中心控制系统 CCS请求数据源;
建立单元 2302 , 用于根据所述 CCS 返回的数据源地址, 建立与第二 ES之间的数据通道, 所述第二 ES为所述第一 ES的上级 ES;
转发单元 2303 , 用于转发所述第二 ES发送的所述切片标识的后续切 片流至客户端。
所述转发单元 2303具体可以包括:
第二请求子单元 23031 , 用于请求所述第二 ES从所述切片标识开始发 送后续切片流;
第四接收子单元 23032 , 用于接收所述第二 ES通过快速緩冲机制返回 的所述后续切片流;
第三发送子单元 23033 , 用于将所述后续切片流发送至客户端。
本发明实施例通过发送后续的切片流给客户端, 从而可以有效解决服 务器故障导致业务流中断的情况, 避免了大范围的用户业务中断, 直播业 务无法使用等问题, 进一步的, 还可以有效地减少了中心节点到边缘节点 的带宽需求; 在本发明实施例中, 主用 CS故障时, 备用 CS发送到 ES的 数据无重复或者丟失, 在线用户观看直播视频时无停顿或者马赛克现象; 对于直播频道,主备 CS仅需要发送一份数据流到边缘节点,节省网络带宽; 通过主备 ES机制实现 ES故障时在线用户的业务不中断。 与本发明实施例提供的方法实施例相对应, 本发明还提供了一种流媒 体业务的处理系统, 参考图 24所示, 所述系统具体可以包括:
第三业务处理装置 2401 , 用于当拓朴结构中的第一 ES 出现故障时, 获取报文中断点的切片标识, 并向中心控制系统 CCS请求数据源; 根据所 述 CCS返回的数据源地址, 建立与第二 ES之间的数据通道, 所述第二 ES 为所述第一 ES的上级 ES;并转发所述第二 ES发送的所述切片标识的后续 切片流至客户端;
第二 ES2402 , 用于根据所述第三业务处理装置的请求, 发送所述切片 标识的后续切片流至所述第三业务处理装置。
所述第三业务处理装置 2401具体可以包括:
第三获取单元, 用于当拓朴结构中的第一 ES出现故障时, 获取报文中 断点的切片标识, 并向中心控制系统 CCS请求数据源;
建立单元, 用于根据所述 CCS返回的数据源地址, 建立与第二 ES之 间的数据通道, 所述第二 ES为所述第一 ES的上级 ES;
转发单元,用于转发所述第二 ES发送的所述切片标识的后续切片流至 客户端。
通过以上实施例的描述, 本领域的技术人员可以清楚地了解到需要说 明的是, 本发明实施例不需要引入独立的功能部件, 可借助软件加必需的 通用硬件平台的方式来实现。 基于这样的理解, 本发明实施例的技术方案 本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出 来, 该计算机软件产品存储在一个存储介质中, 包括若干指令用以执行本 发明各个实施例所述的方法。 这里所称的存储介质, 如: ROM/RAM、 磁 盘、 光盘等。
本发明实施例通过发送后续的切片流给客户端, 从而可以有效解决服 务器故障导致业务流中断的情况, 避免了大范围的用户业务中断, 直播业 务无法使用等问题。 需要说明的是, 因为前述的方法和装置实施例介绍的 十分详尽, 所以所述系统实施例未详尽之处, 可以参见前述对方法和装置 实施例的描述, 在此不再对系统作详细描述。
以上对本发明实施例所提供的流媒体业务的处理方法及系统进行了详 以上实施例的说明只是用于帮助理解本发明实施例的方法及其思想; 同时, 对于本领域的一般技术人员, 依据本发明实施例的思想, 在具体实施方式 及应用范围上均会有改变之处, 综上所述, 本说明书内容不应理解为对本 发明的限制。

Claims

权 利 要 求
1、 一种流媒体业务的处理方法, 其特征在于, 包括:
根据主用中心服务器 CS发送的报文同步点和切片标识,备用 CS维护 所述 4艮文同步点和切片标识的对应关系;
当主用 CS出现故障时, 备用 CS获取报文中断点的切片标识; 依据所述切片标识,备用 CS从对应的报文同步点开始对数据报文进行 切片;
备用 CS 通过边缘服务器 ES 向客户端传输所述切片标识的后续切片 流。
2、 根据权利要求 1所述的方法, 其特征在于, 所述备用 CS维护所述 报文同步点和切片标识的对应关系之前, 还包括:
主用 CS通过建立的数据通道, 接收编码器发送的直播数据流; 主用 CS对所述直播数据流进行緩冲 ,并将数据报文保存在内部緩冲区 中;
主用 CS确定报文同步点,并依据等长切片算法对所述数据报文进行切 片;
主用 CS将所述报文同步点和切片标识发送至备用 cs。
3、 根据权利要求 1所述的方法, 其特征在于, 所述备用 CS维护所述 报文同步点和切片标识的对应关系之前, 还包括:
备用 CS通过建立的数据通道, 接收编码器发送的直播数据流; 备用 CS 对所述直播数据流进行緩冲, 将数据报文保存在内部緩冲区 中;
备用 CS接收主用 CS发送的报文同步点和切片标识。
4、 根据权利要求 1所述的方法, 其特征在于, 所述备用 CS依据所述 切片标识, 从对应的报文同步点开始对数据报文进行切片, 具体包括: 备用 CS根据所述切片标识对应的报文同步点, 查找到主用 CS已经发 送的数据报文;
备用 CS对所述数据报文沿时间轴反向进行切片处理。
5、 根据权利要求 1所述的方法, 其特征在于, 所述备用 CS通过边缘 服务器 ES向客户端传输所述切片标识的后续切片流, 具体包括: 备用 CS建立到边缘服务器 ES的数据通道;
备用 CS接收所述 ES从所述切片标识开始发送后续的切片流的请求; 备用 CS将接收到的所述后续切片流发送至 ES。
6、 一种流媒体业务的处理装置, 其特征在于, 包括:
维护单元, 用于根据主用中心服务器 CS 发送的报文同步点和切片标 识, 维护所述才艮文同步点和切片标识的对应关系;
第一获取单元,用于当主用 CS出现故障时,获取报文中断点的切片标 识;
切片单元, 用于依据所述切片标识, 从对应的报文同步点开始对数据 报文进行切片;
传输单元,用于通过边缘服务器 ES向客户端传输所述切片标识的后续 切片流。
7、 根据权利要求 6所述的装置, 其特征在于, 所述切片单元包括: 查找子单元, 用于根据所述切片标识对应的报文同步点, 查找到主用
CS已经发送的数据报文;
8、 根据权利要求 6所述的装置, 其特征在于, 所述传输单元包括: 第一建立子单元, 用于建立到边缘服务器 ES的数据通道;
第一请求子单元,用于接收所述 ES从所述切片标识开始发送后续的切 片流的请求;
第一发送子单元, 用于将接收到的所述后续切片流发送至 ES。
9、 一种流媒体业务的处理系统, 其特征在于, 包括:
第一业务处理装置,用于根据主用中心服务器 CS发送的报文同步点和 切片标识, 维护所述才艮文同步点和切片标识的对应关系, 当主用 CS出现故 障时, 获取报文中断点的切片标识; 依据所述切片标识, 从对应的报文同 步点开始对数据报文进行切片;并通过边缘服务器 ES向客户端传输所述切 片标识的后续切片流;
主用 CS , 用于确定直播数据流的报文同步点, 并依据所述报文同步点 开始切片, 将所述报文同步点和切片标识发送至所述第一业务处理装置。
10、 根据权利要求 9所述的系统, 其特征在于, 还包括:
第一接收子单元, 用于通过建立的数据通道, 接收编码器发送的直播 数据流;
第一緩冲处理子单元, 用于对所述直播数据流进行緩冲, 以将数据报 文保存在主用 CS的内部緩冲区中;
报文切片子单元, 用于确定报文同步点, 并依据等长切片算法对数据 报文进行切片;
同步子单元, 用于将报文同步点和切片标识同步到所述备用 cs。
11、 根据权利要求 9所述的系统, 其特征在于, 还包括:
第二接收子单元, 用于通过建立的数据通道, 接收编码器发送的直播 数据流;
第二緩冲处理子单元, 用于对所述直播数据流进行緩冲, 将数据报文 保存在备用 CS的内部緩冲区中;
第三接收子单元, 用于接收主用 CS发送的报文同步点和切片标识。
12、 一种流媒体业务的处理方法, 其特征在于, 包括:
当主用边缘服务器 ES 出现故障时, 客户端获取报文中断点的切片标 识;
客户端向备用 ES发送请求,所述请求用于根据所述切片标识获取后续 切片流;
客户端接收备用 ES发送的后续切片流。
13、 根据权利要求 12 所述的方法, 其特征在于, 所述客户端向备用 ES发送请求, 具体包括:
根据中心控制系统 CCS提供的备用 ES 列表, 建立客户端到备用 ES 的数据通道;
客户端通过所述数据通道向所述备用 ES发送请求。
14、 根据权利要求 12所述的方法, 其特征在于, 还包括:
客户端对接收到的切片流根据切片标识进行重复性检查, 若切片重复 时,更新緩冲区中的切片,若发现切片丟失,则向备用 ES请求缺失的切片。
15、 一种流媒体业务的处理装置, 其特征在于, 包括:
第二获取单元, 用于当主用边缘服务器 ES出现故障时, 获取报文中断 点的切片标识;
发送请求单元, 用于向备用 ES发送请求, 所述请求用于根据所述切片 标识获取后续切片流;
接收单元, 用于接收备用 ES发送的后续切片流。
16、 根据权利要求 15所述的装置, 其特征在于, 所述发送请求单元, 具体包括:
第二建立子单元, 用于根据中心控制系统 CCS提供的备用 ES列表, 建立客户端到备用 ES的数据通道;
第二发送子单元, 用于通过所述数据通道向所述备用 ES发送请求。
17、 根据权利要求 15所述的装置, 其特征在于, 还包括:
检查单元, 用于对接收到的切片流根据切片标识进行重复性检查, 若 切片重复, 更新緩冲区中的切片, 若发现切片丟失, 则向备用 ES请求缺失 的切片。
18、 一种流媒体业务的处理系统, 其特征在于, 包括:
第二业务处理装置, 用于当主用边缘服务器 ES出现故障时, 获取报文 中断点的切片标识; 向备用 ES发送请求, 所述请求用于根据所述切片标识 获取后续切片流; 并接收备用 ES发送的后续切片流;
备用 ES , 用于根据所述业务处理装置发送的请求, 根据所述切片标识 向所述业务处理装置发送后续切片流。
19、 一种流媒体业务的处理方法, 其特征在于, 控制中心服务器 CCS 维护的各 ES釆用拓朴结构连接, 包括:
当拓朴结构中的第一 ES出现故障时, 与客户端相连的第三 ES获取报 文中断点的切片标识, 并向中心控制系统 CCS请求数据源;
根据所述 CCS返回的数据源地址,所述第三 ES建立与第二 ES之间的 数据通道, 所述第二 ES为所述第一 ES的上级 ES;
所述第三 ES转发所述第二 ES发送的所述切片标识的后续切片流至客 户端。
20、 根据权利要求 19所述的方法, 其特征在于, 所述第三 ES转发所 述第二 ES发送的所述切片标识的后续切片流至客户端的步骤, 包括: 第三 ES请求所述第二 ES从所述切片标识开始发送后续切片流; 第三 ES接收所述第二 ES通过快速緩冲机制返回的所述后续切片流; 第三 ES将所述后续切片流发送至客户端。
21、 一种流媒体业务的处理装置, 其特征在于, 包括:
第三获取单元, 用于当拓朴结构中的第一 ES出现故障时, 获取报文中 断点的切片标识, 并向中心控制系统 CCS请求数据源;
建立单元, 用于根据所述 CCS返回的数据源地址, 建立与第二 ES之 间的数据通道, 所述第二 ES为所述第一 ES的上级 ES;
转发单元,用于转发所述第二 ES发送的所述切片标识的后续切片流至 客户端。
22、 根据权利要求 21所述的装置, 其特征在于, 所述转发单元包括: 第二请求子单元,用于请求所述第二 ES从所述切片标识开始发送后续 切片流;
第四接收子单元,用于接收所述第二 ES通过快速緩冲机制返回的所述 后续切片流;
第三发送子单元, 用于将所述后续切片流发送至客户端。
23、 一种流媒体业务的处理系统, 其特征在于, 包括:
第三业务处理装置, 用于当拓朴结构中的第一 ES出现故障时, 获取报 文中断点的切片标识, 并向中心控制系统 CCS请求数据源; 根据所述 CCS 返回的数据源地址, 建立与第二 ES之间的数据通道, 所述第二 ES为所述 第一 ES的上级 ES;并转发所述第二 ES发送的所述切片标识的后续切片流 至客户端;
第二 ES , 用于根据所述业务处理装置的请求, 发送所述切片标识的后 续切片流至所述业务处理装置。
PCT/CN2009/072998 2008-10-23 2009-07-30 流媒体业务的处理方法、装置及系统 WO2010045811A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200810171781.5A CN101729909B (zh) 2008-10-23 2008-10-23 一种流媒体业务的处理方法、装置及系统
CN200810171781.5 2008-10-23

Publications (1)

Publication Number Publication Date
WO2010045811A1 true WO2010045811A1 (zh) 2010-04-29

Family

ID=42118928

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2009/072998 WO2010045811A1 (zh) 2008-10-23 2009-07-30 流媒体业务的处理方法、装置及系统

Country Status (2)

Country Link
CN (1) CN101729909B (zh)
WO (1) WO2010045811A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108156473A (zh) * 2017-12-28 2018-06-12 网宿科技股份有限公司 一种获取直播数据的方法及系统

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103095597B (zh) * 2011-10-28 2017-04-26 华为技术有限公司 一种用于负载均衡的方法和装置
CN102571800A (zh) * 2012-01-17 2012-07-11 深圳市乐唯科技开发有限公司 一种集成媒体服务器与客户端的系统及方法
CN103281356B (zh) * 2013-05-03 2017-02-08 聚好看科技股份有限公司 一种分发文件的方法及系统
CN104811827A (zh) 2015-04-20 2015-07-29 中兴通讯股份有限公司 报文发送方法、码流处理方法及装置
CN105871806A (zh) * 2015-12-11 2016-08-17 乐视云计算有限公司 流媒体文件切片的方法、装置及系统
CN106791884B (zh) * 2016-08-19 2019-11-19 炫熵(上海)互联网科技有限公司 P2p直播的视频数据一致性的保持系统及方法
CN107135216B (zh) * 2017-05-03 2020-12-04 深圳市小溪流科技有限公司 一种加强弱网环境流媒体传输方法
CN109246443B (zh) * 2018-11-28 2021-03-23 湖南快乐阳光互动娱乐传媒有限公司 一种直播流切片同步方法及系统
CN109981769B (zh) * 2019-03-21 2021-08-17 青岛铁木真软件技术有限公司 面向工业智能制造的网络协同模型、方法及装置
CN112911315A (zh) * 2019-11-19 2021-06-04 中兴通讯股份有限公司 一种流媒体直播录制方法、网络设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005202774A (ja) * 2004-01-16 2005-07-28 Mitsubishi Electric Corp 生産設備保全システム、生産設備用制御装置および情報処理装置
US20070296550A1 (en) * 2006-06-09 2007-12-27 Bea Systems, Inc. Edge server failover
CN101150421A (zh) * 2006-09-22 2008-03-26 华为技术有限公司 一种分布式内容分发方法、边缘服务器和内容分发网
CN101282281A (zh) * 2007-04-03 2008-10-08 华为技术有限公司 一种媒体分发系统、装置及流媒体播放方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005202774A (ja) * 2004-01-16 2005-07-28 Mitsubishi Electric Corp 生産設備保全システム、生産設備用制御装置および情報処理装置
US20070296550A1 (en) * 2006-06-09 2007-12-27 Bea Systems, Inc. Edge server failover
CN101150421A (zh) * 2006-09-22 2008-03-26 华为技术有限公司 一种分布式内容分发方法、边缘服务器和内容分发网
CN101282281A (zh) * 2007-04-03 2008-10-08 华为技术有限公司 一种媒体分发系统、装置及流媒体播放方法

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108156473A (zh) * 2017-12-28 2018-06-12 网宿科技股份有限公司 一种获取直播数据的方法及系统

Also Published As

Publication number Publication date
CN101729909A (zh) 2010-06-09
CN101729909B (zh) 2012-11-21

Similar Documents

Publication Publication Date Title
WO2010045811A1 (zh) 流媒体业务的处理方法、装置及系统
US7953883B2 (en) Failover mechanism for real-time packet streaming sessions
US7159234B1 (en) System and method for streaming media server single frame failover
US6910078B1 (en) Methods and apparatus for controlling the transmission of stream data
US7509390B1 (en) Methods and apparatus for controlling the transmission of data
WO2020192152A1 (zh) 视频传输的方法、根节点、子节点、p2p服务器和系统
JP2024519363A (ja) ゲームデータの処理方法、装置、コンピュータ機器、及びコンピュータプログラム
US8578042B2 (en) Method, system and device for playing streaming media
US20100138531A1 (en) Real time protocol stream migration
US8145778B2 (en) Method and system for transitioning streamed digital video content between stream servers in a digital video network
US20140189147A1 (en) Method and apparatus for playing live content
WO2008151536A1 (fr) Procédé de traitement de données de communication en réseau, système de communication en réseau et extrémité client
WO2008080343A1 (fr) Procédé et appareil pour réduire un retard de lecture multimédia
US20110258294A1 (en) Method, apparatus, and system for processing media data
CN102171995A (zh) 服务器故障时的报文处理方法及路由器
WO2009121259A1 (zh) 提供媒体内容的方法、装置和系统
EP1806870B1 (en) Method for providing data and data transmission system
WO2011022994A1 (zh) 组播实时传输协议会话快速接入的方法、装置及系统
WO2009012701A1 (en) A notification method, apparatus and system of real time streaming protocol event
WO2012062163A1 (zh) 一种视频会议的动态调整媒体内容的方法和系统
WO2012083841A1 (zh) 频道切换方法、终端及系统
JP2005244605A (ja) ストリーミングコンテンツ配信制御システム、プログラム及び該プログラムを格納した記録媒体
WO2010057391A1 (zh) 一种流媒体播放控制方法、设备及系统
KR20170013241A (ko) 홈 미디어 스트리밍의 스위칭 및 동시 리플레이를 위한 방법 및 시스템
US20110179460A1 (en) System and method for iptv node recovery

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

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

Country of ref document: EP

Kind code of ref document: A1