CN103167359B - The transmission method of RTP Media Stream and device - Google Patents

The transmission method of RTP Media Stream and device Download PDF

Info

Publication number
CN103167359B
CN103167359B CN201310101268.XA CN201310101268A CN103167359B CN 103167359 B CN103167359 B CN 103167359B CN 201310101268 A CN201310101268 A CN 201310101268A CN 103167359 B CN103167359 B CN 103167359B
Authority
CN
China
Prior art keywords
packet loss
media stream
information
rtp media
sequence number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310101268.XA
Other languages
Chinese (zh)
Other versions
CN103167359A (en
Inventor
郑波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201310101268.XA priority Critical patent/CN103167359B/en
Publication of CN103167359A publication Critical patent/CN103167359A/en
Priority to PCT/CN2013/084907 priority patent/WO2014153944A1/en
Application granted granted Critical
Publication of CN103167359B publication Critical patent/CN103167359B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例公开了一种RTP媒体流的传输方法及装置,该方法包括:发送设备向接收设备发送第一RTP媒体流;所述发送设备接收所述接收设备发送的序号相关信息;所述发送设备根据所述序号相关信息、在反馈周期内实际发送的第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息;所述发送设备根据所述丢包信息确定媒体编码参数以及传输参数;所述发送设备根据所述媒体编码参数以及传输参数发送第二RTP媒体流。本发明实施例能够有效缓解发送设备和接收设备之间传输RTP媒体流时出现的丢包问题,提高RTP媒体流的传输效率。

The embodiment of the present invention discloses a method and device for transmitting an RTP media stream. The method includes: a sending device sends a first RTP media stream to a receiving device; the sending device receives serial number related information sent by the receiving device; the The sending device determines the packet loss information of the first RTP media stream 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; the sending device determines the media packet loss information according to the packet loss information Coding parameters and transmission parameters; the sending device sends the second RTP media stream according to the media coding parameters and transmission parameters. The embodiments of the present invention can effectively alleviate the packet loss problem when transmitting RTP media streams between the sending device and the receiving device, and improve the transmission efficiency of the RTP media streams.

Description

RTP媒体流的传输方法及装置Transmission method and device of RTP media stream

技术领域technical field

本发明涉及通信领域,尤其涉及RTP媒体流的传输方法及装置。The invention relates to the communication field, in particular to a method and device for transmitting RTP media streams.

背景技术Background technique

实时传输协议(Real-timeTransportProtocol,简称RTP)是在网络互连协议(InternetProtocol,简称IP)上实现媒体流数据实时传输的一种网络协议。RTP协议包括RTP数据协议和RTP控制协议(Real-timeTransportControlProtocol,简称RTCP)。Real-time Transport Protocol (RTP for short) is a network protocol that realizes real-time transmission of media stream data on the Internet Protocol (Internet Protocol, IP for short). The RTP protocol includes the RTP data protocol and the RTP control protocol (Real-timeTransportControlProtocol, RTCP for short).

现有技术中,采用RTP协议进行RTP媒体流的传输时,RTP媒体流在发送设备和接收设备之间的传输过程包括:发送设备向接收设备发送RTP媒体流;接收设备统计预设周期内接收到的RTP媒体流中数据包的数量,向发送设备发送RTCP反馈消息,所述RTCP反馈消息中携带所述数据包的数量;所述发送设备根据所述预设周期内发送的RTP媒体流中数据包的数量以及所述RTCP反馈消息中携带的所述数据包的数量调整所述传输参数,例如冗余参数、冗余包格式等;发送设备根据调整后的传输参数向接收设备发送RTP媒体流。In the prior art, when the RTP protocol is used to transmit the RTP media stream, 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 received RTP media stream sends an RTCP feedback message to the sending device, and the RTCP feedback message carries the number of data packets; The number of data packets and the number of data packets carried in the RTCP feedback message adjust the transmission parameters, such as redundant parameters, redundant packet formats, etc.; the sending device sends RTP media to the receiving device according to the adjusted transmission parameters flow.

但是,上述RTP媒体流的传输方法无法有效解决发送设备和接收设备之间传输RTP媒体流时出现的丢包问题,RTP媒体流的传输效率低。However, the above method for transmitting the RTP media stream cannot effectively solve the problem of packet loss when transmitting the RTP media stream between the sending device and the receiving device, and the transmission efficiency of the RTP media stream is low.

发明内容Contents of the invention

本发明实施例中提供了一种RTP媒体流的传输方法及装置,能够有效缓解发送设备和接收设备之间传输RTP媒体流时出现的丢包问题,提高RTP媒体流的传输效率。Embodiments of the present invention provide a method and device for transmitting RTP media streams, which can effectively alleviate the problem of packet loss when transmitting RTP media streams between a sending device and a receiving device, and improve the transmission efficiency of RTP media streams.

第一方面,本发明实施例提供一种实时传输协议RTP媒体流的传输方法,包括:In a first aspect, an embodiment of the present invention provides a method for transmitting a real-time transport protocol RTP media stream, including:

发送设备向接收设备发送第一RTP媒体流;The sending device sends the first RTP media stream to the receiving device;

接收所述接收设备发送的序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的所述第一RTP媒体流中数据包的序号信息;receiving 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 one feedback cycle;

根据所述序号相关信息、在所述反馈周期内实际发送的所述第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息;Determine the packet loss information of the first RTP media stream according to the sequence number related information and the sequence number information of the data packets in the first RTP media stream actually sent in the feedback period;

根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数,并向所述接收设备发送所述第二RTP媒体流。Determine 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媒体流的丢包信息,包括:With reference to the first aspect above, in the first possible implementation of the first aspect, the sequence number information of the data packets in the first RTP media stream actually sent in the feedback period according to the sequence number related information Determining the packet loss information of the first RTP media stream, including:

根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定数据包的接收状态序列,所述数据包的接收状态序列为按照数据包的发送顺序记录的各个数据包是否丢包的序列;Determine the receiving state sequence of the data packet according to the sequence number related information and the sequence number information of the data packet actually sent in the feedback cycle, the receiving state sequence of the data packet is whether each data packet recorded according to the sending order of the data packet is The sequence of packet loss;

所述发送设备根据丢包的数据包在所述接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配;The sending device determines whether the randomness of the packet loss matches the random packet loss characteristic according to the position of the packet loss packet in the receiving state sequence;

如果与随机丢包特性匹配,确定RTP媒体流的丢包信息为随机丢包;If it matches the random packet loss feature, 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 feature, determine that the packet loss information of the RTP media stream is bandwidth limited.

结合上述第一方面,和/或,第一方面第一种可能的实现方式,在第一方面第二种可能的实现方式中,所述根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数,包括:In combination with the above first aspect, and/or, the first possible implementation manner of the first aspect, in the second possible implementation manner of the first aspect, determining the second RTP media to be sent according to the packet loss information Stream media encoding parameters and transmission parameters, including:

根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约束参数;determining a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the receiving state sequence of the data packet;

根据所述丢包信息以及所述网络约束参数确定待发送的第二RTP媒体流的媒体编码参数以及传输参数;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 parameters;

当丢包信息为带宽受限时,所述网络约束参数包括:限制周期,所述限制周期为所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长;最大流量,所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数;When the packet loss information is that the bandwidth is limited, the network constraint parameters include: a limit cycle, the limit cycle is the total number of consecutive non-lost data packets and continuous packet loss data packets in the receiving state sequence of the data packets The length of sending; the maximum flow, the maximum flow is the total number of bytes of the continuous unlost data packets in the serial 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 divided by the total number of data packets lost in the receiving state sequence of the data packets divided by the reception of the data packets The total number of packets in the state sequence.

结合上述第一方面第二种可能的实现方式,在第一方面第三种可能的实现方式中,所述根据所述丢包信息以及所述网络约束参数确定待发送的第二RTP媒体流的媒体编码参数以及传输参数,包括:With reference to the second possible implementation of the first aspect above, in the third possible implementation of the first aspect, the determining of the second RTP media stream to be sent according to the packet loss information and the network constraint parameters Media encoding parameters and transmission parameters, including:

根据以下公式确定所述媒体编码参数以及传输参数:Determine the media encoding parameters and transmission parameters according to the following formula:

maxf(x,y)=g(x)+h(y);maxf(x,y)=g(x)+h(y);

s.t.a(x,y)≤Ps.t.a(x,y)≤P

其中,x表示媒体编码参数,y表示传输参数;g(x)表示媒体编码参数在无损网络下能获得的媒体质量分数;h(y)表示基于所述传输参数对所述媒体质量分数的影响校对;f(x,y)表示所述媒体编码参数和传输参数在实际网络下获得的媒体质量分数;a(x,y)表示媒体编码参数和传输参数对应的网络约束参数,P表示所述丢包信息对应的网络约束参数。Wherein, x represents a media coding parameter, y represents a transmission parameter; g(x) represents the media quality score that the media coding parameter can obtain under a lossless network; h(y) represents the influence based on the transmission parameter on the media quality score Proofreading; f(x, y) represents the media quality score obtained by the media encoding 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.

第二方面,本发明实施例提供一种实时传输协议RTP媒体流的传输方法,包括:In a second aspect, embodiments of the present invention provide a method for transmitting a real-time transport protocol RTP media stream, including:

接收设备接收发送设备发送的第一RTP媒体流;The receiving device receives the first RTP media stream sent by the sending device;

确定第一RTP媒体流的序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;Determine the serial number related information of the first RTP media stream, 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 within a feedback cycle;

向所述发送设备发送所述序号相关信息,以便所述发送设备根据所述序号相关信息及在所述反馈周期内实际发送的第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息、根据所述丢包信息确定所述发送设备待发送的第二RTP媒体流的媒体编码参数以及传输参数;Sending the sequence number related information to the sending device, so that the sending device determines the first RTP media stream according to the sequence number related information and the sequence number information of the data packets in the first RTP media stream actually sent in the feedback period Packet loss information, determining 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 parameter and the transmission parameter.

结合上述第二方面,在第二方面第一种可能的实现方式中,所述序号相关信息通过包配列位图实现,所述确定第一RTP媒体流的序号相关信息包括:In conjunction with the second aspect above, in the first possible implementation of the second aspect, the serial number-related information is implemented by using a packet configuration bitmap, and the determination of the serial 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 in a feedback cycle;

根据所述序号信息生成所述包排列位图。The packet arrangement bitmap is generated according to the sequence number information.

第三方面,本发明实施例提供一种实时传输协议RTP媒体流的传输装置,包括:In a third aspect, an embodiment of the present invention provides a transmission device for a real-time transport protocol RTP media stream, including:

第一发送单元,用于向接收设备发送第一RTP媒体流;a first sending unit, configured to send a first RTP media stream to a receiving device;

第一接收单元,用于接收所述接收设备发送的序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;A first receiving unit, 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 one feedback cycle;

丢包信息确定单元,用于根据所述第一接收单元接收到的所述序号相关信息、在所述反馈周期内所述第一发送单元实际发送的第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息;A packet loss information determining unit, configured to, according to the sequence number related information received by the first receiving unit, the sequence number information of the data packet in the first RTP media stream actually sent by the first sending unit within the feedback period Determine the packet loss information of the first RTP media stream;

参数确定单元,用于根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数;A parameter determination unit, configured to determine media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information;

所述第一发送单元还用于:发送所述第二RTP媒体流。The first sending unit is further configured to: send the second RTP media stream.

结合上述第三方面,在第三方面第一种可能的实现方式中,丢包信息确定单元包括:In combination with the third aspect above, in the first possible implementation of the third aspect, the packet loss information determination unit includes:

序列确定子单元,用于根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定数据包的接收状态序列,所述数据包的接收状态序列为按照数据包的发送顺序记录的各个数据包是否丢包的序列;A sequence determining subunit, configured to determine the receiving state sequence of data packets according to the sequence number related information and the sequence number information of the data packets actually sent in the feedback period, and the receiving state sequence of the data packets is according to the sending state of the data packets Sequence of whether each data packet recorded in sequence is lost or not;

原因确定子单元,用于根据丢包的数据包在所述序列确定子单元确定的所述数据包的接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配,如果与随机丢包特性匹配,则确定媒体流的丢包信息为随机丢包;否则,确定媒体流的丢包信息为带宽受限。The cause determination subunit is used to determine whether the randomness of the packet loss matches the random packet loss characteristic according to the position of the lost packet in the receiving state sequence of the packet determined by the sequence determination subunit, if If it matches the random packet loss characteristic, 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.

结合上述第三方面,和/或第三方面第一种可能的实现方式,在第三方面第二种可能的实现方式中,所述参数确定单元包括:In combination with the third aspect above, and/or the first possible implementation manner of the third aspect, in the second possible implementation manner of the third aspect, the parameter determination unit includes:

第一参数确定子单元,用于根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约束参数;The first parameter determination subunit is configured to determine a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the receiving state sequence of the data packet;

第二参数确定子单元,用于根据所述丢包信息以及所述第一参数确定子单元确定的所述网络约束参数确定待发送的第二RTP媒体流的媒体编码参数以及传输参数;A second parameter determination 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 parameters determined by the first parameter determination subunit;

当丢包信息为带宽受限时,所述网络约束参数包括:限制周期,所述限制周期为所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长;最大流量,所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数;When the packet loss information is that the bandwidth is limited, the network constraint parameters include: a limit cycle, the limit cycle is the total number of consecutive non-lost data packets and continuous packet loss data packets in the receiving state sequence of the data packets The length of sending; the maximum flow, the maximum flow is the total number of bytes of the continuous unlost data packets in the serial 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 divided by the total number of data packets lost in the receiving state sequence of the data packets divided by the reception of the data packets The total number of packets in the state sequence.

结合上述第三方面第二种可能的实现方式,在第三方面第三种可能的实现方式中,第二参数确定子单元具体用于:In combination with the second possible implementation of the third aspect above, in the third possible implementation of the third aspect, the second parameter determination subunit is specifically used for:

根据以下公式确定所述媒体编码参数以及传输参数:Determine the media encoding parameters and transmission parameters according to the following formula:

maxf(x,y)=g(x)+h(y);maxf(x,y)=g(x)+h(y);

s.t.a(x,y)≤Ps.t.a(x,y)≤P

其中,x表示媒体编码参数,y表示传输参数;g(x)表示媒体编码参数在无损网络下能获得的媒体质量分数;h(y)表示基于所述传输参数对所述媒体质量分数的影响校对;f(x,y)表示所述媒体编码参数和传输参数在实际网络下获得的媒体质量分数;a(x,y)表示媒体编码参数和传输参数对应的网络约束参数,P表示所述丢包信息对应的网络约束参数。Wherein, x represents a media coding parameter, y represents a transmission parameter; g(x) represents the media quality score that the media coding parameter can obtain under a lossless network; h(y) represents the influence based on the transmission parameter on the media quality score Proofreading; f(x, y) represents the media quality score obtained by the media encoding 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.

第四方面,本发明实施例提供一种实时传输协议RTP媒体流的传输装置,包括:In a fourth aspect, the embodiment of the present invention provides a real-time transport protocol RTP media stream transmission device, including:

第二接收单元,用于接收发送设备发送的第一RTP媒体流;The second receiving unit is configured to receive the first RTP media stream sent by the sending device;

信息确定单元,用于确定所述第二接收单元接收的第一RTP媒体流的序号相关信息,所述序号相关信息为所述第二接收单元在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;An information determination 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 serial number information of the data packet;

第二发送单元,用于向所述发送设备发送所述信息确定单元确定的所述序号相关信息,以便所述发送设备根据所述序号相关信息及在所述反馈周期内实际发送的第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息、根据所述丢包信息确定所述发送设备待发送的第二RTP媒体流的媒体编码参数以及传输参数;A second sending unit, configured to send the sequence number related information determined by the information determining unit to the sending device, so that the sending device can use the sequence number related information and the first RTP actually sent in 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 according to the packet loss information;

所述第二接收单元还用于:接收所述发送设备根据所述媒体编码参数以及传输参数发送的第二RTP媒体流。The second receiving unit is further configured to: receive a second RTP media stream sent by the sending device according to the media encoding parameters and transmission parameters.

结合上述第四方面,在第四方面第一种可能的实现方式中,所述序号相关信息通过包配列位图实现,所述信息确定单元具体用于:In combination with the fourth aspect above, in the first possible implementation of the fourth aspect, the serial number-related information is realized by including a column bitmap, and the information determining unit is specifically configured to:

确定在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;Determine the sequence number information of the data packet in the first RTP media stream received in a feedback cycle;

根据所述序号信息生成所述包排列位图。The packet arrangement bitmap is generated according to the sequence number information.

第五方面,本发明实施例提供一种实时传输协议RTP媒体流的传输系统,包括发送设备和接收设备,其中,In the fifth aspect, an embodiment of the present invention provides a real-time transport protocol RTP media stream transmission system, including a sending device and a receiving device, wherein,

所述发送设备,用于向接收设备发送第一RTP媒体流,接收所述接收设备发送的序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的所述第一RTP媒体流中数据包的序号信息,根据所述序号相关信息、在所述反馈周期内实际发送的所述第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息,根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数,并向所述接收设备发送所述第二RTP媒体流;The sending device is configured to send a first RTP media stream to a receiving device, and receive 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 packet in the RTP media stream, 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 cycle, determine the packet loss information of the first RTP media stream, determining media encoding parameters and transmission parameters 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;

所述接收设备,用于接收发送设备发送的第一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, where the sequence number related information is the first RTP received by the receiving device within a feedback cycle The 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 can use the sequence number related information and the data packet in the first RTP media stream actually sent in the feedback period The sequence number information of the first RTP media stream determines the packet loss information of the first RTP media stream, determines 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, and receives the sending device according to the media The encoding parameters and the second RTP media stream sent by the transmission parameters.

结合上述第五方面,在第五方面第一种可能的实现方式中,所述发送设备具体用于通过以下方式实现所述根据所述序号相关信息、在所述反馈周期内实际发送的所述第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息:With reference to the fifth aspect above, in a first possible implementation manner of the fifth aspect, the sending device is specifically configured to realize the actual sending of the information in the feedback period according to the sequence number related information in the following manner: The sequence number information of data packet in the first RTP media stream determines the packet loss information of the first RTP media stream:

根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定数据包的接收状态序列,所述数据包的接收状态序列为按照数据包的发送顺序记录的各个数据包是否丢包的序列;Determine the receiving state sequence of the data packet according to the sequence number related information and the sequence number information of the data packet actually sent in the feedback cycle, the receiving state sequence of the data packet is whether each data packet recorded according to the sending order of the data packet is The sequence of packet loss;

所述发送设备根据丢包的数据包在所述接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配;The sending device determines whether the randomness of the packet loss matches the random packet loss characteristic according to the position of the packet loss packet in the receiving state sequence;

如果与随机丢包特性匹配,确定RTP媒体流的丢包信息为随机丢包;If it matches the random packet loss feature, 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 feature, determine that the packet loss information of the RTP media stream is bandwidth limited.

结合上述第五方面,和/或第五方面第一种可能的实现方式,在第五方面第二种可能的实现方式中,所述发送设备具体用于通过以下方式实现所述根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数:With reference to the fifth aspect above, 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 information determines the media encoding parameters and transmission parameters of the second RTP media stream to be sent:

根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约束参数;determining a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the receiving state sequence of the data packet;

根据所述丢包信息以及所述网络约束参数确定待发送的第二RTP媒体流的媒体编码参数以及传输参数;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 parameters;

当丢包信息为带宽受限时,所述网络约束参数包括:限制周期,所述限制周期为所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长;最大流量,所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数;When the packet loss information is that the bandwidth is limited, the network constraint parameters include: a limit cycle, the limit cycle is the total number of consecutive non-lost data packets and continuous packet loss data packets in the receiving state sequence of the data packets The length of sending; the maximum flow, the maximum flow is the total number of bytes of the continuous unlost data packets in the serial 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 divided by the total number of data packets lost in the receiving state sequence of the data packets divided by the reception of the data packets The total number of packets in the state sequence.

本发明实施例中,发送设备向接收设备发送第一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; receives the serial number related information sent by the receiving device, and the serial number related information is the first RTP media stream received by the receiving device within a feedback period The sequence number information of the data packet in an RTP media stream; determine the packet loss information of the first RTP media stream 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 ; 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. Thus, the sending device determines the packet loss information of the first RTP media stream, and determines the media encoding parameters and transmission parameters according to the packet loss information; the sending device sends the second RTP media stream according to the media encoding parameters and transmission parameters, so the present invention The embodiment can effectively alleviate the problem of packet loss 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.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the accompanying drawings required in the embodiments. Obviously, the accompanying drawings in the following description are only some of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1为本发明RTP媒体流的传输方法第一实施例示意图;Fig. 1 is the schematic diagram of the first embodiment of the transmission method of RTP media stream of the present invention;

图2为本发明RTP媒体流的传输方法第二实施例示意图;Fig. 2 is the schematic diagram of the second embodiment of the transmission method of RTP media stream of the present invention;

图3为本发明RTP媒体流的传输方法第三实施例示意图;Fig. 3 is the schematic diagram of the third embodiment of the transmission method of RTP media stream of the present invention;

图4为本发明RTP媒体流的传输装置第一实施例示意图;FIG. 4 is a schematic diagram of a first embodiment of an RTP media stream transmission device according to the present invention;

图5为本发明RTP媒体流的传输装置第二实施例示意图;5 is a schematic diagram of a second embodiment of an RTP media stream transmission device of the present invention;

图6为本发明RTP媒体流的发送设备结构示意图;Fig. 6 is a schematic structural diagram of the sending device of the RTP media stream of the present invention;

图7为本发明RTP媒体流的接收设备结构示意图;FIG. 7 is a schematic structural diagram of a receiving device for an RTP media stream of the present invention;

图8为本发明RTP媒体流的传输系统结构示意图。FIG. 8 is a schematic structural diagram of the transmission system of the RTP media stream according to the present invention.

具体实施方式detailed description

通过分析发现,在RTP媒体流的传输过程中造成数据包丢包的原因不尽相同,不同的丢包原因需要采用不同的措施去克服。如果没有准确甄别丢包原因,发送设备对传输参数的调整很可能适得其反。比如如果发送设备与传输设备之间传输媒体流的带宽受限,可提供的带宽小于RTP媒体流实际上行带宽造成数据包丢包时,如果采用冗余编码如前向纠错编码(FEC,ForwardErrorCorrection)后,会加大RTP媒体流的实际上行带宽,导致RTP媒体流的发送需要更多的带宽资源,从而加剧数据包丢包;或者,当丢包原因是随机丢包时,如果减少发送设备的RTP媒体流的流量,并不能保证发送设备发送的RTP媒体流能更有效传输至接收设备。可见,甄别数据包的丢包原因,是解决发送设备和接收设备之间RTP媒体流传输过程中出现的丢包问题、提高RTP媒体流的传输效率的核心。但是,现有技术中RTP媒体流传输方法仅对传输参数进行调整,显然只能在某些特定的情况或凑巧的场合下才能有效解决发送设备和接收设备之间RTP媒体流传输过程中的丢包问题,在大多数情况下都无法有效解决发送设备和接收设备之间RTP媒体流传输过程中的丢包问题。Through analysis, it is found that the causes of packet loss during the transmission of RTP media streams are different, and different causes of packet loss require different measures to overcome. If the cause of packet loss is not accurately identified, the adjustment of transmission parameters by the sending device may be counterproductive. For example, if the media stream transmission bandwidth between the sending device and the transmission device is limited, and the available bandwidth is less than the actual upstream bandwidth of the RTP media stream, causing data packet loss, if redundant coding such as forward error correction coding (FEC, ForwardErrorCorrection ), it will increase the actual uplink bandwidth of the RTP media stream, causing the transmission of the RTP media stream to require more bandwidth resources, thereby aggravating packet loss; or, when the cause of packet loss is random packet loss, if the sending device The flow rate of the RTP media stream does not guarantee that the RTP media stream sent by the sending device can be more effectively transmitted to the receiving device. It can be seen that identifying the cause of data packet loss is the core of solving the problem of packet loss in the process of RTP media stream transmission between the sending device and the receiving device and improving the transmission efficiency of the RTP media stream. However, the RTP media stream transmission method in the prior art only adjusts the transmission parameters, which obviously can only effectively solve the loss in the RTP media stream transmission process between the sending device and the receiving device in some specific situations or occasions. In most cases, it cannot effectively solve the packet loss problem during the RTP media stream transmission between the sending device and the receiving device.

有鉴于此,本发明实施例提供的RTP媒体流传输方法中,确定RTP媒体流的丢包信息,根据所述丢包信息确定媒体编码参数以及传输参数,从而有效缓解发送设备和接收设备之间RTP媒体流传输过程中出现的丢包问题,提高RTP媒体流的传输效率。In view of this, in the RTP media stream transmission method provided by the embodiment of the present invention, the packet loss information of the RTP media stream is determined, and the media encoding parameters and transmission parameters are determined according to the packet loss information, thereby effectively alleviating the tension between the sending device and the receiving device. The problem of packet loss in the process of RTP media stream transmission improves the transmission efficiency of RTP media stream.

其中,本发明实施例所称之发送设备是指发送RTP媒体流的设备,接收设备是指接收RTP媒体流的设备,并不用以限定所述发送设备是否能够发送和接收RTP媒体流之外的其他数据、所述接收设备是否能够发送和接收RTP媒体流之外的其他数据。Wherein, the sending device referred to in the embodiment of the present invention refers to the device sending the RTP media stream, and the receiving device refers to the device receiving the RTP media stream, and is not intended to limit whether the sending device can send and receive RTP media streams. Other data, whether the receiving device can send and receive other data than the RTP media stream.

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有付出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

参见图1,为本发明RTP媒体流的传输方法第一实施例示意图,该方法可以应用于发送设备,该方法包括:Referring to Fig. 1, it is a schematic diagram of the first embodiment of the transmission method of the RTP media stream of the present invention, the method can be applied to the sending device, and the method includes:

步骤101:发送设备向接收设备发送第一RTP媒体流;Step 101: the sending device sends the first RTP media stream to the receiving device;

步骤102:所述发送设备接收所述接收设备发送的序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;Step 102: The sending device receives the serial number related information sent by the receiving device, and 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 within one feedback period;

其中,所述接收设备可以通过RTCP反馈消息等消息向所述发送设备发送所述序号相关信息。Wherein, the receiving device may send the serial number related information to the sending device through a message such as an RTCP feedback message.

其中,所述序号相关信息可以包括:接收设备在一个反馈周期内接收到的RTP媒体流中数据包的序号信息,或者,包排列位图;所述包排列位图可以由接收设备在一个反馈周期内接收到的RTP媒体流中数据包的序号信息生成。Wherein, the sequence number related information may include: the sequence number information of the data packet in the RTP media stream received by the receiving device within one feedback cycle, or the packet arrangement bitmap; the packet arrangement bitmap may be fed back by the receiving device The sequence number information of the data packet in the RTP media stream received in the cycle is generated.

步骤103:所述发送设备根据所述序号相关信息、在所述反馈周期内实际发送的RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息;Step 103: The sending device determines the packet loss information of the first RTP media stream according to the sequence number related information and the sequence number information of the data packets in the RTP media stream actually sent in the feedback period;

所述丢包信息是用于记录RTP媒体流丢包原因的信息。The packet loss information is information for recording the cause of RTP media stream packet loss.

步骤104:所述发送设备根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数,并向所述接收设备发送所述第二RTP媒体流。Step 104: The sending device determines media encoding parameters and transmission parameters 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.

其中,所述第一RTP媒体流和第二RTP媒体流均为RTP媒体流,所述第一、第二仅用于区分步骤101和步骤104中的RTP媒体流。Wherein, the first RTP media stream and the second RTP media stream are both RTP media streams, and the first and second RTP media streams are only used to distinguish the RTP media streams in step 101 and step 104 .

所述第一RTP媒体流和第二RTP媒体流可以为相同或不同的RTP媒体流。一般的,所述第一RTP媒体流和第二RTP媒体流不同,且第二RTP媒体流是第一RTP媒体流后续的媒体流,从而通过根据在前的第一RTP媒体流的传输确定媒体编码参数和传输参数,再使用确定的所述媒体流编码参数和传输参数进行后续RTP媒体流的传输。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 subsequent media stream of the first RTP media stream, so that the media can be determined according to the transmission of the previous first RTP media stream encoding parameters and transmission parameters, and then use the determined media stream encoding parameters and transmission parameters to perform subsequent RTP media stream transmission.

本实施例中,发送设备确定第一RTP媒体流的丢包信息,根据所述丢包信息确定媒体编码参数以及传输参数;所述发送设备根据所述媒体编码参数以及传输参数发送第二RTP媒体流,因此本发明实施例能够针对不同的丢包原因而确定不同的媒体编码参数以及传输参数,从而能够有效缓解发送设备和接收设备之间RTP媒体流的丢包问题,提高RTP媒体流的传输效率。In this embodiment, the sending device determines packet loss information of the first RTP media stream, and determines media encoding parameters and transmission parameters according to the packet loss information; the sending device sends the second RTP media stream according to the media encoding parameters and transmission parameters Therefore, 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 transmission of the RTP media stream efficiency.

参见图2,为本发明RTP媒体流的传输方法第二实施例示意图,该方法可以应用于接收设备,该方法包括:Referring to Fig. 2, it is a schematic diagram of the second embodiment of the transmission method of the RTP media stream of the present invention, the method can be applied to a receiving device, and the method includes:

步骤201:接收设备接收发送设备发送的第一RTP媒体流;Step 201: the receiving device receives the first RTP media stream sent by the sending device;

步骤202:接收设备确定第一RTP媒体流的序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;Step 202: The receiving device determines the sequence number related information of the first RTP media stream, and 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 one feedback cycle;

其中,序号相关信息包括接收设备在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息时,序号相关信息中可以直接包括各个数据包的序号;Wherein, when 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 within a feedback cycle, the serial number related information may directly include the serial number of each data packet;

或者,所述序号相关信息包括包排列位图时,接收设备确定RTP媒体流的序号相关信息可以包括:接收设备确定在一个反馈周期内接收到的RTP媒体流中数据包的序号信息;接收设备根据所述序号信息生成包排列位图。Or, when the sequence number related information includes a packet arrangement bitmap, the receiving device determines that the sequence number related information of the RTP media stream may include: the receiving device determines the sequence number information of the data packet in the RTP media stream received within a feedback cycle; the receiving device A packet arrangement bitmap is generated according to the sequence number information.

步骤203:接收设备向所述发送设备所述序号相关信息,以便所述发送设备根据所述序号相关信息、在所述反馈周期内实际发送的第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息、根据所述丢包信息确定所述发送设备待发送的第二RTP媒体流的媒体编码参数以及传输参数;Step 203: The receiving device sends the sequence number related information to the sending device, so that the sending device determines the sequence number information of the data packet in the first RTP media stream actually sent in the feedback period according to the sequence number related information Packet loss information of an RTP media stream, determining media encoding parameters and transmission parameters of a second RTP media stream to be sent by the sending device according to the packet loss information;

步骤204:所述接收设备接收所述发送设备根据所述媒体编码参数以及传输参数发送的第二RTP媒体流。Step 204: The receiving device receives the second RTP media stream sent by the sending device according to the media encoding parameters and transmission parameters.

本实施例中,接收设备根据在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息确定序号相关信息,将所述序号相关信息发送给所述发送设备,以便所述发送设备根据所述序号相关信息、在所述反馈周期内实际发送的RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息、进而确定媒体编码参数以及传输参数,之后发送设备可以根据确定的所述媒体编码参数以及传输参数进行第二RTP媒体流的发送,因此本发明实施例能够有效缓解发送设备和接收设备之间媒体流的丢包问题,提高RTP媒体流的传输效率。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 within one feedback cycle, and sends the sequence number related information to the sending device, so that the sending device Determine the packet loss information of the first RTP media stream according to the serial number related information and the serial number information of the data packets in the RTP media stream actually sent in the feedback period, and then determine the media encoding parameters and transmission parameters, and then the sending device can be based on The determined media encoding parameters and transmission parameters are used to send the second RTP media stream, so 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.

参见图3,为本发明RTP媒体流传输方法第三实施例示意图,该方法包括:Referring to Fig. 3, it is a schematic diagram of the third embodiment of the RTP media stream transmission method of the present invention, the method includes:

步骤301:发送设备向接收设备发送第一RTP媒体流。Step 301: The sending device sends a first RTP media stream to the receiving device.

其中,所述发送设备是以当前的媒体编码参数和传输参数进行第一RTP媒体流的发送的。Wherein, the sending device sends the first RTP media stream with current media encoding parameters and transmission parameters.

步骤302:接收设备接收所述第一RTP媒体流,确定第一RTP媒体流的序号相关信息;Step 302: The receiving device receives the first RTP media stream, and determines the sequence number related information of the first RTP media stream;

其中,序号相关信息包括接收设备在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息时,序号相关信息中可以直接记录各个数据包的序号;例如,如果在所述一个反馈周期内接收设备接收到了序号为1、3、4、5、7的5个数据包,则所述序号相关信息可以为:13457;Wherein, when 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 within a feedback cycle, the serial number of each data packet can be directly recorded in the serial number related information; If the receiving device receives 5 data packets with sequence numbers 1, 3, 4, 5, and 7 within the period, the sequence number-related information may be: 13457;

或者,所述序号相关信息包括包排列位图时,接收设备确定第一RTP媒体流的序号相关信息可以包括:接收设备确定在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;接收设备根据所述序号信息生成包排列位图。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 determines the sequence number of the data packet in the first RTP media stream received within one feedback cycle information; the receiving device generates a packet arrangement bitmap according to the sequence number information.

在一种可能的实现方式中,所述包排列位图可以包括:在所述一个反馈周期内接收到的第一个数据包的序号、以及根据在所述一个反馈周期内接收到除第一个数据包之外其他数据包生成的位图。例如,如果在所述一个一个反馈周期内接收设备接收到了序号为1、2、3、5、6、7、8的7个数据包,则所述包排列位图可以为:In a possible implementation manner, the packet arrangement bitmap may include: the sequence number of the first data packet received in the one feedback cycle, and the sequence number of the first data packet received in the one feedback cycle Bitmaps generated by packets other than the first packet. For example, if the receiving device receives 7 data packets whose sequence numbers are 1, 2, 3, 5, 6, 7, and 8 in the feedback cycle, the packet arrangement bitmap may be:

HeaderPacketSN:1HeaderPacketSN:1

RcvMap:0xF7RcvMap: 0xF7

其中,0xF7的二进制表示为11110111,如果最低比特位代表第一个数据包,比特位为1表示成功收到,那么0xF7就可以表达接收设备收到了序号为1、2、3、5、6、7、8的7个数据包。Among them, the binary representation of 0xF7 is 11110111. If the lowest bit represents the first data packet, and the bit is 1, it means that it is successfully received, then 0xF7 can express that the receiving device has received the serial number 1, 2, 3, 5, 6, 7, 7 packets of 8.

其中,所述反馈周期的具体时间长度和起始时刻可以在实际应用中自主设定,这里并不限制。Wherein, the specific time length and starting time of the feedback cycle can be set independently in practical applications, and are not limited here.

步骤303:接收设备向所述发送设备发送RTCP反馈消息,所述RTCP反馈消息中包括所述序号相关信息。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.

在实际应用中,接收设备也可以通过其他消息携带所述序号相关信息,这里并不限定。In practical applications, the receiving device may also carry the sequence number-related information through other messages, which is not limited here.

其中,所述RTCP反馈消息可以由接收设备在接收RTP媒体流的过程中按照所述反馈周期定时向发送设备发送。例如,在每个反馈周期结束时,由接收设备根据刚刚结束的反馈周期内接收到的RTP媒体流中数据包的序号信息得到所述序号相关信息,向所述发送设备发送包括所述序号相关信息的RTCP反馈消息。Wherein, the RTCP feedback message may be sent by the receiving device to the sending device according to the feedback period during the process of receiving the RTP media stream. For example, at the end of each feedback cycle, the receiving device obtains the sequence number related information according to the sequence number information of the data packets in the RTP media stream received in the feedback cycle just ended, and sends the sequence number related information to the sending device. Informational RTCP feedback messages.

其中,所述RTCP反馈消息中还可以包括其他信息,例如:在所述反馈周期内接收设备接收到的RTP媒体流的字节总数,和/或时延信息。Wherein, the RTCP feedback message may also include other information, for example: the total number of bytes of the RTP media stream received by the receiving device within the feedback period, and/or delay information.

其中,所述字节总数可以用于计算发送设备和接收设备之间的带宽约束,具体的,所述带宽约束等于:所述字节总数/所述反馈周期的时间长度。Wherein, 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/time length of the feedback cycle.

而所述时延信息可以在发送设备调整发送设备和接收设备之间RTP媒体流的传输路径时作为所述传输路径调整的依据之一。具体实现过程这里不赘述。The delay information may be used as one of the basis for adjusting the transmission path when the sending device adjusts the transmission path of the RTP media stream between the sending device and the receiving device. The specific implementation process will not be repeated here.

步骤304:发送设备接收所述RTCP反馈消息,根据所述序号相关信息、在所述一个反馈周期内实际发送的RTP媒体流中数据包的序号信息确定所述第一RTP媒体流的丢包信息。Step 304: The sending device receives the RTCP feedback message, and determines the packet loss information of the first RTP media stream according to the sequence number related information and the sequence number information of the data packets in the RTP media stream actually sent in the one feedback cycle .

在本发明实施例中,将丢包信息划分为随机丢包和带宽受限两种。在实际应用中,也可以根据实际情况对丢包信息进行其他划分,这里并不限制。In the embodiment of the present invention, packet loss information is divided into two types: random packet loss and bandwidth limitation. In practical applications, other divisions of the packet loss information may also be performed according to actual conditions, which is not limited here.

不同的丢包信息对应的所述网络约束参数不同,丢包信息为随机丢包时,所述网络约束参数可以包括:数据包随机丢包的丢包率和丢包周期;丢包信息为带宽受限时,所述网络约束参数可以包括:发送设备和接收设备之间的最大流量和限制周期。The network constraint parameters corresponding to different packet loss information are different. When the packet loss information is random packet loss, the network constraint parameters may include: packet loss rate and packet loss period of random packet loss of data packets; packet loss information is bandwidth When limited, the network constraint parameters may include: a maximum flow rate between the sending device and the receiving device and a limit period.

具体的,所述根据所述序号相关信息、在所述一个反馈周期内实际发送的RTP媒体流中数据包的序号信息确定所述第一RTP媒体流的丢包信息可以包括:Specifically, the determining the packet loss information of the first RTP media stream according to the sequence number related information and the sequence number information of the data packets in the RTP media stream actually sent in the one feedback period may include:

所述发送设备根据所述序号相关信息以及在所述反馈周期内实际发送的第一RTP媒体流中数据包的序号信息确定数据包的接收状态序列,所述数据包的接收状态序列为按照数据包的发送顺序记录的各个数据包是否丢包的信息;The sending device determines the receiving state sequence of the data packet 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, and the receiving state sequence of the data packet is according to the data Information about whether each data packet is lost or not recorded in the sending order of the packet;

根据丢包的数据包在所述数据包的接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配,如果与随机丢包特性匹配,则确定媒体流的丢包信息为随机丢包;否则,确定媒体流的丢包信息为带宽受限。Judging whether the randomness of packet loss matches the random packet loss characteristic according to the position of the packet loss data packet in the receiving state sequence of the data packet, if it matches the random packet loss characteristic, then determine the packet loss information of the media stream is random packet loss; otherwise, determine the packet loss information of the media stream as bandwidth limited.

例如,在所述一个反馈周期内发送设备向接收设备发送了序号为1~10的10个数据包;而序号相关信息为1236789;则,数据包的接收状态序列可以为:rrrxxrrrrx,其中,r表示该数据包未丢包,x表示该数据包丢包。For example, the sending device sends 10 data packets with serial numbers 1 to 10 to the receiving device during the feedback cycle; and the serial number related information is 1236789; then, the receiving state sequence of data packets can be: rrrxxrrrrx, where r Indicates that the data packet is not lost, and x indicates that the data packet is lost.

在根据丢包的数据包在所述数据包的接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配时,可以结合泊松分布(Poissondistribution)、自相似模型等实现。例如,泊松分布是一种统计与概率学里常见的离散概率分布,泊松分布适合于描述单位时间内随机事件发生的次数。泊松分布公式如下其中泊松分布的期望和方差均为λ,λ是单位时间或单位面积内随机事件的平均发生率,k为单位时间内随机事件发生的次数,k=0,1,2,…。因为随机丢包事件在单位时间内出现的次数或个数近似的服从泊松分布,所以可以根据丢包的数据包在所述数据包的接收状态序列中的位置按照上述泊松分布公式计算出λ的值,进而根据λ值计算出所述λ对应的在Δt时间内的理论丢包数;从所述数据包的接收状态序列中任取Δt时间的接收状态序列,判断所述Δt时间的接收状态序列中实际丢包数与所述理论丢包数的差值是否不大于预设的差值阈值,如果是,则判断数据包丢包的随机性与随机丢包特性匹配,如果否,则判断数据包丢包的随机性与随机丢包特性不匹配。其中,所述差值阈值可以在实际应用中自主设置。When judging whether the randomness of data packet loss matches the random packet loss characteristics according to the position of the lost data packet in the receiving state sequence of the data packet, it can be realized by combining Poisson distribution (Poisson distribution), self-similar model, etc. . For example, the Poisson distribution is a common discrete probability distribution in statistics and probability, and the Poisson distribution is suitable for describing the number of random events occurring per unit time. The Poisson distribution formula is as follows The expectation and variance of the Poisson distribution are both λ, λ is the average occurrence rate of random events per unit time or unit area, k is the number of times random events occur per unit time, k=0,1,2,…. Because the number or number of random packet loss events occurring per unit time approximately obeys the Poisson distribution, it can be calculated according to the above Poisson distribution formula according to the position of the lost data packet in the receiving state sequence of the data packet The value of λ, and then according to the λ value, calculate the theoretical packet loss number corresponding to the λ in the Δt time; from the receiving state sequence of the data packet, the receiving state sequence of the Δt time is arbitrarily taken, and the time of the Δt time is judged Whether the difference between the actual packet loss number and the theoretical packet loss number in the receiving state sequence is not greater than the preset difference threshold, if yes, it is judged that the randomness of the data packet loss matches the random packet loss characteristic, if not, Then it is judged that the randomness of packet loss does not match the random packet loss characteristic. Wherein, the difference threshold can be set independently in practical applications.

因此,在一种可能的实现方式中,所述根据丢包的数据包在所述数据包的接收状态序列中的位置判断数据包丢包的随机性是否符合随机丢包特性可以包括:Therefore, in a possible implementation manner, the judging whether the randomness of the data packet loss conforms to the random packet loss characteristic according to the position of the lost data packet in the receiving state sequence of the data packet may include:

根据丢包的数据包在所述数据包的接收状态序列中的位置按照泊松分布公式计算λ值;k为丢包的数据包在接收状态序列中的位置;According to the position of the lost data packet in the receiving state sequence of the data packet according to the Poisson distribution formula Calculate the λ value; k is the position of the lost data packet in the receiving state sequence;

计算λ对应的在Δt时间内的理论丢包数;Calculate the number of theoretical packet loss corresponding to λ within Δt time;

从所述数据包的接收状态序列中任取Δt时间的接收状态序列,判断所述Δt时间的接收状态序列中实际丢包数与所述理论丢包数的差值是否小于预设阈值,如果小于,则判断数据包丢包的随机性与随机丢包特性匹配,否则,判断数据包丢包的随机性与随机丢包特性不匹配。From the receiving state sequence of the data packet, the receiving state sequence of Δt time is randomly selected, and it is judged whether the difference between the actual packet loss number and the theoretical packet loss number in the receiving state sequence of the Δt time is less than a preset threshold, if is less than, it is judged that the randomness of packet loss matches the random packet loss characteristic, otherwise, it is judged that the randomness of data packet loss does not match the random packet loss characteristic.

其中,计算λ对应的在Δt时间内的理论丢包数时可以依照公式P1(t,t+Δt)=λΔt+Ο(Δt)计算,其中,t为初始时间,P1(t+Δt)表示在t+Δt时间内数据包丢包的概率;O(Δt)为Δt的函数公式;具体如何实现所述计算,这里不赘述。Among them, when calculating the number of theoretical packet loss corresponding to λ within Δt time, it can be calculated according to the formula P 1 (t, t+Δt)=λΔt+Ο(Δt), where t is the initial time, P1(t+Δt) Indicates the probability of data packet loss within t+Δt time; O(Δt) is the functional formula of Δt; how to realize the calculation will not be repeated here.

步骤305:发送设备根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约束参数。Step 305: The sending device determines a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the receiving state sequence of the data packet.

其中,当丢包信息为带宽受限时,根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约束参数可以包括:将所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长,作为所述限制周期;将所述序号相关信息中连续未丢包的数据包的总字节数作为所述最大流量;Wherein, when the packet loss information is bandwidth limited, determining the network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the receiving state sequence of the data packet may include: continuously The total sending duration of the data packets without packet loss and the data packets with continuous packet loss is taken as the limit period; the total number of bytes of the data packets without packet loss in the sequence number related information is taken as the maximum flow rate;

当丢包信息为随机丢包时,根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约束参数可以包括:将所述数据包的接收状态序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包的总数,得到所述丢包率。When the packet loss information is random packet loss, determining the network constraint parameters corresponding to the packet loss information according to the determined packet loss information and the receiving state sequence of the data packet may include: the packet loss in the receiving state sequence of the data packet The total number of data packets is divided by the total number of data packets in the receiving state sequence of the data packets to obtain the packet loss rate.

其中,丢包周期一般可以结合丢包率进行计算,具体计算方法这里不限定。在实际应用中,因为丢包率是由路由/交换设备性能瓶颈引入,而路由/交换设备性能中采用包每秒(PPS,PacketPerSecond)作为常用指标,因此可以将丢包周期直接设置为1s。因此,在实际应用中,可以直接在发送设备中预先存储丢包周期的数值,在确定随机丢包对应的网络约束参数时,读取该预先存储的丢包周期的数值即可。Wherein, the packet loss period can generally be calculated in combination with the packet loss rate, and the specific calculation method is not limited here. In practical applications, because the packet loss rate is introduced by the performance bottleneck of routing/switching equipment, and packet per second (PPS, PacketPerSecond) is used as a common indicator in the performance of routing/switching equipment, the packet loss period can be directly set to 1s. Therefore, in practical applications, the value of the packet loss period can be pre-stored directly in the sending device, and the pre-stored value of the packet loss period can be read when determining the network constraint parameter corresponding to the random packet loss.

具体的,在确定限制周期时,可以先从所述数据包的接收状态序列中查找到第一个丢包的数据包,然后,从所述第一个丢包的数据包之后查找到第一个未丢包的数据包,确定从该未丢包的数据包开始连续未丢包的数据包的个数,并且确定该未丢包的数据包之后第一个丢包的数据包,确定从该丢包的数据包开始连续丢包的数据包的个数,计算所述连续未丢包的数据包的个数和连续丢包的数据包的个数的总和,将所述总和与每个数据包的发送时长相乘,得到所述限制周期。Specifically, when determining the limit period, the first lost data packet can be found from the receiving state sequence of the data packet, and then the first lost data packet can be found after the first lost data packet. non-lost data packets, determine the number of consecutive non-lost data packets starting from the non-lost data packets, and determine the first packet loss data packets after the non-lost data packets, determine from the non-lost data packets The packet loss data packet starts the number of consecutive packet loss data packets, calculates the sum of the number of the continuous non-packet loss data packets and the number of consecutive packet loss data packets, and combines the sum with each The sending duration of the data packets is multiplied to obtain the restriction period.

在确定所述最大流量时,可以确定从该未丢包的数据包开始连续未丢包的数据包的总字节数,得到所述最大流量。When determining the maximum flow rate, the total number of bytes of consecutive non-lost data packets starting from the non-packet loss data packet may be determined to obtain the maximum flow rate.

例如,所述数据包的接收状态序列为rrxxrrrxxrrrxx,则,可以首先找出标识为x的第3个数据包,然后,从第3个数据包之后查找到第一个标识为r的数据包,即第5个数据包,从第5个数据包开始连续未丢包的数据包为第5个数据包至第7个数据包,因此,确定从第5个数据包开始连续未丢包的数据包的个数为3,第5个数据包之后第一个标识为x的数据包为第8个数据包,从该第8个数据包开始连续丢包的数据包为第8个数据包和第9个数据包,因此,确定从第8个数据包开始连续丢包的数据包的个数为2,总个数为5,则所述限制周期为5t;t为每个数据包的发送时长。For example, the receiving state sequence of the data packet is rrxxrrrxxrrrxx, then the third data packet identified as x can be found first, and then the first data packet identified as r is found after the third data packet, That is, the fifth data packet, the data packets that have not been lost continuously since the fifth data packet are the fifth data packet to the seventh data packet, therefore, determine the data that has not been lost continuously since the fifth data packet The number of packets is 3, the first data packet marked as x after the 5th data packet is the 8th data packet, and the data packets that are continuously lost from the 8th data packet are the 8th data packet and The 9th data packet, therefore, it is determined that the number of data packets lost continuously from the 8th data packet is 2, and the total number is 5, then the restriction period is 5t; t is the sending of each data packet duration.

所述最大流量为第5个数据包至第7个数据包的总字节数。The maximum flow is the total number of bytes of the 5th data packet to the 7th data packet.

步骤306:发送设备根据所述丢包信息以及所述丢包信息对应的网络约束参数确定待发送的第二RTP媒体流的媒体编码参数以及传输参数。Step 306: The sending device determines media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information and network constraint parameters corresponding to the packet loss information.

其中,所述媒体编码参数可以包括以下参数中的至少一个参数:媒体编码后构建RTP包率、媒体编码算法、编码速率。Wherein, the media encoding parameters may include at least one of the following parameters: RTP packet rate after media encoding, media encoding algorithm, and encoding rate.

其中,所述媒体编码后构建RTP包率是指发送设备每秒发送的数据包的数量;Wherein, the RTP packet rate constructed after the media encoding refers to the number of data packets sent by the sending device per second;

所述媒体编码算法是指发送设备在对RTP媒体流进行编码时所采用的媒体压缩算法格式,所述媒体压缩算法格式包括:自适应多速率(AMR,AdaptiveMulti-Rate)、G.711等;The media encoding algorithm refers to the media compression algorithm format used by the sending device when encoding the RTP media stream, and the media compression algorithm format includes: Adaptive Multi-Rate (AMR, AdaptiveMulti-Rate), G.711, etc.;

所述编码速率是指采用所述媒体压缩算法的速率,例如,在AMR这一媒体压缩算法下包括多个速率(rate)格式,可以通过所述编码速率具体指示AMR这一媒体压缩算法所使用的速率格式。The encoding rate refers to the rate at which the media compression algorithm is used. For example, the media compression algorithm AMR includes multiple rate formats, and the encoding rate can be used to specifically indicate the media compression algorithm used by AMR. rate format.

所述传输参数可以包括以下参数中的至少一个参数:冗余包编码格式、冗余参数。The transmission parameters may include at least one of the following parameters: redundant packet encoding format and redundant parameters.

其中,所述冗余参数是指冗余系数,例如所述冗余参数为1倍冗余时,则发送设备会在进行RTP媒体流的发送时,将RTP媒体流中每个数据包多发一份;Wherein, the redundancy parameter refers to a redundancy coefficient. For example, when the redundancy parameter is 1 times redundancy, the sending device will send each data packet in the RTP media stream by one more time when sending the RTP media stream. share;

所述冗余参数在实际应用时可以为非整数,如10%表示仅对所有数据包中的10%执行一倍冗余,这可以借助重要帧识别等技术来实现,这里不再赘述。The redundancy parameter may be a non-integer number in actual application. For example, 10% means that only 10% of all data packets are doubled. This can be achieved by means of important frame identification and other technologies, and will not be repeated here.

所述冗余包编码格式用于指示冗余的数据包所采用的编码格式。如RFC2198定义的冗余格式等。The encoding format of the redundant packet is used to indicate the encoding format adopted by the redundant data packet. Such as the redundant format defined by RFC2198, etc.

在实际应用中,可以借助测试,测试不同的媒体参数和传输参数在不同网络损伤下的表现,根据有约束最优化方法例如数学回归方法确定由丢包信息对应的网络约束参数、媒体编码参数、传输参数构成的方程,如:In practical applications, the performance of different media parameters and transmission parameters under different network damages can be tested by means of tests, and the network constraint parameters, media coding parameters, and Equations formed by transmission parameters, such as:

maxf(x,y)=g(x)+h(y)maxf(x,y)=g(x)+h(y)

s.t.a(x,y)≤Ps.t.a(x,y)≤P

其中,x表示媒体编码参数,y表示传输参数;g(x)表示媒体编码参数在无损网络下能获得的媒体质量分数,例如描述语音质量的平均评价得分(MOS,MeanOpinionScore)/主观语音质量评估(PESQ,Perceptualevaluationofspeechquality)分;h(y)表示基于所述传输参数对所述媒体质量分数的影响校对;f(x,y)表示所述媒体编码参数和传输参数在实际网络下获得的媒体质量分数;a(x,y)表示媒体编码参数和传输参数对应的网络约束参数,P表示所述丢包信息对应的网络约束参数。Among them, x represents the media coding parameter, y represents the transmission parameter; g(x) represents the media quality score that the media coding parameter can obtain under the lossless network, such as the average evaluation score (MOS, MeanOpinionScore)/subjective speech quality evaluation describing the speech quality (PESQ, Perceptualevaluationofspeechquality) score; h(y) indicates proofreading based on the impact of the transmission parameters on the media quality score; f(x, y) indicates the media quality obtained by the media encoding parameters and transmission parameters under the actual network Score; a(x, y) represents the network constraint parameter corresponding to the media encoding parameter and the transmission parameter, and P represents the network constraint parameter corresponding to the packet loss information.

具体的,本发明实施例中需要根据随机丢包对应的网络约束参数、媒体编码参数、传输参数构成第一方程,根据带宽约束对应的网络约束参数、媒体编码参数、传输参数构成第二方程;在本步骤的实现中,可以直接将丢包信息对应的网络约束参数代入丢包信息对应的方程中,计算得到媒体编码参数和传输参数。Specifically, in the embodiment of the present invention, it is necessary to form the first equation according to the network constraint parameters, media encoding parameters, and transmission parameters corresponding to the random packet loss, and form the second equation according to the network constraint parameters, media encoding parameters, and transmission parameters corresponding to the bandwidth constraints; In the implementation of this step, the network constraint parameters corresponding to the packet loss information can be directly substituted into the equation corresponding to the packet loss information to calculate the media encoding parameters and transmission parameters.

步骤307:发送设备根据步骤306中确定的媒体编码参数和传输参数发送第二RTP媒体流。Step 307: The sending device sends the second RTP media stream according to the media encoding parameters and transmission parameters determined in step 306.

其中,本步骤中发送设备发送第二RTP媒体流所依据的媒体编码参数和传输参数是根据丢包信息以及所述丢包信息对应的网络约束参数确定的,从而能够有效缓解发送设备和接收设备之间RTP媒体流传输过程中出现的丢包问题,提高RTP媒体流的传输效率。Wherein, in this step, the media encoding parameters and transmission parameters according to which the sending device sends the second RTP media stream are determined according to the packet loss information and the network constraint parameters corresponding to the packet loss information, so that the sending device and the receiving device can effectively alleviate the The packet loss problem that occurs during the transmission of RTP media streams between RTP media streams improves the transmission efficiency of RTP media streams.

本实施例中,发送设备确定第一RTP媒体流的丢包信息以及所述丢包信息对应的网络约束参数,根据所述丢包信息以及所述丢包信息对应的网络约束参数确定媒体编码参数以及传输参数;所述发送设备根据所述媒体编码参数以及传输参数发送第二RTP媒体流,因此本发明实施例能够有效缓解发送设备和接收设备之间RTP媒体流传输过程中出现的丢包问题,提高RTP媒体流的传输效率。In this embodiment, the sending device determines the packet loss information of the first RTP media stream and the network constraint parameters corresponding to the packet loss information, and determines the media encoding parameters according to the packet loss information and the network constraint parameters corresponding to the packet loss information and transmission parameters; the sending device sends the second RTP media stream according to the media encoding parameters and the transmission parameters, so the embodiment of the present invention can effectively alleviate the packet loss problem that occurs during the transmission of the RTP media stream between the sending device and the receiving device , improve the transmission efficiency of the RTP media stream.

参见图4,为本发明RTP媒体流的传输装置第一实施例示意图,该装置可以设置于发送设备,该装置400包括:Referring to FIG. 4 , it is a schematic diagram of a first embodiment of a device for transmitting an RTP media stream according to the present invention. The device can be set in a sending device. The device 400 includes:

第一发送单元410,用于向接收设备发送第一RTP媒体流;The first sending unit 410 is configured to send the first RTP media stream to the receiving device;

第一接收单元420,用于接收所述接收设备发送的序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的所述第一发送单元410发送的第一RTP媒体流中数据包的序号信息;The first receiving unit 420 is configured to receive the serial number-related information sent by the receiving device, where the serial number-related information is the first RTP media sent by the first sending unit 410 received by the receiving device within one feedback cycle Sequence number information of packets in the flow;

丢包信息确定单元430,用于根据所述第一接收单元420接收到的所述序号相关信息、在所述反馈周期内所述第一发送单元410实际发送的第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息;A packet loss information determining unit 430, configured to, according to the sequence number related information received by the first receiving unit 420, the data packets in the first RTP media stream actually sent by the first sending unit 410 within the feedback period The sequence number information determines the packet loss information of the first RTP media stream;

参数确定单元440,用于根据所述丢包信息确定单元430确定的所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数;A parameter determining unit 440, configured to determine media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information determined by the packet loss information determining unit 430;

所述第一发送单元410还用于:根据所述参数确定单元440确定的所述媒体编码参数以及传输参数发送第二RTP媒体流。The first sending unit 410 is further configured to: send a second RTP media stream according to the media encoding parameters and transmission parameters determined by the parameter determining unit 440 .

优选地,丢包信息确定单元430具体可以包括:Preferably, the packet loss information determining unit 430 may specifically include:

序列确定子单元,用于根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定数据包的接收状态序列,所述数据包的接收状态序列为按照数据包的发送顺序记录的各个数据包是否丢包的信息;A sequence determining subunit, configured to determine the receiving state sequence of data packets according to the sequence number related information and the sequence number information of the data packets actually sent in the feedback period, and the receiving state sequence of the data packets is according to the sending state of the data packets Information about whether each data packet recorded sequentially is lost;

原因确定子单元,用于根据丢包的数据包在所述序列确定子单元确定的所述数据包的接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配,如果与随机丢包特性匹配,则确定媒体流的丢包信息为随机丢包;否则,确定媒体流的丢包信息为带宽受限。The cause determination subunit is used to determine whether the randomness of the packet loss matches the random packet loss characteristic according to the position of the lost packet in the receiving state sequence of the packet determined by the sequence determination subunit, if If it matches the random packet loss characteristic, 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.

优选地,所述参数确定单元440可以包括:Preferably, the parameter determination unit 440 may include:

第一参数确定子单元,用于根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约束参数;The first parameter determination subunit is configured to determine a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the receiving state sequence of the data packet;

第二参数确定子单元,用于根据所述丢包信息以及所述第一参数确定子单元确定的所述网络约束参数确定待发送的第二RTP媒体流的媒体编码参数以及传输参数;A second parameter determination 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 parameters determined by the first parameter determination subunit;

当丢包信息为带宽受限时,所述网络约束参数包括:限制周期,所述限制周期为所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长;最大流量,所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数;When the packet loss information is that the bandwidth is limited, the network constraint parameters include: a limit cycle, the limit cycle is the total number of consecutive non-lost data packets and continuous packet loss data packets in the receiving state sequence of the data packets The length of sending; the maximum flow, the maximum flow is the total number of bytes of the continuous unlost data packets in the serial 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 divided by the total number of data packets lost in the receiving state sequence of the data packets divided by the reception of the data packets The total number of packets in the state sequence.

所述第一参数确定子单元具体可以用于:The first parameter determination subunit can specifically be used for:

当丢包信息为带宽受限时,将所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长,作为所述限制周期;将所述序号相关信息中连续未丢包的数据包的总字节数作为所述最大流量;When the packet loss information is that the bandwidth is limited, the total sending time of the continuous non-lost data packets and the continuous packet loss data packets in the receiving state sequence of the data packets is used as the restriction period; the sequence number is correlated The total number of bytes of consecutive unlost data packets in the information is taken as the maximum flow rate;

当丢包信息为随机丢包时,所述网络约束参数可以包括:将所述数据包的接收状态序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包的总数,得到丢包率。When the packet loss information is random packet loss, the network constraint parameter may include: dividing the total number of data packets lost in the receiving state sequence of the data packets by the total number of data packets in the receiving state sequence of the data packets, Get the packet loss rate.

当丢包信息为随机丢包时,将所述数据包的接收状态序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包的总数,得到所述丢包率。When the packet loss information is random packet loss, dividing the total number of lost data packets in the receiving state sequence of data packets by the total number of data packets in the receiving state sequence of data packets to obtain the packet loss rate.

优选地,第二参数确定子单元具体可以用于:Preferably, the second parameter determination subunit can specifically be used for:

根据以下公式确定所述网络约束参数:Determine the network constraint parameters according to the following formula:

maxf(x,y)=g(x)+h(y);maxf(x,y)=g(x)+h(y);

s.t.a(x,y)≤Ps.t.a(x,y)≤P

其中,x表示媒体编码参数,y表示传输参数;g(x)表示媒体编码参数在无损网络下能获得的媒体质量分数;h(y)表示基于所述传输参数对所述媒体质量分数的影响校对;f(x,y)表示所述媒体编码参数和传输参数在实际网络下获得的媒体质量分数;a(x,y)表示媒体编码参数和传输参数对应的网络约束参数,P表示所述丢包信息对应的网络约束参数。Wherein, x represents a media coding parameter, y represents a transmission parameter; g(x) represents the media quality score that the media coding parameter can obtain under a lossless network; h(y) represents the influence based on the transmission parameter on the media quality score Proofreading; f(x, y) represents the media quality score obtained by the media encoding 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.

本实施例中,确定媒体流的丢包信息,根据所述丢包信息确定媒体编码参数以及传输参数;根据所述媒体编码参数以及传输参数发送第二RTP媒体流,因此能够有效缓解发送设备和接收设备之间RTP媒体流传输过程中的丢包问题,提高RTP媒体流的传输效率。In this embodiment, the packet loss information of the media stream is determined, and the media coding parameters and transmission parameters are determined according to the packet loss information; and the second RTP media stream is sent according to the media coding parameters and transmission parameters, so that the sending device and transmission parameters can be effectively alleviated. The packet loss problem in the process of RTP media stream transmission between receiving devices improves the transmission efficiency of RTP media streams.

参见图5,为本发明RTP媒体流的传输装置第二实施例示意图,该装置可以设置于接收设备,该装置500包括:Referring to FIG. 5 , it is a schematic diagram of a second embodiment of an RTP media stream transmission device according to the present invention. The device can be set on a receiving device. The device 500 includes:

第二接收单元510,用于接收发送设备发送的第一RTP媒体流;The second receiving unit 510 is configured to receive the first RTP media stream sent by the sending device;

信息确定单元520,用于确定所述第二接收单元510接收的RTP媒体流的序号相关信息,所述序号相关信息为所述第二接收单元510在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;An information determining unit 520, 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 the first RTP media stream received by the second receiving unit 510 within one feedback cycle Sequence number information of packets in the flow;

第二发送单元530,用于向所述发送设备发送所述信息确定单元520确定的所述序号相关信息,以便所述发送设备根据所述序号相关信息、在所述反馈周期内实际发送的第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息的信息、根据所述丢包信息确定所述发送设备待发送的第二RTP媒体流的媒体编码参数以及传输参数;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 sends the first sequence number in the feedback period according to the sequence number-related information. The sequence number information of the data packets in an RTP media stream determines the packet loss information 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 according to the packet loss information;

第二接收单元510还用于:接收所述发送设备根据所述媒体编码参数以及传输参数发送第二RTP媒体流。The second receiving unit 510 is further configured to: receive the second RTP media stream sent by the sending device according to the media encoding parameters and transmission parameters.

优选地,所述序号相关信息通过包配列位图实现,所述信息确定单元520具体可以用于:Preferably, the serial number-related information is implemented by including a column bitmap, and the information determination unit 520 can be specifically used for:

确定在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;Determine the sequence number information of the data packet in the first RTP media stream received in a feedback cycle;

根据所述序号信息生成所述包排列位图。The packet arrangement bitmap is generated according to the sequence number information.

本实施例中,根据在一个反馈周期内接收到的RTP媒体流确定序号相关信息,将所述序号相关信息发送给所述发送设备,以便所述发送设备根据所述序号相关信息、在所述反馈周期内实际发送的RTP媒体流中数据包的序号信息确定媒体流的丢包信息、根据所述丢包信息确定媒体编码参数以及传输参数,之后接收发送设备根据确定的所述媒体编码参数以及传输参数发送的第二RTP媒体流,因此能够有效缓解发送设备和接收设备之间RTP媒体流传输过程中的丢包问题,提高RTP媒体流的传输效率。In this embodiment, the serial number-related information is determined according to the RTP media stream received within one feedback cycle, and the serial number-related information is sent to the sending device, so that the sending device can, according to the serial number-related information, The sequence number information of the data packets in the RTP media stream actually sent in the feedback period determines the packet loss information of the media stream, and determines the media encoding parameters and transmission parameters according to the packet loss information, and then the receiving and sending device determines the media encoding parameters and transmission parameters according to the determined media encoding parameters and The second RTP media stream sent by the transmission parameters can effectively alleviate the packet loss problem during the transmission of the RTP media stream between the sending device and the receiving device, and improve the transmission efficiency of the RTP media stream.

参见图6,为本发明RTP媒体流的发送设备结构示意图,该发送设备600包括:第一处理器610、第一存储器620、第一收发器630和第一总线640;Referring to FIG. 6 , it is a schematic structural diagram of a sending device for an RTP media stream according to the present invention. The sending device 600 includes: a first processor 610, a first memory 620, a first transceiver 630 and a first bus 640;

第一处理器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 address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 6 , but it does not mean that there is only one bus or one type of bus.

第一存储器620,用于存放程序,所述程序用于实现图1和图3所示实施例中发送设备执行的RTP媒体流传输方法。具体地,程序可以包括程序代码,所述程序代码包括计算机操作指令。第一存储器620可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatilememory),例如至少一个磁盘存储器。The first memory 620 is used to store a program, and the program is used to realize the RTP media stream transmission method performed by the sending device in the embodiment shown in FIG. 1 and FIG. 3 . Specifically, the program may include program code, and the program code includes computer operation instructions. The first memory 620 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

第一收发器630用于连接其他设备,如接收设备、服务器和远端主机等,并与其他设备进行通信。具体的,第一收发器630用于:向接收设备发送第一RTP媒体流;接收所述接收设备发送的序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;根据第一处理器610确定的媒体编码参数以及传输参数发送第二RTP媒体流。The first transceiver 630 is used to connect other devices, such as a receiving device, a server, and a remote host, and communicate with other devices. Specifically, the first transceiver 630 is configured to: send the first RTP media stream to the receiving device; receive the serial number related information sent by the receiving device, and the serial number related information is received by the receiving device within a feedback cycle Sequence number information of data packets in the first RTP media stream; sending the second RTP media stream according to the media encoding parameters and transmission parameters determined by the first processor 610 .

第一处理器610执行第一存储器620中存储的所述程序代码,用于根据所述第一收发器630接收到的所述序号相关信息、所述第一收发器630在所述反馈周期内实际发送的第一RTP媒体流中数据包的序号信息确定媒体流的丢包信息的信息;根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数。The first processor 610 executes the program code stored in the first memory 620, and is used to, according to the information related to the sequence number received by the first transceiver 630, the first transceiver 630 within the feedback cycle The sequence number information of the data packets in the actually sent first RTP media stream determines the packet loss information of the media stream; and determines the media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information.

优选地,所述第一处理器610具体可以用于:根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定数据包的接收状态序列,所述数据包的接收状态序列为按照数据包的发送顺序记录的各个数据包是否丢包的信息;根据丢包的数据包在所述数据包的接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配,如果与随机丢包特性匹配,则确定媒体流的丢包信息为随机丢包;否则,确定媒体流的丢包信息为带宽受限。Preferably, the first processor 610 may be specifically configured to: determine the receiving state sequence of the data packet according to the sequence number related information and the sequence number information of the data packet actually sent in the feedback period, and the reception of the data packet The state sequence is the information of whether each data packet is lost according to the sending order of the data packet; whether the randomness of the data packet loss is judged according to the position of the lost data packet in the receiving state sequence of the data packet is consistent with random loss The packet characteristic matches, and if it matches the random packet loss characteristic, 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.

优选地,所述第一处理器610具体可以用于:根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约束参数;Preferably, the first processor 610 may be specifically configured to: determine a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the receiving state sequence of the data packet;

根据所述丢包信息以及所述网络约束参数确定待发送的第二RTP媒体流的媒体编码参数以及传输参数。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 parameters.

其中,当丢包信息为带宽受限时,所述网络约束参数可以包括:限制周期,所述限制周期为所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长;最大流量,所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数;Wherein, when the packet loss information is that the bandwidth is limited, the network constraint parameters may include: a limit cycle, the limit cycle is the continuous non-lost data packets and the continuous packet loss data in the receiving state sequence of the data packets The total sending time of the packet; the maximum flow, the maximum flow is the total number of bytes of the continuous non-lost data packets in the serial number related information;

当丢包信息为随机丢包时,所述网络约束参数可以包括:将所述数据包的接收状态序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包的总数,得到丢包率。When the packet loss information is random packet loss, the network constraint parameter may include: dividing the total number of data packets lost in the receiving state sequence of the data packets by the total number of data packets in the receiving state sequence of the data packets, Get the packet loss rate.

优选地,所述第一处理器610具体可以用于:当丢包信息为带宽受限时,将所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长,作为所述限制周期;将所述序号相关信息中连续未丢包的数据包的总字节数作为所述最大流量;当丢包信息为随机丢包时,将所述数据包的接收状态序列中丢包的数据包总数除以所述数据包的接收状态序列中数据包的总数,得到所述丢包率。Preferably, the first processor 610 may be specifically configured to: when the packet loss information is bandwidth-limited, combine the data packets of consecutive non-lost data packets and consecutive packet loss data packets in the receiving status sequence of the data packets The total sending time is used as the limit cycle; the total number of bytes of the continuous non-lost data packets in the serial number related information is used as the maximum flow; when the packet loss information is random packet loss, the data packet The total number of lost data packets in the receiving state sequence of the data packet is divided by the total number of data packets in the receiving state sequence of the data packet to obtain the packet loss rate.

优选地,所述第一处理器610具体可以用于根据以下公式确定所述网络约束参数:Preferably, the first processor 610 may be specifically configured to determine the network constraint parameter according to the following formula:

maxf(x,y)=g(x)+h(y);maxf(x,y)=g(x)+h(y);

s.t.a(x,y)≤Ps.t.a(x,y)≤P

其中,x表示媒体编码参数,y表示传输参数;g(x)表示媒体编码参数在无损网络下能获得的媒体质量分数;h(y)表示基于所述传输参数对所述媒体质量分数的影响校对;f(x,y)表示所述媒体编码参数和传输参数在实际网络下获得的媒体质量分数;a(x,y)表示媒体编码参数和传输参数对应的网络约束参数,P表示所述丢包信息对应的网络约束参数。Wherein, x represents a media coding parameter, y represents a transmission parameter; g(x) represents the media quality score that the media coding parameter can obtain under a lossless network; h(y) represents the influence based on the transmission parameter on the media quality score Proofreading; f(x, y) represents the media quality score obtained by the media encoding 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.

本实施例中,发送设备确定第一RTP媒体流的丢包信息;根据所述丢包信息确定媒体编码参数以及传输参数;所述发送设备根据所述媒体编码参数以及传输参数发送第二RTP媒体流,因此本发明实施例能够针对不同的丢包信息而确定不同的媒体编码参数以及传输参数,从而能够有效缓解发送设备和接收设备之间RTP媒体流的丢包问题,提高RTP媒体流的传输效率。In this embodiment, the sending device determines packet loss information of the first RTP media stream; determines media encoding parameters and transmission parameters according to the packet loss information; and sends the second RTP media stream according to the media encoding parameters and transmission parameters. Therefore, the embodiment of the present invention can determine different media encoding 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 transmission of the RTP media stream efficiency.

参见图7,为本发明RTP媒体流的接收设备结构示意图,该接收设备700可以包括:第二处理器710、第二存储器720、第二收发器730和第二总线740;Referring to FIG. 7 , it is a schematic structural diagram of a receiving device for 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;

第二处理器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 a second bus 740; the second bus 740 may be an ISA bus, a PCI bus, or an EISA bus. The second bus 740 can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 7 , but it does not mean that there is only one bus or one type of bus.

第二存储器720,用于存放程序,所述程序用于实现图2和图3所示实施例中接收设备执行的RTP媒体流传输方法。具体地,程序可以包括程序代码,所述程序代码包括计算机操作指令。第二存储器720可能包含高速RAM存储器,也可能还包括非易失性存储器(non-volatilememory),例如至少一个磁盘存储器。The second memory 720 is used to store a program, and the program is used to realize the RTP media stream transmission method performed by the receiving device in the embodiment shown in FIG. 2 and FIG. 3 . Specifically, the program may include program code, and the program code includes computer operation instructions. The second memory 720 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

第二收发器730用于连接其他设备,如发送设备、服务器和远端主机等,并与其他设备进行通信。具体的,第二收发器730用于接收发送设备发送的第一RTP媒体流;向所述发送设备发送序号相关信息,以便所述发送设备根据所述序号相关信息、在所述反馈周期内实际发送的第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息、根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数;接收所述发送设备根据所述媒体编码参数以及传输参数发送的第二RTP媒体流;The second transceiver 730 is used to connect with other devices, such as a sending device, a server, and a remote host, and communicate with other devices. Specifically, the second transceiver 730 is used to receive the first RTP media stream sent by the sending device; and send sequence number related information to the sending device, so that the sending device can actually perform The sequence number information of the data packet in the first RTP media stream sent 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 according to the packet loss information; receiving the The second RTP media stream sent by the sending device according to the media encoding parameters and transmission parameters;

所述第二处理器710执行第二存储器720中存储的所述程序代码,用于:根据所述第二收发器730在一个反馈周期内接收到的第一RTP媒体流确定第一RTP媒体流的序号相关信息,所述序号相关信息为所述第二收发器730在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息。The second processor 710 executes the program code stored in the second memory 720, configured to: determine the first RTP media stream according to the first RTP media stream received by the second transceiver 730 within one feedback cycle The sequence number related information is the sequence number information of the data packet in the first RTP media stream received by the second transceiver 730 within one feedback period.

优选地,所述序号相关信息通过包配列位图实现,所述所述第二处理器710具体可以用于:确定在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;根据所述序号信息生成所述包排列位图。Preferably, the sequence number-related information is implemented through a packet configuration bitmap, and the second processor 710 can be specifically configured to: determine the sequence number information of the data packet in the first RTP media stream received within one feedback cycle; The packet arrangement bitmap is generated according to the sequence number information.

本实施例中,接收设备根据在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息生成序号相关信息,将所述序号相关信息发送给所述发送设备,以便所述发送设备根据序号相关信息、在所述反馈周期内实际发送的第一RTP媒体流中数据包的序号信息确定RTP媒体流的丢包信息、进而确定媒体编码参数以及传输参数,之后发送设备可以根据确定的所述媒体编码参数以及传输参数进行第二RTP媒体流的发送,因此本发明实施例能够有效缓解发送设备和接收设备之间媒体流的丢包问题,提高RTP媒体流的传输效率。In this embodiment, the receiving device generates sequence number related information according to the sequence number information of the data packets in the first RTP media stream received within one feedback cycle, and sends the sequence number related information to the sending device, so that the sending device Determine the packet loss information of the RTP media stream according to the sequence number related information and the sequence number information of the data packets in the first RTP media stream actually sent in the feedback period, and then determine the media encoding parameters and transmission parameters, and then the sending device can determine according to the determined The media encoding parameters and transmission parameters are used to send the second RTP media stream, so 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.

本发明实施例还提供一种实时传输协议RTP媒体流的传输系统,参见图8所示,该系统800包括发送设备810和接收设备820,其中,The embodiment of the present invention also provides a real-time transport protocol RTP media stream transmission system, as shown in FIG. 8, the system 800 includes a sending device 810 and a receiving device 820, wherein,

所述发送设备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 sequence number related information sent by the receiving device 820, the sequence number related information is received by the receiving device 820 within a feedback cycle The sequence number information of the data packets in the first RTP media stream is determined according to the sequence number related information and the sequence number information of the data packets in the first RTP media stream actually sent in the feedback cycle. 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 sending the second RTP media stream to the receiving device;

所述接收设备820,用于接收发送设备810发送的第一RTP媒体流,确定第一RTP媒体流的序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息,向所述发送设备810发送所述序号相关信息,以便所述发送设备根据所述序号相关信息及在所述反馈周期内实际发送的第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息、根据所述丢包信息确定所述发送设备810待发送的第二RTP媒体流的媒体编码参数以及传输参数,接收所述发送设备810根据所述媒体编码参数以及传输参数发送的第二RTP媒体流。The receiving device 820 is configured to receive the 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 the first RTP media stream received by the receiving device within a feedback cycle. The sequence number information of the data packet in an RTP media stream, and send the sequence number related information to the sending device 810, so that the sending device can send the first RTP media stream 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 in the data packet determines the packet loss information of the first RTP media stream, determines the media encoding parameters and transmission parameters of the second RTP media stream to be sent by the sending device 810 according to the packet loss information, and receives the sending device 810 810 Send a second RTP media stream according to the media encoding parameters and transmission parameters.

优选地,所述发送设备810具体可以用于通过以下方式实现所述根据所述序号相关信息、在所述反馈周期内实际发送的所述第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息:Preferably, the sending device 810 can be specifically configured to determine the first according to the sequence number information of the data packet in the first RTP media stream actually sent in the feedback period according to the sequence number related information in the following manner: Packet loss information of RTP media stream:

根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定数据包的接收状态序列,所述数据包的接收状态序列为按照数据包的发送顺序记录的各个数据包是否丢包的序列;Determine the receiving state sequence of the data packet according to the sequence number related information and the sequence number information of the data packet actually sent in the feedback cycle, the receiving state sequence of the data packet is whether each data packet recorded according to the sending order of the data packet is The sequence of packet loss;

所述发送设备根据丢包的数据包在所述接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配;The sending device determines whether the randomness of the packet loss matches the random packet loss characteristic according to the position of the packet loss packet in the receiving state sequence;

如果与随机丢包特性匹配,确定RTP媒体流的丢包信息为随机丢包;If it matches the random packet loss feature, 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 feature, determine that the packet loss information of the RTP media stream is bandwidth limited.

优选地,所述发送设备810具体可以用于通过以下方式实现所述根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数:Preferably, the sending device 810 can be specifically 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 in the following manner:

根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约束参数;determining a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the receiving state sequence of the data packet;

根据所述丢包信息以及所述网络约束参数确定待发送的第二RTP媒体流的媒体编码参数以及传输参数;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 parameters;

当丢包信息为带宽受限时,所述网络约束参数包括:限制周期,所述限制周期为所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长;最大流量,所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数;When the packet loss information is that the bandwidth is limited, the network constraint parameters include: a limit cycle, the limit cycle is the total number of consecutive non-lost data packets and continuous packet loss data packets in the receiving state sequence of the data packets The length of sending; the maximum flow, the maximum flow is the total number of bytes of the continuous unlost data packets in the serial 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 divided by the total number of data packets lost in the receiving state sequence of the data packets divided by the reception of the data packets The total number of packets in the state sequence.

本实施例中,接收设备根据在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息生成序号相关信息,将所述序号相关信息发送给所述发送设备,以便所述发送设备根据序号相关信息、在所述反馈周期内实际发送的第一RTP媒体流中数据包的序号信息确定RTP媒体流的丢包信息、进而确定媒体编码参数以及传输参数,之后发送设备可以根据确定的所述媒体编码参数以及传输参数进行第二RTP媒体流的发送,因此本发明实施例能够有效缓解发送设备和接收设备之间媒体流的丢包问题,提高RTP媒体流的传输效率。In this embodiment, the receiving device generates sequence number related information according to the sequence number information of the data packets in the first RTP media stream received within one feedback cycle, and sends the sequence number related information to the sending device, so that the sending device Determine the packet loss information of the RTP media stream according to the sequence number related information and the sequence number information of the data packets in the first RTP media stream actually sent in the feedback period, and then determine the media encoding parameters and transmission parameters, and then the sending device can determine according to the determined The media encoding parameters and transmission parameters are used to send the second RTP media stream, so 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.

本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。Those skilled in the art can clearly understand that the technologies in the embodiments of the present invention can be implemented by means of software plus a necessary general-purpose hardware platform. Based on this understanding, the essence of the technical solutions in the embodiments of the present invention or the part that contributes to the prior art can be embodied in the form of software products, and the computer software products can be stored in storage media, such as ROM/RAM , magnetic disk, optical disk, etc., including several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of the present invention.

本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a progressive manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the 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 for relevant parts, refer to part of the description of the method embodiment.

以上所述的本发明实施方式,并不构成对本发明保护范围的限定。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明的保护范围之内。The embodiments of the present invention described above are not intended to limit the protection scope of the present invention. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims (12)

1.一种实时传输协议RTP媒体流的传输方法,其特征在于,包括:1. A transmission method of a real-time transport protocol RTP media stream, characterized in that, comprising: 发送设备向接收设备发送第一RTP媒体流;The sending device sends the first RTP media stream to the receiving device; 接收所述接收设备发送的序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的所述第一RTP媒体流中数据包的序号信息;receiving 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 one feedback cycle; 根据所述序号相关信息、在所述反馈周期内实际发送的所述第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息,包括:Determine the packet loss information of the first RTP media stream according to the sequence number related information and the sequence number information of the data packets in the first RTP media stream actually sent in the feedback period, including: 根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定数据包的接收状态序列,所述数据包的接收状态序列为按照数据包的发送顺序记录的各个数据包是否丢包的序列;Determine the receiving state sequence of the data packet according to the sequence number related information and the sequence number information of the data packet actually sent in the feedback cycle, the receiving state sequence of the data packet is whether each data packet recorded according to the sending order of the data packet is The sequence of packet loss; 所述发送设备根据丢包的数据包在所述接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配;The sending device determines whether the randomness of the packet loss matches the random packet loss characteristic according to the position of the packet loss packet in the receiving state sequence; 如果与随机丢包特性匹配,确定RTP媒体流的丢包信息为随机丢包;If it matches the random packet loss feature, 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 feature, determine that the packet loss information of the RTP media stream is bandwidth limited; 根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数,并向所述接收设备发送所述第二RTP媒体流。Determine 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. 2.根据权利要求1所述的方法,其特征在于,所述根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数,包括:2. The method according to claim 1, wherein said determining the media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information comprises: 根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约束参数;determining a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the receiving state sequence of the data packet; 根据所述丢包信息以及所述网络约束参数确定待发送的第二RTP媒体流的媒体编码参数以及传输参数;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 parameters; 当丢包信息为带宽受限时,所述网络约束参数包括:限制周期,所述限制周期为所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长;最大流量,所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数;When the packet loss information is that the bandwidth is limited, the network constraint parameters include: a limit cycle, the limit cycle is the total number of consecutive non-lost data packets and continuous packet loss data packets in the receiving state sequence of the data packets The length of sending; the maximum flow, the maximum flow is the total number of bytes of the continuous unlost data packets in the serial 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 divided by the total number of data packets lost in the receiving state sequence of the data packets divided by the reception of the data packets The total number of packets in the state sequence. 3.根据权利要求2所述的方法,其特征在于,所述根据所述丢包信息以及所述网络约束参数确定待发送的第二RTP媒体流的媒体编码参数以及传输参数,包括:3. The method according to claim 2, wherein said determining media encoding parameters and transmission parameters of the second RTP media stream to be sent according to said packet loss information and said network constraint parameters comprises: 根据以下公式确定所述媒体编码参数以及传输参数:Determine the media encoding parameters and transmission parameters according to the following formula: maxf(x,y)=g(x)+h(y);maxf(x,y)=g(x)+h(y); s.t.a(x,y)≤Ps.t.a(x,y)≤P 其中,x表示媒体编码参数,y表示传输参数;g(x)表示媒体编码参数在无损网络下能获得的媒体质量分数;h(y)表示基于所述传输参数对所述媒体质量分数的影响校对;f(x,y)表示所述媒体编码参数和传输参数在实际网络下获得的媒体质量分数;a(x,y)表示媒体编码参数和传输参数对应的网络约束参数,P表示所述丢包信息对应的网络约束参数。Wherein, x represents a media coding parameter, y represents a transmission parameter; g(x) represents the media quality score that the media coding parameter can obtain under a lossless network; h(y) represents the influence based on the transmission parameter on the media quality score Proofreading; f (x, y) represents the media quality score obtained under the actual network of the media encoding parameters and transmission parameters; 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 packet loss information. 4.一种实时传输协议RTP媒体流的传输方法,其特征在于,包括:4. A transmission method of a real-time transport protocol RTP media stream, characterized in that, comprising: 接收设备接收发送设备发送的第一RTP媒体流;The receiving device receives the first RTP media stream sent by the sending device; 确定第一RTP媒体流的序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;Determine the serial number related information of the first RTP media stream, 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 within a feedback cycle; 向所述发送设备发送所述序号相关信息,以便所述发送设备根据所述序号相关信息及在所述反馈周期内实际发送的第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息、根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定按照数据包的发送顺序记录的各个数据包是否丢包的序列、根据丢包的数据包在所述接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配、根据与随机丢包特性匹配确定RTP媒体流的丢包信息为随机丢包、根据与随机丢包特性不匹配确定RTP媒体流的丢包信息为带宽受限、根据所述丢包信息确定所述发送设备待发送的第二RTP媒体流的媒体编码参数以及传输参数;Sending the sequence number related information to the sending device, so that the sending device determines the first RTP media stream according to the sequence number related information and the sequence number information of the data packets in the first RTP media stream actually sent in the feedback period The packet loss information, according to the sequence number related information and the sequence number information of the data packets actually sent in the feedback cycle to determine whether each data packet is lost according to the sequence of data packets sent sequence sequence, according to the data packet loss Determine whether the randomness of packet loss in the receiving state sequence matches the random packet loss characteristic, determine that the packet loss information of the RTP media stream is random packet loss according to matching with the random packet loss characteristic, and determine whether the packet loss information of the RTP media stream is random packet loss according to the random packet loss characteristic. The characteristic mismatch determines that the packet loss information of the RTP media stream is bandwidth limited, and determines 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 parameter and the transmission parameter. 5.根据权利要求4所述的方法,其特征在于,所述序号相关信息通过包排列位图实现,所述确定第一RTP媒体流的序号相关信息包括:5. method according to claim 4, it is characterized in that, described sequence number related information realizes by packet arrangement bitmap, described determining the sequence number related information of the first RTP media stream comprises: 确定在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;Determine the sequence number information of the data packet in the first RTP media stream received in a feedback cycle; 根据所述序号信息生成所述包排列位图。The packet arrangement bitmap is generated according to the sequence number information. 6.一种实时传输协议RTP媒体流的传输装置,其特征在于,包括:6. A transmission device for a real-time transport protocol RTP media stream, characterized in that it comprises: 第一发送单元,用于向接收设备发送第一RTP媒体流;a first sending unit, configured to send a first RTP media stream to a receiving device; 第一接收单元,用于接收所述接收设备发送的序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;A first receiving unit, 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 one feedback cycle; 丢包信息确定单元,用于根据所述第一接收单元接收到的所述序号相关信息、在所述反馈周期内所述第一发送单元实际发送的第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息;A packet loss information determining unit, configured to, according to the sequence number related information received by the first receiving unit, the sequence number information of the data packet in the first RTP media stream actually sent by the first sending unit within the feedback period Determine the packet loss information of the first RTP media stream; 所述丢包信息确定单元包括:The packet loss information determination unit includes: 序列确定子单元,用于根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定数据包的接收状态序列,所述数据包的接收状态序列为按照数据包的发送顺序记录的各个数据包是否丢包的序列;A sequence determining subunit, configured to determine the receiving state sequence of data packets according to the sequence number related information and the sequence number information of the data packets actually sent in the feedback period, and the receiving state sequence of the data packets is according to the sending state of the data packets Sequence of whether each data packet recorded in sequence is lost or not; 原因确定子单元,用于根据丢包的数据包在所述序列确定子单元确定的所述数据包的接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配,如果与随机丢包特性匹配,则确定媒体流的丢包信息为随机丢包;否则,确定媒体流的丢包信息为带宽受限;The cause determination subunit is used to determine whether the randomness of the packet loss matches the random packet loss characteristic according to the position of the lost packet in the receiving state sequence of the packet determined by the sequence determination subunit, if If it matches the random packet loss feature, it is determined that the packet loss information of the media stream is random packet loss; otherwise, the packet loss information of the media stream is determined to be bandwidth limited; 参数确定单元,用于根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数;A parameter determination unit, configured to determine media encoding parameters and transmission parameters of the second RTP media stream to be sent according to the packet loss information; 所述第一发送单元还用于:发送所述第二RTP媒体流。The first sending unit is further configured to: send the second RTP media stream. 7.根据权利要求6所述的装置,其特征在于,所述参数确定单元包括:7. The device according to claim 6, wherein the parameter determining unit comprises: 第一参数确定子单元,用于根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约束参数;The first parameter determination subunit is configured to determine a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the receiving state sequence of the data packet; 第二参数确定子单元,用于根据所述丢包信息以及所述第一参数确定子单元确定的所述网络约束参数确定待发送的第二RTP媒体流的媒体编码参数以及传输参数;A second parameter determination 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 parameters determined by the first parameter determination subunit; 当丢包信息为带宽受限时,所述网络约束参数包括:限制周期,所述限制周期为所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长;最大流量,所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数;When the packet loss information is that the bandwidth is limited, the network constraint parameters include: a limit cycle, the limit cycle is the total number of consecutive non-lost data packets and continuous packet loss data packets in the receiving state sequence of the data packets The length of sending; the maximum flow, the maximum flow is the total number of bytes of the continuous unlost data packets in the serial 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 divided by the total number of data packets lost in the receiving state sequence of the data packets divided by the reception of the data packets The total number of packets in the state sequence. 8.根据权利要求7所述的装置,其特征在于,第二参数确定子单元具体用于:8. The device according to claim 7, wherein the second parameter determining subunit is specifically used for: 根据以下公式确定所述媒体编码参数以及传输参数:Determine the media encoding parameters and transmission parameters according to the following formula: maxf(x,y)=g(x)+h(y);maxf(x,y)=g(x)+h(y); s.t.a(x,y)≤Ps.t.a(x,y)≤P 其中,x表示媒体编码参数,y表示传输参数;g(x)表示媒体编码参数在无损网络下能获得的媒体质量分数;h(y)表示基于所述传输参数对所述媒体质量分数的影响校对;f(x,y)表示所述媒体编码参数和传输参数在实际网络下获得的媒体质量分数;a(x,y)表示媒体编码参数和传输参数对应的网络约束参数,P表示所述丢包信息对应的网络约束参数。Wherein, x represents a media coding parameter, y represents a transmission parameter; g(x) represents the media quality score that the media coding parameter can obtain under a lossless network; h(y) represents the influence based on the transmission parameter on the media quality score Proofreading; f (x, y) represents the media quality score obtained under the actual network of the media encoding parameters and transmission parameters; 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 packet loss information. 9.一种实时传输协议RTP媒体流的传输装置,其特征在于,包括:9. A transmission device for a real-time transport protocol RTP media stream, characterized in that, comprising: 第二接收单元,用于接收发送设备发送的第一RTP媒体流;The second receiving unit is configured to receive the first RTP media stream sent by the sending device; 信息确定单元,用于确定所述第二接收单元接收的第一RTP媒体流的序号相关信息,所述序号相关信息为所述第二接收单元在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;An information determination 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 serial number information of the data packet; 第二发送单元,用于向所述发送设备发送所述信息确定单元确定的所述序号相关信息,以便所述发送设备根据所述序号相关信息及在所述反馈周期内实际发送的第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息、根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定按照数据包的发送顺序记录的各个数据包是否丢包的序列、根据丢包的数据包在所述接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配、根据与随机丢包特性匹配确定RTP媒体流的丢包信息为随机丢包、根据与随机丢包特性不匹配确定RTP媒体流的丢包信息为带宽受限、根据所述丢包信息确定所述发送设备待发送的第二RTP媒体流的媒体编码参数以及传输参数;A second sending unit, configured to send the sequence number related information determined by the information determining unit to the sending device, so that the sending device can use the sequence number related information and the first RTP actually sent in 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 according to the sequence number related information and the sequence number information of the data packets actually sent in the feedback period, determines the data packets recorded according to the order in which the data packets are sent. Whether the data packet is a packet loss sequence, judge whether the randomness of the packet loss matches the random packet loss characteristic according to the position of the packet loss data packet in the receiving state sequence, and determine the RTP media flow according to the match with the random packet loss characteristic The packet loss information is random packet loss, the packet loss information of the RTP media stream is determined to be bandwidth limited according to the mismatch with the random packet loss characteristic, and the second RTP media stream to be sent by the sending device is determined according to the packet loss information Media encoding parameters and transmission parameters; 所述第二接收单元还用于:接收所述发送设备根据所述媒体编码参数以及传输参数发送的第二RTP媒体流。The second receiving unit is further configured to: receive a second RTP media stream sent by the sending device according to the media encoding parameters and transmission parameters. 10.根据权利要求9所述的装置,其特征在于,所述序号相关信息通过包排列位图实现,所述信息确定单元具体用于:10. The device according to claim 9, wherein the serial number-related information is implemented through a packet arrangement bitmap, and the information determination unit is specifically used for: 确定在一个反馈周期内接收到的第一RTP媒体流中数据包的序号信息;Determine the sequence number information of the data packet in the first RTP media stream received in a feedback cycle; 根据所述序号信息生成所述包排列位图。The packet arrangement bitmap is generated according to the sequence number information. 11.一种实时传输协议RTP媒体流的传输系统,其特征在于,包括发送设备和接收设备,其中,11. A transmission system of a real-time transport protocol RTP media stream, characterized in that it comprises a sending device and a receiving device, wherein, 所述发送设备,用于向接收设备发送第一RTP媒体流,接收所述接收设备发送的序号相关信息,所述序号相关信息为所述接收设备在一个反馈周期内接收到的所述第一RTP媒体流中数据包的序号信息,根据所述序号相关信息、在所述反馈周期内实际发送的所述第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息,根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数,并向所述接收设备发送所述第二RTP媒体流;The sending device is configured to send a first RTP media stream to a receiving device, and receive 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 packet in the RTP media stream, 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 cycle, determine the packet loss information of the first RTP media stream, determining media encoding parameters and transmission parameters 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; 所述发送设备具体用于通过以下方式实现所述根据所述序号相关信息、在所述反馈周期内实际发送的所述第一RTP媒体流中数据包的序号信息确定第一RTP媒体流的丢包信息:The sending device is specifically configured to determine the loss of the first RTP media stream according to the sequence number related information and the sequence number information of the data packets actually sent in the first RTP media stream in the feedback period in the following manner: Package information: 根据所述序号相关信息以及在所述反馈周期内实际发送的数据包的序号信息确定数据包的接收状态序列,所述数据包的接收状态序列为按照数据包的发送顺序记录的各个数据包是否丢包的序列;Determine the receiving state sequence of the data packet according to the sequence number related information and the sequence number information of the data packet actually sent in the feedback cycle, the receiving state sequence of the data packet is whether each data packet recorded according to the sending order of the data packet is The sequence of packet loss; 所述发送设备根据丢包的数据包在所述接收状态序列中的位置判断数据包丢包的随机性是否与随机丢包特性匹配;The sending device judges whether the randomness of the packet loss matches the random packet loss characteristic according to the position of the lost packet in the receiving state sequence; 如果与随机丢包特性匹配,确定RTP媒体流的丢包信息为随机丢包;If it matches the random packet loss feature, 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 feature, determine that the packet loss information of the RTP media stream is bandwidth limited; 所述接收设备,用于接收发送设备发送的第一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, where the sequence number related information is the first RTP received by the receiving device within a feedback cycle The 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 can use the sequence number related information and the data packet in the first RTP media stream actually sent in the feedback period The sequence number information of the first RTP media stream determines the packet loss information of the first RTP media stream, determines 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, and receives the sending device according to the media The encoding parameters and the second RTP media stream sent by the transmission parameters. 12.根据权利要求11所述的系统,其特征在于,所述发送设备具体用于通过以下方式实现所述根据所述丢包信息确定待发送的第二RTP媒体流的媒体编码参数以及传输参数:12. The system according to claim 11, wherein the sending device is specifically 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 in the following manner : 根据确定的丢包信息以及所述数据包的接收状态序列确定丢包信息对应的网络约束参数;determining a network constraint parameter corresponding to the packet loss information according to the determined packet loss information and the receiving state sequence of the data packet; 根据所述丢包信息以及所述网络约束参数确定待发送的第二RTP媒体流的媒体编码参数以及传输参数;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 parameters; 当丢包信息为带宽受限时,所述网络约束参数包括:限制周期,所述限制周期为所述数据包的接收状态序列中连续未丢包的数据包和连续丢包的数据包的总发送时长;最大流量,所述最大流量为所述序号相关信息中连续未丢包的数据包的总字节数;When the packet loss information is that the bandwidth is limited, the network constraint parameters include: a limit cycle, the limit cycle is the total number of consecutive non-lost data packets and continuous packet loss data packets in the receiving state sequence of the data packets The length of sending; the maximum flow, the maximum flow is the total number of bytes of the continuous unlost data packets in the serial 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 divided by the total number of data packets lost in the receiving state sequence of the data packets divided by the reception of the data packets The total number of packets in the state sequence.
CN201310101268.XA 2013-03-27 2013-03-27 The transmission method of RTP Media Stream and device Active CN103167359B (en)

Priority Applications (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
PCT/CN2013/084907 WO2014153944A1 (en) 2013-03-27 2013-10-09 Method and apparatus for transmitting rtp media stream

Applications Claiming Priority (1)

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

Publications (2)

Publication Number Publication Date
CN103167359A CN103167359A (en) 2013-06-19
CN103167359B true CN103167359B (en) 2016-03-02

Family

ID=48590045

Family Applications (1)

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

Country Status (2)

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

Families Citing this family (15)

* 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
US10756997B2 (en) 2015-09-28 2020-08-25 Cybrook Inc. Bandwidth adjustment for real-time video transmission
US10516892B2 (en) 2015-09-28 2019-12-24 Cybrook Inc. Initial bandwidth estimation 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 中国移动通信集团山东有限公司 A Speech Perception Evaluation Method Based on RTP
CN112019307B (en) * 2019-05-30 2023-05-30 广州云积软件技术有限公司 Data processing method and device of national education examination online inspection system
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
CN113473111A (en) * 2021-05-29 2021-10-01 江苏网进科技股份有限公司 Method for detecting video blocking phenomenon based on rtsp protocol
CN116781975B (en) * 2023-08-17 2024-02-06 中仪英斯泰克科技有限公司 Media stream detection method, device, terminal equipment and storage medium
CN117714012A (en) * 2023-12-25 2024-03-15 浙江瑞瀛物联科技有限公司 Bluetooth device communication retransmission method

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
CN101150763A (en) * 2007-10-18 2008-03-26 中兴通讯股份有限公司 A terminal and method for testing real time service transmission performance of WiMAX network

Family Cites Families (1)

* 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

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
CN101150763A (en) * 2007-10-18 2008-03-26 中兴通讯股份有限公司 A terminal and method for testing real time service transmission performance of WiMAX network

Also Published As

Publication number Publication date
CN103167359A (en) 2013-06-19
WO2014153944A1 (en) 2014-10-02

Similar Documents

Publication Publication Date Title
CN103167359B (en) The transmission method of RTP Media Stream and device
CN110855400B (en) Self-adaptive packet loss recovery method based on error correction code, computing device and storage medium
CN101505202B (en) Adaptive error correction method for stream media transmission
CN101924603B (en) Self-adaption adjusting method, device and system of data transmission rate
US10542064B2 (en) Method, server side and system for computing bandwidth of network transmission of streaming media
KR101862175B1 (en) Congestion control bitrate algorithm
CN109923809B (en) Encoding and decoding method using forward error correction, and encoding and decoding system
CN100588177C (en) Data transmission method and communication system and program using the method
CN110192394B (en) Method and server for transmitting media content through network
US10084715B2 (en) Packet loss mitigation
CN107257270B (en) Data transmission method and system based on hybrid automatic repeat request
US20120008644A1 (en) Data communication system, data transmitting apparatus, data transmitting method, and method for determining packet size and redundancy
US20060253763A1 (en) Method and system for correcting burst errors in communications networks, related network and computer-program product
WO2016045332A1 (en) Method and device for encoding parameter adjustment and feedback information processing
RU2009134145A (en) REDUCING THE INFLUENCE OF LOSS OF PACKAGES IN VIDEO TRANSMISSIONS
CN104113884B (en) Real-time multimedia transfer rate control mechanism in a kind of wireless network
US8340126B2 (en) Method and apparatus for congestion control
CN111886875B (en) Method and server for transmitting media content through network
US9866350B2 (en) Streaming media packet processing method, WiFi chip, and mobile terminal
CN108282402A (en) Packet scattering method based on coding in data center network
Roca et al. Less latency and better protection with AL-FEC sliding window codes: A robust multimedia CBR broadcast case study
CN111385055B (en) Data transmission method and device
US10200154B2 (en) System and method for early packet header verification
EP3292674B1 (en) Voice quality monitoring system
JP5533177B2 (en) Packet loss rate estimation device, packet loss rate estimation method, packet loss rate estimation program, and communication system

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant