WO2014153944A1 - Method and apparatus for transmitting rtp media stream - Google Patents

Method and apparatus for transmitting rtp media stream Download PDF

Info

Publication number
WO2014153944A1
WO2014153944A1 PCT/CN2013/084907 CN2013084907W WO2014153944A1 WO 2014153944 A1 WO2014153944 A1 WO 2014153944A1 CN 2013084907 W CN2013084907 W CN 2013084907W WO 2014153944 A1 WO2014153944 A1 WO 2014153944A1
Authority
WO
WIPO (PCT)
Prior art keywords
media stream
packet loss
information
sequence number
rtp media
Prior art date
Application number
PCT/CN2013/084907
Other languages
French (fr)
Chinese (zh)
Inventor
郑波
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2014153944A1 publication Critical patent/WO2014153944A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0014Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the source coding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/65Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and an apparatus for transmitting an RTP media stream. Background technique
  • Real-time Transport Protocol is a network protocol for real-time transmission of media stream data over the Internet Protocol (IP).
  • IP Internet Protocol
  • the RTP protocol includes the RTP data protocol and the RTP control protocol (Real-time Transport Control Protocol, RTCP for short).
  • a method and a device for transmitting an RTP media stream are provided, which can effectively alleviate the packet loss problem occurring when the RTP media stream is transmitted between the sending device and the receiving device, and improve the transmission efficiency of the RTP media stream.
  • the sending device sends the first RTP media stream to the receiving device
  • sequence number related information sent by the receiving device, where the sequence number related information is sequence number information of the data packet in the first RTP media stream received by the receiving device in a feedback period;
  • the sending device determines, according to the location of the packet loss packet in the receiving state sequence, whether the randomness of the packet loss matches the random packet loss characteristic
  • the packet loss information of the RTP media stream is determined to be random packet loss
  • the determining, according to the packet loss information, Media encoding parameters and transmission parameters of the second RTP media stream including:
  • the network constraint parameter includes: a limit period, where the data packet of the packet is received and the packet is continuously lost. The total transmission time of the packet; the maximum traffic, where the maximum traffic is the total number of bytes of consecutive unpacked packets in the serial number related information;
  • the network constraint parameter includes: a packet loss rate, where the packet loss rate is the total number of packets lost in the received state sequence of the data packet divided by the data. The total number of packets in the receive status sequence of the packet.
  • the determining, by the packet loss information and the network constraint parameter, the second RTP to be sent Media encoding parameters and transmission parameters of the media stream including:
  • x represents a media coding parameter
  • y represents a transmission parameter
  • g(x) represents a media quality score that the media coding parameter can obtain under a lossless network
  • h(y) represents the media quality based on the transmission parameter The influence of the score is proofread
  • f ( x, y) represents the media quality score obtained by the media coding parameter and the transmission parameter in the actual network
  • a(x, y) represents the network constraint parameter corresponding to the media coding parameter and the transmission parameter
  • P Indicates a network constraint parameter corresponding to the packet loss information.
  • [29] sending the sequence number related information to the sending device, so that the sending device determines, according to the sequence number related information and the sequence number information of the data packet in the first RTP media stream actually sent in the feedback period.
  • Deleting information of the RTP media stream determining, according to the packet loss information, a media encoding parameter and a transmission parameter of the second RTP media stream to be sent by the sending device;
  • the sequence number related information is implemented by using a packet allocation bitmap, where determining the sequence number related information of the first RTP media stream includes:
  • an embodiment of the present invention provides a real-time transmission protocol RTP media stream transmission apparatus, including:
  • a first sending unit configured to send a first RTP media stream to the receiving device
  • a parameter determining unit configured to determine, according to the packet loss information, a media encoding parameter and a transmission parameter of the second RTP media stream to be sent;
  • the first sending unit is further configured to: send the second RTP media stream.
  • the packet loss information determining unit includes:
  • a sequence determining subunit configured to determine, according to the sequence number related information and the sequence number information of the data packet actually sent in the feedback period, a sequence of receiving states of the data packet, where the receiving state sequence of the data packet is according to the data The sequence of whether each packet recorded in the transmission order of the packet is lost;
  • a reason determining subunit configured to determine, according to the location of the data packet of the packet loss in the sequence of receiving states of the data packet determined by the sequence determining subunit, whether the randomness of packet loss and random packet loss characteristics Matching, if it matches the random packet loss feature, it determines that the packet loss information of the media stream is a random packet loss; otherwise, it determines that the packet loss information of the media stream is bandwidth limited.
  • a first parameter determining subunit configured to determine a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the received status sequence of the data packet
  • a second parameter determining subunit configured to determine media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information and the network constraint parameter determined by the first parameter determining subunit ;
  • the network constraint parameter includes: a limit period, where the data packet of the packet is received in the sequence of the received state and the data of the continuous packet loss is continuously lost. The total transmission time of the packet; the maximum traffic, where the maximum traffic is the total number of bytes of consecutive unpacked packets in the serial number related information;
  • the network constraint parameter includes: a packet loss rate, where the packet loss rate is the total number of packets lost in the received state sequence of the data packet divided by the data. The total number of packets in the receive status sequence of the packet.
  • the second parameter determining subunit is specifically configured to:
  • x represents a media coding parameter
  • y represents a transmission parameter
  • g(x) represents a media quality score that the media coding parameter can obtain under a lossless network
  • h(y) represents the media quality based on the transmission parameter The influence of the score is proofread
  • f ( x, y ) represents the media quality score obtained by the media coding parameter and the transmission parameter in the actual network
  • a(x, y) represents the network constraint parameter corresponding to the media coding parameter and the transmission parameter
  • P Indicates a network constraint parameter corresponding to the packet loss information.
  • the embodiment of the present invention provides a real-time transmission protocol RTP media stream transmission apparatus, including:
  • a second receiving unit configured to receive a first RTP media stream sent by the sending device
  • an information determining unit configured to determine sequence number related information of the first RTP media stream received by the second receiving unit, where the sequence number related information is the first received by the second receiving unit in a feedback period The serial number information of the data packet in the RTP media stream;
  • a second sending unit configured to send, to the sending device, the serial number related information determined by the information determining unit, so that the sending device actually sends the information according to the serial number related information and during the feedback period.
  • the sequence number information of the data packet in the first RTP media stream determines the packet loss information of the first RTP media stream, and determines the media coding parameter and the transmission parameter of the second RTP media stream to be sent by the sending device according to the packet loss information;
  • the second receiving unit is further configured to: receive a second RTP media stream that is sent by the sending device according to the media encoding parameter and the transmission parameter.
  • the sequence number related information is implemented by using a packet allocation bitmap, where the information determining unit is specifically configured to:
  • the receiving device is configured to receive a first RTP media stream sent by the sending device, and determine sequence number related information of the first RTP media stream, where the sequence number related information is received by the receiving device in a feedback period.
  • the sequence number information of the data packet in the first RTP media stream, and the sequence number related information is sent to the sending device, so that the sending device, according to the sequence number related information, and the first RTP media stream actually sent in the feedback period.
  • the sequence number information of the data packet determines the packet loss information of the first RTP media stream, determines the media coding parameter and the transmission parameter of the second RTP media stream to be sent by the sending device according to the packet loss information, and receives the sending device according to the The media encoding parameter and the second RTP media stream sent by the transmission parameter.
  • the sending device is specifically configured to implement, according to the serial number related information, actually sending in the feedback period
  • the sequence number information of the data packet in the first RTP media stream determines the packet loss information of the first RTP media stream:
  • the sending device determines, according to the location of the packet loss packet in the receiving state sequence, whether the randomness of the packet loss matches the random packet loss characteristic
  • the packet loss information of the RTP media stream is determined to be random packet loss
  • the sending device is specifically configured to implement the The packet loss information determines a media coding parameter and a transmission parameter of the second RTP media stream to be sent:
  • the network constraint parameter includes: a restriction period, where the data packet of the packet is continuously lost and the data of the continuous packet loss in the sequence of the received state of the data packet. The total transmission time of the packet; the maximum traffic, where the maximum traffic is the total number of bytes of consecutive unpacked packets in the serial number related information; [73]
  • the network constraint parameter includes: a packet loss rate, where the packet loss rate is the total number of packets lost in the received state sequence of the data packet divided by the data. The total number of packets in the receive status sequence of the packet.
  • the sending device sends the first RTP media stream to the receiving device, and receives the serial number related information sent by the receiving device, where the serial number related information is received by the receiving device in a feedback period.
  • the sequence number information of the data packet in the first RTP media stream determining, according to the sequence number related information, the sequence number information of the data packet in the first RTP media stream actually sent in the feedback period, determining the first RTP media stream Packet loss information; determining media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information, and transmitting the second RTP media stream to the receiving device.
  • the sending device determines the packet loss information of the first RTP media stream, and determines the media encoding parameter and the transmission parameter according to the packet loss information; the sending device sends the second RTP media stream according to the media encoding parameter and the transmission parameter, so the present invention
  • the embodiment can effectively alleviate the packet loss problem in the process of RTP media stream transmission between the sending device and the receiving device, and improve the transmission efficiency of the RTP media stream.
  • FIG. 1 is a schematic diagram of a first embodiment of a method for transmitting an RTP media stream according to the present invention
  • FIG. 2 is a schematic diagram of a second embodiment of a method for transmitting an RTP media stream according to the present invention
  • FIG. 3 is a schematic diagram of a third embodiment of a method for transmitting an RTP media stream according to the present invention.
  • FIG. 4 is a schematic diagram of a first embodiment of an apparatus for transmitting an RTP media stream according to the present invention
  • FIG. 5 is a schematic diagram of a second embodiment of an apparatus for transmitting an RTP media stream according to the present invention.
  • FIG. 6 is a schematic structural diagram of a device for transmitting an RTP media stream according to the present invention.
  • FIG. 7 is a schematic structural diagram of a receiving device of an RTP media stream according to the present invention.
  • FIG. 8 is a schematic structural diagram of a transmission system of an RTP media stream according to the present invention. detailed description
  • the actual line bandwidth of the RTP media stream is increased, which causes the RTP media stream to be sent with more bandwidth resources, thereby aggravating packet loss; or
  • the reason for the packet loss is that when the packet is randomly lost, if the traffic of the RTP media stream of the sending device is reduced, the RTP media stream sent by the sending device cannot be transmitted to the receiving device more efficiently. It can be seen that the reason for discarding the packet loss is to solve the problem of packet loss occurring in the process of RTP media stream transmission between the transmitting device and the receiving device, and to improve the transmission efficiency of the RTP media stream.
  • the RTP media stream transmission method only adjusts the transmission parameters, and obviously can only effectively solve the loss in the RTP media stream transmission process between the transmitting device and the receiving device in certain specific situations or coincidences.
  • the packet problem in most cases, cannot effectively solve the packet loss problem during the RTP media stream transmission between the sending device and the receiving device.
  • the device that is referred to in the embodiment of the present invention refers to a device that sends an RTP media stream, and the device that receives the RTP media stream is not used to limit whether the sending device can send and receive an RTP media stream. Other data than the other, whether the receiving device is capable of transmitting and receiving other data than the RTP media stream.
  • FIG. 1 is a schematic diagram of a first embodiment of a method for transmitting an RTP media stream according to the present invention.
  • the method may be applied to a sending device, where the method includes:
  • Step 101 The sending device sends the first RTP media stream to the receiving device.
  • Step 102 The sending device receives the serial number related information sent by the receiving device, where the serial number related information is the serial number information of the data packet in the first RTP media stream received by the receiving device in a feedback period. ;
  • Step 103 The sending device determines packet loss information of the first RTP media stream according to the sequence number related information, the sequence number information of the data packet in the RTP media stream actually sent in the feedback period;
  • the packet loss information is information used to record the reason for packet loss of the RTP media stream.
  • Step 104 The sending device determines a media encoding parameter and a transmission parameter of the second RTP media stream to be sent according to the packet loss information, and sends the second RTP media stream to the receiving device.
  • the first RTP media stream and the second RTP media stream are both RTP media streams, and the first and second are only used to distinguish the RTP media streams in step 101 and step 104.
  • the first RTP media stream and the second RTP media stream may be the same or different RTP media streams.
  • the first RTP media stream is different from the second RTP media stream
  • the second RTP media stream is a media stream subsequent to the first RTP media stream, thereby determining the media by transmitting according to the previous first RTP media stream. Encoding parameters and transmission parameters, and then using the determined media stream coding parameters and transmission parameters for subsequent transmission of the RTP media stream.
  • FIG. 2 is a schematic diagram of a second embodiment of a method for transmitting an RTP media stream according to the present invention.
  • the method may be applied to a receiving device, where the method includes:
  • Step 201 The receiving device receives the first RTP media stream sent by the sending device.
  • Step 202 The receiving device determines sequence number related information of the first RTP media stream, where the sequence number related information is sequence number information of the data packet in the first RTP media stream received by the receiving device in a feedback period;
  • sequence number related information includes the sequence number information of the data packet in the first RTP media stream received by the receiving device in a feedback period, and the sequence number related information may directly include the sequence number of each data packet;
  • the receiving device determining the sequence number related information of the RTP media stream may include: the receiving device determining the sequence number information of the data packet in the RTP media stream received in a feedback period. The receiving device generates a packet arrangement bitmap according to the sequence number information.
  • Step 203 The receiving device sends the serial number related information to the sending device, so that the sending device, according to the serial number related information, the serial number of the data packet in the first RTP media stream actually sent in the feedback period. Determining, by the information, the packet loss information of the first RTP media stream, determining, according to the packet loss information, a media coding parameter and a transmission parameter of the second RTP media stream to be sent by the sending device;
  • Step 204 The receiving device receives a second RTP media stream that is sent by the sending device according to the media encoding parameter and the transmission parameter.
  • the receiving device determines the sequence number related information according to the sequence number information of the data packet in the first RTP media stream received in a feedback period, and sends the sequence number related information to the sending device, so as to Determining, by the sending device, the packet loss information of the first RTP media stream, determining the media encoding parameter and the transmission parameter, according to the sequence number related information, the sequence number information of the data packet in the RTP media stream actually sent in the feedback period, and then sending The device can perform the second RTP media stream transmission according to the determined media coding parameter and the transmission parameter. Therefore, the embodiment of the present invention can effectively alleviate the packet loss problem of the media stream between the sending device and the receiving device, and improve the RTP medium. The efficiency of body fluid transmission.
  • FIG. 3 is a schematic diagram of a third embodiment of an RTP media stream transmission method according to the present invention, where the method includes:
  • Step 301 The sending device sends the first RTP media stream to the receiving device.
  • the sending device sends the first RTP media stream by using current media coding parameters and transmission parameters.
  • Step 302 The receiving device receives the first RTP media stream, and determines sequence number related information of the first RTP media stream.
  • the serial number related information includes the serial number information of the data packet in the first RTP media stream received by the receiving device in a feedback period, and the serial number related information may directly record the serial number of each data packet; for example, if The receiving device receives five data packets with sequence numbers 1, 3, 4, 5, and 7 in a feedback period, and the sequence number related information may be: 13457;
  • the receiving device determining the sequence number related information of the first RTP media stream may include: the receiving device determining the data in the first RTP media stream received in one feedback period. The serial number information of the packet; the receiving device generates a packet arrangement bitmap according to the serial number information.
  • the packet arrangement bitmap may include: a sequence number of the first data packet received in the one feedback period, and receiving according to the one feedback period A bitmap generated by a packet other than the first packet. For example, if the receiving device receives 7 data packets with sequence numbers 1, 2, 3, 5, 6, 7, 8 within the one feedback period, the packet arrangement bitmap may be:
  • 0xF7 the binary representation of 0xF7 is 11110111. If the lowest bit represents the first data packet and the bit is 1 indicating successful reception, then 0xF7 can express that the receiving device has received the sequence number 1, 2, 3, 5 7, 6 packets of 6, 7, and 8.
  • Step 303 The receiving device sends an RTCP feedback message to the sending device, where the RTCP feedback message includes the sequence number related information.
  • the receiving device may also carry the serial number related information through other messages, which is not limited herein.
  • the RTCP feedback message may be sent by the receiving device to the sending device according to the feedback cycle timing in the process of receiving the RTP media stream. For example, at the end of each feedback period, the receiving device obtains the sequence number related information according to the sequence number information of the data packet in the RTP media stream received in the feedback cycle just ended, and sends the sequence number related information to the sending device.
  • RTCP feedback message for information.
  • the RTCP feedback message may further include other information, for example, the total number of bytes of the RTP media stream received by the device in the feedback period, and/or the delay information.
  • the total number of bytes may be used to calculate a bandwidth constraint between the sending device and the receiving device.
  • the bandwidth constraint is equal to: the total number of bytes / the length of time of the feedback period.
  • the delay information may be used as one of the basis for the transmission path adjustment when the transmitting device adjusts the transmission path of the RTP media stream between the transmitting device and the receiving device.
  • the specific implementation process is not described here.
  • the packet loss information is divided into two types: random packet loss and bandwidth limitation.
  • the packet loss information may be further divided according to actual conditions, which is not limited herein.
  • the network constraint parameters corresponding to the different packet loss information are different.
  • the network constraint parameter may include: a packet loss rate and a packet loss period of the packet random packet loss;
  • the network constraint parameter may include: a maximum traffic and a restriction period between the sending device and the receiving device.
  • the determining, according to the sequence number related information, the sequence information of the data packet in the RTP media stream that is actually sent in the one feedback period, the packet loss information of the first RTP media stream may include:
  • the packet loss information is a random packet loss; otherwise, the packet loss information of the media stream is determined to be bandwidth limited.
  • the sending device sends 10 data packets with sequence numbers 1 to 10 to the receiving device; and the sequence number related information is 1236789; the receiving state sequence of the data packet may be: rrrxxrrrrx , where r indicates that the packet is not dropped, and X indicates that the packet is lost.
  • the value of ⁇ , and then the ⁇ corresponding to ⁇ is calculated according to the ⁇ value
  • the difference threshold may be set autonomously in an actual application.
  • the determining, according to the location of the data packet in the received state sequence of the data packet, whether the randomness of the packet loss meets the random packet loss characteristic may include :
  • [135] taking a sequence of received states of the ⁇ t time from the sequence of received states of the data packet, and determining whether the difference between the actual number of lost packets and the theoretical number of lost packets in the received state sequence of the ⁇ t time is less than The preset threshold, if less than, determines that the randomness of the packet loss matches the random packet loss feature. Otherwise, it determines that the randomness of the packet loss does not match the random packet loss feature.
  • Step 305 The sending device determines, according to the determined packet loss information and the received status sequence of the data packet, a network constraint parameter corresponding to the packet loss information.
  • determining the network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the received status sequence of the data packet may include: receiving the data packet The total transmission duration of the packet that is not continuously lost in the sequence and the packet that is continuously lost is used as the limitation period; the total number of bytes of consecutive unpacked packets in the sequence number related information is taken as the maximum Traffic flow
  • determining, according to the determined packet loss information and the received status sequence of the data packet, the network constraint parameter corresponding to the packet loss information may include: The packet loss rate is obtained by dividing the total number of lost packets by the total number of packets in the received status sequence of the packet.
  • the packet loss period can be generally calculated in combination with the packet loss rate, and the specific calculation method is not limited herein.
  • the packet loss rate is introduced by the routing/switching device performance bottleneck, and the packet per second (PPS, Packet Per Second) is used as a common indicator. Therefore, the packet loss period can be directly set to Ls. Therefore, in a practical application, the value of the packet loss period may be pre-stored in the sending device, and when the network constraint parameter corresponding to the random packet loss is determined, the value of the pre-stored packet loss period may be read.
  • the first packet loss packet may be first searched from the received status sequence of the data packet, and then, after the first packet loss packet is checked. Find the first packet that has not been dropped, determine the number of consecutive undropped packets from the undropped packet, and determine the first packet that is dropped after the undropped packet. Determining the number of consecutively dropped packets from the packet of the lost packet, and calculating the sum of the number of consecutive undropped packets and the number of consecutively dropped packets, the sum Multiply the transmission duration of each data packet to obtain the restriction period.
  • the receiving status sequence of the data packet is rrxxrrrxxrrrxx, and the first data packet identified by x may be first found, and then the first identifier is found after the third data packet.
  • the data packet that is, the 5th data packet
  • the packet that is continuously lost from the 5th data packet is the 5th data packet to the 7th data packet, and therefore, it is determined that the 5th data packet is continuously continuous.
  • the number of packets lost is 3, and the first packet identified by X after the 5th packet is the 8th packet, and the packet that is continuously dropped from the 8th packet is 8th.
  • Packets and ninth packet therefore, it is determined that the number of consecutive packets lost from the 8th packet is 2, and the total number is 5, then the limiting period is 5t ; t is each The length of time the packet is sent.
  • Step 306 The sending device determines, according to the packet loss information and the network constraint parameter corresponding to the packet loss information, a media encoding parameter and a transmission parameter of the second RTP media stream to be sent.
  • the media coding parameter may include at least one of the following parameters: RTP packet rate, media coding algorithm, and coding rate are constructed after media coding.
  • the RTP packet rate after the media coding is performed refers to the number of data packets sent by the sending device per second
  • the media coding algorithm refers to a media compression algorithm format used by a sending device to encode an RTP media stream, and the media compression algorithm format includes: an adaptive multi-rate (AMR), G .711, etc.
  • AMR adaptive multi-rate
  • the transmission parameter may include at least one of the following parameters: a redundancy packet coding format, a redundancy parameter.
  • the redundancy parameter refers to a redundancy coefficient.
  • the sending device will each data in the RTP media stream when the RTP media stream is sent. Send one more package;
  • the redundancy parameter may be a non-integer in practical application, for example, 10% means that only one 10% of all data packets are doubled, which can be implemented by means of important frame recognition, etc. Narration.
  • the redundant packet coding format is used to indicate the coding format employed by the redundant data packets. Redundant formats as defined in RFC 2198, etc. [154] In practical applications, tests can be used to test the performance of different media parameters and transmission parameters under different network impairments, and the network constraint parameters corresponding to the packet loss information and the media are determined according to a constrained optimization method such as a mathematical regression method.
  • the equations of coding parameters and transmission parameters such as:
  • x represents a media coding parameter
  • y represents a transmission parameter
  • g(x) represents a media quality score that the media coding parameter can obtain under a lossless network, such as an average evaluation score describing a voice quality (MOS, Mean Opinion Score) /Perceptual evaluation of speech quality (PESQ);
  • h(y) indicates proofreading based on the influence of the transmission parameter on the media quality score;
  • f ( ⁇ , y) indicates the media coding parameter and transmission
  • a(x, y) represents the network constraint parameter corresponding to the media coding parameter and the transmission parameter
  • P represents the network constraint parameter corresponding to the packet loss information.
  • the network constraint parameter, the media coding parameter, and the transmission parameter corresponding to the random packet loss need to constitute a first equation, and the network constraint parameter, the media coding parameter, and the transmission parameter component corresponding to the bandwidth constraint are configured.
  • the network constraint parameter corresponding to the packet loss information may be directly substituted into the equation corresponding to the packet loss information, and the media coding parameter and the transmission parameter are calculated.
  • Step 307 The sending device sends the second RTP media stream according to the media encoding parameter and the transmission parameter determined in step 306.
  • the media encoding parameter and the transmission parameter according to the packet loss information and the packet loss information are determined according to the packet loss information and the network constraint parameter of the packet loss information, so that the sending device can be effectively alleviated.
  • the packet loss problem occurring during the RTP media stream transmission between the receiving device and the receiving device improves the transmission efficiency of the RTP media stream.
  • the sending device determines the packet loss information of the first RTP media stream and the network constraint parameter corresponding to the packet loss information, and determines, according to the packet loss information and the network constraint parameter corresponding to the packet loss information.
  • the media encoding parameter and the transmission parameter; the sending device sends the second RTP media stream according to the media encoding parameter and the transmission parameter, so the embodiment of the present invention can effectively alleviate the occurrence of the RTP media stream transmission between the sending device and the receiving device.
  • the packet loss problem improves the transmission efficiency of the RTP media stream.
  • FIG. 4 it is a schematic diagram of a first embodiment of a transmission apparatus for an RTP media stream according to the present invention.
  • the apparatus may be disposed on a transmitting device, and the apparatus 400 includes:
  • the first sending unit 410 is configured to send, to the receiving device, the first RTP media stream.
  • the first receiving unit 420 is configured to receive sequence number related information that is sent by the receiving device, where the sequence number related information is sent by the first sending unit 410 that is received by the receiving device in a feedback period. Sequence number information of a data packet in an RTP media stream;
  • the packet loss information determining unit 430 is configured to receive the serial number related information according to the first receiving unit 420.
  • the sequence number information of the data packet in the first RTP media stream that is actually sent by the first sending unit 410 in the feedback period determines the packet loss information of the first RTP media stream;
  • the parameter determining unit 440 is configured to determine, according to the packet loss information determined by the packet loss information determining unit 430, a media encoding parameter and a transmission parameter of the second RTP media stream to be sent.
  • the first sending unit 410 is further configured to: send the second RTP media stream according to the media coding parameter and the transmission parameter determined by the parameter determining unit 440.
  • the packet loss information determining unit 430 may specifically include:
  • a sequence determining subunit configured to determine, according to the sequence number related information and sequence number information of a data packet actually sent in the feedback period, a sequence of receiving states of the data packet, where the sequence of receiving states of the data packet is according to data Information about whether each packet recorded in the order of transmission of the packet is lost;
  • a reason determining subunit configured to determine, according to the location of the data packet of the packet loss in the sequence of receiving states of the data packet determined by the sequence determining subunit, whether the randomness of packet loss and random packet loss characteristics Matching, if it matches the random packet loss feature, it determines that the packet loss information of the media stream is a random packet loss; otherwise, it determines that the packet loss information of the media stream is bandwidth limited.
  • the parameter determining unit 440 may include:
  • a first parameter determining subunit configured to determine a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the received state sequence of the data packet;
  • a second parameter determining subunit configured to determine, according to the packet loss information and the network constraint parameter determined by the first parameter determining subunit, a media encoding parameter and a transmission parameter of the second RTP media stream to be sent.
  • the network constraint parameter includes: a restriction period, where the data packet of the packet is continuously lost and the data of consecutive packet loss in the sequence of the received state of the data packet. The total transmission time of the packet; the maximum traffic, where the maximum traffic is the total number of bytes of consecutive unpacked packets in the serial number related information;
  • the network constraint parameter includes: a packet loss rate, where the packet loss rate is the total number of packets lost in the received state sequence of the data packet divided by the data. The total number of packets in the receive status sequence of the packet.
  • the first parameter determining subunit may be specifically used to:
  • the packet loss information is limited in bandwidth
  • the total transmission duration of the continuously unpacked data packet and the continuously dropped packet in the reception status sequence of the data packet is taken as the limitation period
  • the total number of bytes of consecutive data packets that are not lost in the sequence number related information is used as the maximum traffic
  • the network constraint parameter may include: dividing a total number of data packets lost in the reception status sequence of the data packet by a data packet in a reception status sequence of the data packet. The total number of packets is obtained.
  • the packet loss information is a random packet loss
  • the total number of data packets lost in the reception status sequence of the data packet is divided by the total number of data packets in the reception status sequence of the data packet, and the packet loss is obtained. rate.
  • the second parameter determining subunit is specifically applicable to: [181]
  • the network constraint parameters are determined according to the following formula:
  • x represents a media coding parameter
  • y represents a transmission parameter
  • g(x) represents a media quality score that the media coding parameter can obtain under a lossless network
  • h(y) represents the media quality based on the transmission parameter The influence of the score is proofread
  • f ( x, y) represents the media quality score obtained by the media coding parameter and the transmission parameter in the actual network
  • a(x, y) represents the network constraint parameter corresponding to the media coding parameter and the transmission parameter
  • P Indicates a network constraint parameter corresponding to the packet loss information.
  • determining packet loss information of the media stream determining media coding parameters and transmission parameters according to the packet loss information, and transmitting the second RTP media stream according to the media coding parameter and the transmission parameter, thereby effectively alleviating
  • the packet loss problem in the process of RTP media stream transmission between the sending device and the receiving device improves the transmission efficiency of the RTP media stream.
  • FIG. 5 is a schematic diagram of a second embodiment of a transmission apparatus for an RTP media stream according to the present invention.
  • the apparatus may be disposed on a receiving device, and the apparatus 500 includes:
  • the second receiving unit 510 is configured to receive a first RTP media stream sent by the sending device.
  • the information determining unit 520 is configured to determine sequence number related information of the RTP media stream received by the second receiving unit 510, where the sequence number related information is received by the second receiving unit 510 in a feedback period. Sequence number information of a data packet in an RTP media stream;
  • the second sending unit 530 is configured to send the sequence number related information determined by the information determining unit 520 to the sending device, so that the sending device actually performs the feedback period according to the sequence number related information.
  • the sequence number information of the data packet in the first RTP media stream is sent, the information about the packet loss information of the first RTP media stream is determined, and the media coding parameter of the second RTP media stream to be sent by the sending device is determined according to the packet loss information.
  • the second receiving unit 510 is further configured to: receive, by the sending device, the second RTP media stream according to the media encoding parameter and the transmission parameter.
  • the sequence number related information is implemented by using a packetized bitmap, and the information determining unit 520 may be specifically configured to:
  • the sequence number related information is determined according to the RTP media stream received in a feedback period, and the sequence number related information is sent to the sending device, so that the sending device is based on the sequence number related information
  • the sequence number information of the data packet in the RTP media stream that is actually sent in the feedback period determines the packet loss information of the media stream, determines the media coding parameter and the transmission parameter according to the packet loss information, and then receives the media according to the determined transmission device.
  • Encoding parameters and a second RTP media stream transmitted by the transmission parameters thereby effectively alleviating the transmitting device and the receiving device
  • the packet loss problem during the RTP media stream transmission between backups improves the transmission efficiency of the RTP media stream.
  • FIG. 6 is a schematic structural diagram of a transmitting device of an RTP media stream according to the present invention.
  • the transmitting device 600 includes: a first processor 610, a first memory 620, a first transceiver 630, and a first bus 640;
  • the first processor 610, the first memory 620, and the first transceiver 630 are connected to each other through a first bus 640; the first bus 640 may be an ISA bus, a PCI bus, or an EISA bus.
  • the first bus 640 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 6, but it does not mean that there is only one bus or one type of bus.
  • the first memory 620 is configured to store a program, and the program is used to implement the RTP media stream transmission method performed by the transmitting device in the embodiment shown in FIG. 1 and FIG.
  • the program can include program code, the program code including computer operating instructions.
  • the first memory 620 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
  • the first transceiver 630 is used to connect other devices, such as receiving devices, servers, and remote hosts, and to communicate with other devices. Specifically, the first transceiver 630 is configured to: send a first RTP media stream to the receiving device; receive sequence number related information sent by the receiving device, where the sequence number related information is received by the receiving device in a feedback period. Sequence number information of the data packet in the first RTP media stream; transmitting the second RTP media stream according to the media encoding parameter determined by the first processor 610 and the transmission parameter.
  • the first processor 610 is specifically configured to: determine, according to the sequence number related information and sequence number information of a data packet actually sent in the feedback period, a sequence of receiving status of the data packet, where the data is The receiving status sequence of the packet is information indicating whether each data packet is lost according to the sending order of the data packet; whether the randomness of the data packet loss is determined according to the position of the lost data packet in the receiving state sequence of the data packet If the random packet loss feature matches the random packet loss feature, the packet loss information of the media stream is determined to be random packet loss; otherwise, the packet loss information of the media stream is determined to be bandwidth limited.
  • the first processor 610 is configured to: determine, according to the determined packet loss information and the received status sequence of the data packet, a network constraint parameter corresponding to the packet loss information;
  • the network constraint parameter may include: a restriction period, where the packet is continuously lost without packet loss in the sequence of receiving status of the data packet The total transmission duration of the data packet of the packet; the maximum traffic, the maximum traffic being the total byte of the consecutive undropped data packets in the sequence number related information Number
  • the network constraint parameter may include: dividing a total number of data packets that are lost in the receiving state sequence of the data packet by a data packet in a receiving state sequence of the data packet. The total number of packets is obtained.
  • the first processor 610 is specifically configured to: when the packet loss information is limited in bandwidth, the data packet of the received state sequence of the data packet is continuously unpacked and continuously lost.
  • the total transmission duration of the data packet is used as the limitation period; the total number of bytes of consecutive data packets that are not lost in the sequence number related information is used as the maximum traffic volume; when the packet loss information is random packet loss,
  • the packet loss rate is obtained by dividing the total number of packets lost in the received status sequence of the data packet by the total number of data packets in the received status sequence of the data packet.
  • the first processor 610 is specifically configured to determine the network constraint parameter according to the following formula:
  • x represents a media coding parameter
  • y represents a transmission parameter
  • g(x) represents a media quality score that the media coding parameter can obtain under a lossless network
  • h(y) represents the media quality based on the transmission parameter The influence of the score is proofread
  • f ( x, y) represents the media quality score obtained by the media coding parameter and the transmission parameter in the actual network
  • a(x, y) represents the network constraint parameter corresponding to the media coding parameter and the transmission parameter
  • P Indicates a network constraint parameter corresponding to the packet loss information.
  • FIG. 7 is a schematic structural diagram of a receiving device of an RTP media stream according to the present invention.
  • the receiving device 700 may include: a second processor 710, a second memory 720, a second transceiver 730, and a second bus 740;
  • the second processor 710, the second memory 720, and the second transceiver 730 are connected to each other through the second bus 740;
  • the second bus 740 may be an ISA bus, a PCI bus or an EISA bus or the like.
  • the second bus 740 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 7, but it does not mean that there is only one bus or one type of bus.
  • the second memory 720 is configured to store a program, and the program is used to implement the RTP media stream transmission method performed by the receiving device in the embodiment shown in FIG. 2 and FIG.
  • the program can include program code, the program code including computer operating instructions.
  • the second memory 720 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
  • the second transceiver 730 is configured to connect to other devices, such as a transmitting device, a server, a remote host, etc., and to communicate with other devices. Specifically, the second transceiver 730 is configured to receive the first RTP media stream sent by the sending device. And sending the sequence number related information to the sending device, so that the sending device determines, according to the sequence number related information, the sequence number information of the data packet in the first RTP media stream that is actually sent in the feedback period, the first RTP media stream is lost.
  • the second processor 710 executes the program code stored in the second memory 720, and is configured to: determine, according to the first RTP media stream received by the second transceiver 730 in one feedback period, the first The serial number related information of the RTP media stream, where the serial number related information is the serial number information of the data packet in the first RTP media stream received by the second transceiver 730 in one feedback period.
  • the sequence number related information is implemented by using a packetized bitmap
  • the second processor 710 is specifically configured to: determine, in a first RTP media stream received in a feedback period, a data packet. Sequence number information; generating the packet arrangement bitmap according to the sequence number information.
  • the receiving device generates sequence number related information according to the sequence number information of the data packet in the first RTP media stream received in a feedback period, and sends the sequence number related information to the sending device, so as to Determining, by the sending device, the packet loss information of the RTP media stream, and further determining the media coding parameter and the transmission parameter, according to the sequence number related information, the sequence number information of the data packet in the first RTP media stream actually sent in the feedback period, and then the sending device may
  • the sending of the second RTP media stream is performed according to the determined media encoding parameter and the transmission parameter. Therefore, the embodiment of the present invention can effectively alleviate the packet loss problem of the media stream between the sending device and the receiving device, and improve the transmission efficiency of the RTP media stream.
  • the embodiment of the present invention further provides a transmission system of a real-time transmission protocol RTP media stream.
  • the system 800 includes a transmitting device 810 and a receiving device 820, where
  • the sending device 810 is configured to send the first RTP media stream to the receiving device 820, and receive the serial number related information sent by the receiving device 820, where the serial number related information is that the receiving device 820 is in a feedback period.
  • Receiving the sequence number information of the data packet in the first RTP media stream determining, according to the sequence number related information, the sequence number information of the data packet in the first RTP media stream actually sent in the feedback period, determining the first RTP a packet loss information of the media stream, determining, according to the packet loss information, a media coding parameter and a transmission parameter of the second RTP media stream to be sent, and sending the second RTP media stream to the receiving device;
  • the receiving device 820 is configured to receive a first RTP media stream sent by the sending device 810, and determine sequence number related information of the first RTP media stream, where the sequence number related information is received by the receiving device in a feedback period.
  • the sequence number information of the data packet in the first RTP media stream is sent to the sending device 810, so that the sending device sends the first information related information according to the serial number related information and the first actually sent in the feedback period.
  • the sequence number information of the data packet in the RTP media stream determines the packet loss information of the first RTP media stream, determines the media coding parameter and the transmission parameter of the second RTP media stream to be sent by the sending device 810 according to the packet loss information, and receives the The second RTP media stream sent by the sending device 810 according to the media encoding parameter and the transmission parameter.
  • the sending device 810 is specifically configured to implement, according to the sequence number related information, the serial number information of the data packet in the first RTP media stream that is actually sent in the feedback period. Determining packet loss information of the first RTP media stream:
  • the sending device determines, according to the location of the packet loss packet in the receiving state sequence, whether the randomness of the packet loss matches the random packet loss characteristic
  • the packet loss information of the RTP media stream is determined to be random packet loss
  • the sending device 810 is specifically configured to: according to the packet loss information, determine, according to the packet loss information, a media encoding parameter and a transmission parameter of a second RTP media stream to be sent:
  • the network constraint parameter includes: a restriction period, where the data packet of the packet is continuously lost and the data of consecutive packet loss in the sequence of receiving status of the data packet. The total transmission time of the packet; the maximum traffic, where the maximum traffic is the total number of bytes of consecutive unpacked packets in the serial number related information;
  • the network constraint parameter includes: a packet loss rate, where the packet loss rate is the total number of packets lost in the received state sequence of the data packet divided by the data. The total number of packets in the receive status sequence of the packet.
  • the receiving device generates sequence number related information according to the sequence number information of the data packet in the first RTP media stream received in a feedback period, and sends the sequence number related information to the sending device, so as to Determining, by the sending device, the packet loss information of the RTP media stream, and further determining the media coding parameter and the transmission parameter, according to the sequence number related information, the sequence number information of the data packet in the first RTP media stream actually sent in the feedback period, and then the sending device may
  • the sending of the second RTP media stream is performed according to the determined media encoding parameter and the transmission parameter. Therefore, the embodiment of the present invention can effectively alleviate the packet loss problem of the media stream between the sending device and the receiving device, and improve the transmission efficiency of the RTP media stream.
  • the techniques in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, and the computer software product may be stored in a storage medium such as a ROM/RAM. , disk, CD, etc., including a number of instructions to make a computer
  • the device (which may be a personal computer, server, or network device, etc.) performs the methods described in various embodiments of the present invention or in certain portions of the embodiments.

Abstract

Disclosed are a method and apparatus for transmitting an RTP (Real-time Transport Protocol) media stream, the method comprising: a transmitting device transmitting a first RTP media stream to a receiving device; the transmitting device receiving serial number related information transmitted by the receiving device; the transmitting device determining the packet loss information of the first RTP media stream according to the serial number related information, and the serial number information of data packets in the first RTP media stream actually transmitted within a feedback cycle; the transmitting device determining a media coding parameter and a transmission parameter according to the packet loss information; the transmitting device transmitting a second RTP media stream according to the media coding parameter and the transmission parameter. In the embodiment of the invention, the problem of packet loss during the transmission of the RTP media stream between the transmitting device and the receiving device can be alleviated effectively, and the transmission efficiency of the RTP media stream can be improved.

Description

说 明  Description
RTP媒体流的传输方法及装置 技术领域 RTP media stream transmission method and device
[01] 本发明涉及通信领域, 尤其涉及 RTP媒体流的传输方法及装置。 背景技术  [01] The present invention relates to the field of communications, and in particular, to a method and an apparatus for transmitting an RTP media stream. Background technique
[02] 实时传输协议 ( Real-time Transport Protocol , 简称 RTP ) 是在网络互连协议 ( Internet Protocol, 简称 IP ) 上实现媒体流数据实时传输的一种网络协议。 RTP协议 包括 RTP数据协议和 RTP控制协议(Real-time Transport Control Protocol,简称 RTCP)。  [02] Real-time Transport Protocol (RTT) is a network protocol for real-time transmission of media stream data over the Internet Protocol (IP). The RTP protocol includes the RTP data protocol and the RTP control protocol (Real-time Transport Control Protocol, RTCP for short).
[03] 现有技术中, 采用 RTP协议进行 RTP媒体流的传输时, RTP媒体流在发送设备和 接收设备之间的传输过程包括: 发送设备向接收设备发送 RTP媒体流; 接收设备统计预 设周期内接收到的 RTP媒体流中数据包的数量, 向发送设备发送 RTCP反馈消息,所述 RTCP 反馈消息中携带所述数据包的数量; 所述发送设备根据所述预设周期内发送的 RTP媒体流中数据包的数量以及所述 RTCP反馈消息中携带的所述数据包的数量调整所 述传输参数, 例如冗余参数、 冗余包格式等; 发送设备根据调整后的传输参数向接收设 备发送 RTP媒体流。 [03] In the prior art, when the RTP media stream is transmitted by using the RTP protocol, the transmission process of the RTP media stream between the sending device and the receiving device includes: the sending device sends the RTP media stream to the receiving device; The number of data packets in the RTP media stream received in the period, and the RTCP feedback message is sent to the sending device, where the RTCP feedback message carries the number of the data packets; the sending device sends the RTP according to the preset period. The number of data packets in the media stream and the number of the data packets carried in the RTCP feedback message adjust the transmission parameters, such as a redundancy parameter, a redundancy packet format, etc.; the sending device sends the adjusted transmission parameter to the receiving device. Send an RTP media stream.
[04] 但是,上述 RTP媒体流的传输方法无法有效解决发送设备和接收设备之间传输 RTP 媒体流时出现的丢包问题, RTP媒体流的传输效率低。 发明内容  [04] However, the above-mentioned RTP media stream transmission method cannot effectively solve the packet loss problem occurring when the RTP media stream is transmitted between the transmitting device and the receiving device, and the transmission efficiency of the RTP media stream is low. Summary of the invention
[05] 本发明实施例中提供了一种 RTP媒体流的传输方法及装置, 能够有效缓解发送设 备和接收设备之间传输 RTP媒体流时出现的丢包问题, 提高 RTP媒体流的传输效率。  [05] In the embodiment of the present invention, a method and a device for transmitting an RTP media stream are provided, which can effectively alleviate the packet loss problem occurring when the RTP media stream is transmitted between the sending device and the receiving device, and improve the transmission efficiency of the RTP media stream.
[06] 第一方面, 本发明实施例提供一种实时传输协议 RTP媒体流的传输方法, 包括: [06] In a first aspect, an embodiment of the present invention provides a method for transmitting a real-time transport protocol RTP media stream, including:
[07] 发送设备向接收设备发送第一 RTP媒体流; [07] the sending device sends the first RTP media stream to the receiving device;
[08] 接收所述接收设备发送的序号相关信息, 所述序号相关信息为所述接收设备在一个 反馈周期内接收到的所述第一 RTP媒体流中数据包的序号信息;  [08] receiving sequence number related information sent by the receiving device, where the sequence number related information is sequence number information of the data packet in the first RTP media stream received by the receiving device in a feedback period;
[09] 根据所述序号相关信息、 在所述反馈周期内实际发送的所述第一 RTP媒体流中数 据包的序号信息确定第一 RTP媒体流的丢包信息;  [09] determining packet loss information of the first RTP media stream according to the sequence number related information, the sequence number information of the data packet in the first RTP media stream that is actually sent in the feedback period;
[10] 根据所述丢包信息确定待发送的第二 RTP媒体流的媒体编码参数以及传输参数, 并向所述接收设备发送所述第二 RTP媒体流。  [10] determining a media coding parameter and a transmission parameter of the second RTP media stream to be sent according to the packet loss information, and sending the second RTP media stream to the receiving device.
[11] 结合上述第一方面, 在第一方面第一种可能的实现方式中, 所述根据所述序号相关 信息、在所述反馈周期内实际发送的所述第一 RTP媒体流中数据包的序号信息确定第一 RTP媒体流的丢包信息, 包括: [11] In combination with the foregoing first aspect, in a first possible implementation manner of the first aspect, the The information, the sequence number information of the data packet in the first RTP media stream that is actually sent in the feedback period, determines the packet loss information of the first RTP media stream, and includes:
[12] 根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定 数据包的接收状态序列, 所述数据包的接收状态序列为按照数据包的发送顺序记录的各 个数据包是否丢包的序列;  [12] determining a sequence of receiving status of the data packet according to the serial number related information and the serial number information of the data packet actually sent in the feedback period, where the receiving status sequence of the data packet is recorded according to the sending order of the data packet The sequence of whether the packet is lost;
[13] 所述发送设备根据丢包的数据包在所述接收状态序列中的位置判断数据包丢包的 随机性是否与随机丢包特性匹配;  [13] The sending device determines, according to the location of the packet loss packet in the receiving state sequence, whether the randomness of the packet loss matches the random packet loss characteristic;
[14] 如果与随机丢包特性匹配, 确定 RTP媒体流的丢包信息为随机丢包;  [14] If the random packet loss feature matches, the packet loss information of the RTP media stream is determined to be random packet loss;
[15] 如果与随机丢包特性不匹配, 确定 RTP媒体流的丢包信息为带宽受限。  [15] If the random packet loss feature does not match, it is determined that the packet loss information of the RTP media stream is bandwidth limited.
[16] 结合上述第一方面, 和 /或, 第一方面第一种可能的实现方式, 在第一方面第二种可 能的实现方式中,所述根据所述丢包信息确定待发送的第二 RTP媒体流的媒体编码参数 以及传输参数, 包括:  [16] In combination with the foregoing first aspect, and/or the first possible implementation manner of the first aspect, in the second possible implementation manner of the first aspect, the determining, according to the packet loss information, Media encoding parameters and transmission parameters of the second RTP media stream, including:
[17] 根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约 束参数;  [17] determining, according to the determined packet loss information and the receiving status sequence of the data packet, a network constraint parameter corresponding to the packet loss information;
[18] 根据所述丢包信息以及所述网络约束参数确定待发送的第二 RTP媒体流的媒体编 码参数以及传输参数;  [18] determining media coding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information and the network constraint parameter;
[19] 当丢包信息为带宽受限时, 所述网络约束参数包括: 限制周期, 所述限制周期为所 述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长; 最 大流量, 所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数;  [19] When the packet loss information is limited in bandwidth, the network constraint parameter includes: a limit period, where the data packet of the packet is received and the packet is continuously lost. The total transmission time of the packet; the maximum traffic, where the maximum traffic is the total number of bytes of consecutive unpacked packets in the serial number related information;
[20] 当丢包信息为随机丢包时, 所述网络约束参数包括: 丢包率, 所述丢包率为所述数 据包的接收状态序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包的总 数。  [20] When the packet loss information is a random packet loss, the network constraint parameter includes: a packet loss rate, where the packet loss rate is the total number of packets lost in the received state sequence of the data packet divided by the data. The total number of packets in the receive status sequence of the packet.
[21] 结合上述第一方面第二种可能的实现方式, 在第一方面第三种可能的实现方式中, 所述根据所述丢包信息以及所述网络约束参数确定待发送的第二 RTP媒体流的媒体编 码参数以及传输参数, 包括:  [21] In combination with the second possible implementation manner of the foregoing first aspect, in a third possible implementation manner of the foregoing aspect, the determining, by the packet loss information and the network constraint parameter, the second RTP to be sent Media encoding parameters and transmission parameters of the media stream, including:
[22] 根据以下公式确定所述媒体编码参数以及传输参数:  [22] The media encoding parameters and transmission parameters are determined according to the following formula:
[23】 max f(x,y) = g(x) + h(y); [23] max f(x, y) = g(x) + h(y) ;
[24] s.t. a(x,y) P [24] s.t. a(x,y) P
[25] 其中, x表示媒体编码参数, y表示传输参数; g(x)表示媒体编码参数在无损网络下 能获得的媒体质量分数; h(y)表示基于所述传输参数对所述媒体质量分数的影响校对; f ( x, y) 表示所述媒体编码参数和传输参数在实际网络下获得的媒体质量分数; a(x,y) 表示媒体编码参数和传输参数对应的网络约束参数, P表示所述丢包信息对应的网络约 束参数。  [25] wherein x represents a media coding parameter, y represents a transmission parameter; g(x) represents a media quality score that the media coding parameter can obtain under a lossless network; h(y) represents the media quality based on the transmission parameter The influence of the score is proofread; f ( x, y) represents the media quality score obtained by the media coding parameter and the transmission parameter in the actual network; a(x, y) represents the network constraint parameter corresponding to the media coding parameter and the transmission parameter, P Indicates a network constraint parameter corresponding to the packet loss information.
[26] 第二方面, 本发明实施例提供一种实时传输协议 RTP媒体流的传输方法, 包括: [27] 接收设备接收发送设备发送的第一 RTP媒体流; [26] In a second aspect, an embodiment of the present invention provides a method for transmitting a real-time transport protocol RTP media stream, including: [27] The receiving device receives the first RTP media stream sent by the sending device;
[28] 确定第一 RTP媒体流的序号相关信息, 所述序号相关信息为所述接收设备在一个 反馈周期内接收到的第一 RTP媒体流中数据包的序号信息;  [28] determining sequence number related information of the first RTP media stream, where the sequence number related information is sequence number information of the data packet in the first RTP media stream received by the receiving device in a feedback period;
[29] 向所述发送设备发送所述序号相关信息, 以便所述发送设备根据所述序号相关信息 及在所述反馈周期内实际发送的第一 RTP媒体流中数据包的序号信息确定第一 RTP媒 体流的丢包信息、根据所述丢包信息确定所述发送设备待发送的第二 RTP媒体流的媒体 编码参数以及传输参数;  [29] sending the sequence number related information to the sending device, so that the sending device determines, according to the sequence number related information and the sequence number information of the data packet in the first RTP media stream actually sent in the feedback period. Deleting information of the RTP media stream, determining, according to the packet loss information, a media encoding parameter and a transmission parameter of the second RTP media stream to be sent by the sending device;
[30] 接收所述发送设备根据所述媒体编码参数以及传输参数发送的第二 RTP媒体流。  [30] receiving a second RTP media stream sent by the sending device according to the media encoding parameter and the transmission parameter.
[31] 结合上述第二方面, 在第二方面第一种可能的实现方式中, 所述序号相关信息通过 包配列位图实现, 所述确定第一 RTP媒体流的序号相关信息包括:  [31] In combination with the foregoing second aspect, in a first possible implementation manner of the second aspect, the sequence number related information is implemented by using a packet allocation bitmap, where determining the sequence number related information of the first RTP media stream includes:
[32] 确定在一个反馈周期内接收到的第一 RTP媒体流中数据包的序号信息;  [32] determining sequence number information of the data packet in the first RTP media stream received in one feedback period;
[33] 根据所述序号信息生成所述包排列位图。  [33] generating the packet arrangement bitmap according to the sequence number information.
[34] 第三方面, 本发明实施例提供一种实时传输协议 RTP媒体流的传输装置, 包括:  [34] In a third aspect, an embodiment of the present invention provides a real-time transmission protocol RTP media stream transmission apparatus, including:
[35] 第一发送单元, 用于向接收设备发送第一 RTP媒体流; [35] a first sending unit, configured to send a first RTP media stream to the receiving device;
[36] 第一接收单元, 用于接收所述接收设备发送的序号相关信息, 所述序号相关信息为 所述接收设备在一个反馈周期内接收到的第一 RTP媒体流中数据包的序号信息;  [36] The first receiving unit is configured to receive sequence number related information sent by the receiving device, where the sequence number related information is sequence number information of the data packet in the first RTP media stream received by the receiving device in a feedback period. ;
[37] 丢包信息确定单元, 用于根据所述第一接收单元接收到的所述序号相关信息、 在所 述反馈周期内所述第一发送单元实际发送的第一 RTP 媒体流中数据包的序号信息确定 第一 RTP媒体流的丢包信息; [37] a packet loss information determining unit, configured to: according to the sequence number related information received by the first receiving unit, a data packet in a first RTP media stream actually sent by the first sending unit in the feedback period The sequence number information determines the packet loss information of the first RTP media stream;
[38] 参数确定单元, 用于根据所述丢包信息确定待发送的第二 RTP媒体流的媒体编码 参数以及传输参数;  [38] a parameter determining unit, configured to determine, according to the packet loss information, a media encoding parameter and a transmission parameter of the second RTP media stream to be sent;
[39] 所述第一发送单元还用于: 发送所述第二 RTP媒体流。  [39] The first sending unit is further configured to: send the second RTP media stream.
[40] 结合上述第三方面,在第三方面第一种可能的实现方式中,丢包信息确定单元包括:  [40] In combination with the foregoing third aspect, in a first possible implementation manner of the third aspect, the packet loss information determining unit includes:
[41] 序列确定子单元, 用于根据所述序号相关信息以及在所述反馈周期内实际发送的数 据包的序号信息确定数据包的接收状态序列, 所述数据包的接收状态序列为按照数据包 的发送顺序记录的各个数据包是否丢包的序列; [41] a sequence determining subunit, configured to determine, according to the sequence number related information and the sequence number information of the data packet actually sent in the feedback period, a sequence of receiving states of the data packet, where the receiving state sequence of the data packet is according to the data The sequence of whether each packet recorded in the transmission order of the packet is lost;
[42] 原因确定子单元, 用于根据丢包的数据包在所述序列确定子单元确定的所述数据包 的接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配, 如果与随 机丢包特性匹配, 则确定媒体流的丢包信息为随机丢包; 否则, 确定媒体流的丢包信息 为带宽受限。  [42] a reason determining subunit, configured to determine, according to the location of the data packet of the packet loss in the sequence of receiving states of the data packet determined by the sequence determining subunit, whether the randomness of packet loss and random packet loss characteristics Matching, if it matches the random packet loss feature, it determines that the packet loss information of the media stream is a random packet loss; otherwise, it determines that the packet loss information of the media stream is bandwidth limited.
[43] 结合上述第三方面,和 /或第三方面第一种可能的实现方式,在第三方面第二种可能 的实现方式中, 所述参数确定单元包括:  [43] In combination with the foregoing third aspect, and/or the first possible implementation manner of the third aspect, in the second possible implementation manner of the third aspect, the parameter determining unit includes:
[44] 第一参数确定子单元, 用于根据确定的丢包信息以及所述数据包的接收状态序列确 定丢包信息对应的网络约束参数; [45] 第二参数确定子单元, 用于根据所述丢包信息以及所述第一参数确定子单元确定的 所述网络约束参数确定待发送的第二 RTP媒体流的媒体编码参数以及传输参数; [44] a first parameter determining subunit, configured to determine a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the received status sequence of the data packet; [45] a second parameter determining subunit, configured to determine media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information and the network constraint parameter determined by the first parameter determining subunit ;
[46] 当丢包信息为带宽受限时, 所述网络约束参数包括: 限制周期, 所述限制周期为所 述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长; 最 大流量, 所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数;  [46] When the packet loss information is limited in bandwidth, the network constraint parameter includes: a limit period, where the data packet of the packet is received in the sequence of the received state and the data of the continuous packet loss is continuously lost. The total transmission time of the packet; the maximum traffic, where the maximum traffic is the total number of bytes of consecutive unpacked packets in the serial number related information;
[47] 当丢包信息为随机丢包时, 所述网络约束参数包括: 丢包率, 所述丢包率为所述数 据包的接收状态序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包的总 数。  [47] When the packet loss information is a random packet loss, the network constraint parameter includes: a packet loss rate, where the packet loss rate is the total number of packets lost in the received state sequence of the data packet divided by the data. The total number of packets in the receive status sequence of the packet.
[48] 结合上述第三方面第二种可能的实现方式, 在第三方面第三种可能的实现方式中, 第二参数确定子单元具体用于:  [48] In combination with the second possible implementation manner of the foregoing third aspect, in a third possible implementation manner of the third aspect, the second parameter determining subunit is specifically configured to:
[49] 根据以下公式确定所述媒体编码参数以及传输参数:  [49] The media encoding parameters and transmission parameters are determined according to the following formula:
[50】 max f(x,y) = g(x) + h(y); [50] max f(x, y) = g(x) + h(y) ;
[51】 s.t. a(x,y) P [51] s.t. a(x,y) P
[52] 其中, x表示媒体编码参数, y表示传输参数; g(x)表示媒体编码参数在无损网络下 能获得的媒体质量分数; h(y)表示基于所述传输参数对所述媒体质量分数的影响校对; f ( x, y ) 表示所述媒体编码参数和传输参数在实际网络下获得的媒体质量分数; a(x,y) 表示媒体编码参数和传输参数对应的网络约束参数, P表示所述丢包信息对应的网络约 束参数。  [52] wherein x represents a media coding parameter, y represents a transmission parameter; g(x) represents a media quality score that the media coding parameter can obtain under a lossless network; h(y) represents the media quality based on the transmission parameter The influence of the score is proofread; f ( x, y ) represents the media quality score obtained by the media coding parameter and the transmission parameter in the actual network; a(x, y) represents the network constraint parameter corresponding to the media coding parameter and the transmission parameter, P Indicates a network constraint parameter corresponding to the packet loss information.
[53] 第四方面, 本发明实施例提供一种实时传输协议 RTP媒体流的传输装置, 包括:  [53] In a fourth aspect, the embodiment of the present invention provides a real-time transmission protocol RTP media stream transmission apparatus, including:
[54] 第二接收单元, 用于接收发送设备发送的第一 RTP媒体流; [54] a second receiving unit, configured to receive a first RTP media stream sent by the sending device;
[55] 信息确定单元, 用于确定所述第二接收单元接收的第一 RTP媒体流的序号相关信 息,所述序号相关信息为所述第二接收单元在一个反馈周期内接收到的第一 RTP媒体流 中数据包的序号信息;  [55] an information determining unit, configured to determine sequence number related information of the first RTP media stream received by the second receiving unit, where the sequence number related information is the first received by the second receiving unit in a feedback period The serial number information of the data packet in the RTP media stream;
[56] 第二发送单元, 用于向所述发送设备发送所述信息确定单元确定的所述序号相关信 息, 以便所述发送设备根据所述序号相关信息及在所述反馈周期内实际发送的第一 RTP 媒体流中数据包的序号信息确定第一 RTP媒体流的丢包信息、根据所述丢包信息确定所 述发送设备待发送的第二 RTP媒体流的媒体编码参数以及传输参数;  a second sending unit, configured to send, to the sending device, the serial number related information determined by the information determining unit, so that the sending device actually sends the information according to the serial number related information and during the feedback period. The sequence number information of the data packet in the first RTP media stream determines the packet loss information of the first RTP media stream, and determines the media coding parameter and the transmission parameter of the second RTP media stream to be sent by the sending device according to the packet loss information;
[57] 所述第二接收单元还用于: 接收所述发送设备根据所述媒体编码参数以及传输参数 发送的第二 RTP媒体流。 The second receiving unit is further configured to: receive a second RTP media stream that is sent by the sending device according to the media encoding parameter and the transmission parameter.
[58] 结合上述第四方面, 在第四方面第一种可能的实现方式中, 所述序号相关信息通过 包配列位图实现, 所述信息确定单元具体用于:  [58] In combination with the foregoing fourth aspect, in a first possible implementation manner of the fourth aspect, the sequence number related information is implemented by using a packet allocation bitmap, where the information determining unit is specifically configured to:
[59] 确定在一个反馈周期内接收到的第一 RTP媒体流中数据包的序号信息;  [59] determining sequence number information of the data packet in the first RTP media stream received in one feedback period;
[60] 根据所述序号信息生成所述包排列位图。 [60] generating the packet arrangement bitmap according to the sequence number information.
[61] 第五方面, 本发明实施例提供一种实时传输协议 RTP媒体流的传输系统, 包括发 送设备和接收设备, 其中, [61] In a fifth aspect, an embodiment of the present invention provides a real-time transmission protocol RTP media stream transmission system, including Sending device and receiving device, wherein
[62] 所述发送设备, 用于向接收设备发送第一 RTP媒体流, 接收所述接收设备发送的 序号相关信息, 所述序号相关信息为所述接收设备在一个反馈周期内接收到的所述第一 RTP媒体流中数据包的序号信息, 根据所述序号相关信息、 在所述反馈周期内实际发送 的所述第一 RTP媒体流中数据包的序号信息确定第一 RTP媒体流的丢包信息, 根据所 述丢包信息确定待发送的第二 RTP媒体流的媒体编码参数以及传输参数,并向所述接收 设备发送所述第二 RTP媒体流;  [62] The sending device is configured to send a first RTP media stream to the receiving device, and receive sequence number related information sent by the receiving device, where the sequence number related information is received by the receiving device in a feedback period. Determining the sequence number information of the data packet in the first RTP media stream, determining, according to the sequence number related information, the sequence number information of the data packet in the first RTP media stream that is actually sent in the feedback period, the first RTP media stream is lost. Packet information, determining media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information, and transmitting the second RTP media stream to the receiving device;
[63] 所述接收设备, 用于接收发送设备发送的第一 RTP媒体流, 确定第一 RTP媒体流 的序号相关信息, 所述序号相关信息为所述接收设备在一个反馈周期内接收到的第一 RTP媒体流中数据包的序号信息, 向所述发送设备发送所述序号相关信息, 以便所述发 送设备根据所述序号相关信息及在所述反馈周期内实际发送的第一 RTP媒体流中数据 包的序号信息确定第一 RTP媒体流的丢包信息、根据所述丢包信息确定所述发送设备待 发送的第二 RTP媒体流的媒体编码参数以及传输参数,接收所述发送设备根据所述媒体 编码参数以及传输参数发送的第二 RTP媒体流。  [63] The receiving device is configured to receive a first RTP media stream sent by the sending device, and determine sequence number related information of the first RTP media stream, where the sequence number related information is received by the receiving device in a feedback period. The sequence number information of the data packet in the first RTP media stream, and the sequence number related information is sent to the sending device, so that the sending device, according to the sequence number related information, and the first RTP media stream actually sent in the feedback period The sequence number information of the data packet determines the packet loss information of the first RTP media stream, determines the media coding parameter and the transmission parameter of the second RTP media stream to be sent by the sending device according to the packet loss information, and receives the sending device according to the The media encoding parameter and the second RTP media stream sent by the transmission parameter.
[64] 结合上述第五方面, 在第五方面第一种可能的实现方式中, 所述发送设备具体用于 通过以下方式实现所述根据所述序号相关信息、 在所述反馈周期内实际发送的所述第一 RTP媒体流中数据包的序号信息确定第一 RTP媒体流的丢包信息:  [64] In combination with the foregoing fifth aspect, in a first possible implementation manner of the foregoing aspect, the sending device is specifically configured to implement, according to the serial number related information, actually sending in the feedback period The sequence number information of the data packet in the first RTP media stream determines the packet loss information of the first RTP media stream:
[65] 根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定 数据包的接收状态序列, 所述数据包的接收状态序列为按照数据包的发送顺序记录的各 个数据包是否丢包的序列; [65] determining a sequence of receiving status of the data packet according to the serial number related information and sequence number information of the data packet actually sent in the feedback period, where the receiving status sequence of the data packet is recorded according to the sending order of the data packet The sequence of whether the packet is lost;
[66] 所述发送设备根据丢包的数据包在所述接收状态序列中的位置判断数据包丢包的 随机性是否与随机丢包特性匹配;  [66] The sending device determines, according to the location of the packet loss packet in the receiving state sequence, whether the randomness of the packet loss matches the random packet loss characteristic;
[67] 如果与随机丢包特性匹配, 确定 RTP媒体流的丢包信息为随机丢包;  [67] If the random packet loss feature matches, the packet loss information of the RTP media stream is determined to be random packet loss;
[68] 如果与随机丢包特性不匹配, 确定 RTP媒体流的丢包信息为带宽受限。  [68] If the random packet loss feature does not match, it is determined that the packet loss information of the RTP media stream is bandwidth limited.
[69] 结合上述第五方面,和 /或第五方面第一种可能的实现方式,在第五方面第二种可能 的实现方式中, 所述发送设备具体用于通过以下方式实现所述根据所述丢包信息确定待 发送的第二 RTP媒体流的媒体编码参数以及传输参数:  [69] In combination with the foregoing fifth aspect, and/or the first possible implementation manner of the fifth aspect, in the second possible implementation manner of the fifth aspect, the sending device is specifically configured to implement the The packet loss information determines a media coding parameter and a transmission parameter of the second RTP media stream to be sent:
[70] 根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约 束参数;  [70] determining, according to the determined packet loss information and the receiving status sequence of the data packet, a network constraint parameter corresponding to the packet loss information;
[71] 根据所述丢包信息以及所述网络约束参数确定待发送的第二 RTP媒体流的媒体编 码参数以及传输参数;  [71] determining media coding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information and the network constraint parameter;
[72] 当丢包信息为带宽受限时, 所述网络约束参数包括: 限制周期, 所述限制周期为所 述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长; 最 大流量, 所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数; [73] 当丢包信息为随机丢包时, 所述网络约束参数包括: 丢包率, 所述丢包率为所述数 据包的接收状态序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包的总 数。 [72] When the packet loss information is limited in bandwidth, the network constraint parameter includes: a restriction period, where the data packet of the packet is continuously lost and the data of the continuous packet loss in the sequence of the received state of the data packet. The total transmission time of the packet; the maximum traffic, where the maximum traffic is the total number of bytes of consecutive unpacked packets in the serial number related information; [73] When the packet loss information is a random packet loss, the network constraint parameter includes: a packet loss rate, where the packet loss rate is the total number of packets lost in the received state sequence of the data packet divided by the data. The total number of packets in the receive status sequence of the packet.
[74】 本发明实施例中, 发送设备向接收设备发送第一 RTP媒体流; 接收所述接收设备 发送的序号相关信息, 所述序号相关信息为所述接收设备在一个反馈周期内接收到的所 述第一 RTP媒体流中数据包的序号信息; 根据所述序号相关信息、在所述反馈周期内实 际发送的所述第一 RTP媒体流中数据包的序号信息确定第一 RTP媒体流的丢包信息; 根据所述丢包信息确定待发送的第二 RTP媒体流的媒体编码参数以及传输参数,并向所 述接收设备发送所述第二 RTP媒体流。 从而, 发送设备确定第一 RTP媒体流的丢包信 息, 根据丢包信息确定媒体编码参数以及传输参数; 所述发送设备根据所述媒体编码参 数以及传输参数发送第二 RTP媒体流,因此本发明实施例能够有效缓解发送设备和接收 设备之间 RTP媒体流传输过程中的丢包问题, 提高 RTP媒体流的传输效率。 附图说明  In the embodiment of the present invention, the sending device sends the first RTP media stream to the receiving device, and receives the serial number related information sent by the receiving device, where the serial number related information is received by the receiving device in a feedback period. The sequence number information of the data packet in the first RTP media stream; determining, according to the sequence number related information, the sequence number information of the data packet in the first RTP media stream actually sent in the feedback period, determining the first RTP media stream Packet loss information; determining media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information, and transmitting the second RTP media stream to the receiving device. Therefore, the sending device determines the packet loss information of the first RTP media stream, and determines the media encoding parameter and the transmission parameter according to the packet loss information; the sending device sends the second RTP media stream according to the media encoding parameter and the transmission parameter, so the present invention The embodiment can effectively alleviate the packet loss problem in the process of RTP media stream transmission between the sending device and the receiving device, and improve the transmission efficiency of the RTP media stream. DRAWINGS
[75] 为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使 用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对于 本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的 附图。  [75] 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 will be briefly described below. Obviously, the drawings in the following description are only the present drawings. Some embodiments of the invention may be obtained by those of ordinary skill in the art from the drawings without departing from the scope of the invention.
[76] 图 1为本发明 RTP媒体流的传输方法第一实施例示意图; 1 is a schematic diagram of a first embodiment of a method for transmitting an RTP media stream according to the present invention;
[77] 图 2为本发明 RTP媒体流的传输方法第二实施例示意图; 2 is a schematic diagram of a second embodiment of a method for transmitting an RTP media stream according to the present invention;
[78] 图 3为本发明 RTP媒体流的传输方法第三实施例示意图; 3 is a schematic diagram of a third embodiment of a method for transmitting an RTP media stream according to the present invention;
[79] 图 4为本发明 RTP媒体流的传输装置第一实施例示意图; 4 is a schematic diagram of a first embodiment of an apparatus for transmitting an RTP media stream according to the present invention;
[80] 图 5为本发明 RTP媒体流的传输装置第二实施例示意图; 5 is a schematic diagram of a second embodiment of an apparatus for transmitting an RTP media stream according to the present invention;
[81] 图 6为本发明 RTP媒体流的发送设备结构示意图; 6 is a schematic structural diagram of a device for transmitting an RTP media stream according to the present invention;
[82] 图 7为本发明 RTP媒体流的接收设备结构示意图; 7 is a schematic structural diagram of a receiving device of an RTP media stream according to the present invention;
[83] 图 8为本发明 RTP媒体流的传输系统结构示意图。 具体实施方式 8 is a schematic structural diagram of a transmission system of an RTP media stream according to the present invention. detailed description
[84] 通过分析发现, 在 RTP媒体流的传输过程中造成数据包丢包的原因不尽相同, 不 同的丢包原因需要采用不同的措施去克服。 如果没有准确甄别丢包原因, 发送设备对传 输参数的调整很可能适得其反。 比如如果发送设备与传输设备之间传输媒体流的带宽受 限, 可提供的带宽小于 RTP媒体流实际上行带宽造成数据包丢包时, 如果采用冗余编码 如前向纠错编码 (FEC, Forward Error Correction ) 后, 会加大 RTP媒体流的实际上 行带宽, 导致 RTP媒体流的发送需要更多的带宽资源, 从而加剧数据包丢包; 或者, 当 丢包原因是随机丢包时, 如果减少发送设备的 RTP媒体流的流量, 并不能保证发送设备 发送的 RTP媒体流能更有效传输至接收设备。 可见, 甄别数据包的丢包原因, 是解决发 送设备和接收设备之间 RTP媒体流传输过程中出现的丢包问题、 提高 RTP媒体流的传 输效率的核心。但是, 现有技术中 RTP媒体流传输方法仅对传输参数进行调整, 显然只 能在某些特定的情况或凑巧的场合下才能有效解决发送设备和接收设备之间 RTP媒体 流传输过程中的丢包问题, 在大多数情况下都无法有效解决发送设备和接收设备之间 RTP媒体流传输过程中的丢包问题。 [84] It is found through analysis that the causes of packet loss during the transmission of RTP media streams are different. Different packet loss reasons need to be overcome by different measures. If the reason for the packet loss is not accurately identified, the adjustment of the transmission parameters by the transmitting device is likely to be counterproductive. For example, if the bandwidth of the transport media stream between the sending device and the transmitting device is limited, the available bandwidth is smaller than the actual bandwidth of the RTP media stream, causing packet loss, if redundant coding such as forward error correction coding (FEC, Forward) is used. After Error Correction), the actual line bandwidth of the RTP media stream is increased, which causes the RTP media stream to be sent with more bandwidth resources, thereby aggravating packet loss; or The reason for the packet loss is that when the packet is randomly lost, if the traffic of the RTP media stream of the sending device is reduced, the RTP media stream sent by the sending device cannot be transmitted to the receiving device more efficiently. It can be seen that the reason for discarding the packet loss is to solve the problem of packet loss occurring in the process of RTP media stream transmission between the transmitting device and the receiving device, and to improve the transmission efficiency of the RTP media stream. However, in the prior art, the RTP media stream transmission method only adjusts the transmission parameters, and obviously can only effectively solve the loss in the RTP media stream transmission process between the transmitting device and the receiving device in certain specific situations or coincidences. The packet problem, in most cases, cannot effectively solve the packet loss problem during the RTP media stream transmission between the sending device and the receiving device.
[85] 有鉴于此, 本发明实施例提供的 RTP媒体流传输方法中, 确定 RTP媒体流的丢包 信息, 根据所述丢包信息确定媒体编码参数以及传输参数, 从而有效缓解发送设备和接 收设备之间 RTP媒体流传输过程中出现的丢包问题, 提高 RTP媒体流的传输效率。  [85] In view of the above, in the RTP media stream transmission method provided by the embodiment of the present invention, determining packet loss information of an RTP media stream, determining media coding parameters and transmission parameters according to the packet loss information, thereby effectively alleviating the sending device and receiving The packet loss problem occurs during the RTP media stream transmission between devices, and improves the transmission efficiency of the RTP media stream.
[86] 其中, 本发明实施例所称之发送设备是指发送 RTP媒体流的设备, 接收设备是指 接收 RTP媒体流的设备, 并不用以限定所述发送设备是否能够发送和接收 RTP媒体流 之外的其他数据、 所述接收设备是否能够发送和接收 RTP媒体流之外的其他数据。 The device that is referred to in the embodiment of the present invention refers to a device that sends an RTP media stream, and the device that receives the RTP media stream is not used to limit whether the sending device can send and receive an RTP media stream. Other data than the other, whether the receiving device is capable of transmitting and receiving other data than the RTP media stream.
[87] 下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清楚、 完整 的描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基 于本发明中的实施例, 本领域普通技术人员在没有付出创造性劳动前提下所获得的所有 其他实施例, 都属于本发明保护的范围。 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. example. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any inventive effort are within the scope of the present invention.
[88] 参见图 1, 为本发明 RTP媒体流的传输方法第一实施例示意图, 该方法可以应用于 发送设备, 该方法包括: [88] FIG. 1 is a schematic diagram of a first embodiment of a method for transmitting an RTP media stream according to the present invention. The method may be applied to a sending device, where the method includes:
[89] 步骤 101 : 发送设备向接收设备发送第一 RTP媒体流;  [89] Step 101: The sending device sends the first RTP media stream to the receiving device.
[90] 步骤 102 : 所述发送设备接收所述接收设备发送的序号相关信息, 所述序号相关信 息为所述接收设备在一个反馈周期内接收到的第一 RTP媒体流中数据包的序号信息;  [90] Step 102: The sending device receives the serial number related information sent by the receiving device, where the serial number related information is the serial number information of the data packet in the first RTP media stream received by the receiving device in a feedback period. ;
[91] 其中,所述接收设备可以通过 RTCP反馈消息等消息向所述发送设备发送所述序号 相关信息。 [91] The receiving device may send the sequence number related information to the sending device by using a message such as an RTCP feedback message.
[92] 其中, 所述序号相关信息可以包括: 接收设备在一个反馈周期内接收到的 RTP媒 体流中数据包的序号信息, 或者, 包排列位图; 所述包排列位图可以由接收设备在一个 反馈周期内接收到的 RTP媒体流中数据包的序号信息生成。  [92] The sequence number related information may include: sequence number information of the data packet in the RTP media stream received by the receiving device in a feedback period, or a packet arrangement bitmap; the packet arrangement bitmap may be received by the receiving device The sequence number information of the data packet in the RTP media stream received in one feedback period is generated.
[93] 步骤 103 :所述发送设备根据所述序号相关信息、在所述反馈周期内实际发送的 RTP 媒体流中数据包的序号信息确定第一 RTP媒体流的丢包信息;  [93] Step 103: The sending device determines packet loss information of the first RTP media stream according to the sequence number related information, the sequence number information of the data packet in the RTP media stream actually sent in the feedback period;
[94] 所述丢包信息是用于记录 RTP媒体流丢包原因的信息。 [94] The packet loss information is information used to record the reason for packet loss of the RTP media stream.
[95] 步骤 104 : 所述发送设备根据所述丢包信息确定待发送的第二 RTP媒体流的媒体编 码参数以及传输参数, 并向所述接收设备发送所述第二 RTP媒体流。 [96] 其中, 所述第一 RTP媒体流和第二 RTP媒体流均为 RTP媒体流, 所述第一、第二 仅用于区分步骤 101和步骤 104中的 RTP媒体流。 [95] Step 104: The sending device determines a media encoding parameter and a transmission parameter of the second RTP media stream to be sent according to the packet loss information, and sends the second RTP media stream to the receiving device. [96] The first RTP media stream and the second RTP media stream are both RTP media streams, and the first and second are only used to distinguish the RTP media streams in step 101 and step 104.
[97] 所述第一 RTP媒体流和第二 RTP媒体流可以为相同或不同的 RTP媒体流。一般的, 所述第一 RTP媒体流和第二 RTP媒体流不同, 且第二 RTP媒体流是第一 RTP媒体流 后续的媒体流,从而通过根据在前的第一 RTP媒体流的传输确定媒体编码参数和传输参 数, 再使用确定的所述媒体流编码参数和传输参数进行后续 RTP媒体流的传输。  [97] The first RTP media stream and the second RTP media stream may be the same or different RTP media streams. Generally, the first RTP media stream is different from the second RTP media stream, and the second RTP media stream is a media stream subsequent to the first RTP media stream, thereby determining the media by transmitting according to the previous first RTP media stream. Encoding parameters and transmission parameters, and then using the determined media stream coding parameters and transmission parameters for subsequent transmission of the RTP media stream.
[98] 本实施例中, 发送设备确定第一 RTP媒体流的丢包信息, 根据所述丢包信息确定 媒体编码参数以及传输参数; 所述发送设备根据所述媒体编码参数以及传输参数发送第 二 RTP媒体流,因此本发明实施例能够针对不同的丢包原因而确定不同的媒体编码参数 以及传输参数, 从而能够有效缓解发送设备和接收设备之间 RTP媒体流的丢包问题, 提 高 RTP媒体流的传输效率。 [98] In this embodiment, the sending device determines the packet loss information of the first RTP media stream, and determines the media encoding parameter and the transmission parameter according to the packet loss information; the sending device sends the first according to the media encoding parameter and the transmission parameter. The second RTP media stream, so the embodiment of the present invention can determine different media coding parameters and transmission parameters for different packet loss reasons, thereby effectively alleviating the packet loss problem of the RTP media stream between the sending device and the receiving device, and improving the RTP media. The transmission efficiency of the stream.
[99] 参见图 2, 为本发明 RTP媒体流的传输方法第二实施例示意图, 该方法可以应用于 接收设备, 该方法包括: [99] FIG. 2 is a schematic diagram of a second embodiment of a method for transmitting an RTP media stream according to the present invention. The method may be applied to a receiving device, where the method includes:
[100】步骤 201 : 接收设备接收发送设备发送的第一 RTP媒体流;  [100] Step 201: The receiving device receives the first RTP media stream sent by the sending device.
[101】步骤 202 : 接收设备确定第一 RTP媒体流的序号相关信息, 所述序号相关信息为所 述接收设备在一个反馈周期内接收到的第一 RTP媒体流中数据包的序号信息;  [101] Step 202: The receiving device determines sequence number related information of the first RTP media stream, where the sequence number related information is sequence number information of the data packet in the first RTP media stream received by the receiving device in a feedback period;
[102】其中, 序号相关信息包括接收设备在一个反馈周期内接收到的第一 RTP媒体流中 数据包的序号信息时, 序号相关信息中可以直接包括各个数据包的序号;  [102] wherein the sequence number related information includes the sequence number information of the data packet in the first RTP media stream received by the receiving device in a feedback period, and the sequence number related information may directly include the sequence number of each data packet;
[103】或者, 所述序号相关信息包括包排列位图时, 接收设备确定 RTP媒体流的序号相 关信息可以包括:接收设备确定在一个反馈周期内接收到的 RTP媒体流中数据包的序号 信息; 接收设备根据所述序号信息生成包排列位图。  [103] Alternatively, when the sequence number related information includes a packet arrangement bitmap, the receiving device determining the sequence number related information of the RTP media stream may include: the receiving device determining the sequence number information of the data packet in the RTP media stream received in a feedback period. The receiving device generates a packet arrangement bitmap according to the sequence number information.
[104】步骤 203 : 接收设备向所述发送设备所述序号相关信息, 以便所述发送设备根据所 述序号相关信息、在所述反馈周期内实际发送的第一 RTP媒体流中数据包的序号信息确 定第一 RTP媒体流的丢包信息、 根据所述丢包信息确定所述发送设备待发送的第二 RTP 媒体流的媒体编码参数以及传输参数;  [104] Step 203: The receiving device sends the serial number related information to the sending device, so that the sending device, according to the serial number related information, the serial number of the data packet in the first RTP media stream actually sent in the feedback period. Determining, by the information, the packet loss information of the first RTP media stream, determining, according to the packet loss information, a media coding parameter and a transmission parameter of the second RTP media stream to be sent by the sending device;
[105】步骤 204 : 所述接收设备接收所述发送设备根据所述媒体编码参数以及传输参数发 送的第二 RTP媒体流。  [105] Step 204: The receiving device receives a second RTP media stream that is sent by the sending device according to the media encoding parameter and the transmission parameter.
[106】本实施例中, 接收设备根据在一个反馈周期内接收到的第一 RTP媒体流中数据包 的序号信息确定序号相关信息, 将所述序号相关信息发送给所述发送设备, 以便所述发 送设备根据所述序号相关信息、在所述反馈周期内实际发送的 RTP媒体流中数据包的序 号信息确定第一 RTP媒体流的丢包信息、进而确定媒体编码参数以及传输参数, 之后发 送设备可以根据确定的所述媒体编码参数以及传输参数进行第二 RTP媒体流的发送,因 此本发明实施例能够有效缓解发送设备和接收设备之间媒体流的丢包问题,提高 RTP媒 体流的传输效率。 [106] In this embodiment, the receiving device determines the sequence number related information according to the sequence number information of the data packet in the first RTP media stream received in a feedback period, and sends the sequence number related information to the sending device, so as to Determining, by the sending device, the packet loss information of the first RTP media stream, determining the media encoding parameter and the transmission parameter, according to the sequence number related information, the sequence number information of the data packet in the RTP media stream actually sent in the feedback period, and then sending The device can perform the second RTP media stream transmission according to the determined media coding parameter and the transmission parameter. Therefore, the embodiment of the present invention can effectively alleviate the packet loss problem of the media stream between the sending device and the receiving device, and improve the RTP medium. The efficiency of body fluid transmission.
[107】参见图 3, 为本发明 RTP媒体流传输方法第三实施例示意图, 该方法包括: [107] FIG. 3 is a schematic diagram of a third embodiment of an RTP media stream transmission method according to the present invention, where the method includes:
[108】步骤 301 : 发送设备向接收设备发送第一 RTP媒体流。 [108] Step 301: The sending device sends the first RTP media stream to the receiving device.
[109】其中, 所述发送设备是以当前的媒体编码参数和传输参数进行第一 RTP媒体流的 发送的。  [109] wherein, the sending device sends the first RTP media stream by using current media coding parameters and transmission parameters.
[110】步骤 302: 接收设备接收所述第一 RTP媒体流, 确定第一 RTP媒体流的序号相关 信息;  [110] Step 302: The receiving device receives the first RTP media stream, and determines sequence number related information of the first RTP media stream.
[111】其中, 序号相关信息包括接收设备在一个反馈周期内接收到的第一 RTP媒体流中 数据包的序号信息时, 序号相关信息中可以直接记录各个数据包的序号; 例如, 如果在 所述一个反馈周期内接收设备接收到了序号为 1、 3、 4、 5、 7的 5个数据包, 则所述序 号相关信息可以为: 13457;  [111] wherein, the serial number related information includes the serial number information of the data packet in the first RTP media stream received by the receiving device in a feedback period, and the serial number related information may directly record the serial number of each data packet; for example, if The receiving device receives five data packets with sequence numbers 1, 3, 4, 5, and 7 in a feedback period, and the sequence number related information may be: 13457;
[112】或者, 所述序号相关信息包括包排列位图时, 接收设备确定第一 RTP媒体流的序 号相关信息可以包括:接收设备确定在一个反馈周期内接收到的第一 RTP媒体流中数据 包的序号信息; 接收设备根据所述序号信息生成包排列位图。  [112] Alternatively, when the sequence number related information includes a packet arrangement bitmap, the receiving device determining the sequence number related information of the first RTP media stream may include: the receiving device determining the data in the first RTP media stream received in one feedback period. The serial number information of the packet; the receiving device generates a packet arrangement bitmap according to the serial number information.
[113】在一种可能的实现方式中, 所述包排列位图可以包括: 在所述一个反馈周期内接收 到的第一个数据包的序号、 以及根据在所述一个反馈周期内接收到除第一个数据包之外 其他数据包生成的位图。 例如, 如果在所述一个一个反馈周期内接收设备接收到了序号 为 1、 2、 3、 5、 6、 7、 8的 7个数据包, 则所述包排列位图可以为:  [113] In a possible implementation manner, the packet arrangement bitmap may include: a sequence number of the first data packet received in the one feedback period, and receiving according to the one feedback period A bitmap generated by a packet other than the first packet. For example, if the receiving device receives 7 data packets with sequence numbers 1, 2, 3, 5, 6, 7, 8 within the one feedback period, the packet arrangement bitmap may be:
[114] Header Packet SN: 1 [114] Header Packet SN: 1
[115] RcvMap: 0xF7 [115] RcvMap: 0xF7
[116】其中, 0xF7的二进制表示为 11110111, 如果最低比特位代表第一个数据包, 比特位 为 1表示成功收到, 那么 0xF7就可以表达接收设备收到了序号为 1、 2、 3、 5、 6、 7、 8 的 7个数据包。  [116] wherein, the binary representation of 0xF7 is 11110111. If the lowest bit represents the first data packet and the bit is 1 indicating successful reception, then 0xF7 can express that the receiving device has received the sequence number 1, 2, 3, 5 7, 6 packets of 6, 7, and 8.
[117】其中, 所述反馈周期的具体时间长度和起始时刻可以在实际应用中自主设定, 这里 并不限制。  [117] wherein the specific time length and the starting time of the feedback period can be set autonomously in practical applications, and is not limited herein.
[118】步骤 303: 接收设备向所述发送设备发送 RTCP反馈消息, 所述 RTCP反馈消息中 包括所述序号相关信息。  [118] Step 303: The receiving device sends an RTCP feedback message to the sending device, where the RTCP feedback message includes the sequence number related information.
[119】在实际应用中, 接收设备也可以通过其他消息携带所述序号相关信息, 这里并不限 定。  [119] In an actual application, the receiving device may also carry the serial number related information through other messages, which is not limited herein.
[120】其中, 所述 RTCP反馈消息可以由接收设备在接收 RTP媒体流的过程中按照所述 反馈周期定时向发送设备发送。 例如, 在每个反馈周期结束时, 由接收设备根据刚刚结 束的反馈周期内接收到的 RTP媒体流中数据包的序号信息得到所述序号相关信息,向所 述发送设备发送包括所述序号相关信息的 RTCP反馈消息。 [121】其中, 所述 RTCP反馈消息中还可以包括其他信息, 例如: 在所述反馈周期内接收 设备接收到的 RTP媒体流的字节总数, 和 /或时延信息。 [120] The RTCP feedback message may be sent by the receiving device to the sending device according to the feedback cycle timing in the process of receiving the RTP media stream. For example, at the end of each feedback period, the receiving device obtains the sequence number related information according to the sequence number information of the data packet in the RTP media stream received in the feedback cycle just ended, and sends the sequence number related information to the sending device. RTCP feedback message for information. [121] The RTCP feedback message may further include other information, for example, the total number of bytes of the RTP media stream received by the device in the feedback period, and/or the delay information.
[122】其中, 所述字节总数可以用于计算发送设备和接收设备之间的带宽约束, 具体的, 所述带宽约束等于: 所述字节总数 /所述反馈周期的时间长度。  [122] The total number of bytes may be used to calculate a bandwidth constraint between the sending device and the receiving device. Specifically, the bandwidth constraint is equal to: the total number of bytes / the length of time of the feedback period.
[123】而所述时延信息可以在发送设备调整发送设备和接收设备之间 RTP媒体流的传输 路径时作为所述传输路径调整的依据之一。 具体实现过程这里不赘述。  [123] The delay information may be used as one of the basis for the transmission path adjustment when the transmitting device adjusts the transmission path of the RTP media stream between the transmitting device and the receiving device. The specific implementation process is not described here.
[124】步骤 304: 发送设备接收所述 RTCP反馈消息, 根据所述序号相关信息、 在所述一 个反馈周期内实际发送的 RTP媒体流中数据包的序号信息确定所述第一 RTP媒体流的 丢包信息。 [124] Step 304: The sending device receives the RTCP feedback message, and determines the first RTP media stream according to the sequence number related information, the sequence number information of the data packet in the RTP media stream actually sent in the one feedback period. Packet loss information.
[125】在本发明实施例中, 将丢包信息划分为随机丢包和带宽受限两种。 在实际应用中, 也可以根据实际情况对丢包信息进行其他划分, 这里并不限制。  In the embodiment of the present invention, the packet loss information is divided into two types: random packet loss and bandwidth limitation. In actual applications, the packet loss information may be further divided according to actual conditions, which is not limited herein.
[126】不同的丢包信息对应的所述网络约束参数不同, 丢包信息为随机丢包时, 所述网络 约束参数可以包括: 数据包随机丢包的丢包率和丢包周期; 丢包信息为带宽受限时, 所 述网络约束参数可以包括: 发送设备和接收设备之间的最大流量和限制周期。  [126] The network constraint parameters corresponding to the different packet loss information are different. When the packet loss information is a random packet loss, the network constraint parameter may include: a packet loss rate and a packet loss period of the packet random packet loss; When the information is bandwidth limited, the network constraint parameter may include: a maximum traffic and a restriction period between the sending device and the receiving device.
[127】具体的, 所述根据所述序号相关信息、 在所述一个反馈周期内实际发送的 RTP媒 体流中数据包的序号信息确定所述第一 RTP媒体流的丢包信息可以包括:  Specifically, the determining, according to the sequence number related information, the sequence information of the data packet in the RTP media stream that is actually sent in the one feedback period, the packet loss information of the first RTP media stream may include:
[128】所述发送设备根据所述序号相关信息以及在所述反馈周期内实际发送的第一 RTP 媒体流中数据包的序号信息确定数据包的接收状态序列, 所述数据包的接收状态序列为 按照数据包的发送顺序记录的各个数据包是否丢包的信息;  [128] The sending device determines, according to the sequence number related information and the sequence number information of the data packet in the first RTP media stream actually sent in the feedback period, a sequence of receiving status of the data packet, and a sequence of receiving status of the data packet. Information indicating whether each packet is lost in accordance with the order in which the packets are sent;
[129】根据丢包的数据包在所述数据包的接收状态序列中的位置判断数据包丢包的随机 性是否与随机丢包特性匹配, 如果与随机丢包特性匹配, 则确定媒体流的丢包信息为随 机丢包; 否则, 确定媒体流的丢包信息为带宽受限。  [129] determining, according to the location of the packet loss packet in the receiving state sequence of the data packet, whether the randomness of the packet loss packet matches the random packet loss characteristic, and if it matches the random packet loss characteristic, determining the media stream. The packet loss information is a random packet loss; otherwise, the packet loss information of the media stream is determined to be bandwidth limited.
[130】例如, 在所述一个反馈周期内发送设备向接收设备发送了序号为 1~10的 10个数据 包;而序号相关信息为 1236789;贝 IJ,数据包的接收状态序列可以为: rrrxxrrrrx,其中, r表示该数据包未丢包, X表示该数据包丢包。  [130] For example, in the one feedback period, the sending device sends 10 data packets with sequence numbers 1 to 10 to the receiving device; and the sequence number related information is 1236789; the receiving state sequence of the data packet may be: rrrxxrrrrx , where r indicates that the packet is not dropped, and X indicates that the packet is lost.
[131】在根据丢包的数据包在所述数据包的接收状态序列中的位置判断数据包丢包的随 机性是否与随机丢包特性匹配时, 可以结合泊松分布 (Poisson distribution )、 自相似模 型等实现。 例如, 泊松分布是一种统计与概率学里常见的离散概率分布, 泊松分布适合 ■  [131] When determining whether the randomness of the packet loss is matched with the random packet loss characteristic according to the position of the packet in the received state sequence of the packet, the Poisson distribution can be combined with Similar models are implemented. For example, Poisson distribution is a discrete probability distribution that is common in statistics and probability. Poisson distribution is suitable ■
于描述单位时间内随机事件发生的次数。泊松分布公式如下 ^ ,其中泊松 分布的期望和方差均为入, λ是单位时间或单位面积内随机事件的平均发生率, k为单 位时间内随机事件发生的次数, k=0,l,2,...。 因为随机丢包事件在单位时间内出现的次数 或个数近似的服从泊松分布, 所以可以根据丢包的数据包在所述数据包的接收状态序列 中的位置按照上述泊松分布公式计算出 λ的值,进而根据 λ值计算出所述 λ对应的在 Δ t 时间内的理论丢包数;从所述数据包的接收状态序列中任取 A t时间的接收状态序列,判 断所述 A t 时间的接收状态序列中实际丢包数与所述理论丢包数的差值是否不大于预设 的差值阈值, 如果是, 则判断数据包丢包的随机性与随机丢包特性匹配, 如果否, 则判 断数据包丢包的随机性与随机丢包特性不匹配。 其中, 所述差值阈值可以在实际应用中 自主设置。 Describe the number of random events that occur within a unit of time. The Poisson distribution formula is as follows, where the expectation and variance of the Poisson distribution are both in, λ is the average incidence of random events per unit time or unit area, and k is the number of random events occurring per unit time, k=0, l ,2,.... Because the number of random packet loss events or the number of occurrences per unit time is approximately obeying the Poisson distribution, it can be calculated according to the Poisson distribution formula according to the position of the packet of the lost packet in the receiving state sequence of the data packet. The value of λ, and then the λ corresponding to λ is calculated according to the λ value The number of theoretical packet loss in the time period; any sequence of receiving states of the A t time from the sequence of receiving states of the data packet, determining the actual number of lost packets in the received state sequence of the A t time and the theoretical number of lost packets Whether the difference is not greater than the preset difference threshold. If yes, it is determined that the randomness of the packet loss matches the random packet loss feature. If not, the randomness and random packet loss characteristics of the packet loss are determined. match. The difference threshold may be set autonomously in an actual application.
[132】因此, 在一种可能的实现方式中, 所述根据丢包的数据包在所述数据包的接收状态 序列中的位置判断数据包丢包的随机性是否符合随机丢包特性可以包括:  [132] Therefore, in a possible implementation, the determining, according to the location of the data packet in the received state sequence of the data packet, whether the randomness of the packet loss meets the random packet loss characteristic may include :
数据包在所述数据包的接收状态序列中的位置按照泊松分布公式
Figure imgf000013_0001
计算 λ值; k为丢包的数据包在接收状态序列中的位置;
The location of the data packet in the sequence of received states of the data packet according to the Poisson distribution formula
Figure imgf000013_0001
Calculating the value of λ; k is the position of the packet of the lost packet in the sequence of receiving states;
[134】计算 λ对应的在 Δ t时间内的理论丢包数;  [134] calculating the theoretical number of lost packets corresponding to λ within Δt time;
[135]从所述数据包的接收状态序列中任取 Δ t时间的接收状态序列,判断所述 Δ t时间的 接收状态序列中实际丢包数与所述理论丢包数的差值是否小于预设阈值, 如果小于, 则 判断数据包丢包的随机性与随机丢包特性匹配, 否则, 判断数据包丢包的随机性与随机 丢包特性不匹配。  [135] taking a sequence of received states of the Δt time from the sequence of received states of the data packet, and determining whether the difference between the actual number of lost packets and the theoretical number of lost packets in the received state sequence of the Δt time is less than The preset threshold, if less than, determines that the randomness of the packet loss matches the random packet loss feature. Otherwise, it determines that the randomness of the packet loss does not match the random packet loss feature.
[136】其中, 计算 λ 对应的在 A t 时间 内 的理论丢包数时可以依照公式 Ρ^ί, ί + Δ ί = λΔ ί + 0 Δ ί 计算, 其中, t 为初始时间, Pl ( t+ A t ) 表示在 t+ A t 时间内数据包丢包的概率; O ( A t) 为 A t 的函数公式; 具体如何实现所述计算, 这里 不赘述。 [136] wherein, the calculation of the theoretical number of lost packets in the A t time corresponding to λ can be calculated according to the formula Ρ^ί, ί + Δ ί = λΔ ί + 0 Δ ί, where t is the initial time, Pl (t+ A t ) indicates the probability of packet loss during t+ A t time; O ( A t) is a function formula of A t ; how to implement the calculation in detail, which is not described here.
[137】步骤 305: 发送设备根据确定的丢包信息以及所述数据包的接收状态序列确定丢包 信息对应的网络约束参数。  [137] Step 305: The sending device determines, according to the determined packet loss information and the received status sequence of the data packet, a network constraint parameter corresponding to the packet loss information.
[138】其中, 当丢包信息为带宽受限时, 根据确定的丢包信息以及所述数据包的接收状态 序列确定丢包信息对应的网络约束参数可以包括: 将所述数据包的接收状态序列中连续 未丢包的数据包和连续丢包的数据包的总发送时长, 作为所述限制周期; 将所述序号相 关信息中连续未丢包的数据包的总字节数作为所述最大流量;  [138] wherein, when the packet loss information is limited in bandwidth, determining the network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the received status sequence of the data packet may include: receiving the data packet The total transmission duration of the packet that is not continuously lost in the sequence and the packet that is continuously lost is used as the limitation period; the total number of bytes of consecutive unpacked packets in the sequence number related information is taken as the maximum Traffic flow
[139】当丢包信息为随机丢包时, 根据确定的丢包信息以及所述数据包的接收状态序列确 定丢包信息对应的网络约束参数可以包括: 将所述数据包的接收状态序列中丢包的数据 包总数除以所述数据包的接收状态序列中数据包的总数, 得到所述丢包率。  [139] When the packet loss information is a random packet loss, determining, according to the determined packet loss information and the received status sequence of the data packet, the network constraint parameter corresponding to the packet loss information may include: The packet loss rate is obtained by dividing the total number of lost packets by the total number of packets in the received status sequence of the packet.
[140】其中, 丢包周期一般可以结合丢包率进行计算, 具体计算方法这里不限定。 在实际 应用中, 因为丢包率是由路由 /交换设备性能瓶颈引入,而路由 /交换设备性能中采用包每 秒 (PPS, Packet Per Second) 作为常用指标, 因此可以将丢包周期直接设置为 ls。 因 此, 在实际应用中, 可以直接在发送设备中预先存储丢包周期的数值, 在确定随机丢包 对应的网络约束参数时, 读取该预先存储的丢包周期的数值即可。 [141】具体的, 在确定限制周期时, 可以先从所述数据包的接收状态序列中査找到第一个 丢包的数据包, 然后, 从所述第一个丢包的数据包之后査找到第一个未丢包的数据包, 确定从该未丢包的数据包开始连续未丢包的数据包的个数, 并且确定该未丢包的数据包 之后第一个丢包的数据包, 确定从该丢包的数据包开始连续丢包的数据包的个数, 计算 所述连续未丢包的数据包的个数和连续丢包的数据包的个数的总和, 将所述总和与每个 数据包的发送时长相乘, 得到所述限制周期。 [140] wherein, the packet loss period can be generally calculated in combination with the packet loss rate, and the specific calculation method is not limited herein. In practical applications, the packet loss rate is introduced by the routing/switching device performance bottleneck, and the packet per second (PPS, Packet Per Second) is used as a common indicator. Therefore, the packet loss period can be directly set to Ls. Therefore, in a practical application, the value of the packet loss period may be pre-stored in the sending device, and when the network constraint parameter corresponding to the random packet loss is determined, the value of the pre-stored packet loss period may be read. [141] Specifically, when determining the restriction period, the first packet loss packet may be first searched from the received status sequence of the data packet, and then, after the first packet loss packet is checked. Find the first packet that has not been dropped, determine the number of consecutive undropped packets from the undropped packet, and determine the first packet that is dropped after the undropped packet. Determining the number of consecutively dropped packets from the packet of the lost packet, and calculating the sum of the number of consecutive undropped packets and the number of consecutively dropped packets, the sum Multiply the transmission duration of each data packet to obtain the restriction period.
[142】在确定所述最大流量时, 可以确定从该未丢包的数据包开始连续未丢包的数据包的 总字节数, 得到所述最大流量。  [142] When determining the maximum traffic, it is possible to determine the total number of bytes of consecutive undropped packets starting from the undropped packet, and obtain the maximum traffic.
[143】例如, 所述数据包的接收状态序列为 rrxxrrrxxrrrxx, 贝 lj, 可以首先找出标识为 x 的第 3个数据包, 然后, 从第 3个数据包之后査找到第一个标识为 r的数据包, 即第 5 个数据包, 从第 5个数据包开始连续未丢包的数据包为第 5个数据包至第 7个数据包, 因此, 确定从第 5个数据包开始连续未丢包的数据包的个数为 3, 第 5个数据包之后第 一个标识为 X的数据包为第 8个数据包, 从该第 8个数据包开始连续丢包的数据包为第 8个数据包和第 9个数据包, 因此, 确定从第 8个数据包开始连续丢包的数据包的个数 为 2, 总个数为 5, 则所述限制周期为 5t; t为每个数据包的发送时长。 [143] For example, the receiving status sequence of the data packet is rrxxrrrxxrrrxx, and the first data packet identified by x may be first found, and then the first identifier is found after the third data packet. The data packet, that is, the 5th data packet, the packet that is continuously lost from the 5th data packet is the 5th data packet to the 7th data packet, and therefore, it is determined that the 5th data packet is continuously continuous. The number of packets lost is 3, and the first packet identified by X after the 5th packet is the 8th packet, and the packet that is continuously dropped from the 8th packet is 8th. Packets and ninth packet, therefore, it is determined that the number of consecutive packets lost from the 8th packet is 2, and the total number is 5, then the limiting period is 5t ; t is each The length of time the packet is sent.
[144】所述最大流量为第 5个数据包至第 7个数据包的总字节数。 [144] The maximum traffic is the total number of bytes from the 5th packet to the 7th packet.
[145】步骤 306 : 发送设备根据所述丢包信息以及所述丢包信息对应的网络约束参数确定 待发送的第二 RTP媒体流的媒体编码参数以及传输参数。  [145] Step 306: The sending device determines, according to the packet loss information and the network constraint parameter corresponding to the packet loss information, a media encoding parameter and a transmission parameter of the second RTP media stream to be sent.
[146】其中, 所述媒体编码参数可以包括以下参数中的至少一个参数: 媒体编码后构建 RTP包率、 媒体编码算法、 编码速率。  [146] wherein the media coding parameter may include at least one of the following parameters: RTP packet rate, media coding algorithm, and coding rate are constructed after media coding.
[147】其中, 所述媒体编码后构建 RTP包率是指发送设备每秒发送的数据包的数量;  [147] wherein, the RTP packet rate after the media coding is performed refers to the number of data packets sent by the sending device per second;
[148】所述媒体编码算法是指发送设备在对 RTP媒体流进行编码时所采用的媒体压缩算 法格式, 所述媒体压缩算法格式包括: 自适应多速率 (AMR, Adaptive Multi-Rate ) , G.711等; [148] The media coding algorithm refers to a media compression algorithm format used by a sending device to encode an RTP media stream, and the media compression algorithm format includes: an adaptive multi-rate (AMR), G .711, etc.
[149】所述编码速率是指采用所述媒体压缩算法的速率, 例如, 在 AMR这一媒体压缩算 法下包括多个速率(rate )格式, 可以通过所述编码速率具体指示 AMR这一媒体压缩算 法所使用的速率格式。  [149] The encoding rate refers to the rate of the media compression algorithm. For example, the AMR media compression algorithm includes multiple rate formats, and the AMR media compression can be specifically indicated by the encoding rate. The rate format used by the algorithm.
[150】所述传输参数可以包括以下参数中的至少一个参数: 冗余包编码格式、 冗余参数。  [150] The transmission parameter may include at least one of the following parameters: a redundancy packet coding format, a redundancy parameter.
[151】其中, 所述冗余参数是指冗余系数, 例如所述冗余参数为 1倍冗余时, 则发送设备 会在进行 RTP媒体流的发送时, 将 RTP媒体流中每个数据包多发一份;  [151] wherein the redundancy parameter refers to a redundancy coefficient. For example, when the redundancy parameter is 1x redundancy, the sending device will each data in the RTP media stream when the RTP media stream is sent. Send one more package;
[152】所述冗余参数在实际应用时可以为非整数, 如 10%表示仅对所有数据包中的 10% 执行一倍冗余, 这可以借助重要帧识别等技术来实现, 这里不再赘述。  [152] The redundancy parameter may be a non-integer in practical application, for example, 10% means that only one 10% of all data packets are doubled, which can be implemented by means of important frame recognition, etc. Narration.
[153】所述冗余包编码格式用于指示冗余的数据包所采用的编码格式。 如 RFC2198定义 的冗余格式等。 [154】在实际应用中, 可以借助测试, 测试不同的媒体参数和传输参数在不同网络损伤下 的表现,根据有约束最优化方法例如数学回归方法确定由丢包信息对应的网络约束参数、 媒体编码参数、 传输参数构成的方程, 如: [153] The redundant packet coding format is used to indicate the coding format employed by the redundant data packets. Redundant formats as defined in RFC 2198, etc. [154] In practical applications, tests can be used to test the performance of different media parameters and transmission parameters under different network impairments, and the network constraint parameters corresponding to the packet loss information and the media are determined according to a constrained optimization method such as a mathematical regression method. The equations of coding parameters and transmission parameters, such as:
[155] max f(x,y) = g(x) + h(y) [155] max f(x,y) = g(x) + h(y)
[156] s.t. a(x,y) P [156] s.t. a(x,y) P
[157】其中, x表示媒体编码参数, y表示传输参数; g(x)表示媒体编码参数在无损网络下 能获得的媒体质量分数,例如描述语音质量的平均评价得分(MOS, Mean Opinion Score) /主观语音质量评估(PESQ, Perceptual evaluation of speech quality)分; h(y)表示基于 所述传输参数对所述媒体质量分数的影响校对; f ( χ, y)表示所述媒体编码参数和传输 参数在实际网络下获得的媒体质量分数; a(x,y)表示媒体编码参数和传输参数对应的网络 约束参数, P表示所述丢包信息对应的网络约束参数。  [157] wherein x represents a media coding parameter, y represents a transmission parameter; g(x) represents a media quality score that the media coding parameter can obtain under a lossless network, such as an average evaluation score describing a voice quality (MOS, Mean Opinion Score) /Perceptual evaluation of speech quality (PESQ); h(y) indicates proofreading based on the influence of the transmission parameter on the media quality score; f ( χ, y) indicates the media coding parameter and transmission The media quality score obtained by the parameter in the actual network; a(x, y) represents the network constraint parameter corresponding to the media coding parameter and the transmission parameter, and P represents the network constraint parameter corresponding to the packet loss information.
[158】具体的, 本发明实施例中需要根据随机丢包对应的网络约束参数、 媒体编码参数、 传输参数构成第一方程, 根据带宽约束对应的网络约束参数、 媒体编码参数、 传输参数 构成第二方程; 在本步骤的实现中, 可以直接将丢包信息对应的网络约束参数代入丢包 信息对应的方程中, 计算得到媒体编码参数和传输参数。  [158] Specifically, in the embodiment of the present invention, the network constraint parameter, the media coding parameter, and the transmission parameter corresponding to the random packet loss need to constitute a first equation, and the network constraint parameter, the media coding parameter, and the transmission parameter component corresponding to the bandwidth constraint are configured. The second equation; In the implementation of this step, the network constraint parameter corresponding to the packet loss information may be directly substituted into the equation corresponding to the packet loss information, and the media coding parameter and the transmission parameter are calculated.
[159】步骤 307: 发送设备根据步骤 306中确定的媒体编码参数和传输参数发送第二 RTP 媒体流。  [159] Step 307: The sending device sends the second RTP media stream according to the media encoding parameter and the transmission parameter determined in step 306.
[160】其中, 本步骤中发送设备发送第二 RTP媒体流所依据的媒体编码参数和传输参数 是根据丢包信息以及所述丢包信息对应的网络约束参数确定的, 从而能够有效缓解发送 设备和接收设备之间 RTP媒体流传输过程中出现的丢包问题, 提高 RTP媒体流的传输 效率。  [160] The media encoding parameter and the transmission parameter according to the packet loss information and the packet loss information are determined according to the packet loss information and the network constraint parameter of the packet loss information, so that the sending device can be effectively alleviated. The packet loss problem occurring during the RTP media stream transmission between the receiving device and the receiving device improves the transmission efficiency of the RTP media stream.
[161】本实施例中, 发送设备确定第一 RTP媒体流的丢包信息以及所述丢包信息对应的 网络约束参数, 根据所述丢包信息以及所述丢包信息对应的网络约束参数确定媒体编码 参数以及传输参数;所述发送设备根据所述媒体编码参数以及传输参数发送第二 RTP媒 体流,因此本发明实施例能够有效缓解发送设备和接收设备之间 RTP媒体流传输过程中 出现的丢包问题, 提高 RTP媒体流的传输效率。  [161] In this embodiment, the sending device determines the packet loss information of the first RTP media stream and the network constraint parameter corresponding to the packet loss information, and determines, according to the packet loss information and the network constraint parameter corresponding to the packet loss information. The media encoding parameter and the transmission parameter; the sending device sends the second RTP media stream according to the media encoding parameter and the transmission parameter, so the embodiment of the present invention can effectively alleviate the occurrence of the RTP media stream transmission between the sending device and the receiving device. The packet loss problem improves the transmission efficiency of the RTP media stream.
[162】参见图 4, 为本发明 RTP媒体流的传输装置第一实施例示意图, 该装置可以设置于 发送设备, 该装置 400包括: [162] Referring to FIG. 4, it is a schematic diagram of a first embodiment of a transmission apparatus for an RTP media stream according to the present invention. The apparatus may be disposed on a transmitting device, and the apparatus 400 includes:
[163】第一发送单元 410, 用于向接收设备发送第一 RTP媒体流;  [163] The first sending unit 410 is configured to send, to the receiving device, the first RTP media stream.
[164】第一接收单元 420, 用于接收所述接收设备发送的序号相关信息, 所述序号相关信 息为所述接收设备在一个反馈周期内接收到的所述第一发送单元 410发送的第一 RTP媒 体流中数据包的序号信息;  [164] The first receiving unit 420 is configured to receive sequence number related information that is sent by the receiving device, where the sequence number related information is sent by the first sending unit 410 that is received by the receiving device in a feedback period. Sequence number information of a data packet in an RTP media stream;
[165】丢包信息确定单元 430, 用于根据所述第一接收单元 420接收到的所述序号相关信 息、在所述反馈周期内所述第一发送单元 410实际发送的第一 RTP媒体流中数据包的序 号信息确定第一 RTP媒体流的丢包信息; [165] The packet loss information determining unit 430 is configured to receive the serial number related information according to the first receiving unit 420. The sequence number information of the data packet in the first RTP media stream that is actually sent by the first sending unit 410 in the feedback period determines the packet loss information of the first RTP media stream;
[166】参数确定单元 440, 用于根据所述丢包信息确定单元 430确定的所述丢包信息确定 待发送的第二 RTP媒体流的媒体编码参数以及传输参数;  [166] The parameter determining unit 440 is configured to determine, according to the packet loss information determined by the packet loss information determining unit 430, a media encoding parameter and a transmission parameter of the second RTP media stream to be sent.
[167】所述第一发送单元 410还用于: 根据所述参数确定单元 440确定的所述媒体编码参 数以及传输参数发送第二 RTP媒体流。  The first sending unit 410 is further configured to: send the second RTP media stream according to the media coding parameter and the transmission parameter determined by the parameter determining unit 440.
[168】优选地, 丢包信息确定单元 430具体可以包括:  [168] Preferably, the packet loss information determining unit 430 may specifically include:
[169】序列确定子单元, 用于根据所述序号相关信息以及在所述反馈周期内实际发送的数 据包的序号信息确定数据包的接收状态序列, 所述数据包的接收状态序列为按照数据包 的发送顺序记录的各个数据包是否丢包的信息;  [169] a sequence determining subunit, configured to determine, according to the sequence number related information and sequence number information of a data packet actually sent in the feedback period, a sequence of receiving states of the data packet, where the sequence of receiving states of the data packet is according to data Information about whether each packet recorded in the order of transmission of the packet is lost;
[170】原因确定子单元, 用于根据丢包的数据包在所述序列确定子单元确定的所述数据包 的接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配, 如果与随 机丢包特性匹配, 则确定媒体流的丢包信息为随机丢包; 否则, 确定媒体流的丢包信息 为带宽受限。  [170] a reason determining subunit, configured to determine, according to the location of the data packet of the packet loss in the sequence of receiving states of the data packet determined by the sequence determining subunit, whether the randomness of packet loss and random packet loss characteristics Matching, if it matches the random packet loss feature, it determines that the packet loss information of the media stream is a random packet loss; otherwise, it determines that the packet loss information of the media stream is bandwidth limited.
[171】优选地, 所述参数确定单元 440可以包括:  [171] Preferably, the parameter determining unit 440 may include:
[172】第一参数确定子单元, 用于根据确定的丢包信息以及所述数据包的接收状态序列确 定丢包信息对应的网络约束参数;  [172] a first parameter determining subunit, configured to determine a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the received state sequence of the data packet;
[173】第二参数确定子单元, 用于根据所述丢包信息以及所述第一参数确定子单元确定的 所述网络约束参数确定待发送的第二 RTP媒体流的媒体编码参数以及传输参数;  [173] a second parameter determining subunit, configured to determine, according to the packet loss information and the network constraint parameter determined by the first parameter determining subunit, a media encoding parameter and a transmission parameter of the second RTP media stream to be sent. ;
[174】当丢包信息为带宽受限时, 所述网络约束参数包括: 限制周期, 所述限制周期为所 述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长; 最 大流量, 所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数;  [174] When the packet loss information is limited in bandwidth, the network constraint parameter includes: a restriction period, where the data packet of the packet is continuously lost and the data of consecutive packet loss in the sequence of the received state of the data packet. The total transmission time of the packet; the maximum traffic, where the maximum traffic is the total number of bytes of consecutive unpacked packets in the serial number related information;
[175】当丢包信息为随机丢包时, 所述网络约束参数包括: 丢包率, 所述丢包率为所述数 据包的接收状态序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包的总 数。  [175] When the packet loss information is a random packet loss, the network constraint parameter includes: a packet loss rate, where the packet loss rate is the total number of packets lost in the received state sequence of the data packet divided by the data. The total number of packets in the receive status sequence of the packet.
[176】所述第一参数确定子单元具体可以用于:  [176] The first parameter determining subunit may be specifically used to:
[177]当丢包信息为带宽受限时, 将所述数据包的接收状态序列中连续未丢包的数据包和 连续丢包的数据包的总发送时长, 作为所述限制周期; 将所述序号相关信息中连续未丢 包的数据包的总字节数作为所述最大流量;  [177] When the packet loss information is limited in bandwidth, the total transmission duration of the continuously unpacked data packet and the continuously dropped packet in the reception status sequence of the data packet is taken as the limitation period; The total number of bytes of consecutive data packets that are not lost in the sequence number related information is used as the maximum traffic;
[178】当丢包信息为随机丢包时, 所述网络约束参数可以包括: 将所述数据包的接收状态 序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包的总数,得到丢包率。  [178] When the packet loss information is a random packet loss, the network constraint parameter may include: dividing a total number of data packets lost in the reception status sequence of the data packet by a data packet in a reception status sequence of the data packet. The total number of packets is obtained.
[179】当丢包信息为随机丢包时, 将所述数据包的接收状态序列中丢包的数据包总数除以 所述数据包的接收状态序列中数据包的总数, 得到所述丢包率。  [179] When the packet loss information is a random packet loss, the total number of data packets lost in the reception status sequence of the data packet is divided by the total number of data packets in the reception status sequence of the data packet, and the packet loss is obtained. rate.
[180】优选地, 第二参数确定子单元具体可以用于: [181】根据以下公式确定所述网络约束参数: [180] Preferably, the second parameter determining subunit is specifically applicable to: [181] The network constraint parameters are determined according to the following formula:
[182] max f(x,y) = g(x) + h(y); [182] max f(x, y) = g(x) + h(y) ;
[183] s.t. a(x,y) P [183] s.t. a(x,y) P
[184】其中, x表示媒体编码参数, y表示传输参数; g(x)表示媒体编码参数在无损网络下 能获得的媒体质量分数; h(y)表示基于所述传输参数对所述媒体质量分数的影响校对; f ( x, y) 表示所述媒体编码参数和传输参数在实际网络下获得的媒体质量分数; a(x,y) 表示媒体编码参数和传输参数对应的网络约束参数, P表示所述丢包信息对应的网络约 束参数。  [184] wherein x represents a media coding parameter, y represents a transmission parameter; g(x) represents a media quality score that the media coding parameter can obtain under a lossless network; h(y) represents the media quality based on the transmission parameter The influence of the score is proofread; f ( x, y) represents the media quality score obtained by the media coding parameter and the transmission parameter in the actual network; a(x, y) represents the network constraint parameter corresponding to the media coding parameter and the transmission parameter, P Indicates a network constraint parameter corresponding to the packet loss information.
[185】本实施例中, 确定媒体流的丢包信息, 根据所述丢包信息确定媒体编码参数以及传 输参数; 根据所述媒体编码参数以及传输参数发送第二 RTP媒体流, 因此能够有效缓解 发送设备和接收设备之间 RTP媒体流传输过程中的丢包问题, 提高 RTP媒体流的传输 效率。  [185] In this embodiment, determining packet loss information of the media stream, determining media coding parameters and transmission parameters according to the packet loss information, and transmitting the second RTP media stream according to the media coding parameter and the transmission parameter, thereby effectively alleviating The packet loss problem in the process of RTP media stream transmission between the sending device and the receiving device improves the transmission efficiency of the RTP media stream.
[186】参见图 5, 为本发明 RTP媒体流的传输装置第二实施例示意图, 该装置可以设置于 接收设备, 该装置 500包括: [186] FIG. 5 is a schematic diagram of a second embodiment of a transmission apparatus for an RTP media stream according to the present invention. The apparatus may be disposed on a receiving device, and the apparatus 500 includes:
[187】第二接收单元 510, 用于接收发送设备发送的第一 RTP媒体流;  [187] The second receiving unit 510 is configured to receive a first RTP media stream sent by the sending device.
[188】信息确定单元 520, 用于确定所述第二接收单元 510接收的 RTP媒体流的序号相关 信息, 所述序号相关信息为所述第二接收单元 510在一个反馈周期内接收到的第一 RTP 媒体流中数据包的序号信息; [188] The information determining unit 520 is configured to determine sequence number related information of the RTP media stream received by the second receiving unit 510, where the sequence number related information is received by the second receiving unit 510 in a feedback period. Sequence number information of a data packet in an RTP media stream;
[189】第二发送单元 530, 用于向所述发送设备发送所述信息确定单元 520确定的所述序 号相关信息, 以便所述发送设备根据所述序号相关信息、 在所述反馈周期内实际发送的 第一 RTP媒体流中数据包的序号信息确定第一 RTP媒体流的丢包信息的信息、 根据所 述丢包信息确定所述发送设备待发送的第二 RTP媒体流的媒体编码参数以及传输参数;  [189] The second sending unit 530 is configured to send the sequence number related information determined by the information determining unit 520 to the sending device, so that the sending device actually performs the feedback period according to the sequence number related information. The sequence number information of the data packet in the first RTP media stream is sent, the information about the packet loss information of the first RTP media stream is determined, and the media coding parameter of the second RTP media stream to be sent by the sending device is determined according to the packet loss information. Transmission parameter
[190】第二接收单元 510还用于: 接收所述发送设备根据所述媒体编码参数以及传输参数 发送第二 RTP媒体流。 The second receiving unit 510 is further configured to: receive, by the sending device, the second RTP media stream according to the media encoding parameter and the transmission parameter.
[191】优选地, 所述序号相关信息通过包配列位图实现, 所述信息确定单元 520具体可以 用于:  Preferably, the sequence number related information is implemented by using a packetized bitmap, and the information determining unit 520 may be specifically configured to:
[192】确定在一个反馈周期内接收到的第一 RTP媒体流中数据包的序号信息;  [192] determining sequence number information of the data packet in the first RTP media stream received in one feedback period;
[193】根据所述序号信息生成所述包排列位图。 [193] generating the packet arrangement bitmap according to the sequence number information.
[194】本实施例中, 根据在一个反馈周期内接收到的 RTP媒体流确定序号相关信息, 将 所述序号相关信息发送给所述发送设备, 以便所述发送设备根据所述序号相关信息、 在 所述反馈周期内实际发送的 RTP媒体流中数据包的序号信息确定媒体流的丢包信息、根 据所述丢包信息确定媒体编码参数以及传输参数, 之后接收发送设备根据确定的所述媒 体编码参数以及传输参数发送的第二 RTP媒体流,因此能够有效缓解发送设备和接收设 备之间 RTP媒体流传输过程中的丢包问题, 提高 RTP媒体流的传输效率。 [194] In this embodiment, the sequence number related information is determined according to the RTP media stream received in a feedback period, and the sequence number related information is sent to the sending device, so that the sending device is based on the sequence number related information, The sequence number information of the data packet in the RTP media stream that is actually sent in the feedback period determines the packet loss information of the media stream, determines the media coding parameter and the transmission parameter according to the packet loss information, and then receives the media according to the determined transmission device. Encoding parameters and a second RTP media stream transmitted by the transmission parameters, thereby effectively alleviating the transmitting device and the receiving device The packet loss problem during the RTP media stream transmission between backups improves the transmission efficiency of the RTP media stream.
[195】参见图 6, 为本发明 RTP媒体流的发送设备结构示意图, 该发送设备 600包括: 第 一处理器 610、 第一存储器 620、 第一收发器 630和第一总线 640; [195] FIG. 6 is a schematic structural diagram of a transmitting device of an RTP media stream according to the present invention. The transmitting device 600 includes: a first processor 610, a first memory 620, a first transceiver 630, and a first bus 640;
[196】第一处理器 610、 第一存储器 620、 第一收发器 630通过第一总线 640相互连接; 第一总线 640可以是 ISA总线、 PCI总线或 EISA总线等。 所述第一总线 640可以分为 地址总线、 数据总线、 控制总线等。 为便于表示, 图 6中仅用一条粗线表示, 但并不表 示仅有一根总线或一种类型的总线。 The first processor 610, the first memory 620, and the first transceiver 630 are connected to each other through a first bus 640; the first bus 640 may be an ISA bus, a PCI bus, or an EISA bus. The first bus 640 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 6, but it does not mean that there is only one bus or one type of bus.
[197】第一存储器 620, 用于存放程序, 所述程序用于实现图 1和图 3所示实施例中发送 设备执行的 RTP媒体流传输方法。 具体地, 程序可以包括程序代码, 所述程序代码包括 计算机操作指令。 第一存储器 620可能包含高速 RAM存储器, 也可能还包括非易失性 存储器 (non-volatile memory), 例如至少一个磁盘存储器。  The first memory 620 is configured to store a program, and the program is used to implement the RTP media stream transmission method performed by the transmitting device in the embodiment shown in FIG. 1 and FIG. In particular, the program can include program code, the program code including computer operating instructions. The first memory 620 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
[198】第一收发器 630用于连接其他设备, 如接收设备、 服务器和远端主机等, 并与其他 设备进行通信。 具体的, 第一收发器 630用于: 向接收设备发送第一 RTP媒体流; 接收 所述接收设备发送的序号相关信息, 所述序号相关信息为所述接收设备在一个反馈周期 内接收到的第一 RTP媒体流中数据包的序号信息;根据第一处理器 610确定的媒体编码 参数以及传输参数发送第二 RTP媒体流。  The first transceiver 630 is used to connect other devices, such as receiving devices, servers, and remote hosts, and to communicate with other devices. Specifically, the first transceiver 630 is configured to: send a first RTP media stream to the receiving device; receive sequence number related information sent by the receiving device, where the sequence number related information is received by the receiving device in a feedback period. Sequence number information of the data packet in the first RTP media stream; transmitting the second RTP media stream according to the media encoding parameter determined by the first processor 610 and the transmission parameter.
[199】第一处理器 610执行第一存储器 620中存储的所述程序代码, 用于根据所述第一收 发器 630接收到的所述序号相关信息、 所述第一收发器 630在所述反馈周期内实际发送 的第一 RTP媒体流中数据包的序号信息确定媒体流的丢包信息的信息;根据所述丢包信 息确定待发送的第二 RTP媒体流的媒体编码参数以及传输参数。  The first processor 610 executes the program code stored in the first memory 620, and the first transceiver 630 is configured according to the serial number related information received by the first transceiver 630. The sequence number information of the data packet in the first RTP media stream that is actually sent in the feedback period determines the information of the packet loss information of the media stream; and determines the media coding parameter and the transmission parameter of the second RTP media stream to be sent according to the packet loss information.
[200】优选地, 所述第一处理器 610具体可以用于: 根据所述序号相关信息以及在所述反 馈周期内实际发送的数据包的序号信息确定数据包的接收状态序列, 所述数据包的接收 状态序列为按照数据包的发送顺序记录的各个数据包是否丢包的信息; 根据丢包的数据 包在所述数据包的接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性 匹配, 如果与随机丢包特性匹配, 则确定媒体流的丢包信息为随机丢包; 否则, 确定媒 体流的丢包信息为带宽受限。  [00] Preferably, the first processor 610 is specifically configured to: determine, according to the sequence number related information and sequence number information of a data packet actually sent in the feedback period, a sequence of receiving status of the data packet, where the data is The receiving status sequence of the packet is information indicating whether each data packet is lost according to the sending order of the data packet; whether the randomness of the data packet loss is determined according to the position of the lost data packet in the receiving state sequence of the data packet If the random packet loss feature matches the random packet loss feature, the packet loss information of the media stream is determined to be random packet loss; otherwise, the packet loss information of the media stream is determined to be bandwidth limited.
[201】优选地, 所述第一处理器 610具体可以用于: 根据确定的丢包信息以及所述数据包 的接收状态序列确定丢包信息对应的网络约束参数;  Preferably, the first processor 610 is configured to: determine, according to the determined packet loss information and the received status sequence of the data packet, a network constraint parameter corresponding to the packet loss information;
[202】根据所述丢包信息以及所述网络约束参数确定待发送的第二 RTP媒体流的媒体编 码参数以及传输参数。  Determining, according to the packet loss information and the network constraint parameter, a media coding parameter and a transmission parameter of the second RTP media stream to be sent.
[203】其中, 当丢包信息为带宽受限时, 所述网络约束参数可以包括: 限制周期, 所述限 制周期为所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发 送时长; 最大流量, 所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节 数; [203] wherein, when the packet loss information is limited in bandwidth, the network constraint parameter may include: a restriction period, where the packet is continuously lost without packet loss in the sequence of receiving status of the data packet The total transmission duration of the data packet of the packet; the maximum traffic, the maximum traffic being the total byte of the consecutive undropped data packets in the sequence number related information Number
[204】当丢包信息为随机丢包时, 所述网络约束参数可以包括: 将所述数据包的接收状态 序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包的总数,得到丢包率。  [204] When the packet loss information is a random packet loss, the network constraint parameter may include: dividing a total number of data packets that are lost in the receiving state sequence of the data packet by a data packet in a receiving state sequence of the data packet. The total number of packets is obtained.
[205】优选地, 所述第一处理器 610具体可以用于: 当丢包信息为带宽受限时, 将所述数 据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长, 作为所 述限制周期;将所述序号相关信息中连续未丢包的数据包的总字节数作为所述最大流量; 当丢包信息为随机丢包时, 将所述数据包的接收状态序列中丢包的数据包总数除以所述 数据包的接收状态序列中数据包的总数, 得到所述丢包率。 [205] Preferably, the first processor 610 is specifically configured to: when the packet loss information is limited in bandwidth, the data packet of the received state sequence of the data packet is continuously unpacked and continuously lost. The total transmission duration of the data packet is used as the limitation period; the total number of bytes of consecutive data packets that are not lost in the sequence number related information is used as the maximum traffic volume; when the packet loss information is random packet loss, The packet loss rate is obtained by dividing the total number of packets lost in the received status sequence of the data packet by the total number of data packets in the received status sequence of the data packet.
[206】优选地, 所述第一处理器 610具体可以用于根据以下公式确定所述网络约束参数:  [206] Preferably, the first processor 610 is specifically configured to determine the network constraint parameter according to the following formula:
[207] max f(x,y) = g(x) + h(y); [207] max f(x, y) = g(x) + h(y) ;
[208] s.t. a(x,y) P [208] s.t. a(x,y) P
[209】其中, x表示媒体编码参数, y表示传输参数; g(x)表示媒体编码参数在无损网络下 能获得的媒体质量分数; h(y)表示基于所述传输参数对所述媒体质量分数的影响校对; f ( x, y) 表示所述媒体编码参数和传输参数在实际网络下获得的媒体质量分数; a(x,y) 表示媒体编码参数和传输参数对应的网络约束参数, P表示所述丢包信息对应的网络约 束参数。  [209] wherein x represents a media coding parameter, y represents a transmission parameter; g(x) represents a media quality score that the media coding parameter can obtain under a lossless network; h(y) represents the media quality based on the transmission parameter The influence of the score is proofread; f ( x, y) represents the media quality score obtained by the media coding parameter and the transmission parameter in the actual network; a(x, y) represents the network constraint parameter corresponding to the media coding parameter and the transmission parameter, P Indicates a network constraint parameter corresponding to the packet loss information.
[210】本实施例中, 发送设备确定第一 RTP媒体流的丢包信息; 根据所述丢包信息确定 媒体编码参数以及传输参数; 所述发送设备根据所述媒体编码参数以及传输参数发送第 二 RTP媒体流,因此本发明实施例能够针对不同的丢包信息而确定不同的媒体编码参数 以及传输参数, 从而能够有效缓解发送设备和接收设备之间 RTP媒体流的丢包问题, 提 高 RTP媒体流的传输效率。  [210] In this embodiment, the sending device determines packet loss information of the first RTP media stream, and determines a media encoding parameter and a transmission parameter according to the packet loss information. The sending device sends the packet according to the media encoding parameter and the transmission parameter. The second RTP media stream, so the embodiment of the present invention can determine different media coding parameters and transmission parameters for different packet loss information, thereby effectively alleviating the packet loss problem of the RTP media stream between the sending device and the receiving device, and improving the RTP media. The transmission efficiency of the stream.
[211】参见图 7,为本发明 RTP媒体流的接收设备结构示意图,该接收设备 700可以包括: 第二处理器 710、 第二存储器 720、 第二收发器 730和第二总线 740; [211] FIG. 7 is a schematic structural diagram of a receiving device of an RTP media stream according to the present invention. The receiving device 700 may include: a second processor 710, a second memory 720, a second transceiver 730, and a second bus 740;
[212】第二处理器 710、 第二存储器 720、 第二收发器 730通过第二总线 740相互连接; 第二总线 740可以是 ISA总线、 PCI总线或 EISA总线等。 所述第二总线 740可以分为 地址总线、 数据总线、 控制总线等。 为便于表示, 图 7中仅用一条粗线表示, 但并不表 示仅有一根总线或一种类型的总线。 The second processor 710, the second memory 720, and the second transceiver 730 are connected to each other through the second bus 740; the second bus 740 may be an ISA bus, a PCI bus or an EISA bus or the like. The second bus 740 can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 7, but it does not mean that there is only one bus or one type of bus.
[213】第二存储器 720, 用于存放程序, 所述程序用于实现图 2和图 3所示实施例中接收 设备执行的 RTP媒体流传输方法。 具体地, 程序可以包括程序代码, 所述程序代码包括 计算机操作指令。 第二存储器 720可能包含高速 RAM存储器, 也可能还包括非易失性 存储器 (non-volatile memory), 例如至少一个磁盘存储器。  [213] The second memory 720 is configured to store a program, and the program is used to implement the RTP media stream transmission method performed by the receiving device in the embodiment shown in FIG. 2 and FIG. In particular, the program can include program code, the program code including computer operating instructions. The second memory 720 may include a high speed RAM memory and may also include a non-volatile memory such as at least one disk memory.
[214】第二收发器 730用于连接其他设备, 如发送设备、 服务器和远端主机等, 并与其他 设备进行通信。 具体的, 第二收发器 730 用于接收发送设备发送的第一 RTP媒体流; 向所述发送设备发送序号相关信息, 以便所述发送设备根据所述序号相关信息、 在所述 反馈周期内实际发送的第一 RTP媒体流中数据包的序号信息确定第一 RTP媒体流的丢 包信息、根据所述丢包信息确定待发送的第二 RTP媒体流的媒体编码参数以及传输参数; 接收所述发送设备根据所述媒体编码参数以及传输参数发送的第二 RTP媒体流; The second transceiver 730 is configured to connect to other devices, such as a transmitting device, a server, a remote host, etc., and to communicate with other devices. Specifically, the second transceiver 730 is configured to receive the first RTP media stream sent by the sending device. And sending the sequence number related information to the sending device, so that the sending device determines, according to the sequence number related information, the sequence number information of the data packet in the first RTP media stream that is actually sent in the feedback period, the first RTP media stream is lost. Determining, according to the packet loss information, a media coding parameter and a transmission parameter of the second RTP media stream to be sent according to the packet loss information; receiving a second RTP media stream sent by the sending device according to the media coding parameter and the transmission parameter;
[215】所述第二处理器 710执行第二存储器 720中存储的所述程序代码, 用于: 根据所述 第二收发器 730在一个反馈周期内接收到的第一 RTP媒体流确定第一 RTP媒体流的序 号相关信息, 所述序号相关信息为所述第二收发器 730在一个反馈周期内接收到的第一 RTP媒体流中数据包的序号信息。 The second processor 710 executes the program code stored in the second memory 720, and is configured to: determine, according to the first RTP media stream received by the second transceiver 730 in one feedback period, the first The serial number related information of the RTP media stream, where the serial number related information is the serial number information of the data packet in the first RTP media stream received by the second transceiver 730 in one feedback period.
[216】优选地, 所述序号相关信息通过包配列位图实现, 所述所述第二处理器 710具体可 以用于: 确定在一个反馈周期内接收到的第一 RTP媒体流中数据包的序号信息; 根据所 述序号信息生成所述包排列位图。  [216] Preferably, the sequence number related information is implemented by using a packetized bitmap, and the second processor 710 is specifically configured to: determine, in a first RTP media stream received in a feedback period, a data packet. Sequence number information; generating the packet arrangement bitmap according to the sequence number information.
[217】本实施例中, 接收设备根据在一个反馈周期内接收到的第一 RTP媒体流中数据包 的序号信息生成序号相关信息, 将所述序号相关信息发送给所述发送设备, 以便所述发 送设备根据序号相关信息、在所述反馈周期内实际发送的第一 RTP媒体流中数据包的序 号信息确定 RTP媒体流的丢包信息、进而确定媒体编码参数以及传输参数, 之后发送设 备可以根据确定的所述媒体编码参数以及传输参数进行第二 RTP媒体流的发送,因此本 发明实施例能够有效缓解发送设备和接收设备之间媒体流的丢包问题,提高 RTP媒体流 的传输效率。  [217] In this embodiment, the receiving device generates sequence number related information according to the sequence number information of the data packet in the first RTP media stream received in a feedback period, and sends the sequence number related information to the sending device, so as to Determining, by the sending device, the packet loss information of the RTP media stream, and further determining the media coding parameter and the transmission parameter, according to the sequence number related information, the sequence number information of the data packet in the first RTP media stream actually sent in the feedback period, and then the sending device may The sending of the second RTP media stream is performed according to the determined media encoding parameter and the transmission parameter. Therefore, the embodiment of the present invention can effectively alleviate the packet loss problem of the media stream between the sending device and the receiving device, and improve the transmission efficiency of the RTP media stream.
[218】本发明实施例还提供一种实时传输协议 RTP媒体流的传输系统, 参见图 8所示, 该系统 800包括发送设备 810和接收设备 820, 其中, The embodiment of the present invention further provides a transmission system of a real-time transmission protocol RTP media stream. As shown in FIG. 8, the system 800 includes a transmitting device 810 and a receiving device 820, where
[219】所述发送设备 810, 用于向接收设备 820发送第一 RTP媒体流, 接收所述接收设备 820发送的序号相关信息, 所述序号相关信息为所述接收设备 820在一个反馈周期内接 收到的所述第一 RTP媒体流中数据包的序号信息, 根据所述序号相关信息、在所述反馈 周期内实际发送的所述第一 RTP媒体流中数据包的序号信息确定第一 RTP媒体流的丢 包信息,根据所述丢包信息确定待发送的第二 RTP媒体流的媒体编码参数以及传输参数, 并向所述接收设备发送所述第二 RTP媒体流;  The sending device 810 is configured to send the first RTP media stream to the receiving device 820, and receive the serial number related information sent by the receiving device 820, where the serial number related information is that the receiving device 820 is in a feedback period. Receiving the sequence number information of the data packet in the first RTP media stream, determining, according to the sequence number related information, the sequence number information of the data packet in the first RTP media stream actually sent in the feedback period, determining the first RTP a packet loss information of the media stream, determining, according to the packet loss information, a media coding parameter and a transmission parameter of the second RTP media stream to be sent, and sending the second RTP media stream to the receiving device;
[220】所述接收设备 820,用于接收发送设备 810发送的第一 RTP媒体流,确定第一 RTP 媒体流的序号相关信息, 所述序号相关信息为所述接收设备在一个反馈周期内接收到的 第一 RTP媒体流中数据包的序号信息, 向所述发送设备 810发送所述序号相关信息, 以 便所述发送设备根据所述序号相关信息及在所述反馈周期内实际发送的第一 RTP媒体 流中数据包的序号信息确定第一 RTP媒体流的丢包信息、根据所述丢包信息确定所述发 送设备 810待发送的第二 RTP媒体流的媒体编码参数以及传输参数,接收所述发送设备 810根据所述媒体编码参数以及传输参数发送的第二 RTP媒体流。 [221】优选地, 所述发送设备 810具体可以用于通过以下方式实现所述根据所述序号相关 信息、在所述反馈周期内实际发送的所述第一 RTP媒体流中数据包的序号信息确定第一 RTP媒体流的丢包信息: [220] The receiving device 820 is configured to receive a first RTP media stream sent by the sending device 810, and determine sequence number related information of the first RTP media stream, where the sequence number related information is received by the receiving device in a feedback period. The sequence number information of the data packet in the first RTP media stream is sent to the sending device 810, so that the sending device sends the first information related information according to the serial number related information and the first actually sent in the feedback period. The sequence number information of the data packet in the RTP media stream determines the packet loss information of the first RTP media stream, determines the media coding parameter and the transmission parameter of the second RTP media stream to be sent by the sending device 810 according to the packet loss information, and receives the The second RTP media stream sent by the sending device 810 according to the media encoding parameter and the transmission parameter. [221] Preferably, the sending device 810 is specifically configured to implement, according to the sequence number related information, the serial number information of the data packet in the first RTP media stream that is actually sent in the feedback period. Determining packet loss information of the first RTP media stream:
[222】根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定 数据包的接收状态序列, 所述数据包的接收状态序列为按照数据包的发送顺序记录的各 个数据包是否丢包的序列;  [222] determining a sequence of receiving status of the data packet according to the serial number related information and sequence number information of the data packet actually sent in the feedback period, where the receiving status sequence of the data packet is recorded according to the sending order of the data packet. The sequence of whether the packet is lost;
[223】所述发送设备根据丢包的数据包在所述接收状态序列中的位置判断数据包丢包的 随机性是否与随机丢包特性匹配;  [223] The sending device determines, according to the location of the packet loss packet in the receiving state sequence, whether the randomness of the packet loss matches the random packet loss characteristic;
[224】如果与随机丢包特性匹配, 确定 RTP媒体流的丢包信息为随机丢包;  [224] If the random packet loss characteristic is matched, the packet loss information of the RTP media stream is determined to be random packet loss;
[225】如果与随机丢包特性不匹配, 确定 RTP媒体流的丢包信息为带宽受限。  [225] If the random packet loss feature does not match, it is determined that the packet loss information of the RTP media stream is bandwidth limited.
[226】优选地, 所述发送设备 810具体可以用于通过以下方式实现所述根据所述丢包信息 确定待发送的第二 RTP媒体流的媒体编码参数以及传输参数:  [226] Preferably, the sending device 810 is specifically configured to: according to the packet loss information, determine, according to the packet loss information, a media encoding parameter and a transmission parameter of a second RTP media stream to be sent:
[227】根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约 束参数;  [227] determining network constraint parameters corresponding to the packet loss information according to the determined packet loss information and the received status sequence of the data packet;
[228】根据所述丢包信息以及所述网络约束参数确定待发送的第二 RTP媒体流的媒体编 码参数以及传输参数;  Determining, according to the packet loss information and the network constraint parameter, a media coding parameter and a transmission parameter of the second RTP media stream to be sent;
[229】当丢包信息为带宽受限时, 所述网络约束参数包括: 限制周期, 所述限制周期为所 述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长; 最 大流量, 所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数;  [229] When the packet loss information is limited in bandwidth, the network constraint parameter includes: a restriction period, where the data packet of the packet is continuously lost and the data of consecutive packet loss in the sequence of receiving status of the data packet. The total transmission time of the packet; the maximum traffic, where the maximum traffic is the total number of bytes of consecutive unpacked packets in the serial number related information;
[230】当丢包信息为随机丢包时, 所述网络约束参数包括: 丢包率, 所述丢包率为所述数 据包的接收状态序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包的总 数。  [230] When the packet loss information is a random packet loss, the network constraint parameter includes: a packet loss rate, where the packet loss rate is the total number of packets lost in the received state sequence of the data packet divided by the data. The total number of packets in the receive status sequence of the packet.
[231】本实施例中, 接收设备根据在一个反馈周期内接收到的第一 RTP媒体流中数据包 的序号信息生成序号相关信息, 将所述序号相关信息发送给所述发送设备, 以便所述发 送设备根据序号相关信息、在所述反馈周期内实际发送的第一 RTP媒体流中数据包的序 号信息确定 RTP媒体流的丢包信息、进而确定媒体编码参数以及传输参数, 之后发送设 备可以根据确定的所述媒体编码参数以及传输参数进行第二 RTP媒体流的发送,因此本 发明实施例能够有效缓解发送设备和接收设备之间媒体流的丢包问题,提高 RTP媒体流 的传输效率。  [231] In this embodiment, the receiving device generates sequence number related information according to the sequence number information of the data packet in the first RTP media stream received in a feedback period, and sends the sequence number related information to the sending device, so as to Determining, by the sending device, the packet loss information of the RTP media stream, and further determining the media coding parameter and the transmission parameter, according to the sequence number related information, the sequence number information of the data packet in the first RTP media stream actually sent in the feedback period, and then the sending device may The sending of the second RTP media stream is performed according to the determined media encoding parameter and the transmission parameter. Therefore, the embodiment of the present invention can effectively alleviate the packet loss problem of the media stream between the sending device and the receiving device, and improve the transmission efficiency of the RTP media stream.
[232】本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的 通用硬件平台的方式来实现。 基于这样的理解, 本发明实施例中的技术方案本质上或者 说对现有技术做出贡献的部分可以以软件产品的形式体现出来, 该计算机软件产品可以 存储在存储介质中, 如 ROM/RAM、 磁碟、 光盘等, 包括若干指令用以使得一台计算机 设备 (可以是个人计算机, 服务器, 或者网络设备等) 执行本发明各个实施例或者实施 例的某些部分所述的方法。 It will be apparent to those skilled in the art that the techniques in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, and the computer software product may be stored in a storage medium such as a ROM/RAM. , disk, CD, etc., including a number of instructions to make a computer The device (which may be a personal computer, server, or network device, etc.) performs the methods described in various embodiments of the present invention or in certain portions of the embodiments.
[233】本说明书中的各个实施例均采用递进的方式描述, 各个实施例之间相同相似的部分 互相参见即可, 每个实施例重点说明的都是与其他实施例的不同之处。 尤其, 对于系统 实施例而言, 由于其基本相似于方法实施例, 所以描述的比较简单, 相关之处参见方法 实施例的部分说明即可。  Each of the embodiments in the present specification is described in a progressive manner, and the same or similar portions between the various embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
[234】以上所述的本发明实施方式, 并不构成对本发明保护范围的限定。 任何在本发明的 精神和原则之内所作的修改、 等同替换和改进等, 均应包含在本发明的保护范围之内。  The above described embodiments of the invention are not intended to limit the scope of the invention. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims

1、 一种实时传输协议 RTP媒体流的传输方法, 其特征在于, 包括: 1. A real-time transmission protocol RTP media stream transmission method, which is characterized by including:
发送设备向接收设备发送第一 RTP媒体流; The sending device sends the first RTP media stream to the receiving device;
接收所述接收设备发送的序号相关信息, 所述序号相关信息为所述接收设备在一 个反馈周期内接收到的所述第一 RTP媒体流中数据包的序号信息; Receive sequence number related information sent by the receiving device, where the sequence number related information is the sequence number information of the data packet in the first RTP media stream received by the receiving device within a feedback cycle;
根据所述序号相关信息、 在所述反馈周期内实际发送的所述第一 RTP媒体流中数 据包的序号信息确定第一 RTP媒体流的丢包信息; Determine the packet loss information of the first RTP media stream based on the sequence number related information and the sequence number information of the data packets in the first RTP media stream actually sent within the feedback period;
根据所述丢包信息确定待发送的第二 RTP媒体流的媒体编码参数以及传输参数, 并向所述接收设备发送所述第二 RTP媒体流。 Determine media encoding parameters and transmission parameters of the second RTP media stream to be sent based on the packet loss information, and send the second RTP media stream to the receiving device.
2、 根据权利要求 1所述的方法, 其特征在于, 所述根据所述序号相关信息、 在所 述反馈周期内实际发送的所述第一 RTP媒体流中数据包的序号信息确定第一 RTP媒体流 的丢包信息, 包括: 2. The method according to claim 1, wherein the first RTP is determined based on the sequence number related information and the sequence number information of the data packets in the first RTP media stream actually sent during the feedback period. Packet loss information of media streams, including:
根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定 数据包的接收状态序列,所述数据包的接收状态序列为按照数据包的发送顺序记录的各 个数据包是否丢包的序列; The reception status sequence of the data packet is determined based on the sequence number related information and the sequence number information of the data packet actually sent within the feedback period. The reception status sequence of the data packet is whether each data packet is recorded according to the sending order of the data packet. The sequence of packet loss;
所述发送设备根据丢包的数据包在所述接收状态序列中的位置判断数据包丢包的 随机性是否与随机丢包特性匹配; The sending device determines whether the randomness of the data packet loss matches the random packet loss characteristics based on the position of the lost data packet in the reception status sequence;
如果与随机丢包特性匹配, 确定 RTP媒体流的丢包信息为随机丢包; If it matches the random packet loss characteristics, determine that the packet loss information of the RTP media stream is random packet loss;
如果与随机丢包特性不匹配, 确定 RTP媒体流的丢包信息为带宽受限。 If it does not match the random packet loss characteristics, determine that the packet loss information of the RTP media stream is bandwidth limited.
3、根据权利要求 1或 2所述的方法, 其特征在于, 所述根据所述丢包信息确定待 发送的第二 RTP媒体流的媒体编码参数以及传输参数, 包括: 3. The method according to claim 1 or 2, characterized in that, determining the media encoding parameters and transmission parameters of the second RTP media stream to be sent based on the packet loss information includes:
根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约 束参数; Determine the network constraint parameters corresponding to the packet loss information according to the determined packet loss information and the reception status sequence of the data packet;
根据所述丢包信息以及所述网络约束参数确定待发送的第二 RTP媒体流的媒体编 码参数以及传输参数; Determine the media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information and the network constraint parameters;
当丢包信息为带宽受限时, 所述网络约束参数包括: 限制周期, 所述限制周期为 所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长; 最大流量, 所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数; 当丢包信息为随机丢包时, 所述网络约束参数包括: 丢包率, 所述丢包率为所述 数据包的接收状态序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包 的总数。 When the packet loss information indicates that the bandwidth is limited, the network constraint parameters include: a limit period, which is the total number of consecutive non-lost data packets and consecutive packet loss data packets in the reception status sequence of the data packets. Transmission duration; Maximum flow rate, the maximum flow rate is the total number of bytes of consecutive unlost data packets in the sequence number related information; When the packet loss information is random packet loss, the network constraint parameters include: Packet loss rate , the packet loss rate is the The total number of lost packets in the packet's receive status sequence is divided by the total number of packets in the packet's receive status sequence.
4、根据权利要求 3所述的方法, 其特征在于, 所述根据所述丢包信息以及所述网 络约束参数确定待发送的第二 RTP媒体流的媒体编码参数以及传输参数, 包括: 4. The method according to claim 3, wherein determining the media encoding parameters and transmission parameters of the second RTP media stream to be sent based on the packet loss information and the network constraint parameters includes:
根据以下公式确定所述媒体编码参数以及传输参数: The media encoding parameters and transmission parameters are determined according to the following formula:
max f(x,y) = g(x) + h(y); max f(x,y) = g(x) + h(y);
s.t. a(x,y) P s.t. a(x,y) P
其中, x表示媒体编码参数, y表示传输参数; g(x)表示媒体编码参数在无损网络 下能获得的媒体质量分数; h(y)表示基于所述传输参数对所述媒体质量分数的影响校对; f ( x, y )表示所述媒体编码参数和传输参数在实际网络下获得的媒体质量分数; a(x,y) 表示媒体编码参数和传输参数对应的网络约束参数, P表示所述丢包信息对应的网络约 束参数。 Where, x represents the media coding parameters, y represents the transmission parameters; g(x) represents the media quality score that can be obtained by the media coding parameters under the lossless network; h(y) represents the impact on the media quality score based on the transmission parameters. Proofreading; f (x, y) represents the media quality score obtained by the media coding parameters and transmission parameters under the actual network; a (x, y) represents the network constraint parameters corresponding to the media coding parameters and transmission parameters, and P represents the Network constraint parameters corresponding to packet loss information.
5、 一种实时传输协议 RTP媒体流的传输方法, 其特征在于, 包括: 5. A real-time transmission protocol RTP media stream transmission method, which is characterized by including:
接收设备接收发送设备发送的第一 RTP媒体流; The receiving device receives the first RTP media stream sent by the sending device;
确定第一 RTP媒体流的序号相关信息, 所述序号相关信息为所述接收设备在一个 反馈周期内接收到的第一 RTP媒体流中数据包的序号信息; Determine the sequence number related information of the first RTP media stream, where the sequence number related information is the sequence number information of the data packet in the first RTP media stream received by the receiving device within a feedback cycle;
向所述发送设备发送所述序号相关信息, 以便所述发送设备根据所述序号相关信 息及在所述反馈周期内实际发送的第一 RTP媒体流中数据包的序号信息确定第一 RTP 媒体流的丢包信息、根据所述丢包信息确定所述发送设备待发送的第二 RTP媒体流的媒 体编码参数以及传输参数; Send the sequence number related information to the sending device, so that the sending device determines the first RTP media stream based on the sequence number related information and the sequence number information of the data packet in the first RTP media stream actually sent within the feedback period. packet loss information, and determining the media encoding parameters and transmission parameters of the second RTP media stream to be sent by the sending device according to the packet loss information;
接收所述发送设备根据所述媒体编码参数以及传输参数发送的第二 RTP媒体流。 Receive the second RTP media stream sent by the sending device according to the media encoding parameters and transmission parameters.
6、根据权利要求 5所述的方法, 其特征在于, 所述序号相关信息通过包配列位图 实现, 所述确定第一 RTP媒体流的序号相关信息包括: 6. The method according to claim 5, characterized in that, the sequence number related information is implemented through a packet allocation column bitmap, and the determining the sequence number related information of the first RTP media stream includes:
确定在一个反馈周期内接收到的第一 RTP媒体流中数据包的序号信息; Determine the sequence number information of the data packet in the first RTP media stream received within a feedback cycle;
根据所述序号信息生成所述包排列位图。 The packet arrangement bitmap is generated according to the sequence number information.
7、 一种实时传输协议 RTP媒体流的传输装置, 其特征在于, 包括: 7. A real-time transmission protocol RTP media stream transmission device, which is characterized by including:
第一发送单元, 用于向接收设备发送第一 RTP媒体流; The first sending unit is used to send the first RTP media stream to the receiving device;
第一接收单元, 用于接收所述接收设备发送的序号相关信息, 所述序号相关信息 为所述接收设备在一个反馈周期内接收到的第一 RTP媒体流中数据包的序号信息; 丢包信息确定单元, 用于根据所述第一接收单元接收到的所述序号相关信息、 在 所述反馈周期内所述第一发送单元实际发送的第一 RTP媒体流中数据包的序号信息确 定第一 RTP媒体流的丢包信息; The first receiving unit is configured to receive sequence number related information sent by the receiving device, where the sequence number related information is the sequence number information of the data packet in the first RTP media stream received by the receiving device within a feedback cycle; Packet loss information determination unit, configured to determine based on the sequence number related information received by the first receiving unit and the sequence number information of the data packet in the first RTP media stream actually sent by the first sending unit during the feedback period. Determine the packet loss information of the first RTP media stream;
参数确定单元, 用于根据所述丢包信息确定待发送的第二 RTP媒体流的媒体编码 参数以及传输参数; A parameter determination unit, configured to determine the media encoding parameters and transmission parameters of the second RTP media stream to be sent based on the packet loss information;
所述第一发送单元还用于: 发送所述第二 RTP媒体流。 The first sending unit is also used to: send the second RTP media stream.
8、 根据权利要求 7所述的装置, 其特征在于, 丢包信息确定单元包括: 序列确定子单元, 用于根据所述序号相关信息以及在所述反馈周期内实际发送的 数据包的序号信息确定数据包的接收状态序列,所述数据包的接收状态序列为按照数据 包的发送顺序记录的各个数据包是否丢包的序列; 8. The device according to claim 7, wherein the packet loss information determination unit includes: a sequence determination subunit, configured to determine based on the sequence number related information and the sequence number information of the data packet actually sent within the feedback period. Determine the reception status sequence of the data packet, which is the sequence of whether each data packet is lost according to the sending order of the data packet;
原因确定子单元, 用于根据丢包的数据包在所述序列确定子单元确定的所述数据 包的接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配,如果与 随机丢包特性匹配, 则确定媒体流的丢包信息为随机丢包; 否则, 确定媒体流的丢包信 息为带宽受限。 The cause determination subunit is used to determine whether the randomness of the data packet loss matches the random packet loss characteristics based on the position of the lost data packet in the reception status sequence of the data packet determined by the sequence determination subunit. If If it matches the random packet loss characteristics, it is determined that the packet loss information of the media stream is random packet loss; otherwise, it is determined that the packet loss information of the media stream is bandwidth limited.
9、 根据权利要求 7或 8所述的装置, 其特征在于, 所述参数确定单元包括: 第一参数确定子单元, 用于根据确定的丢包信息以及所述数据包的接收状态序列 确定丢包信息对应的网络约束参数; 9. The device according to claim 7 or 8, characterized in that the parameter determination unit includes: a first parameter determination sub-unit, configured to determine the loss based on the determined packet loss information and the reception status sequence of the data packet. Network constraint parameters corresponding to packet information;
第二参数确定子单元, 用于根据所述丢包信息以及所述第一参数确定子单元确定 的所述网络约束参数确定待发送的第二 RTP媒体流的媒体编码参数以及传输参数; 当丢包信息为带宽受限时, 所述网络约束参数包括: 限制周期, 所述限制周期为 所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长; 最大流量, 所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数; 当丢包信息为随机丢包时, 所述网络约束参数包括: 丢包率, 所述丢包率为所述 数据包的接收状态序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包 的总数。 The second parameter determination subunit is configured to determine the media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information and the network constraint parameters determined by the first parameter determination subunit; When the packet information is bandwidth limited, the network constraint parameters include: a limit period, which is the total sending time of consecutive non-lost data packets and consecutive lost data packets in the reception status sequence of the data packets. ; Maximum flow, the maximum flow is the total number of bytes of consecutive unlost data packets in the sequence number related information; When the packet loss information is random packet loss, the network constraint parameters include: Packet loss rate, so The packet loss rate is the total number of lost data packets in the reception status sequence of the data packet divided by the total number of data packets in the reception status sequence of the data packet.
10、 根据权利要求 9所述的装置, 其特征在于, 第二参数确定子单元具体用于: 根据以下公式确定所述媒体编码参数以及传输参数: 10. The device according to claim 9, wherein the second parameter determination subunit is specifically configured to: determine the media encoding parameters and transmission parameters according to the following formula:
max f(x,y) = g(x) + h(y); max f(x,y) = g(x) + h(y);
s.t. a(x,y) P s.t. a(x,y) P
其中, x表示媒体编码参数, y表示传输参数; g(x)表示媒体编码参数在无损网络 下能获得的媒体质量分数; h(y)表示基于所述传输参数对所述媒体质量分数的影响校对; f ( x, y )表示所述媒体编码参数和传输参数在实际网络下获得的媒体质量分数; a(x,y) 表示媒体编码参数和传输参数对应的网络约束参数, P表示所述丢包信息对应的网络约 束参数。 Among them, x represents the media coding parameters, y represents the transmission parameters; g(x) represents the media coding parameters in the lossless network. The media quality score that can be obtained under the actual network; h (y) represents the proofreading based on the impact of the transmission parameters on the media quality score; f (x, y) represents the media obtained under the actual network with the media encoding parameters and transmission parameters Quality score; a(x, y) represents the network constraint parameters corresponding to the media encoding parameters and transmission parameters, and P represents the network constraint parameters corresponding to the packet loss information.
11、 一种实时传输协议 RTP媒体流的传输装置, 其特征在于, 包括: 11. A real-time transmission protocol RTP media stream transmission device, which is characterized by including:
第二接收单元, 用于接收发送设备发送的第一 RTP媒体流; The second receiving unit is used to receive the first RTP media stream sent by the sending device;
信息确定单元, 用于确定所述第二接收单元接收的第一 RTP媒体流的序号相关信 息,所述序号相关信息为所述第二接收单元在一个反馈周期内接收到的第一 RTP媒体流 中数据包的序号信息; An information determining unit, configured to determine sequence number related information of the first RTP media stream received by the second receiving unit, where the sequence number related information is the first RTP media stream received by the second receiving unit within a feedback cycle. The sequence number information of the data packet;
第二发送单元, 用于向所述发送设备发送所述信息确定单元确定的所述序号相关 信息, 以便所述发送设备根据所述序号相关信息及在所述反馈周期内实际发送的第一 RTP媒体流中数据包的序号信息确定第一 RTP媒体流的丢包信息、根据所述丢包信息确 定所述发送设备待发送的第二 RTP媒体流的媒体编码参数以及传输参数; The second sending unit is configured to send the sequence number related information determined by the information determining unit to the sending device, so that the sending device can determine the sequence number based on the sequence number related information and the first RTP actually sent within the feedback period. The sequence number information of the data packets in the media stream determines the packet loss information of the first RTP media stream, and determines the media encoding parameters and transmission parameters of the second RTP media stream to be sent by the sending device based on the packet loss information;
所述第二接收单元还用于: 接收所述发送设备根据所述媒体编码参数以及传输参 数发送的第二 RTP媒体流。 The second receiving unit is also configured to: receive a second RTP media stream sent by the sending device according to the media encoding parameters and transmission parameters.
12、根据权利要求 11所述的装置, 其特征在于, 所述序号相关信息通过包配列位 图实现, 所述信息确定单元具体用于: 12. The device according to claim 11, characterized in that, the serial number related information is implemented by packing a column bitmap, and the information determination unit is specifically used to:
确定在一个反馈周期内接收到的第一 RTP媒体流中数据包的序号信息; Determine the sequence number information of the data packet in the first RTP media stream received within a feedback cycle;
根据所述序号信息生成所述包排列位图。 The packet arrangement bitmap is generated according to the sequence number information.
13、 一种实时传输协议 RTP媒体流的传输系统, 其特征在于, 包括发送设备和接 收设备, 其中, 13. A real-time transmission protocol RTP media stream transmission system, characterized by including a sending device and a receiving device, wherein,
所述发送设备, 用于向接收设备发送第一 RTP媒体流, 接收所述接收设备发送的 序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的所述第一 RTP媒体流中数据包的序号信息, 根据所述序号相关信息、 在所述反馈周期内实际发送 的所述第一 RTP媒体流中数据包的序号信息确定第一 RTP媒体流的丢包信息,根据所述 丢包信息确定待发送的第二 RTP媒体流的媒体编码参数以及传输参数,并向所述接收设 备发送所述第二 RTP媒体流; The sending device is configured to send the first RTP media stream to the receiving device, and receive the sequence number related information sent by the receiving device, where the sequence number related information is the first RTP media stream received by the receiving device within a feedback cycle. The sequence number information of the data packets in the RTP media stream, determining the packet loss information of the first RTP media stream based on the sequence number related information and the sequence number information of the data packets in the first RTP media stream actually sent within the feedback period, Determine the media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information, and send the second RTP media stream to the receiving device;
所述接收设备, 用于接收发送设备发送的第一 RTP媒体流, 确定第一 RTP媒体流 的序号相关信息, 所述序号相关信息为所述接收设备在一个反馈周期内接收到的第一 RTP媒体流中数据包的序号信息, 向所述发送设备发送所述序号相关信息, 以便所述发 送设备根据所述序号相关信息及在所述反馈周期内实际发送的第一 RTP媒体流中数据 包的序号信息确定第一 RTP媒体流的丢包信息、根据所述丢包信息确定所述发送设备待 发送的第二 RTP媒体流的媒体编码参数以及传输参数,接收所述发送设备根据所述媒体 编码参数以及传输参数发送的第二 RTP媒体流。 The receiving device is configured to receive the first RTP media stream sent by the sending device, and determine the sequence number related information of the first RTP media stream. The sequence number related information is the first RTP received by the receiving device within a feedback cycle. Sequence number information of the data packet in the media stream, and send the sequence number related information to the sending device so that the sending device The sending device determines the packet loss information of the first RTP media stream based on the sequence number related information and the sequence number information of the data packet in the first RTP media stream actually sent within the feedback period, and determines the sending device based on the packet loss information. Media encoding parameters and transmission parameters of the second RTP media stream to be sent by the device, and receiving the second RTP media stream sent by the sending device according to the media encoding parameters and transmission parameters.
14、根据权利要求 13所述的系统, 其特征在于, 所述发送设备具体用于通过以下 方式实现所述根据所述序号相关信息、在所述反馈周期内实际发送的所述第一 RTP媒体 流中数据包的序号信息确定第一 RTP媒体流的丢包信息: 14. The system according to claim 13, wherein the sending device is specifically configured to implement the first RTP media actually sent within the feedback period according to the sequence number related information in the following manner: The sequence number information of the data packets in the stream determines the packet loss information of the first RTP media stream:
根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定 数据包的接收状态序列,所述数据包的接收状态序列为按照数据包的发送顺序记录的各 个数据包是否丢包的序列; The reception status sequence of the data packet is determined based on the sequence number related information and the sequence number information of the data packet actually sent within the feedback period. The reception status sequence of the data packet is whether each data packet is recorded according to the sending order of the data packet. The sequence of packet loss;
所述发送设备根据丢包的数据包在所述接收状态序列中的位置判断数据包丢包的 随机性是否与随机丢包特性匹配; The sending device determines whether the randomness of the data packet loss matches the random packet loss characteristics based on the position of the lost data packet in the reception status sequence;
如果与随机丢包特性匹配, 确定 RTP媒体流的丢包信息为随机丢包; If it matches the random packet loss characteristics, determine that the packet loss information of the RTP media stream is random packet loss;
如果与随机丢包特性不匹配, 确定 RTP媒体流的丢包信息为带宽受限。 If it does not match the random packet loss characteristics, determine that the packet loss information of the RTP media stream is bandwidth limited.
15、 根据权利要求 13或 14所述的系统, 其特征在于, 所述发送设备具体用于通 过以下方式实现所述根据所述丢包信息确定待发送的第二 RTP媒体流的媒体编码参数 以及传输参数: 15. The system according to claim 13 or 14, wherein the sending device is specifically configured to determine the media encoding parameters of the second RTP media stream to be sent according to the packet loss information in the following manner; Transmission parameters:
根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约 束参数; Determine the network constraint parameters corresponding to the packet loss information according to the determined packet loss information and the reception status sequence of the data packet;
根据所述丢包信息以及所述网络约束参数确定待发送的第二 RTP媒体流的媒体编 码参数以及传输参数; Determine the media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information and the network constraint parameters;
当丢包信息为带宽受限时, 所述网络约束参数包括: 限制周期, 所述限制周期为 所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长; 最大流量, 所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数; 当丢包信息为随机丢包时, 所述网络约束参数包括: 丢包率, 所述丢包率为所述 数据包的接收状态序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包 的总数。 When the packet loss information indicates that the bandwidth is limited, the network constraint parameters include: a limit period, which is the total number of consecutive non-lost data packets and consecutive packet loss data packets in the reception status sequence of the data packets. Transmission duration; Maximum flow rate, the maximum flow rate is the total number of bytes of consecutive unlost data packets in the sequence number related information; When the packet loss information is random packet loss, the network constraint parameters include: Packet loss rate , the packet loss rate is the total number of lost data packets in the reception status sequence of the data packet divided by the total number of data packets in the reception status sequence of the data packet.
PCT/CN2013/084907 2013-03-27 2013-10-09 Method and apparatus for transmitting rtp media stream WO2014153944A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310101268.XA CN103167359B (en) 2013-03-27 2013-03-27 The transmission method of RTP Media Stream and device
CN201310101268.X 2013-03-27

Publications (1)

Publication Number Publication Date
WO2014153944A1 true WO2014153944A1 (en) 2014-10-02

Family

ID=48590045

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/084907 WO2014153944A1 (en) 2013-03-27 2013-10-09 Method and apparatus for transmitting rtp media stream

Country Status (2)

Country Link
CN (1) CN103167359B (en)
WO (1) WO2014153944A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112019307A (en) * 2019-05-30 2020-12-01 广州云积软件技术有限公司 Data processing method and device for national education examination online patrol system
CN113473111A (en) * 2021-05-29 2021-10-01 江苏网进科技股份有限公司 Method for detecting video blocking phenomenon based on rtsp protocol

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103167359B (en) * 2013-03-27 2016-03-02 华为技术有限公司 The transmission method of RTP Media Stream and device
CN104283850B (en) * 2013-07-05 2017-06-20 中国移动通信集团浙江有限公司 A kind of network internal Media Stream integrality determination methods and system
CN105227552A (en) * 2015-09-25 2016-01-06 重庆邮电大学 A kind of TD-LTE emergency terminal speech service quality support method
US10516892B2 (en) 2015-09-28 2019-12-24 Cybrook Inc. Initial bandwidth estimation for real-time video transmission
US10756997B2 (en) 2015-09-28 2020-08-25 Cybrook Inc. Bandwidth adjustment for real-time video transmission
US10506257B2 (en) 2015-09-28 2019-12-10 Cybrook Inc. Method and system of video processing with back channel message management
CN106101702B (en) * 2015-12-29 2019-08-09 苏州踪视通信息技术有限公司 Video coding and decoding with reverse channel message management
CN108632681B (en) * 2017-03-21 2020-04-03 华为技术有限公司 Method, server and terminal for playing media stream
CN111245665B (en) * 2018-11-28 2021-10-29 中国移动通信集团山东有限公司 Voice perception evaluation method based on RTP
CN110213623B (en) * 2019-06-03 2021-08-06 上海哔哩哔哩科技有限公司 Video uploading method, video uploading device and computer readable storage medium
CN114070459B (en) * 2020-08-04 2023-11-07 成都鼎桥通信技术有限公司 Data transmission method, device, terminal equipment and storage medium
CN116781975B (en) * 2023-08-17 2024-02-06 中仪英斯泰克科技有限公司 Media stream detection method, device, terminal equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1640076A (en) * 2002-03-06 2005-07-13 惠普公司 Medium streaming distribution system
CN101030832A (en) * 2006-03-03 2007-09-05 华为技术有限公司 Method and system for realizing realtime transmission protocol message redundancy
CN103167359A (en) * 2013-03-27 2013-06-19 华为技术有限公司 Method and device for transmitting real-time transport protocol (RTP) media stream

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101150763B (en) * 2007-10-18 2012-06-06 中兴通讯股份有限公司 A terminal and method for testing real time service transmission performance of WiMAX network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1640076A (en) * 2002-03-06 2005-07-13 惠普公司 Medium streaming distribution system
CN101030832A (en) * 2006-03-03 2007-09-05 华为技术有限公司 Method and system for realizing realtime transmission protocol message redundancy
CN103167359A (en) * 2013-03-27 2013-06-19 华为技术有限公司 Method and device for transmitting real-time transport protocol (RTP) media stream

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112019307A (en) * 2019-05-30 2020-12-01 广州云积软件技术有限公司 Data processing method and device for national education examination online patrol system
CN113473111A (en) * 2021-05-29 2021-10-01 江苏网进科技股份有限公司 Method for detecting video blocking phenomenon based on rtsp protocol

Also Published As

Publication number Publication date
CN103167359B (en) 2016-03-02
CN103167359A (en) 2013-06-19

Similar Documents

Publication Publication Date Title
WO2014153944A1 (en) Method and apparatus for transmitting rtp media stream
US10542064B2 (en) Method, server side and system for computing bandwidth of network transmission of streaming media
CN109923809B (en) Encoding and decoding method using forward error correction, and encoding and decoding system
JP5164123B2 (en) System and method for improving throughput
CN110943800B (en) Data packet sending method, device and system, storage medium and electronic device
CN110192394B (en) Method and server for transmitting media content through network
US20070098016A1 (en) System and method for improving robust header compression (ROHC) efficiency
US9264333B1 (en) Checksum trailer in timing protocols
WO2017045528A1 (en) Method, device and system for multicast transmission
WO2012129922A1 (en) Packet handling method, forwarding device and system
US9344374B2 (en) Network congestion control
CN108282402B (en) Packet scattering method based on coding in data center network
Larzon et al. Efficient use of wireless bandwidth for multimedia applications
WO2017097201A1 (en) Data transmission method, transmission device and receiving device
US9866350B2 (en) Streaming media packet processing method, WiFi chip, and mobile terminal
CN111385055B (en) Data transmission method and device
CN110545161B (en) Multimedia data real-time transmission method with redundancy
KR20230002784A (en) Methods and servers for transmitting audio and/or video content
US9967306B1 (en) Prioritized transmission of redundancy data for packetized voice communication
WO2009087774A1 (en) Network card and information processor
WO2012103722A1 (en) Reception method and apparatus, transmission method and apparatus, and processing system for rtp media data
US20150063103A1 (en) Bandwidth-dependent compressor for robust header compression and method of use thereof
JP2008028767A (en) Network card and information processor
WO2013086671A1 (en) Rtp media data processing method and device
EP3161983A1 (en) Method for communicating media data between two devices incorporating effectiveness of error correction strategies and associated computer program, communication quality module and device

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

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

Country of ref document: EP

Kind code of ref document: A1