[go: up one dir, main page]

WO2010115376A1 - Media stream switching method, apparatus and system - Google Patents

Media stream switching method, apparatus and system Download PDF

Info

Publication number
WO2010115376A1
WO2010115376A1 PCT/CN2010/071645 CN2010071645W WO2010115376A1 WO 2010115376 A1 WO2010115376 A1 WO 2010115376A1 CN 2010071645 W CN2010071645 W CN 2010071645W WO 2010115376 A1 WO2010115376 A1 WO 2010115376A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
visual sensitivity
media stream
packet
terminal
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2010/071645
Other languages
French (fr)
Chinese (zh)
Inventor
郭凯
向海州
郑合文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Publication of WO2010115376A1 publication Critical patent/WO2010115376A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/438Interfacing the downstream path of the transmission network originating from a server, e.g. retrieving encoded video stream packets from an IP network
    • H04N21/4383Accessing a communication channel
    • H04N21/4384Accessing a communication channel involving operations to reduce the access time, e.g. fast-tuning for reducing channel switching latency
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/631Multimode Transmission, e.g. transmitting basic layers and enhancement layers of the content over different transmission paths or transmitting with different error corrections, different keys or with different transmission protocols

Definitions

  • IPTV Internet Protocol Television
  • the IPTV channel switching delay is composed of multiple factors, such as: the time spent leaving the old media stream multicast group, the time consumed by adding the new media stream multicast group, and the set top box (STB) jitter buffer filling data consumption time. , waiting for the time consumed by the I frame. Among them, waiting for the I frame time is the most critical part.
  • IPTV Digital Television
  • DTV Digital Television
  • MPEG- 2 Moving Picture Experts Group Compression Standard Version 2
  • H.264/AVC MPEG-4 Advanced Video Coding, Advanced Video Coding
  • video codec 1 VC-1
  • AVS Audio Coding Standard
  • TV pictures are encoded as internal coded frames ( A sequence of images consisting of I frames), forward predictive frames (P frames), and bidirectionally interpolated frames (B frames).
  • the I frame is a frame completely encoded by the entire picture, and is also referred to as a complete frame or a key frame.
  • the I frame can be independently decoded and displayed, and can also provide reference for decoding of related P frames and B frames.
  • the P frame is a frame that is different from the previous frame.
  • the P frame cannot be decoded and displayed independently. It must be decoded before the I frame it refers to.
  • the B frame is a frame that encodes a difference from the previous frame and the subsequent frame.
  • the B frame cannot be independently decoded and displayed, and must be decoded and displayed when the I frame it refers to is received in advance. Since most of the pictures are continuous, the two consecutive frames are substantially the same and the difference is small.
  • the P frame and the B frame mainly encode inter-frame differences, and it is not necessary to encode the entire picture, and thus has higher coding efficiency than the I frame.
  • the code sequence used to obtain a higher compression ratio usually has an I frame interval of about 0.55 seconds, which forms a form such as IBBPBBPBBPBBIBBPBBP..., since the number of P frames and B frames is far more than I frame.
  • IBBPBBPBBPBBIBBPBBP a form such as IBBPBBPBBPBBIBBPBBP.
  • P-frames or B-frames are encountered in most cases.
  • P-frames and B-frames must be decoded by the preceding I-frames, the received P-frames and B-frames can only be discarded. It is only possible to start decoding after waiting for the next I frame, thus causing a problem of slow speed when switching channels.
  • H.264 has a better data compression rate. In the case of the same visual experience, the H.264 encoded video stream is about 1/2 to 1/3 of MPEG-2, so H.264 is more suitable for IPTV. Media encoding format.
  • a group of pictures (GOP) of H.264 has a long time, it can be set to 4 to 8 seconds according to the actual environment, so the interval between I frames is longer.
  • the terminal needs to wait for a complete I frame to receive decoding before starting the process.
  • the process of waiting for I may be 0 to 8 seconds, which causes the problem of slow speed when the media stream is switched.
  • the STB In an IP network, packet loss is difficult to avoid completely, and packet loss can result in a bad visual experience such as a picture screen or pause.
  • the STB In order to solve the problem of lost packets, the STB generally uses the lost error message retransmission technique, that is, when receiving an error message or not receiving a data message, it actively requests the server for a lost or incorrect message, and the server unicasts The terminal retransmits the message requested by the terminal.
  • the STB decoder of the terminal When the media stream is switched, the STB decoder of the terminal must buffer a complete I frame to start decoding.
  • the existing media stream is switched as follows:
  • the server caches the multimedia data stream corresponding to the IPTV media stream
  • the STB When the media stream is switched, the STB initiates a session requesting a burst media code stream from the server, and the content thereof is a Real-time Transport Protocol (RTP) continuous code stream starting at the I frame;
  • RTP Real-time Transport Protocol
  • the terminal requests to join the media stream corresponding to the multicast group, and the multicast group code stream starts to reach the terminal;
  • the terminal finds that the RTP code stream obtained from the server and the real-time multicast stream are repeated in the RTP, the terminal stops acquiring the burst media code stream from the server;
  • the burst stream that the server needs to push quickly will be relatively large, so that the STB buffer has Higher requirements, the low-end STB will lose packets due to buffer overflow, affecting picture quality; media stream switching has higher requirements on transmission bandwidth, and the number of unicast streams that can be pushed under the same transmission bandwidth is limited, and push continues.
  • the time is long.
  • the embodiment of the invention provides a passive optical network protection method, an active/standby switching control device and a system, and can use a standby 0LT to implement backup of multiple primary OLTs.
  • An object of the embodiments of the present invention is to provide a media stream switching method and apparatus, which solves the problem that media stream switching has high requirements on transmission bandwidth.
  • a media stream switching method includes:
  • the message with high visual sensitivity that has been rearranged by the serial number is sent to the terminal.
  • a media stream switching server includes: a storage module, an obtaining module, a selecting module, a programming module, and a sending module; wherein
  • the storage module is configured to receive and cache a packet, where the packet is used to carry a media stream;
  • the obtaining module is configured to acquire visual sensitivity of a message buffered in the storage module
  • the selecting module is configured to: when receiving the media stream switching request of the terminal, select a message with high visual sensitivity in the message buffered by the storage module;
  • the orchestration module is configured to re-arrange the serial number of the message selected by the selection module;
  • the sending module is configured to send a message that is re-arranged by the programming module to the terminal.
  • a media stream switching system includes a media stream switching server and a head end; wherein
  • the media stream switching server is configured to receive and cache a packet sent by the head end, where the packet is used to carry a media stream, obtain a visual sensitivity of the packet, and receive a media stream switching request of the terminal. And selecting, in the cached message, a message with high visual sensitivity, rearranging the sequence number of the message with high visual sensitivity, and re-arranging the message with high visual sensitivity after reordering the serial number. Sent to the terminal;
  • the header is configured to send a packet, where the packet is used to carry a media stream.
  • FIG. 1 is a flowchart of a method for switching a media stream according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of continuously mapping one end of a selected packet with a larger RTP sequence number in the selected embodiment of the present invention
  • FIG. 3 is a block diagram of a media stream switching server according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a media stream switching system according to an embodiment of the present invention.
  • FIG. 5 is a flowchart of a method for switching a media stream according to an embodiment of the present invention
  • FIG. 6 is a schematic diagram of continuously mapping one end of a selected packet with a smaller RTP sequence number according to an embodiment of the present invention
  • FIG. 7 is a block diagram of a media stream switching server according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a media stream switching system according to an embodiment of the present invention.
  • the embodiments of the present invention will be further described in detail with reference to the drawings and specific embodiments.
  • FIGS. 1 through 4 An embodiment of the present invention will be described below with reference to FIGS. 1 through 4:
  • FIG. 1 is a flowchart of a method for switching a media stream according to an embodiment of the present invention. The method includes:
  • the media stream switching server caches each media stream, and the cached content is a packet carrying the media stream.
  • the media stream switching server may be one or a group of dedicated servers, or may be integrated into a network device such as a network access node or a router.
  • the media stream switching server identifies the key information of the video by means of Deep Packets Inspect (DPI), and acquires a Group of Pictures (GOP) and an I frame.
  • Information such as P frames and B frames as visual sensitivity information, and can be independently decoded
  • P frames and B frames as visual sensitivity information
  • P frames and B frames as visual sensitivity information
  • other information can also be detected.
  • a Program Association Table (PAT) and a Program Map Table can be detected for the buffered message. , PMT) and so on.
  • the media stream switching server may also identify the video key information and obtain the independently decodable message and the frame according to the special information of the video source, that is, the head end (Head End) in some fields or bits in the message header. starting point.
  • the visual sensitivity is a motion vector richness of the media stream switching server according to the content corresponding to the message, a position in the picture, an error hiding mechanism at the decoding end, and a decoding reference. Relationships, brightness and chrominance, frame type or stripe (SLICE) type, picture position and residuals, or some of these factors are evaluated.
  • the unit of definition of the visual sensitivity is a message.
  • the visual sensitivity may also be obtained by comprehensively evaluating the upstream node according to the above various factors of the content of the message.
  • the upstream node may be a head end, a dedicated evaluation device, or a network device having an evaluation function.
  • the media stream switching server receives the packet of the bearer media stream that is sent by the head end and includes the visual sensitivity, and obtains the visual sensitivity of the message.
  • the media stream switching server discards the packets of the B frame and selects the packets of the I frame and the P frame according to the starting position of each frame.
  • the selected message is executed 108.
  • the media stream switching server discards the packets of the B frame and the P frame in units of frames according to the starting position of each frame, selects the message of the I frame, and performs 108 on the selected message.
  • the media stream switching server discards the packets with low visual sensitivity in units of frames or packets according to the visual sensitivity of each frame or each packet, and selects the visual sensitivity.
  • a high-level message performs 108 on the selected message.
  • the standard of high visual sensitivity is given by a preset threshold. For example, when a message with high visual sensitivity is selected in units of frames, an average value of visual sensitivity of each frame may be calculated or estimated, and a visual sensitivity is selected in units of frames according to the average value and a preset threshold.
  • Message When a message with high visual acuity is selected in units of messages, a message with low visual sensitivity may be derived from a B frame image, and may be from a P frame image or an I frame image.
  • the media stream switching server continuously maps the RTP sequence number of the selected packet to the end of the selected packet with the larger RTP sequence number.
  • the RTP sequence number of the selected first message is X
  • the RTP sequence number of the last message is ⁇
  • a total of n messages that are evaluated as having high visual sensitivity are selected.
  • the column number is rearranged
  • the RTP sequence number of the selected first message is rearranged to Y-n+l
  • the RTP sequence number of the second message is rearranged to ⁇ - ⁇ +2, and so on, the last one
  • the RTP sequence number of the message is still ⁇ .
  • FIG. 2 is a schematic diagram of continuously mapping one end of a selected packet with a larger RTP sequence number according to an embodiment of the present invention.
  • the RTP sequence number of the selected message starts with 100 and ends with 112, for a total of 7 messages.
  • the RTP sequence numbers of the seven messages are rearranged into consecutive sequence numbers from 106 to 112.
  • the RTP sequence number of the packet to be received by the terminal is consecutive, and when the selected packet is correctly transmitted, the terminal will not initiate a retransmission request.
  • the media stream switching server pushes the visually sensitive message unicast that has been rearranged by the serial number to the terminal.
  • the unicast push code stream rate may be greater than the real-time multicast code stream rate, so that the unicast push code stream can catch up with the real-time multicast code stream.
  • the unicast push rate may be equal to or lower than the real-time multicast stream rate.
  • the media stream switching server discards some packets with low visual sensitivity and does not send the packets to the terminal.
  • the unicast push rate can be equal to Or less than the real-time multicast stream rate, as long as the sum of the code rate sent to the user and the discarded message stream rate is greater than the real-time multicast stream rate, so that the unicast-push stream can catch up with the real-time multicast code. flow.
  • the mapping relationship between the re-arranged packet sequence number and the original packet sequence number may be recorded in the media stream switching server, or the mapping relationship may be sent to the terminal, or The mapping relationship is also recorded in the media stream switching server and sent to the terminal.
  • the media stream switching server or the terminal that stores the mapping relationship sends the mapping relationship to the head end, or the terminal obtains the original sequence number of the lost packet according to the mapping relationship, and sends the packet to the head end.
  • the original serial number is given to the head end.
  • FIG. 3 is a block diagram of a media stream switching server according to an embodiment of the present invention.
  • the media stream switching server may be one or a group of dedicated servers, or may be integrated into a network device such as a network access node or a router.
  • the media stream switching server includes a storage module 302, an obtaining module 304, a selecting module 306, a scheduling module 308, and a sending module 310.
  • the storage module 302 is configured to receive and cache a packet, where the packet is used to carry a media stream.
  • the storage module 302 caches each media stream, and the cached content is a packet carrying the media stream.
  • the obtaining module 304 is configured to obtain the visual sensitivity of the message buffered in the storage module 302.
  • the obtaining module 304 identifies the video key information of the message buffered in the storage module 302 by means of DPI, and the like, and obtains a group of pictures (GOP), an I frame, and a P.
  • Information such as frames and B frames is used as visual sensitivity information, and a message that can be independently decoded and a starting position of each frame are obtained.
  • other information can be detected for different encoding formats, for example, for MPEG-TS format, it can be detected slowly. PAT, PMT, etc. of stored messages.
  • the obtaining module 304 may also identify the video key information according to the special information of the video source, that is, the certain field or bit in the header of the video header, and obtain the message that can be independently decoded and the starting position of each frame.
  • the visual sensitivity is obtained by the acquiring module 304 according to the media stream switching server according to the motion vector richness of the content corresponding to the packet, the position in the screen, and the error hiding on the decoding end.
  • Mechanism, decoding reference relationship, luminance and chrominance, frame type or SLICE type, picture position and residual or some of the factors are evaluated.
  • the unit of definition of the visual sensitivity is a message.
  • the data in the non-important data message of the low visual sensitivity identifier can be from the B frame image, and can be from the P frame image or from the I frame image.
  • the visual sensitivity can also be obtained by comprehensively evaluating the head end according to the above various factors of the content of the message.
  • the obtaining module 304 acquires the visual sensitivity in the message of the bearer media stream including the visual sensitivity sent by the head end.
  • the selecting module 306 is configured to: when receiving the media stream switching request of the terminal, select a message with high visual sensitivity in the message buffered by the storage module 302.
  • the selecting module 306 discards the B-frame packet in the frame-based unit according to the initial position of the identified frame, and selects I in the packet buffered by the storage module 302. The message of the frame and the P frame, the selected message is delivered to the orchestration module 308. Or the media stream switching server discards the packets of the B frame and the P frame in units of frames according to the starting position of each frame, selects the message of the I frame, and delivers the selected message to the orchestration module 308.
  • the selecting module 306 discards the packet with low visual sensitivity in units of frames or packets according to the visual sensitivity of each frame or each packet, in the storage module 302.
  • a message with high visual sensitivity is selected in the buffered message, and the selected message is delivered to the orchestration module 308.
  • the visually sensitive standard is given by a preset threshold in the selection module 306.
  • the orchestration module 308 is configured to rearrange the serial number of the selected message of the selection module 306.
  • the orchestration module 308 continuously maps the RTP sequence number of the packet selected by the module 306 to the end of the selected packet with the larger RTP sequence number.
  • the RTP sequence number of the first packet selected by the selection module 306 is X
  • the RTP sequence number of the last packet is Y
  • a total of n packets are selected.
  • the orchestration module 308 rearranges the RTP sequence numbers of the n messages, and the RTP sequence number of the selected first message is rearranged to ⁇ - ⁇ +1, and the RTP sequence number of the second message is rearranged to Y. -n+2, and so on, the RTP sequence number of the last message is still ⁇ .
  • the sending module 310 is configured to send the message that has been re-arranged by the orchestration module 308 to the terminal.
  • the sending module 310 unicasts the message unicast by the orchestration module 308 to the terminal.
  • the unicast push code stream rate may be greater than the real-time multicast code stream rate, so that the unicast push code stream can catch up with the real-time multicast code stream.
  • the unicast push code stream rate can also be equal to or less than the real-time multicast stream rate.
  • the selection module 306 discards some packets with low visual sensitivity and does not send the packets to the terminal, the code stream rate of the unicast push may be equal to or smaller than the real-time multicast code stream rate, as long as the code stream rate sent to the user is discarded.
  • the sum of the message stream rates is greater than the real-time multicast stream rate, so that the unicast-push stream can catch up with the real-time multicast stream.
  • the sending module 310 is further configured to send the mapping relationship between the re-arranged message sequence number and the original message sequence number to the terminal.
  • the terminal sends the mapping relationship to the head end, or obtains the original sequence number of the lost packet according to the mapping relationship, and sends the original sequence number to the head end.
  • the media stream switching server may further include: a recording module, configured to record a mapping relationship between the re-arranged message sequence number and the original message sequence number.
  • the recording module sends the mapping relationship to the head end.
  • FIG. 4 is a schematic diagram of a media stream switching system according to an embodiment of the present invention.
  • the system includes a media stream switching server 402 and a head end 404;
  • the media stream switching server 402 is configured to receive and cache the packet sent by the head end, where the packet is used to carry the media stream, and obtain the visual sensitivity of the packet.
  • receive and cache the packet sent by the head end where the packet is used to carry the media stream, and obtain the visual sensitivity of the packet.
  • Selecting a message with high visual sensitivity When receiving the media stream switching request of the terminal, Selecting a message with high visual sensitivity, re-arranging the sequence number of the message with high visual sensitivity, and transmitting the message with high visual sensitivity after re-arranging the sequence number to the terminal in the cached message .
  • the media stream switching server 402 can be a dedicated server or a group of dedicated servers, or can be integrated into network devices such as network access nodes or routers.
  • the head end 404 is configured to send a message, where the message is used to carry a media stream.
  • the head end 404 is a source device initiated by the media stream, and the manner of obtaining the media stream may be recording from a satellite television, or forwarding from another wired network, etc., and the head end 404 may also be other network devices, such as a side-mounted network device. Edge server.
  • the network connection between the headend 404 and the media stream switching server or access node can be in various ways, for example, through a core network, a metropolitan area network, an aggregation network, or other network connection.
  • the access node may be a Digital Subscriber Line Access Multiplexer (DSLAM) device, an optical line terminal (OLT) device, or an Underlay Provider Edge (UPE) device.
  • DSL Digital Subscriber Line
  • ONT optical line terminal
  • UPE Underlay Provider Edge
  • a device such as an IP switch may also be applied to other devices at the access node network location, such as an aggregation router.
  • the connection between the access node and the terminal may include various access technologies, such as Digital Subscriber Line (DSL), Passive Optical Network (PON), Ethernet, and the like.
  • the sequence number is continuously mapped to the end of the selected message with the larger sequence number, so that the sequence number of the message to be received by the terminal is continuous.
  • the terminal When the selected message is correctly transmitted, the terminal will not initiate a retransmission request. Therefore, the terminal does not need to support retransmission suppression, and the problem that the media stream switching has high requirements on the transmission bandwidth, the number of pushable unicast streams is limited, and the push duration is relatively long can be solved.
  • FIG. 5 is a flowchart of a method for switching a media stream according to an embodiment of the present invention. The method includes:
  • the media stream switching server caches each media stream, and the cached content is a packet carrying the media stream.
  • the media stream switching server may be one or a group of dedicated servers, or may be integrated into a network device such as a network access node or a router.
  • the media stream switching server identifies the video key information by means of DPI, etc., and obtains information such as a group of pictures (GOP), an I frame, a P frame, and a B frame as visual Sensitivity information, and get the message that can be decoded independently and the starting position of each frame.
  • information such as a group of pictures (GOP), an I frame, a P frame, and a B frame as visual Sensitivity information
  • other information can be detected for different coding formats. For example, for the MPEG-TS format, PAT, PMT, etc. of the buffered message can be detected.
  • the media stream switching server may also identify the video key information and obtain the independently decodable message and the starting position of each frame according to the special information of the video source, that is, the certain field or bit in the header of the message header.
  • the visual sensitivity is a motion vector richness of the media stream switching server according to the content corresponding to the message, a position in the picture, an error hiding mechanism at the decoding end, and a decoding reference. Relationships, brightness and chrominance, frame type or SLICE type, picture position and residual or some of the factors are evaluated.
  • the unit of definition of the visual sensitivity is a message.
  • the data in the non-important data message with low visual sensitivity can be from the B frame image, and can be from the P frame image or from the I frame image.
  • the visual sensitivity can also be obtained by comprehensively evaluating the head end according to the above various factors of the content of the message.
  • the media stream switching server receives the message of the bearer media stream that is sent by the head end and includes the visual sensitivity, and obtains the visual sensitivity of the message.
  • the media stream switching server When receiving a media stream switching request of the terminal, select a packet with high visual sensitivity in the cached message.
  • the media stream switching server discards the packets of the B frame and selects the packets of the I frame and the P frame according to the initial position of the identified frame. 508 is performed on the selected message. Or the media stream switching server discards the packets of the B frame and the P frame in units of frames according to the starting position of each frame, selects the message of the I frame, and performs 508 on the selected message.
  • the media stream switching server discards the packets with low visual sensitivity in units of frames or packets according to the visual sensitivity of each frame or each packet, and selects the visual sensitivity.
  • a high-level message performs 108 on the selected message.
  • the standard of high visual sensitivity is given by a preset threshold.
  • the media stream switching server continuously maps the RTP sequence number of the selected packet to the smaller end of the selected packet with the smaller RTP sequence number.
  • the RTP sequence number of the selected first message is X
  • the RTP sequence number of the last message is ⁇
  • a total of n messages evaluated as having high visual sensitivity are selected.
  • the RTP sequence numbers of the n messages are rearranged, the RTP sequence number of the selected first message is still X, the RTP sequence number of the second message is rearranged to X+l, and so on, and finally The RTP sequence number of a message is rearranged to X+nl.
  • the start sequence number of the multicast packet received by the terminal starts from Y+1.
  • the sequence of the selected packet is re-arranged and is not continuous with the start sequence number of the multicast packet. For X+n
  • the discontinuous serial number to Y is performed 510, 512.
  • FIG. 6 is a schematic diagram of continuously mapping one end of a selected packet with a smaller RTP sequence number according to an embodiment of the present invention.
  • the RTP sequence number of the selected message starts with 100 and ends with 112, for a total of 7 messages.
  • the RTP sequence numbers of these 7 messages are rearranged into consecutive serial numbers from 100 to 106.
  • the start sequence number of the multicast packet received by the terminal starts from 113.
  • the sequence of the selected packet is re-arranged and is not continuous with the start sequence number of the multicast packet. For the segment 107 to 111.
  • the discontinuous serial numbers are executed 510, 512.
  • retransmission suppression information includes identifier information of the discontinuous sequence number of the re-arranged message.
  • the retransmission suppression information may be generated at this time, and the retransmission suppression information includes information of the discontinuous sequence number, for example, the discontinuous sequence.
  • the retransmission suppression information may be sent by the extended RTCP message to the receiving node.
  • the media stream switching server unicasts the visually sensitive message unicast that has been rearranged by the sequence number to the terminal.
  • the unicast push code stream rate may be greater than the real-time multicast code stream rate, so that the unicast push code stream can catch up with the real-time multicast code stream.
  • the unicast push rate may be equal to or lower than the real-time multicast stream rate.
  • the media stream switching server discards some packets with low visual sensitivity and does not send the packets to the terminal.
  • the unicast push rate can be equal to Or less than the real-time multicast stream rate, as long as the sum of the code rate sent to the user and the discarded message stream rate is greater than the real-time multicast stream rate, so that the unicast-push stream can catch up with the real-time multicast code. flow.
  • the purpose of rearranging the serial number in the embodiment shown in FIG. 5 is to reduce or simplify the retransmission suppression information that needs to be transmitted. Other conceivable ones can reduce or simplify the retransmission suppression information that needs to be sent.
  • the method of programming the serial number can be used as the method of rearranging the serial number of the message with high visual sensitivity.
  • retransmission suppression information in 510 and 512 in the embodiment shown in FIG. 5 is not strictly time-ordered to push the unicast media stream to the terminal in 514.
  • the retransmission suppression information may be sent to the terminal before the unicast media stream is pushed, or may be sent to the terminal after a part of the unicast media stream has been pushed.
  • the mapping relationship between the re-arranged packet sequence number and the original packet sequence number may be recorded in the media stream switching server, or the mapping relationship may be sent to the terminal, or The mapping relationship is also recorded in the media stream switching server and sent to the terminal.
  • the media stream switching server or the terminal that stores the mapping relationship sends the mapping relationship to the head end, or the terminal obtains the original sequence number of the lost packet according to the mapping relationship, and sends the packet to the head end.
  • the original serial number is given to the head end.
  • FIG. 7 is a block diagram of a media stream switching server according to an embodiment of the present invention.
  • the media stream switching server may be one or a group of dedicated servers, or may be integrated into a network device such as a network access node or a router.
  • the media stream switching server includes a storage module 702, an obtaining module 704, a selecting module 706, a scheduling module 708, a generating module 710, and a sending module 712.
  • the storage module 702, the obtaining module 704, and the selecting module 706 are respectively associated with FIG. 3.
  • the memory module 302, the acquisition module 304, and the selection module 306 in the illustrated embodiment function substantially the same. The difference is that the functions of the orchestration module 708 are slightly different, and the generation module 710 is added correspondingly, and the function of the transmission module 712 is added.
  • the storage module 702 is configured to receive and cache a packet, where the packet is used to carry a media stream.
  • the obtaining module 704 is configured to obtain visual sensitivity of the message buffered in the storage module 702.
  • the selecting module 706 is configured to select a packet with high visual sensitivity in the packet buffered by the storage module 702 when receiving the media stream switching request of the terminal.
  • the orchestration module 708 is configured to rearrange the serial number of the message selected by the selection module 706.
  • the orchestration module 708 continuously maps the RTP sequence number of the packet selected by the module 706 to the smaller end of the selected packet with the smaller RTP sequence number.
  • the RTP sequence number of the first message selected by the selection module 706 is X
  • the RTP sequence number of the last message is ⁇
  • a total of n messages that are evaluated as having high visual sensitivity are selected.
  • the orchestration module 708 rearranges the RTP sequence numbers of the n messages, and the RTP sequence number of the selected first message is still X, and the RTP sequence number of the second message is rearranged to X+l.
  • the RTP sequence number of the last message is rearranged to X+nl.
  • the generating module 710 is configured to generate retransmission suppression information, where the retransmission suppression information includes identifier information of a discontinuous sequence number of the re-arranged message.
  • the generating module 710 can generate retransmission suppression information, and the retransmission suppression information includes information of the discontinuous sequence number, for example, this segment does not The first RTP sequence number (X+n) and the last RTP sequence number (Y) of consecutive serial numbers.
  • the sending module 712 is configured to send, to the terminal, the re-arrangement suppression message generated by the generating module 710, and send the retransmission suppression information to the terminal.
  • the packet corresponding to the identifier information is lost, the packet corresponding to the identifier information is not requested to be retransmitted.
  • the sending module 712 can send the retransmission suppression information to the receiving node with the extended RTCP message.
  • the sending module 712 unicasts the visually sensitive message with the reordered serial number to the terminal.
  • the unicast push code stream rate may be greater than the real-time multicast code stream rate, so that the unicast push code stream can catch up with the real-time multicast code stream.
  • the unicast push code stream rate may also be equal to or lower than the real-time multicast code stream rate, because the selection module 706 discards some of the packets with low visual sensitivity and does not send the message to the terminal, so the unicast push code stream rate may also be equal to or Less than the real-time multicast stream rate, as long as the sum of the code stream rate sent to the user and the discarded message stream rate is greater than the real-time multicast stream rate, so that the unicast-push stream can catch up with the real-time multicast stream. .
  • the sending module 712 is further configured to send the mapping relationship between the re-arranged message sequence number and the original message sequence number to the terminal.
  • the terminal sends the mapping relationship to the head end, or obtains the original sequence number of the lost packet according to the mapping relationship, and sends the original sequence number to the head end.
  • the media stream switching server may further include: a recording module, configured to record a mapping relationship between the re-arranged message sequence number and the original message sequence number.
  • the recording module sends the mapping relationship to the head end.
  • FIG. 8 is a schematic diagram of a media stream switching system according to an embodiment of the present invention.
  • the system includes a media stream switching server 802 and a head end 804;
  • the media stream switching server 802 is configured to receive and cache the packet sent by the head end, where the packet is used to carry the media stream, and obtain the visual sensitivity of the packet.
  • the retransmission suppression information includes the identifier information of the discontinuous sequence number of the re-arranged message, and the retransmission suppression information is sent to the terminal, where The transmission suppression information is such that when the terminal receives the packet corresponding to the identifier information, the terminal does not request to retransmit the packet corresponding to the identifier information.
  • the media stream switching server 802 can be a dedicated server or a group of dedicated servers, or can be integrated into network devices such as network access nodes or routers.
  • the head end 804 is configured to send a message, where the message is used to carry a media stream.
  • the head end 804 is a source device initiated by the media stream, and the manner of obtaining the media stream may be recording from a satellite television, or forwarding from another wired network, etc., and the head end 804 may also be other network devices, for example, hanging on a metropolitan area network device. Edge server.
  • the network connection between the headend 804 and the media stream switching server or access node can be in various ways, for example, through a core network, a metropolitan area network, an aggregation network, or other network connection.
  • the access node may be a Digital Subscriber Line Access Multiplexer (DSLAM) device, an optical line terminal (OLT) device, or an Underlay Provider Edge (UPE) device.
  • DSL Digital Subscriber Line
  • ONT optical line terminal
  • UPE Underlay Provider Edge
  • a device such as an IP switch may also be applied to other devices at the access node network location, such as an aggregation router.
  • the connection between the access node and the terminal can include various access technologies, such as Digital Subscriber Line (DSL), Passive Optical Network (PON), Ethernet, and the like.
  • the technical solution provided by the embodiment only the message with high visual sensitivity is sent to the terminal, the requirement for the transmission bandwidth of the media stream switching is reduced, the number of pushable unicast streams is increased, and the sent message is After the sequence number is re-arranged, only a small amount of retransmission suppression information is sent, so that the terminal does not need to request retransmission of the message, which solves the problem that the media stream switching has high requirements on the transmission bandwidth, the number of pushable unicast streams is limited, and the push A problem that lasts longer.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention relates to the field of network communications. A media stream switching method, apparatus and system are provided. The method includes: receiving and buffering messages, wherein said messages are used for bearing the media stream; obtaining the visual sensitivity of said messages; when a media stream switching request is received from a terminal, selecting the messages with high visual sensitivity from said buffered messages; rearranging the serial numbers of said messages with high visual sensitivity; and sending the messages, whose serial numbers have been rearranged, with high visual sensitivity to the terminal. With the technical scheme provided by the embodiments of the present invention, because only the messages with high visual sensitivity are sent to the terminal, the requirement of the media stream switching on the transmission bandwidth is reduced, and the number of the pushable unicast bit streams is increased. And because the serial numbers of the sent messages have been rearranged, the terminal need not request retransmission of the messages, and the problems are solved that the requirement of the media stream switching on transmission bandwidth is high, the number of the pushable unicast bit stream is limited and the duration of the push is long.

Description

一种媒体流切换方法、 装置和系统 本申请要求于 2009年 4月 10日提交中国专利局、申请号为 200910106639. 7、发明 名称为 "一种媒体流切换方法、 装置和系统"的中国专利申请的优先权, 其全部内容通 过引用结合在本申请中。 技术领域 本发明涉及网络通信领域, 尤其涉及一种媒体流切换方法、 装置和系统。 背景技术 网络协议电视(Internet Protocol Television, IPTV)逐渐普及, 但是困扰着用 户及运营商的一个问题是, IPTV频道切换有较大的延时。  A media stream switching method, device and system The present application claims to be submitted to the Chinese Patent Office on April 10, 2009, and the application number is 200910106639. 7. The invention is entitled "A Media Stream Switching Method, Apparatus and System" Chinese Patent Priority of the application, the entire contents of which are incorporated herein by reference. The present invention relates to the field of network communications, and in particular, to a media stream switching method, apparatus, and system. BACKGROUND OF THE INVENTION Internet Protocol Television (IPTV) is becoming more and more popular, but one problem that plagues users and operators is that there is a large delay in IPTV channel switching.

IPTV频道切换延时由多个因素构成, 例如: 离开旧媒体流组播组消耗的时间,加入 新媒体流组播组消耗的时间, 机顶盒 (Set Top Box , STB) 抖动缓存填充数据消耗的 时间, 等待 I帧消耗的时间。 其中, 等待 I帧的时间是最关键的一部分。  The IPTV channel switching delay is composed of multiple factors, such as: the time spent leaving the old media stream multicast group, the time consumed by adding the new media stream multicast group, and the set top box (STB) jitter buffer filling data consumption time. , waiting for the time consumed by the I frame. Among them, waiting for the I frame time is the most critical part.

IPTV, 数字电视 (Digital Television, DTV)普遍在用运动图像专家组压缩标准第 2版 (MPEG- 2 , Moving Picture Experts Group Compression Standard Version 2 )、 H. 264/AVC (MPEG-4高级视频编码, Advanced Video Coding)、 视频编解码器 _1 (Video Codec 1 , VC- 1 )、 数字音视频编解码标准 (AVS, Audio Coding Standard)等视音频 压缩编码算法, 电视画面被编码为内部编码帧 (I 帧)、 前向预测帧 (P 帧)和双向内 插帧(B帧)组成的图像序列。 其中, I 帧是整个画面完整编码的帧, 又称为完整帧、 关键帧, I帧可以独立解码显示, 也能为相关的 P帧、 B帧的解码提供参照。 P帧是编 码与前一帧差异的帧, P帧不能独立解码显示, 必须在它参照的 I帧预先收到时才能解 码显示。 B帧是编码与前一帧和后一帧差异的帧, B帧不能独立解码显示, 必须在它参 照的 I帧预先收到时才能解码显示。 由于绝大部分画面是连续的, 连续 2帧大体相同而 差异较小, P帧、 B帧主要编码帧间差异, 不必编码整个画面, 因而比 I帧具有更高的 编码效率。 广播电视运营时为了获取更高的压缩率采用的编码序列通常 I帧间隔 0 . 55 秒左右, 就形成了例如 IBBPBBPBBPBBIBBPBBP…的形式, 这样由于 P帧、 B帧的数量远 远多于 I帧, 当用户切换频道时,大部分情况下遇到的是 P帧或 B帧,然而, 由于 P帧、 B帧必须依靠前面的 I 帧才能解码, 因此收到的 P帧、 B帧只能丢弃, 只有等到下一 个 I 帧后才有可能开始解码, 因此就引起了在频道切换时速度慢的问题。 H. 264有更好的数据压缩率, 在相同视觉体验的情况下, H. 264编码的视频码流约 为 MPEG-2 的 1/2至 1/3, 因此 H. 264更适合做 IPTV的媒体编码格式。 IPTV, Digital Television (DTV) is generally using the Moving Picture Experts Group Compression Standard Version 2 (MPEG- 2, Moving Picture Experts Group Compression Standard Version 2), H.264/AVC (MPEG-4 Advanced Video Coding, Advanced Video Coding), video codec 1 (VC-1), audio and video coding standard (AVS, Audio Coding Standard) and other video and audio compression coding algorithms, TV pictures are encoded as internal coded frames ( A sequence of images consisting of I frames), forward predictive frames (P frames), and bidirectionally interpolated frames (B frames). The I frame is a frame completely encoded by the entire picture, and is also referred to as a complete frame or a key frame. The I frame can be independently decoded and displayed, and can also provide reference for decoding of related P frames and B frames. The P frame is a frame that is different from the previous frame. The P frame cannot be decoded and displayed independently. It must be decoded before the I frame it refers to. The B frame is a frame that encodes a difference from the previous frame and the subsequent frame. The B frame cannot be independently decoded and displayed, and must be decoded and displayed when the I frame it refers to is received in advance. Since most of the pictures are continuous, the two consecutive frames are substantially the same and the difference is small. The P frame and the B frame mainly encode inter-frame differences, and it is not necessary to encode the entire picture, and thus has higher coding efficiency than the I frame. In the broadcast TV operation, the code sequence used to obtain a higher compression ratio usually has an I frame interval of about 0.55 seconds, which forms a form such as IBBPBBPBBPBBIBBPBBP..., since the number of P frames and B frames is far more than I frame. When a user switches channels, P-frames or B-frames are encountered in most cases. However, since P-frames and B-frames must be decoded by the preceding I-frames, the received P-frames and B-frames can only be discarded. It is only possible to start decoding after waiting for the next I frame, thus causing a problem of slow speed when switching channels. H.264 has a better data compression rate. In the case of the same visual experience, the H.264 encoded video stream is about 1/2 to 1/3 of MPEG-2, so H.264 is more suitable for IPTV. Media encoding format.

但由于 H. 264的一个画面组(Group of Pictures, GOP) 时间比较长, 可以根据实 际环境设置成 4至 8秒之多, 因此 I帧间的间隔更长。 在频道切换时, 终端需要等待接 收到一个完整的 I帧后才能开始解码, 等待 I的过程有可能是 0至 8秒, 因此就引起了 在媒体流切换时速度慢的问题。  However, since a group of pictures (GOP) of H.264 has a long time, it can be set to 4 to 8 seconds according to the actual environment, so the interval between I frames is longer. When the channel is switched, the terminal needs to wait for a complete I frame to receive decoding before starting the process. The process of waiting for I may be 0 to 8 seconds, which causes the problem of slow speed when the media stream is switched.

在 IP网络中, 报文丢失难以完全避免, 报文丢失会产生画面花屏或停顿等不好的 视觉体验。 为了解决丢失报文问题, STB普遍使用丢失错误报文重传技术, 即在接收到 错误报文或者没有接收到数据报文时主动向服务器请求丢失或错误的报文,服务器以单 播方式向终端重发终端请求的报文。  In an IP network, packet loss is difficult to avoid completely, and packet loss can result in a bad visual experience such as a picture screen or pause. In order to solve the problem of lost packets, the STB generally uses the lost error message retransmission technique, that is, when receiving an error message or not receiving a data message, it actively requests the server for a lost or incorrect message, and the server unicasts The terminal retransmits the message requested by the terminal.

媒体流切换的时候,终端即 STB的解码器必须缓存一个完整的 I帧才能开始解码显 示。 为了解决 I帧等待引入的媒体流切换时间过程的问题,现有媒体流切换如下: When the media stream is switched, the STB decoder of the terminal must buffer a complete I frame to start decoding. In order to solve the problem of the media stream switching time process introduced by the I frame waiting, the existing media stream is switched as follows:

(1) .服务器缓存 IPTV媒体流对应的多媒体数据流; (1) The server caches the multimedia data stream corresponding to the IPTV media stream;

(2) .媒体流切换的时候, STB发起会话从服务器请求突发媒体码流,其内容为 I帧开 始的实时传送协议 (Real-time Transport Protocol , RTP)连续码流;  (2) When the media stream is switched, the STB initiates a session requesting a burst media code stream from the server, and the content thereof is a Real-time Transport Protocol (RTP) continuous code stream starting at the I frame;

(3) .服务器将 I帧开始的 RTP码流通过单播推送给终端;  (3) The server pushes the RTP code stream starting from the I frame to the terminal through unicast;

(4) .终端缓存获得的 RTP码流,开始解码显示;  (4) The RTP code stream obtained by the terminal buffer starts to decode and display;

(5) .终端请求加入媒体流对应组播组, 组播组码流开始到达终端;  (5) The terminal requests to join the media stream corresponding to the multicast group, and the multicast group code stream starts to reach the terminal;

(6) .当终端发现从服务器获取到的 RTP码流与实时组播流在 RTP重复的时候,就停 止从服务器获取突发媒体码流;  (6) When the terminal finds that the RTP code stream obtained from the server and the real-time multicast stream are repeated in the RTP, the terminal stops acquiring the burst media code stream from the server;

(7) .当终端发现丢失报文时, 主动向服务器请求错误报文重传。  (7) When the terminal finds a lost message, it actively requests the server to retransmit the error message.

直播电视在使用 H. 264格式时, 由于 I帧间隔时间比较长, 在终端用户请求媒体流 切换时, 服务器需要快速推送的突发码流会比较大,这样一来,对 STB的缓存器有较高要 求, 中低端的 STB会因缓存溢出而丢失报文, 影响画面质量; 媒体流切换对传送带宽有 较高要求, 并且相同传送带宽下可推送的单播码流数量有限, 推送持续时间比较长。  When the live TV is in the H.264 format, because the I frame interval is relatively long, when the end user requests media stream switching, the burst stream that the server needs to push quickly will be relatively large, so that the STB buffer has Higher requirements, the low-end STB will lose packets due to buffer overflow, affecting picture quality; media stream switching has higher requirements on transmission bandwidth, and the number of unicast streams that can be pushed under the same transmission bandwidth is limited, and push continues. The time is long.

发明内容 本发明实施例提供无源光网络保护方法、主备切换控制设备和系统, 可以采用一个 备用 0LT实现对多个主用 0LT的备份。本发明实施例的目的是提供一种媒体流切换方法和 装置, 解决了媒体流切换对传送带宽有较高要求的问题。 Summary of the invention The embodiment of the invention provides a passive optical network protection method, an active/standby switching control device and a system, and can use a standby 0LT to implement backup of multiple primary OLTs. An object of the embodiments of the present invention is to provide a media stream switching method and apparatus, which solves the problem that media stream switching has high requirements on transmission bandwidth.

本发明实施例的目的是通过以下技术方案实现的:  The purpose of the embodiment of the present invention is achieved by the following technical solutions:

一种媒体流切换方法, 包括:  A media stream switching method includes:

接收并缓存报文, 所述报文用于承载媒体流;  Receiving and buffering a packet, where the packet is used to carry a media stream;

获取所述报文的视觉敏感度;  Obtaining visual sensitivity of the message;

当收到终端的媒体流切换请求时, 在所述缓存的报文中选择视觉敏感度高的报文; 重新编排所述视觉敏感度高的报文的序列号;  When receiving the media stream switching request of the terminal, selecting a message with high visual sensitivity in the cached message; and rearranging the serial number of the message with high visual sensitivity;

将经过重新编排序列号的所述视觉敏感度高的报文发送给终端。  The message with high visual sensitivity that has been rearranged by the serial number is sent to the terminal.

一种媒体流切换服务器, 包括, 存储模块、 获取模块、 选择模块、 编排模块和发送 模块; 其中,  A media stream switching server includes: a storage module, an obtaining module, a selecting module, a programming module, and a sending module; wherein

所述存储模块, 用于接收并缓存报文, 所述报文用于承载媒体流;  The storage module is configured to receive and cache a packet, where the packet is used to carry a media stream;

所述获取模块, 用于获取所述存储模块中缓存的报文的视觉敏感度;  The obtaining module is configured to acquire visual sensitivity of a message buffered in the storage module;

所述选择模块, 用于当收到终端的媒体流切换请求时, 在所述存储模块缓存的报文 中选择视觉敏感度高的报文;  The selecting module is configured to: when receiving the media stream switching request of the terminal, select a message with high visual sensitivity in the message buffered by the storage module;

所述编排模块, 用于重新编排所述选择模块选择的报文的序列号;  The orchestration module is configured to re-arrange the serial number of the message selected by the selection module;

所述发送模块, 用于将经过所述编排模块重新编排序列号的报文发送给终端。 一种媒体流切换系统, 包括媒体流切换服务器和头端; 其中,  The sending module is configured to send a message that is re-arranged by the programming module to the terminal. A media stream switching system includes a media stream switching server and a head end; wherein

所述媒体流切换服务器, 用于接收并缓存所述头端发送的报文, 所述报文用于承载 媒体流,获取所述报文的视觉敏感度,当收到终端的媒体流切换请求时,在所述缓存的报 文中选择视觉敏感度高的报文,重新编排所述视觉敏感度高的报文的序列号,将经过重 新编排序列号的所述视觉敏感度高的报文发送给终端;  The media stream switching server is configured to receive and cache a packet sent by the head end, where the packet is used to carry a media stream, obtain a visual sensitivity of the packet, and receive a media stream switching request of the terminal. And selecting, in the cached message, a message with high visual sensitivity, rearranging the sequence number of the message with high visual sensitivity, and re-arranging the message with high visual sensitivity after reordering the serial number. Sent to the terminal;

所述头端, 用于发送报文, 所述报文用于承载媒体流。  The header is configured to send a packet, where the packet is used to carry a media stream.

采用本发明实施例提供的技术方案, 因为只发送视觉敏感度高的报文给终端, 降低 了媒体流切换对传送带宽的要求, 增加了可推送的单播码流数量, 并且发送的报文的序 列号经过重新编排,终端无需请求报文重传,解决了媒体流切换对传送带宽有较高要求、 可推送的单播码流数量有限、 推送持续时间比较长的问题。 附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有 技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本 发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。 The technical solution provided by the embodiment of the present invention, because only the message with high visual sensitivity is sent to the terminal, the requirement for the transmission bandwidth of the media stream switching is reduced, the number of pushable unicast code streams is increased, and the sent message is sent. After the serial number is re-arranged, the terminal does not need to request retransmission of the message, which solves the problem that the media stream switching has high requirements on the transmission bandwidth, the number of pushable unicast streams is limited, and the push duration is long. DRAWINGS In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings to be used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.

图 1为本发明一个实施例中媒体流切换方法流程图;  1 is a flowchart of a method for switching a media stream according to an embodiment of the present invention;

图 2为本发明实施例中向所选择的报文中 RTP序列号较大的一端连续映射的示意图; 图 3为本发明一个实施例中媒体流切换服务器框图;  2 is a schematic diagram of continuously mapping one end of a selected packet with a larger RTP sequence number in the selected embodiment of the present invention; FIG. 3 is a block diagram of a media stream switching server according to an embodiment of the present invention;

图 4为本发明一个实施例中媒体流切换系统示意图;  4 is a schematic diagram of a media stream switching system according to an embodiment of the present invention;

图 5为本发明一个实施例中媒体流切换方法流程图;  FIG. 5 is a flowchart of a method for switching a media stream according to an embodiment of the present invention;

图 6为本发明实施例中向所选择的报文中 RTP序列号较小的一端连续映射的示意图; 图 7为本发明一个实施例中媒体流切换服务器框图;  6 is a schematic diagram of continuously mapping one end of a selected packet with a smaller RTP sequence number according to an embodiment of the present invention; FIG. 7 is a block diagram of a media stream switching server according to an embodiment of the present invention;

图 8为本发明一个实施例中媒体流切换系统示意图。 具体实施方式 为使本发明实施例的上述目的、特征和优点能够更加明显易懂, 下面结合附图和具 体实施方式对本发明实施例作进一步详细的说明。  FIG. 8 is a schematic diagram of a media stream switching system according to an embodiment of the present invention. The embodiments of the present invention will be further described in detail with reference to the drawings and specific embodiments.

下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整 地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基 于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有 其他实施例, 都属于本发明保护的范围。  The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.

以下结合图 1至图 4说明本发明一个实施例:  An embodiment of the present invention will be described below with reference to FIGS. 1 through 4:

图 1为本发明一个实施例中媒体流切换方法流程图。 该方法包括:  FIG. 1 is a flowchart of a method for switching a media stream according to an embodiment of the present invention. The method includes:

102、 接收并缓存报文, 所述报文用于承载媒体流。  102. Receive and cache a packet, where the packet is used to carry a media stream.

例如,媒体流切换服务器对每个媒体流进行缓存,缓存的内容为承载媒体流的报文。 所述媒体流切换服务器可以是一台或一组专用服务器,也可以集成到网络接入节点或路 由器等网络设备上。  For example, the media stream switching server caches each media stream, and the cached content is a packet carrying the media stream. The media stream switching server may be one or a group of dedicated servers, or may be integrated into a network device such as a network access node or a router.

104、 获取所述报文的视觉敏感度。  104. Obtain a visual sensitivity of the message.

在本发明实施例的第一个具体应用场景中, 媒体流切换服务器以深度报文检测 (Deep Packets Inspect, DPI ) 等方式识别视频关键信息, 获取画面组 (Group of Pictures, GOP) 、 I帧、 P帧和 B帧等信息作为视觉敏感度信息, 并得到可以独立解码的 报文以及各帧的起始位置。 此外, 对不同编码格式, 还可以检测其它信息, 例如, 对于 MPEG-TS (Transport Stream)格式, 可以检测缓存的报文的节目关联表(Program Association Table, PAT) 、 节目映射表 (Program Map Table , PMT)等。 媒体流切 换服务器也可以根据视频源即头端 (Head End)在报文头中的某些字段或比特位进行的 特殊信息, 识别出视频关键信息并得到可以独立解码的报文以及各帧的起始位置。 In the first specific application scenario of the embodiment of the present invention, the media stream switching server identifies the key information of the video by means of Deep Packets Inspect (DPI), and acquires a Group of Pictures (GOP) and an I frame. Information such as P frames and B frames as visual sensitivity information, and can be independently decoded The message and the starting position of each frame. In addition, for different encoding formats, other information can also be detected. For example, for the MPEG-TS (Transport Stream) format, a Program Association Table (PAT) and a Program Map Table can be detected for the buffered message. , PMT) and so on. The media stream switching server may also identify the video key information and obtain the independently decodable message and the frame according to the special information of the video source, that is, the head end (Head End) in some fields or bits in the message header. starting point.

在本发明实施例的第二个具体应用场景中,所述视觉敏感度是媒体流切换服务器根 据报文所对应内容的运动矢量丰富度、在画面中的位置、解码端的错误隐藏机制、解码 参考关系、 亮度与色度、 帧类型或条带(SLICE)类型、 画面位置及残差或其中部分因 素进行评估得到的。所述视觉敏感度的定义的单位为报文。视觉敏感度也可以是上游节 点根据报文所对应内容的上述各种因素进行综合评估得到的, 举例来说, 所述上游节点 可以是头端、专用评估设备或具有评估功能的网络设备。媒体流切换服务器接收头端发 送的包括视觉敏感度的承载媒体流的报文, 获取报文的视觉敏感度。  In the second specific application scenario of the embodiment of the present invention, the visual sensitivity is a motion vector richness of the media stream switching server according to the content corresponding to the message, a position in the picture, an error hiding mechanism at the decoding end, and a decoding reference. Relationships, brightness and chrominance, frame type or stripe (SLICE) type, picture position and residuals, or some of these factors are evaluated. The unit of definition of the visual sensitivity is a message. The visual sensitivity may also be obtained by comprehensively evaluating the upstream node according to the above various factors of the content of the message. For example, the upstream node may be a head end, a dedicated evaluation device, or a network device having an evaluation function. The media stream switching server receives the packet of the bearer media stream that is sent by the head end and includes the visual sensitivity, and obtains the visual sensitivity of the message.

106、 当收到终端的媒体流切换请求时, 在所述缓存的报文中选择视觉敏感度高的 报文。  106. When receiving the media stream switching request of the terminal, select a message with high visual sensitivity in the cached message.

在本发明实施例的第一个具体应用场景中, 媒体流切换服务器根据各帧的起始位 置, 以帧为单位, 丢弃 B帧的报文, 选择 I帧和 P帧的报文, 对所选择的报文执行 108。 或 者媒体流切换服务器根据各帧的起始位置, 以帧为单位, 丢弃 B帧和 P帧的报文, 选择 I 帧的报文, 对所选择的报文执行 108。  In the first specific application scenario of the embodiment of the present invention, the media stream switching server discards the packets of the B frame and selects the packets of the I frame and the P frame according to the starting position of each frame. The selected message is executed 108. The media stream switching server discards the packets of the B frame and the P frame in units of frames according to the starting position of each frame, selects the message of the I frame, and performs 108 on the selected message.

在本发明实施例的第二个具体应用场景中,媒体流切换服务器根据各帧或各报文的 视觉敏感度, 以帧或报文为单位,丢弃视觉敏感度低的报文,选择视觉敏感度高的报文, 对所选择的报文执行 108。 所述视觉敏感度高的标准由预设阈值给定。 举例来说, 当以 帧为单位选择视觉敏感度高的报文时, 可以计算或估算各帧视觉敏感度的平均值, 根据 该平均值和预设阈值以帧为单位选择视觉敏感度高的报文。当以报文为单位选择视觉敏 感度高的报文时, 视觉敏感度低的报文可以来自于 B帧图像, 可以来自 P帧图像, 也可以 来自 I帧图像。  In the second specific application scenario of the embodiment of the present invention, the media stream switching server discards the packets with low visual sensitivity in units of frames or packets according to the visual sensitivity of each frame or each packet, and selects the visual sensitivity. A high-level message performs 108 on the selected message. The standard of high visual sensitivity is given by a preset threshold. For example, when a message with high visual sensitivity is selected in units of frames, an average value of visual sensitivity of each frame may be calculated or estimated, and a visual sensitivity is selected in units of frames according to the average value and a preset threshold. Message. When a message with high visual acuity is selected in units of messages, a message with low visual sensitivity may be derived from a B frame image, and may be from a P frame image or an I frame image.

108、 重新编排所述视觉敏感度高的报文的序列号。  108. Rearrange the serial number of the message with high visual sensitivity.

举例来说, 媒体流切换服务器将所选择的报文的 RTP序列号, 向所选择的报文中 RTP 序列号较大的一端连续映射。例如, 所选择的第一个报文的 RTP序列号为 X, 最后一个报 文的 RTP序列号为¥, 共选择了 n个被评估为视觉敏感度高的报文。 将这 n个报文的 RTP序 列号重新编排, 所选择的第一个报文的 RTP序列号重新编排为 Y-n+l, 第二个报文的 RTP 序列号重新编排为 Υ-η+2, 依此类推, 最后一个报文的 RTP序列号仍为 Υ。 For example, the media stream switching server continuously maps the RTP sequence number of the selected packet to the end of the selected packet with the larger RTP sequence number. For example, the RTP sequence number of the selected first message is X, and the RTP sequence number of the last message is ¥, and a total of n messages that are evaluated as having high visual sensitivity are selected. Put the RTP sequence of these n messages The column number is rearranged, the RTP sequence number of the selected first message is rearranged to Y-n+l, the RTP sequence number of the second message is rearranged to Υ-η+2, and so on, the last one The RTP sequence number of the message is still Υ.

参见图 2, 图 2为本发明实施例中向所选择的报文中 RTP序列号较大的一端连续映射 的示意图。 选择的报文的 RTP序列号以 100开始, 112结束, 共 7个报文。 将这 7个报文的 RTP序列号重新编排为从 106至 112的连续序列号。使得终端将要接收的报文的 RTP序列号 连续, 在选择的报文正确传输时, 终端将不会发起重传请求。  Referring to FIG. 2, FIG. 2 is a schematic diagram of continuously mapping one end of a selected packet with a larger RTP sequence number according to an embodiment of the present invention. The RTP sequence number of the selected message starts with 100 and ends with 112, for a total of 7 messages. The RTP sequence numbers of the seven messages are rearranged into consecutive sequence numbers from 106 to 112. The RTP sequence number of the packet to be received by the terminal is consecutive, and when the selected packet is correctly transmitted, the terminal will not initiate a retransmission request.

110、 将经过重新编排报文序列号的所述视觉敏感度高的报文发送给终端。  110. Send the message with high visual sensitivity of the re-arranged message sequence number to the terminal.

举例来说,媒体流切换服务器将经过重新编排序列号的所述视觉敏感度高的报文单 播推送给终端。所述报文推送过程中, 单播推送的码流率可以大于实时组播码流率, 以 使单播推送的码流可以追上实时组播码流。单播推送的码流率也可以等于或小于实时组 播码流率, 因为媒体流切换服务器丢弃部分视觉敏感度低的报文, 不发送给终端, 所以 单播推送的码流率也可以等于或小于实时组播码流率,只要发送给用户的码流率与丢弃 的报文码流率之和大于实时组播码流率, 以使单播推送的码流可以追上实时组播码流。  For example, the media stream switching server pushes the visually sensitive message unicast that has been rearranged by the serial number to the terminal. During the packet push process, the unicast push code stream rate may be greater than the real-time multicast code stream rate, so that the unicast push code stream can catch up with the real-time multicast code stream. The unicast push rate may be equal to or lower than the real-time multicast stream rate. The media stream switching server discards some packets with low visual sensitivity and does not send the packets to the terminal. Therefore, the unicast push rate can be equal to Or less than the real-time multicast stream rate, as long as the sum of the code rate sent to the user and the discarded message stream rate is greater than the real-time multicast stream rate, so that the unicast-push stream can catch up with the real-time multicast code. flow.

在本发明实施例的某些具体应用场景中,可以在媒体流切换服务器中记录重新编排 后的报文序列号与原始报文序列号的映射关系, 或者将所述映射关系发送给终端, 或者 既在媒体流切换服务器中记录所述映射关系也将该映射关系发送给终端。在头端需要对 丢包情况进行统计时,存储所述映射关系的媒体流切换服务器或终端向头端发送所述映 射关系, 或者终端根据所述映射关系得到丢失报文的原始序列号, 发送该原始序列号给 头端。  In some specific application scenarios of the embodiment of the present invention, the mapping relationship between the re-arranged packet sequence number and the original packet sequence number may be recorded in the media stream switching server, or the mapping relationship may be sent to the terminal, or The mapping relationship is also recorded in the media stream switching server and sent to the terminal. The media stream switching server or the terminal that stores the mapping relationship sends the mapping relationship to the head end, or the terminal obtains the original sequence number of the lost packet according to the mapping relationship, and sends the packet to the head end. The original serial number is given to the head end.

图 3为本发明一个实施例中媒体流切换服务器框图。 所述媒体流切换服务器可以是 一台或一组专用服务器, 也可以集成到网络接入节点或路由器等网络设备上。该媒体流 切换服务器包括, 存储模块 302、 获取模块 304、选择模块 306、 编排模块 308和发送模块 310; 其中,  FIG. 3 is a block diagram of a media stream switching server according to an embodiment of the present invention. The media stream switching server may be one or a group of dedicated servers, or may be integrated into a network device such as a network access node or a router. The media stream switching server includes a storage module 302, an obtaining module 304, a selecting module 306, a scheduling module 308, and a sending module 310.

存储模块 302, 用于接收并缓存报文, 所述报文用于承载媒体流。  The storage module 302 is configured to receive and cache a packet, where the packet is used to carry a media stream.

例如, 存储模块 302对每个媒体流进行缓存, 缓存的内容为承载媒体流的报文。 获取模块 304, 用于获取存储模块 302中缓存的报文的视觉敏感度。  For example, the storage module 302 caches each media stream, and the cached content is a packet carrying the media stream. The obtaining module 304 is configured to obtain the visual sensitivity of the message buffered in the storage module 302.

在本发明实施例的第一个具体应用场景中,获取模块 304以 DPI等方式识别存储模块 302中缓存的报文的视频关键信息, 获取画面组(Group of Pictures, GOP) 、 I帧、 P 帧和 B帧等信息作为视觉敏感度信息,并得到可以独立解码的报文以及各帧的起始位置。 此外, 对不同编码格式, 还可以检测其它信息, 例如, 对于 MPEG-TS格式, 可以检测缓 存的报文的 PAT、 PMT等。 获取模块 304也可以根据视频源即头端在报文头中的某些字段 或比特位进行的特殊信息,识别出视频关键信息并得到可以独立解码的报文以及各帧的 起始位置。 In the first specific application scenario of the embodiment of the present invention, the obtaining module 304 identifies the video key information of the message buffered in the storage module 302 by means of DPI, and the like, and obtains a group of pictures (GOP), an I frame, and a P. Information such as frames and B frames is used as visual sensitivity information, and a message that can be independently decoded and a starting position of each frame are obtained. In addition, other information can be detected for different encoding formats, for example, for MPEG-TS format, it can be detected slowly. PAT, PMT, etc. of stored messages. The obtaining module 304 may also identify the video key information according to the special information of the video source, that is, the certain field or bit in the header of the video header, and obtain the message that can be independently decoded and the starting position of each frame.

在本发明实施例的第二个具体应用场景中, 所述视觉敏感度是获取模块 304根据媒 体流切换服务器根据报文所对应内容的运动矢量丰富度、在画面中的位置、解码端的错 误隐藏机制、 解码参考关系、 亮度与色度、 帧类型或 SLICE类型、 画面位置及残差或其 中部分因素进行评估得到的。所述视觉敏感度的定义的单位为报文。低视觉敏感度标识 的非重要数据报文里的数据可以来自于 B帧图像, 可以来自 P帧图像, 也可以来自 I帧图 像。 视觉敏感度也可以是头端根据报文所对应内容的上述各种因素进行综合评估得到 的。获取模块 304获取头端发送的包括视觉敏感度的承载媒体流的报文中的视觉敏感度。  In the second specific application scenario of the embodiment of the present invention, the visual sensitivity is obtained by the acquiring module 304 according to the media stream switching server according to the motion vector richness of the content corresponding to the packet, the position in the screen, and the error hiding on the decoding end. Mechanism, decoding reference relationship, luminance and chrominance, frame type or SLICE type, picture position and residual or some of the factors are evaluated. The unit of definition of the visual sensitivity is a message. The data in the non-important data message of the low visual sensitivity identifier can be from the B frame image, and can be from the P frame image or from the I frame image. The visual sensitivity can also be obtained by comprehensively evaluating the head end according to the above various factors of the content of the message. The obtaining module 304 acquires the visual sensitivity in the message of the bearer media stream including the visual sensitivity sent by the head end.

选择模块 306, 用于当收到终端的媒体流切换请求时, 在存储模块 302缓存的报文中 选择视觉敏感度高的报文。  The selecting module 306 is configured to: when receiving the media stream switching request of the terminal, select a message with high visual sensitivity in the message buffered by the storage module 302.

在本发明实施例的第一个具体应用场景中, 选择模块 306根据标识的各帧的起始位 置, 以帧为单位, 丢弃 B帧的报文, 在存储模块 302缓存的报文中选择 I帧和 P帧的报文, 将所选择的报文交给编排模块 308。 或者媒体流切换服务器根据各帧的起始位置, 以帧 为单位, 丢弃 B帧和 P帧的报文, 选择 I帧的报文, 将所选择的报文交给编排模块 308。  In the first specific application scenario of the embodiment of the present invention, the selecting module 306 discards the B-frame packet in the frame-based unit according to the initial position of the identified frame, and selects I in the packet buffered by the storage module 302. The message of the frame and the P frame, the selected message is delivered to the orchestration module 308. Or the media stream switching server discards the packets of the B frame and the P frame in units of frames according to the starting position of each frame, selects the message of the I frame, and delivers the selected message to the orchestration module 308.

在本发明实施例的第二个具体应用场景中, 选择模块 306根据各帧或各报文的视觉 敏感度, 以帧或报文为单位, 丢弃视觉敏感度低的报文, 在存储模块 302缓存的报文中 选择视觉敏感度高的报文, 将所选择的报文交给编排模块 308。 所述视觉敏感度高的标 准由选择模块 306中的预设阈值给定。  In the second specific application scenario of the embodiment of the present invention, the selecting module 306 discards the packet with low visual sensitivity in units of frames or packets according to the visual sensitivity of each frame or each packet, in the storage module 302. A message with high visual sensitivity is selected in the buffered message, and the selected message is delivered to the orchestration module 308. The visually sensitive standard is given by a preset threshold in the selection module 306.

编排模块 308, 用于重新编排选择模块 306选择的报文的序列号。  The orchestration module 308 is configured to rearrange the serial number of the selected message of the selection module 306.

举例来说, 编排模块 308将选择模块 306选择的报文的 RTP序列号, 向所选择的报文 中 RTP序列号较大的一端连续映射。 例如, 选择模块 306选择的第一个报文的 RTP序列号 为 X,最后一个报文的 RTP序列号为 Y,共选择了 η个报文。编排模块 308将这 η个报文的 RTP 序列号重新编排,所选择的第一个报文的 RTP序列号重新编排为 Υ-η+1,第二个报文的 RTP 序列号重新编排为 Y-n+2, 依此类推, 最后一个报文的 RTP序列号仍为 Υ。  For example, the orchestration module 308 continuously maps the RTP sequence number of the packet selected by the module 306 to the end of the selected packet with the larger RTP sequence number. For example, the RTP sequence number of the first packet selected by the selection module 306 is X, and the RTP sequence number of the last packet is Y, and a total of n packets are selected. The orchestration module 308 rearranges the RTP sequence numbers of the n messages, and the RTP sequence number of the selected first message is rearranged to Υ-η+1, and the RTP sequence number of the second message is rearranged to Y. -n+2, and so on, the RTP sequence number of the last message is still Υ.

发送模块 310, 用于将经过编排模块 308重新编排序列号的报文发送给终端。  The sending module 310 is configured to send the message that has been re-arranged by the orchestration module 308 to the terminal.

举例来说, 发送模块 310将经过编排模块 308重新编排序列号的报文单播推送给终 端。所述报文推送过程中, 单播推送的码流率可以大于实时组播码流率, 以使单播推送 的码流可以追上实时组播码流。 单播推送的码流率也可以等于或小于实时组播码流率, 因为选择模块 306丢弃部分视觉敏感度低的报文, 不发送给终端, 所以单播推送的码流 率也可以等于或小于实时组播码流率,只要发送给用户的码流率与丢弃的报文码流率之 和大于实时组播码流率, 以使单播推送的码流可以追上实时组播码流。 For example, the sending module 310 unicasts the message unicast by the orchestration module 308 to the terminal. During the packet push process, the unicast push code stream rate may be greater than the real-time multicast code stream rate, so that the unicast push code stream can catch up with the real-time multicast code stream. The unicast push code stream rate can also be equal to or less than the real-time multicast stream rate. Because the selection module 306 discards some packets with low visual sensitivity and does not send the packets to the terminal, the code stream rate of the unicast push may be equal to or smaller than the real-time multicast code stream rate, as long as the code stream rate sent to the user is discarded. The sum of the message stream rates is greater than the real-time multicast stream rate, so that the unicast-push stream can catch up with the real-time multicast stream.

在本发明实施例的某些具体应用场景中, 发送模块 310还用于将重新编排后的报文 序列号与原始报文序列号的映射关系发送给终端。 在头端需要对丢包情况进行统计时, 终端向头端发送所述映射关系, 或者根据所述映射关系得到丢失报文的原始序列号, 发 送该原始序列号给头端。  In some specific application scenarios of the embodiment of the present invention, the sending module 310 is further configured to send the mapping relationship between the re-arranged message sequence number and the original message sequence number to the terminal. When the head end needs to collect statistics on the packet loss, the terminal sends the mapping relationship to the head end, or obtains the original sequence number of the lost packet according to the mapping relationship, and sends the original sequence number to the head end.

在本发明实施例的某些具体应用场景中,媒体流切换服务器还可以包括,记录模块, 用于记录重新编排后的报文序列号与原始报文序列号的映射关系。在头端需要对丢包情 况进行统计时, 所述记录模块向头端发送所述映射关系。  In some specific application scenarios of the embodiment of the present invention, the media stream switching server may further include: a recording module, configured to record a mapping relationship between the re-arranged message sequence number and the original message sequence number. When the head end needs to collect statistics on the packet loss situation, the recording module sends the mapping relationship to the head end.

图 4为本发明一个实施例中媒体流切换系统示意图。 该系统包括媒体流切换服务器 402和头端 404; 其中,  FIG. 4 is a schematic diagram of a media stream switching system according to an embodiment of the present invention. The system includes a media stream switching server 402 and a head end 404;

媒体流切换服务器 402, 用于接收并缓存头端发送的报文, 所述报文用于承载媒体 流,获取所述报文的视觉敏感度,当收到终端的媒体流切换请求时,在所述缓存的报文中 选择视觉敏感度高的报文,重新编排所述视觉敏感度高的报文的序列号,将经过重新编 排序列号的所述视觉敏感度高的报文发送给终端。  The media stream switching server 402 is configured to receive and cache the packet sent by the head end, where the packet is used to carry the media stream, and obtain the visual sensitivity of the packet. When receiving the media stream switching request of the terminal, Selecting a message with high visual sensitivity, re-arranging the sequence number of the message with high visual sensitivity, and transmitting the message with high visual sensitivity after re-arranging the sequence number to the terminal in the cached message .

媒体流切换服务器 402可以是一台或一组专用服务器, 也可以集成到网络接入节点 或路由器等网络设备上。  The media stream switching server 402 can be a dedicated server or a group of dedicated servers, or can be integrated into network devices such as network access nodes or routers.

头端 404, 用于发送报文, 所述报文用于承载媒体流。  The head end 404 is configured to send a message, where the message is used to carry a media stream.

头端 404是媒体流发起的源头设备, 其获取媒体流的方式可以是从卫星电视录制, 或从其它有线网络转发等, 头端 404也可以是其它网络设备, 例如侧挂于城域网络设备 的边缘服务器。  The head end 404 is a source device initiated by the media stream, and the manner of obtaining the media stream may be recording from a satellite television, or forwarding from another wired network, etc., and the head end 404 may also be other network devices, such as a side-mounted network device. Edge server.

头端 404与媒体流切换服务器或接入节点之间的网络连接可以有多种方式, 例如, 通过核心网、 城域网、 汇聚网或其他网络连接方式连接。  The network connection between the headend 404 and the media stream switching server or access node can be in various ways, for example, through a core network, a metropolitan area network, an aggregation network, or other network connection.

所述接入节点,可以是数字用户线路接入复用器(Digital Subscriber Line Access Multiplexer, DSLAM) 设备、 光缆终端 (optical line terminal , OLT) 设备、 下层运 营商边缘(Underlay Provider Edge, UPE) 设备或 IP交换机等设备, 也可以是应用于 其它在接入节点网络位置上的设备, 例如汇聚路由器等。接入节点和终端之间的连接可 以包括各种接入技术, 例如, 数字用户线路 (Digital Subscriber Line, DSL) 、 无源 光纤网络 (Passive Optical Network, PON) 、 以太网等。 采用本实施例提供的技术方案, 因为只发送视觉敏感度高的报文给终端, 降低了媒 体流切换对传送带宽的要求, 增加了可推送的单播码流数量, 并且将选择的报文的序列 号, 向所选择的报文中序列号较大的一端连续映射, 使得终端将要接收的报文的序列号 连续, 在选择的报文正确传输时, 终端将不会发起重传请求。 因此不需要终端支持重传 抑制就可以解决媒体流切换对传送带宽有较高要求、可推送的单播码流数量有限、推送 持续时间比较长的问题。 以下结合图 5至图 6说明本发明一个实施例: The access node may be a Digital Subscriber Line Access Multiplexer (DSLAM) device, an optical line terminal (OLT) device, or an Underlay Provider Edge (UPE) device. A device such as an IP switch may also be applied to other devices at the access node network location, such as an aggregation router. The connection between the access node and the terminal may include various access technologies, such as Digital Subscriber Line (DSL), Passive Optical Network (PON), Ethernet, and the like. With the technical solution provided by the embodiment, only the message with high visual sensitivity is sent to the terminal, the requirement for the transmission bandwidth of the media stream switching is reduced, the number of pushable unicast streams is increased, and the selected message is selected. The sequence number is continuously mapped to the end of the selected message with the larger sequence number, so that the sequence number of the message to be received by the terminal is continuous. When the selected message is correctly transmitted, the terminal will not initiate a retransmission request. Therefore, the terminal does not need to support retransmission suppression, and the problem that the media stream switching has high requirements on the transmission bandwidth, the number of pushable unicast streams is limited, and the push duration is relatively long can be solved. An embodiment of the present invention will be described below with reference to FIGS. 5 through 6:

图 5为本发明一个实施例中媒体流切换方法流程图。 该方法包括:  FIG. 5 is a flowchart of a method for switching a media stream according to an embodiment of the present invention. The method includes:

502、 接收并缓存报文, 所述报文用于承载媒体流。  502. Receive and cache a packet, where the packet is used to carry a media stream.

例如,媒体流切换服务器对每个媒体流进行缓存,缓存的内容为承载媒体流的报文。 所述媒体流切换服务器可以是一台或一组专用服务器,也可以集成到网络接入节点或路 由器等网络设备上。  For example, the media stream switching server caches each media stream, and the cached content is a packet carrying the media stream. The media stream switching server may be one or a group of dedicated servers, or may be integrated into a network device such as a network access node or a router.

504、 获取所述报文的视觉敏感度。  504. Obtain a visual sensitivity of the packet.

在本发明实施例的第一个具体应用场景中, 媒体流切换服务器以 DPI等方式识别视 频关键信息, 获取画面组(Group of Pictures, GOP) 、 I帧、 P帧和 B帧等信息作为视 觉敏感度信息, 并得到可以独立解码的报文以及各帧的起始位置。 此外, 对不同编码格 式, 还可以检测其它信息, 例如, 对于 MPEG-TS格式, 可以检测缓存的报文的 PAT、 PMT 等。媒体流切换服务器也可以根据视频源即头端在报文头中的某些字段或比特位进行的 特殊信息, 识别出视频关键信息并得到可以独立解码的报文以及各帧的起始位置。  In the first specific application scenario of the embodiment of the present invention, the media stream switching server identifies the video key information by means of DPI, etc., and obtains information such as a group of pictures (GOP), an I frame, a P frame, and a B frame as visual Sensitivity information, and get the message that can be decoded independently and the starting position of each frame. In addition, other information can be detected for different coding formats. For example, for the MPEG-TS format, PAT, PMT, etc. of the buffered message can be detected. The media stream switching server may also identify the video key information and obtain the independently decodable message and the starting position of each frame according to the special information of the video source, that is, the certain field or bit in the header of the message header.

在本发明实施例的第二个具体应用场景中,所述视觉敏感度是媒体流切换服务器根 据报文所对应内容的运动矢量丰富度、在画面中的位置、解码端的错误隐藏机制、解码 参考关系、 亮度与色度、 帧类型或 SLICE类型、 画面位置及残差或其中部分因素进行评 估得到的。所述视觉敏感度的定义的单位为报文。视觉敏感度标识低的非重要数据报文 里的数据可以来自于 B帧图像, 可以来自 P帧图像, 也可以来自 I帧图像。 视觉敏感度也 可以是头端根据报文所对应内容的上述各种因素进行综合评估得到的。媒体流切换服务 器接收头端发送的包括视觉敏感度的承载媒体流的报文, 获取报文的视觉敏感度。  In the second specific application scenario of the embodiment of the present invention, the visual sensitivity is a motion vector richness of the media stream switching server according to the content corresponding to the message, a position in the picture, an error hiding mechanism at the decoding end, and a decoding reference. Relationships, brightness and chrominance, frame type or SLICE type, picture position and residual or some of the factors are evaluated. The unit of definition of the visual sensitivity is a message. The data in the non-important data message with low visual sensitivity can be from the B frame image, and can be from the P frame image or from the I frame image. The visual sensitivity can also be obtained by comprehensively evaluating the head end according to the above various factors of the content of the message. The media stream switching server receives the message of the bearer media stream that is sent by the head end and includes the visual sensitivity, and obtains the visual sensitivity of the message.

506、 当收到终端的媒体流切换请求时, 在所述缓存的报文中选择视觉敏感度高的 报文。 在本发明实施例的第一个具体应用场景中,媒体流切换服务器根据标识的各帧的起 始位置, 以帧为单位,丢弃 B帧的报文,选择 I帧和 P帧的报文,对所选择的报文执行 508。 或者媒体流切换服务器根据各帧的起始位置, 以帧为单位, 丢弃 B帧和 P帧的报文, 选择 I帧的报文, 对所选择的报文执行 508。 506. When receiving a media stream switching request of the terminal, select a packet with high visual sensitivity in the cached message. In the first specific application scenario of the embodiment of the present invention, the media stream switching server discards the packets of the B frame and selects the packets of the I frame and the P frame according to the initial position of the identified frame. 508 is performed on the selected message. Or the media stream switching server discards the packets of the B frame and the P frame in units of frames according to the starting position of each frame, selects the message of the I frame, and performs 508 on the selected message.

在本发明实施例的第二个具体应用场景中,媒体流切换服务器根据各帧或各报文的 视觉敏感度, 以帧或报文为单位,丢弃视觉敏感度低的报文,选择视觉敏感度高的报文, 对所选择的报文执行 108。 所述视觉敏感度高的标准由预设阈值给定。  In the second specific application scenario of the embodiment of the present invention, the media stream switching server discards the packets with low visual sensitivity in units of frames or packets according to the visual sensitivity of each frame or each packet, and selects the visual sensitivity. A high-level message performs 108 on the selected message. The standard of high visual sensitivity is given by a preset threshold.

508、 重新编排所述视觉敏感度高的报文的序列号。  508. Rearrange the sequence number of the message with high visual sensitivity.

举例来说, 媒体流切换服务器将所选择的报文的 RTP序列号, 向所选择的报文中 RTP 序列号较小的一端连续映射。例如, 所选择的第一个报文的 RTP序列号为 X, 最后一个报 文的 RTP序列号为¥, 共选择了 n个被评估为视觉敏感度高的报文。 将这 n个报文的 RTP序 列号重新编排, 所选择的第一个报文的 RTP序列号仍为 X, 第二个报文的 RTP序列号重新 编排为 X+l, 依此类推, 最后一个报文的 RTP序列号重新编排为 X+n-l。 媒体流切换完成 后, 终端接收的组播报文起始序列号从 Y+1开始; 选择的报文经过重新编排的序列号, 与组播报文起始序列号不连续, 对 X+n至 Y这一段不连续的序列号执行 510、 512。  For example, the media stream switching server continuously maps the RTP sequence number of the selected packet to the smaller end of the selected packet with the smaller RTP sequence number. For example, the RTP sequence number of the selected first message is X, and the RTP sequence number of the last message is ¥, and a total of n messages evaluated as having high visual sensitivity are selected. The RTP sequence numbers of the n messages are rearranged, the RTP sequence number of the selected first message is still X, the RTP sequence number of the second message is rearranged to X+l, and so on, and finally The RTP sequence number of a message is rearranged to X+nl. After the media stream is switched, the start sequence number of the multicast packet received by the terminal starts from Y+1. The sequence of the selected packet is re-arranged and is not continuous with the start sequence number of the multicast packet. For X+n The discontinuous serial number to Y is performed 510, 512.

参见图 6, 图 6为本发明实施例中向所选择的报文中 RTP序列号较小的一端连续映射 的示意图。 选择的报文的 RTP序列号以 100开始, 112结束, 共 7个报文。 将这 7个报文的 RTP序列号重新编排为从 100至 106的连续序列号。 媒体流切换完成后, 终端接收的组播 报文起始序列号从 113开始; 选择的报文经过重新编排的序列号, 与组播报文起始序列 号不连续, 对 107至 111这一段不连续的序列号执行 510、 512。  Referring to FIG. 6, FIG. 6 is a schematic diagram of continuously mapping one end of a selected packet with a smaller RTP sequence number according to an embodiment of the present invention. The RTP sequence number of the selected message starts with 100 and ends with 112, for a total of 7 messages. The RTP sequence numbers of these 7 messages are rearranged into consecutive serial numbers from 100 to 106. After the media stream is switched, the start sequence number of the multicast packet received by the terminal starts from 113. The sequence of the selected packet is re-arranged and is not continuous with the start sequence number of the multicast packet. For the segment 107 to 111. The discontinuous serial numbers are executed 510, 512.

510、 生成重传抑制信息, 所述重传抑制信息包括所述经过重新编排的报文的不连 续的序列号的标识信息。  510. Generate retransmission suppression information, where the retransmission suppression information includes identifier information of the discontinuous sequence number of the re-arranged message.

以 RTP序列号从 X+n至 Y这一段不连续为例, 此时可以生成重传抑制信息, 重传抑制 信息中包括这一段不连续的序列号的信息, 例如, 这一段不连续的序列号的第一个 RTP 序列号 (X+n)和最后一个 RTP序列号 (Y) 。  Taking the discontinuity of the RTP sequence number from X+n to Y as an example, the retransmission suppression information may be generated at this time, and the retransmission suppression information includes information of the discontinuous sequence number, for example, the discontinuous sequence. The first RTP sequence number (X+n) and the last RTP sequence number (Y).

512、 向所述终端发送所述重传抑制信息, 所述重传抑制信息使所述终端接在所述 标识信息对应的报文丢失时, 不请求重传所述标识信息对应的报文。  512. Send the retransmission suppression information to the terminal, where the retransmission suppression information is used to prevent the retransmission of the packet corresponding to the identifier information when the terminal receives the packet corresponding to the identifier information.

举例来说, 重传抑制信息可以由扩展 RTCP报文发送给接收节点。  For example, the retransmission suppression information may be sent by the extended RTCP message to the receiving node.

514、 将经过重新编排报文序列号的所述视觉敏感度高的报文发送给终端。 举例来说,媒体流切换服务器将经过重新编排序列号的所述视觉敏感度高的报文单 播推送给终端。所述报文推送过程中, 单播推送的码流率可以大于实时组播码流率, 以 使单播推送的码流可以追上实时组播码流。单播推送的码流率也可以等于或小于实时组 播码流率, 因为媒体流切换服务器丢弃部分视觉敏感度低的报文, 不发送给终端, 所以 单播推送的码流率也可以等于或小于实时组播码流率,只要发送给用户的码流率与丢弃 的报文码流率之和大于实时组播码流率, 以使单播推送的码流可以追上实时组播码流。 514. Send the message with high visual sensitivity of the re-arranged message sequence number to the terminal. For example, the media stream switching server unicasts the visually sensitive message unicast that has been rearranged by the sequence number to the terminal. During the packet push process, the unicast push code stream rate may be greater than the real-time multicast code stream rate, so that the unicast push code stream can catch up with the real-time multicast code stream. The unicast push rate may be equal to or lower than the real-time multicast stream rate. The media stream switching server discards some packets with low visual sensitivity and does not send the packets to the terminal. Therefore, the unicast push rate can be equal to Or less than the real-time multicast stream rate, as long as the sum of the code rate sent to the user and the discarded message stream rate is greater than the real-time multicast stream rate, so that the unicast-push stream can catch up with the real-time multicast code. flow.

本领域普通技术人员可以理解, 图 5所示实施例中重新编排序列号的目的是减少或 简化需要发送的重传抑制信息,其他容易想到的可以减少或简化需要发送的重传抑制信 息的重新编排序列号的方法都可以作为所述重新编排所述视觉敏感度高的报文的序列 号的方法。  It will be understood by those skilled in the art that the purpose of rearranging the serial number in the embodiment shown in FIG. 5 is to reduce or simplify the retransmission suppression information that needs to be transmitted. Other conceivable ones can reduce or simplify the retransmission suppression information that needs to be sent. The method of programming the serial number can be used as the method of rearranging the serial number of the message with high visual sensitivity.

本领域普通技术人员可以理解, 图 5所示实施例中 510和 512中重传抑制信息的生成 和发送, 与 514中推送单播媒体流给终端并无严格的时间顺序。 重传抑制信息可以在推 送单播媒体流之前即发送给终端, 也可以在已经推送一部分单播媒体流之后发送给终 端。  A person of ordinary skill in the art can understand that the generation and transmission of retransmission suppression information in 510 and 512 in the embodiment shown in FIG. 5 is not strictly time-ordered to push the unicast media stream to the terminal in 514. The retransmission suppression information may be sent to the terminal before the unicast media stream is pushed, or may be sent to the terminal after a part of the unicast media stream has been pushed.

在本发明实施例的某些具体应用场景中,可以在媒体流切换服务器中记录重新编排 后的报文序列号与原始报文序列号的映射关系, 或者将所述映射关系发送给终端, 或者 既在媒体流切换服务器中记录所述映射关系也将该映射关系发送给终端。在头端需要对 丢包情况进行统计时,存储所述映射关系的媒体流切换服务器或终端向头端发送所述映 射关系, 或者终端根据所述映射关系得到丢失报文的原始序列号, 发送该原始序列号给 头端。  In some specific application scenarios of the embodiment of the present invention, the mapping relationship between the re-arranged packet sequence number and the original packet sequence number may be recorded in the media stream switching server, or the mapping relationship may be sent to the terminal, or The mapping relationship is also recorded in the media stream switching server and sent to the terminal. The media stream switching server or the terminal that stores the mapping relationship sends the mapping relationship to the head end, or the terminal obtains the original sequence number of the lost packet according to the mapping relationship, and sends the packet to the head end. The original serial number is given to the head end.

图 7为本发明一个实施例中媒体流切换服务器框图。 所述媒体流切换服务器可以是 一台或一组专用服务器, 也可以集成到网络接入节点或路由器等网络设备上。该媒体流 切换服务器包括, 存储模块 702、 获取模块 704、 选择模块 706、 编排模块 708、 生成模块 710和发送模块 712; 其中, 所述存储模块 702、获取模块 704和选择模块 706分别与图 3所 示实施例中存储模块 302、 获取模块 304和选择模块 306功能基本相同。 区别在于, 编排 模块 708的功能略有不同, 并相应增加了生成模块 710, 并增加了发送模块 712的功能。  FIG. 7 is a block diagram of a media stream switching server according to an embodiment of the present invention. The media stream switching server may be one or a group of dedicated servers, or may be integrated into a network device such as a network access node or a router. The media stream switching server includes a storage module 702, an obtaining module 704, a selecting module 706, a scheduling module 708, a generating module 710, and a sending module 712. The storage module 702, the obtaining module 704, and the selecting module 706 are respectively associated with FIG. 3. The memory module 302, the acquisition module 304, and the selection module 306 in the illustrated embodiment function substantially the same. The difference is that the functions of the orchestration module 708 are slightly different, and the generation module 710 is added correspondingly, and the function of the transmission module 712 is added.

存储模块 702, 用于接收并缓存报文, 所述报文用于承载媒体流。  The storage module 702 is configured to receive and cache a packet, where the packet is used to carry a media stream.

获取模块 704, 用于获取存储模块 702中缓存的报文的视觉敏感度。  The obtaining module 704 is configured to obtain visual sensitivity of the message buffered in the storage module 702.

选择模块 706, 用于当收到终端的媒体流切换请求时, 在存储模块 702缓存的报文中 选择视觉敏感度高的报文。 编排模块 708, 用于重新编排选择模块 706选择的报文的序列号。 The selecting module 706 is configured to select a packet with high visual sensitivity in the packet buffered by the storage module 702 when receiving the media stream switching request of the terminal. The orchestration module 708 is configured to rearrange the serial number of the message selected by the selection module 706.

举例来说, 编排模块 708将选择模块 706选择的报文的 RTP序列号, 向所选择的报文 中 RTP序列号较小的一端连续映射。 例如, 选择模块 706选择的第一个报文的 RTP序列号 为 X, 最后一个报文的 RTP序列号为¥, 共选择了 n个被评估为视觉敏感度高的报文。编排 模块 708将这 n个报文的 RTP序列号重新编排, 所选择的第一个报文的 RTP序列号仍为 X, 第二个报文的 RTP序列号重新编排为 X+l, 依此类推, 最后一个报文的 RTP序列号重新编 排为 X+n-l。  For example, the orchestration module 708 continuously maps the RTP sequence number of the packet selected by the module 706 to the smaller end of the selected packet with the smaller RTP sequence number. For example, the RTP sequence number of the first message selected by the selection module 706 is X, and the RTP sequence number of the last message is ¥, and a total of n messages that are evaluated as having high visual sensitivity are selected. The orchestration module 708 rearranges the RTP sequence numbers of the n messages, and the RTP sequence number of the selected first message is still X, and the RTP sequence number of the second message is rearranged to X+l. By analogy, the RTP sequence number of the last message is rearranged to X+nl.

生成模块 710, 用于生成重传抑制信息, 所述重传抑制信息包括所述经过重新编排 的报文的不连续的序列号的标识信息。  The generating module 710 is configured to generate retransmission suppression information, where the retransmission suppression information includes identifier information of a discontinuous sequence number of the re-arranged message.

以 RTP序列号从 X+n至 Y这一段不连续为例, 此时生成模块 710可以生成重传抑制信 息, 重传抑制信息中包括这一段不连续的序列号的信息, 例如, 这一段不连续的序列号 的第一个 RTP序列号 (X+n)和最后一个 RTP序列号 (Y) 。  Taking the discontinuity of the RTP sequence number from X+n to Y as an example, the generating module 710 can generate retransmission suppression information, and the retransmission suppression information includes information of the discontinuous sequence number, for example, this segment does not The first RTP sequence number (X+n) and the last RTP sequence number (Y) of consecutive serial numbers.

发送模块 712, 用于将经过编排模块 308重新编排序列号的报文发送给终端,还用于 向所述终端发送生成模块 710生成的重传抑制信息, 所述重传抑制信息使所述终端接在 所述标识信息对应的报文丢失时, 不请求重传所述标识信息对应的报文。  The sending module 712 is configured to send, to the terminal, the re-arrangement suppression message generated by the generating module 710, and send the retransmission suppression information to the terminal. When the packet corresponding to the identifier information is lost, the packet corresponding to the identifier information is not requested to be retransmitted.

举例来说, 发送模块 712可以用扩展 RTCP报文将重传抑制信息发送给接收节点。 举例来说, 发送模块 712将经过重新编排序列号的所述视觉敏感度高的报文单播推 送给终端。所述报文推送过程中, 单播推送的码流率可以大于实时组播码流率, 以使单 播推送的码流可以追上实时组播码流。单播推送的码流率也可以等于或小于实时组播码 流率, 因为选择模块 706丢弃部分视觉敏感度低的报文, 不发送给终端, 所以单播推送 的码流率也可以等于或小于实时组播码流率,只要发送给用户的码流率与丢弃的报文码 流率之和大于实时组播码流率, 以使单播推送的码流可以追上实时组播码流。  For example, the sending module 712 can send the retransmission suppression information to the receiving node with the extended RTCP message. For example, the sending module 712 unicasts the visually sensitive message with the reordered serial number to the terminal. During the packet push process, the unicast push code stream rate may be greater than the real-time multicast code stream rate, so that the unicast push code stream can catch up with the real-time multicast code stream. The unicast push code stream rate may also be equal to or lower than the real-time multicast code stream rate, because the selection module 706 discards some of the packets with low visual sensitivity and does not send the message to the terminal, so the unicast push code stream rate may also be equal to or Less than the real-time multicast stream rate, as long as the sum of the code stream rate sent to the user and the discarded message stream rate is greater than the real-time multicast stream rate, so that the unicast-push stream can catch up with the real-time multicast stream. .

在本发明实施例的某些具体应用场景中, 发送模块 712还用于将重新编排后的报文 序列号与原始报文序列号的映射关系发送给终端。 在头端需要对丢包情况进行统计时, 终端向头端发送所述映射关系, 或者根据所述映射关系得到丢失报文的原始序列号, 发 送该原始序列号给头端。  In some specific application scenarios of the embodiment of the present invention, the sending module 712 is further configured to send the mapping relationship between the re-arranged message sequence number and the original message sequence number to the terminal. When the head end needs to collect statistics on the packet loss, the terminal sends the mapping relationship to the head end, or obtains the original sequence number of the lost packet according to the mapping relationship, and sends the original sequence number to the head end.

在本发明实施例的某些具体应用场景中,媒体流切换服务器还可以包括,记录模块, 用于记录重新编排后的报文序列号与原始报文序列号的映射关系。在头端需要对丢包情 况进行统计时, 所述记录模块向头端发送所述映射关系。 图 8为本发明一个实施例中媒体流切换系统示意图。 该系统包括媒体流切换服务器 802和头端 804; 其中, In some specific application scenarios of the embodiment of the present invention, the media stream switching server may further include: a recording module, configured to record a mapping relationship between the re-arranged message sequence number and the original message sequence number. When the head end needs to collect statistics on the packet loss situation, the recording module sends the mapping relationship to the head end. FIG. 8 is a schematic diagram of a media stream switching system according to an embodiment of the present invention. The system includes a media stream switching server 802 and a head end 804;

媒体流切换服务器 802, 用于接收并缓存头端发送的报文, 所述报文用于承载媒体 流,获取所述报文的视觉敏感度,当收到终端的媒体流切换请求时,在所述缓存的报文中 选择视觉敏感度高的报文,重新编排所述视觉敏感度高的报文的序列号,将经过重新编 排序列号的所述视觉敏感度高的报文发送给终端,还用于生成重传抑制信息, 所述重传 抑制信息包括所述经过重新编排的报文的不连续的序列号的标识信息, 向所述终端发送 所述重传抑制信息, 所述重传抑制信息使所述终端接在所述标识信息对应的报文丢失 时, 不请求重传所述标识信息对应的报文。  The media stream switching server 802 is configured to receive and cache the packet sent by the head end, where the packet is used to carry the media stream, and obtain the visual sensitivity of the packet. When receiving the media stream switching request of the terminal, Selecting a message with high visual sensitivity, re-arranging the sequence number of the message with high visual sensitivity, and transmitting the message with high visual sensitivity after re-arranging the sequence number to the terminal in the cached message And the retransmission suppression information includes the identifier information of the discontinuous sequence number of the re-arranged message, and the retransmission suppression information is sent to the terminal, where The transmission suppression information is such that when the terminal receives the packet corresponding to the identifier information, the terminal does not request to retransmit the packet corresponding to the identifier information.

媒体流切换服务器 802可以是一台或一组专用服务器, 也可以集成到网络接入节点 或路由器等网络设备上。  The media stream switching server 802 can be a dedicated server or a group of dedicated servers, or can be integrated into network devices such as network access nodes or routers.

头端 804, 用于发送报文, 所述报文用于承载媒体流。  The head end 804 is configured to send a message, where the message is used to carry a media stream.

头端 804是媒体流发起的源头设备, 其获取媒体流的方式可以是从卫星电视录制, 或从其它有线网络转发等, 头端 804也可以是其它网络设备, 例如侧挂于城域网络设备 的边缘服务器。  The head end 804 is a source device initiated by the media stream, and the manner of obtaining the media stream may be recording from a satellite television, or forwarding from another wired network, etc., and the head end 804 may also be other network devices, for example, hanging on a metropolitan area network device. Edge server.

头端 804与媒体流切换服务器或接入节点之间的网络连接可以有多种方式, 例如, 通过核心网、 城域网、 汇聚网或其他网络连接方式连接。  The network connection between the headend 804 and the media stream switching server or access node can be in various ways, for example, through a core network, a metropolitan area network, an aggregation network, or other network connection.

所述接入节点,可以是数字用户线路接入复用器(Digital Subscriber Line Access Multiplexer, DSLAM) 设备、 光缆终端 (optical line terminal , OLT) 设备、 下层运 营商边缘(Underlay Provider Edge, UPE) 设备或 IP交换机等设备, 也可以是应用于 其它在接入节点网络位置上的设备, 例如汇聚路由器等。接入节点和终端之间的连接可 以包括各种接入技术, 例如, 数字用户线路 (Digital Subscriber Line, DSL) 、 无源 光纤网络 (Passive Optical Network, PON) 、 以太网等。  The access node may be a Digital Subscriber Line Access Multiplexer (DSLAM) device, an optical line terminal (OLT) device, or an Underlay Provider Edge (UPE) device. A device such as an IP switch may also be applied to other devices at the access node network location, such as an aggregation router. The connection between the access node and the terminal can include various access technologies, such as Digital Subscriber Line (DSL), Passive Optical Network (PON), Ethernet, and the like.

采用本实施例提供的技术方案, 因为只发送视觉敏感度高的报文给终端, 降低了媒 体流切换对传送带宽的要求, 增加了可推送的单播码流数量, 并且发送的报文的序列号 经过重新编排, 只需发送少量重传抑制信息, 即可使终端无需请求报文重传, 解决了媒 体流切换对传送带宽有较高要求、可推送的单播码流数量有限、推送持续时间比较长的 问题。 本领域普通技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通 过程序来指令相关的硬件完成, 所述的程序可以存储于计算机可读存储介质中, 所述存 储介质可以是 ROM/RAM, 磁盘或光盘等。 With the technical solution provided by the embodiment, only the message with high visual sensitivity is sent to the terminal, the requirement for the transmission bandwidth of the media stream switching is reduced, the number of pushable unicast streams is increased, and the sent message is After the sequence number is re-arranged, only a small amount of retransmission suppression information is sent, so that the terminal does not need to request retransmission of the message, which solves the problem that the media stream switching has high requirements on the transmission bandwidth, the number of pushable unicast streams is limited, and the push A problem that lasts longer. A person skilled in the art can understand that all or part of the steps of implementing the above embodiments may be completed by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, and the storage medium may be a ROM. /RAM, disk or CD, etc.

以上所述, 仅为本发明较佳的具体实施方式, 但本发明的保护范围并不局限于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到的变化或替 换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围应该以权利要求的保 护范围为准。  The above is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or within the technical scope disclosed by the present invention. Alternatives are intended to be covered by the scope of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

权利要求 Rights request 1、 一种媒体流切换方法, 其特征在于, 包括:  A media stream switching method, comprising: 接收并缓存报文, 所述报文用于承载媒体流;  Receiving and buffering a packet, where the packet is used to carry a media stream; 获取所述报文的视觉敏感度;  Obtaining visual sensitivity of the message; 当收到终端的媒体流切换请求时, 在所述缓存的报文中选择视觉敏感度高的报文; 重新编排所述视觉敏感度高的报文的序列号;  When receiving the media stream switching request of the terminal, selecting a message with high visual sensitivity in the cached message; and rearranging the serial number of the message with high visual sensitivity; 将经过重新编排序列号的所述视觉敏感度高的报文发送给终端。  The message with high visual sensitivity that has been rearranged by the serial number is sent to the terminal. 2、根据权利要求 1所述的方法, 其特征在于, 所述重新编排所述视觉敏感度高的报 文的序列号, 包括:  The method according to claim 1, wherein the rearranging the serial number of the message with high visual sensitivity includes: 将所述视觉敏感度高的报文的序列号, 向序列号较大的一端连续映射。  The sequence number of the message with high visual sensitivity is continuously mapped to the end with the larger sequence number. 3、根据权利要求 1或 2所述的方法, 其特征在于, 所述获取所述报文的视觉敏感度, 包括:  The method according to claim 1 or 2, wherein the obtaining the visual sensitivity of the message comprises: 对所述报文进行评估得到所述视觉敏感度; 或  Evaluating the message to obtain the visual sensitivity; or 获取携带在所述报文中的由上游节点对所述报文进行评估得到的视觉敏感度。 Obtaining a visual sensitivity obtained by the upstream node to evaluate the message carried in the packet. 4、 根据权利要求 1或 2所述的方法, 其特征在于, 所述在所述缓存的报文中选择视 觉敏感度高的报文, 包括: The method according to claim 1 or 2, wherein the selecting a message with high visual sensitivity in the cached message includes: 以帧为单位在所述缓存的报文中选择视觉敏感度高的报文。  A message with high visual sensitivity is selected in the cached message in units of frames. 5、根据权利要求 3所述的方法, 其特征在于, 所述以帧为单位在所述缓存的报文中 选择视觉敏感度高的报文, 包括:  The method according to claim 3, wherein the selecting a message with high visual sensitivity in the cached message in a frame unit comprises: 在所述缓存的报文中选择 I帧和 P帧的报文。  The packets of the I frame and the P frame are selected in the buffered message. 6、 根据权利要求 1或 2所述的方法, 其特征在于, 所述在所述缓存的报文中选择视 觉敏感度高的报文, 包括:  The method according to claim 1 or 2, wherein the selecting a message with high visual sensitivity in the cached message includes: 以报文为单位在所述缓存的报文中选择视觉敏感度高的报文。  Selecting a message with high visual sensitivity in the cached message in units of messages. 7、 根据权利要求 1或 2所述的方法, 其特征在于, 在所述重新编排所述视觉敏感度 高的报文的序列号之后, 还包括:  The method according to claim 1 or 2, further comprising: after the rearranging the serial number of the message with high visual sensitivity, further comprising: 记录重新编排后的报文序列号与重新编排前的报文序列号的映射关系; 和 /或 将重新编排后的报文序列号与重新编排前的报文序列号的映射关系发送给终端。 Recording the mapping relationship between the re-arranged message sequence number and the message sequence number before re-arrangement; and/or transmitting the mapping relationship between the re-arranged message sequence number and the re-arranged message sequence number to the terminal. 8、根据权利要求 1所述的方法, 其特征在于, 所述重新编排所述视觉敏感度高的报 文的序列号, 包括: The method according to claim 1, wherein the rearranging the serial number of the message with high visual sensitivity includes: 将所述视觉敏感度高的报文的序列号, 向序列号较小的一端连续映射。 The sequence number of the message with high visual sensitivity is continuously mapped to the end with the smaller sequence number. 9、根据权利要求 8所述的方法, 其特征在于, 在重新编排所述视觉敏感度高的报文 的序列号之后, 还包括: The method according to claim 8, wherein after rearranging the serial number of the message with high visual sensitivity, the method further comprises: 生成重传抑制信息,所述重传抑制信息包括所述经过重新编排的报文的不连续的序 列号的标识信息;  Generating retransmission suppression information, where the retransmission suppression information includes identification information of a discontinuous sequence number of the re-arranged message; 向所述终端发送所述重传抑制信息,所述重传抑制信息使所述终端接在所述标识信 息对应的报文丢失时, 不请求重传所述标识信息对应的报文。  The retransmission suppression information is sent to the terminal, and the retransmission suppression information is used to prevent the retransmission of the packet corresponding to the identifier information when the terminal receives the packet corresponding to the identifier information. 10、一种媒体流切换服务器, 其特征在于, 包括, 存储模块、获取模块、选择模块、 编排模块和发送模块; 其中,  A media stream switching server, comprising: a storage module, an obtaining module, a selecting module, a scheduling module, and a sending module; 所述存储模块, 用于接收并缓存报文, 所述报文用于承载媒体流;  The storage module is configured to receive and cache a packet, where the packet is used to carry a media stream; 所述获取模块, 用于获取所述存储模块中缓存的报文的视觉敏感度;  The obtaining module is configured to acquire visual sensitivity of a message buffered in the storage module; 所述选择模块, 用于当收到终端的媒体流切换请求时, 在所述存储模块缓存的报文 中选择视觉敏感度高的报文;  The selecting module is configured to: when receiving the media stream switching request of the terminal, select a message with high visual sensitivity in the message buffered by the storage module; 所述编排模块, 用于重新编排所述选择模块选择的报文的序列号;  The orchestration module is configured to re-arrange the serial number of the message selected by the selection module; 所述发送模块, 用于将经过所述编排模块重新编排序列号的报文发送给终端。 The sending module is configured to send a message that is re-arranged by the programming module to the terminal. 11、 根据权利要求 10所述的媒体流切换服务器, 其特征在于, 所述编排模块, 具体 用于将所述视觉敏感度高的报文的序列号, 向序列号较大的一端连续映射。 The media stream switching server according to claim 10, wherein the orchestration module is configured to continuously map the sequence number of the message with high visual sensitivity to one end with a larger serial number. 12、 根据权利要求 10所述的媒体流切换服务器, 其特征在于, 还包括生成模块; 其 中,  12. The media stream switching server according to claim 10, further comprising a generating module; wherein 所述生成模块, 用于生成重传抑制信息, 所述重传抑制信息包括所述经过重新编排 的报文的不连续的序列号的标识信息;  The generating module is configured to generate retransmission suppression information, where the retransmission suppression information includes identifier information of a discontinuous sequence number of the re-arranged message; 所述发送模块, 还用于向所述终端发送所述生成模块生成的重传抑制信息, 所述重 传抑制信息使所述终端接在所述标识信息对应的报文丢失时,不请求重传所述标识信息 对应的报文。  The sending module is further configured to send the retransmission suppression information generated by the generating module to the terminal, where the retransmission suppression information is such that the terminal does not request heavy when the packet corresponding to the identifier information is lost. The packet corresponding to the identifier information is transmitted. 13、 一种媒体流切换系统, 其特征在于, 包括媒体流切换服务器和头端; 其中, 所述媒体流切换服务器, 用于接收并缓存所述头端发送的报文, 所述报文用于承载 媒体流,获取所述报文的视觉敏感度,当收到终端的媒体流切换请求时,在所述缓存的报 文中选择视觉敏感度高的报文,重新编排所述视觉敏感度高的报文的序列号,将经过重 新编排序列号的所述视觉敏感度高的报文发送给终端;  A media stream switching system, comprising: a media stream switching server and a head end; wherein the media stream switching server is configured to receive and cache a packet sent by the head end, where the packet is used by the packet And receiving the media stream, and acquiring the visual sensitivity of the packet. When receiving the media stream switching request of the terminal, selecting a packet with high visual sensitivity in the cached packet, and rearranging the visual sensitivity. The sequence number of the high message is sent to the terminal by the re-arranged sequence number of the message with high visual sensitivity; 所述头端, 用于发送报文, 所述报文用于承载媒体流。 The header is configured to send a packet, where the packet is used to carry a media stream. 14、根据权利要求 13所述的媒体流切换系统, 其特征在于, 所述重新编排所述视觉 敏感度高的报文的序列号, 具体包括- 将所述视觉敏感度高的报文的序列号, 向序列号较大的一端连续映射。 The media stream switching system according to claim 13, wherein the rearranging the sequence number of the message with high visual sensitivity includes: - the sequence of the message with high visual sensitivity Number, continuously mapped to the larger end of the serial number. 15、根据权利要求 13所述的媒体流切换系统,其特征在于,所述媒体流切换服务器, 还用于生成重传抑制信息, 向所述终端发送所述重传抑制信息, 所述重传抑制信息包括 所述经过重新编排的报文的不连续的序列号的标识信息,用于使所述终端接在所述标识 信息对应的报文丢失时, 不请求重传所述标识信息对应的报文。  The media stream switching system according to claim 13, wherein the media stream switching server is further configured to generate retransmission suppression information, and send the retransmission suppression information to the terminal, where the retransmission is performed. The suppression information includes the identifier information of the discontinuous sequence number of the re-arranged message, and is used to enable the terminal to not retransmit the identifier information when the packet corresponding to the identifier information is lost. Message.
PCT/CN2010/071645 2009-04-10 2010-04-09 Media stream switching method, apparatus and system Ceased WO2010115376A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200910106639.7 2009-04-10
CN 200910106639 CN101860471B (en) 2009-04-10 2009-04-10 Method, device and system for switching media stream

Publications (1)

Publication Number Publication Date
WO2010115376A1 true WO2010115376A1 (en) 2010-10-14

Family

ID=42935650

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2010/071645 Ceased WO2010115376A1 (en) 2009-04-10 2010-04-09 Media stream switching method, apparatus and system

Country Status (2)

Country Link
CN (1) CN101860471B (en)
WO (1) WO2010115376A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106937155B (en) * 2015-12-29 2020-06-02 北京华为数字技术有限公司 Access device, Internet Protocol Television (IPTV) system and channel switching method
JP6727087B2 (en) 2016-09-28 2020-07-22 Kddi株式会社 Communication system, communication device, and program
CN109151491B (en) 2018-09-14 2021-03-05 网宿科技股份有限公司 Data distribution system, method and computer-readable storage medium
CN115959030A (en) * 2023-01-05 2023-04-14 中国第一汽车股份有限公司 Method and device for generating high beam control signal

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1741497A (en) * 2004-08-29 2006-03-01 华为技术有限公司 Priority service method for wireless chain protocol module multi-example data business
EP1718079A1 (en) * 2005-04-29 2006-11-02 Alcatel USA Sourcing, L.P. System, method and computer readable medium for rapid channel change
CN101141458A (en) * 2007-10-12 2008-03-12 网经科技(苏州)有限公司 Network data pipelining type analysis process method
CN101155298A (en) * 2006-09-25 2008-04-02 华为技术有限公司 A method and system for realizing fast switching of network TV channels

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1741497A (en) * 2004-08-29 2006-03-01 华为技术有限公司 Priority service method for wireless chain protocol module multi-example data business
EP1718079A1 (en) * 2005-04-29 2006-11-02 Alcatel USA Sourcing, L.P. System, method and computer readable medium for rapid channel change
CN101155298A (en) * 2006-09-25 2008-04-02 华为技术有限公司 A method and system for realizing fast switching of network TV channels
CN101141458A (en) * 2007-10-12 2008-03-12 网经科技(苏州)有限公司 Network data pipelining type analysis process method

Also Published As

Publication number Publication date
CN101860471A (en) 2010-10-13
CN101860471B (en) 2013-01-30

Similar Documents

Publication Publication Date Title
CN101753973B (en) Channel switching method, device and system
CN101568027B (en) Method, device and system for forwarding video data
JP6145127B2 (en) System and method for error resilience and random access in video communication systems
CN101938456B (en) Method, device and system for reducing media delays
CN101316357B (en) Channel switching method and terminal
US8693333B2 (en) Method, network node and system for suppressing lost packet retransmission
WO2010054543A1 (en) Method, device and system for channel switching
CN101132521A (en) A method and device for realizing IPTV channel switching
WO2011000253A1 (en) Media stream processing method and communication system and related devices
US11374998B1 (en) Adaptive bitrate streaming stall mitigation
WO2010031273A1 (en) Video encoding/decoding method, device and video playing method, device and system
CN100550999C (en) A digital channel fast switching method and system and auxiliary channel generating equipment
EP2415261A1 (en) Methods and arrangements for channel change in an iptv network
CN101742271B (en) Method, system and device for transmitting stream media data
CN101489101B (en) Method, apparatus and system for IP television channel switching processing
WO2016077072A1 (en) Delivering partially received segments of streamed media data
CN101860471B (en) Method, device and system for switching media stream
CN101198025A (en) Method and device for improving network TV user experience
CN101409631A (en) Method and apparatus for switching channel

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

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

Country of ref document: EP

Kind code of ref document: A1