[go: up one dir, main page]

CN116962613A - Data transmission method and device, computer equipment and storage medium - Google Patents

Data transmission method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN116962613A
CN116962613A CN202210997603.8A CN202210997603A CN116962613A CN 116962613 A CN116962613 A CN 116962613A CN 202210997603 A CN202210997603 A CN 202210997603A CN 116962613 A CN116962613 A CN 116962613A
Authority
CN
China
Prior art keywords
frame rate
media data
sending
rendering
rate
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.)
Pending
Application number
CN202210997603.8A
Other languages
Chinese (zh)
Inventor
盛剑锋
周骏华
雷鹏
熊小颖
程宝平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology 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 China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202210997603.8A priority Critical patent/CN116962613A/en
Publication of CN116962613A publication Critical patent/CN116962613A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N7/00Television systems
    • H04N7/14Systems for two-way working
    • H04N7/141Systems for two-way working between two video terminals, e.g. videophone
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/25Management operations performed by the server for facilitating the content distribution or administrating data related to end-users or client devices, e.g. end-user or client device authentication, learning user preferences for recommending movies
    • H04N21/266Channel or content management, e.g. generation and management of keys and entitlement messages in a conditional access system, merging a VOD unicast channel into a multicast channel
    • H04N21/2662Controlling the complexity of the video stream, e.g. by scaling the resolution or bitrate of the video stream based on the client capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/478Supplemental services, e.g. displaying phone caller identification, shopping application
    • H04N21/4788Supplemental services, e.g. displaying phone caller identification, shopping application communicating with other users, e.g. chatting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/60Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client 
    • H04N21/63Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
    • H04N21/643Communication protocols
    • H04N21/6437Real-time Transport Protocol [RTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The disclosure provides a data transmission method and device, a computer device and a storage medium, wherein the method is applied to a first device and comprises the following steps: transmitting the first media data to the second device at a preset first transmission frame rate; receiving a rendering frame rate fed back by the second device based on the first media data; wherein the rendering frame rate is a display frequency at which the second device displays the first media data; determining a second transmission frame rate of second media data to be transmitted according to the rendering frame rate; and transmitting the second media data to the second device based on the second transmission frame rate. According to the method and the device for displaying the media data, the sending frame rate is adjusted according to the rendering frame rate fed back by the second device, so that the sending frame rate of the first device is matched with the performance of the second device and/or the network environment, and the smoothness of media data display can be improved under the condition of balancing the device resources and/or the network environment as much as possible, and therefore user experience is improved.

Description

数据传输方法及装置、计算机设备、存储介质Data transmission methods and devices, computer equipment, storage media

技术领域Technical field

本公开涉及但不限于通信领域,尤其涉及一种数据传输方法及装置、计算机设备、存储介质。The present disclosure relates to but is not limited to the field of communications, and in particular, to a data transmission method and device, computer equipment, and storage media.

背景技术Background technique

音视频质量保障,就是将音视频的发送码率、目标分辨率及发送帧率设定在一个合理的区间内,在各种终端设备和网络环境下尽量保持音视频通信的流畅和高清晰度。Audio and video quality assurance is to set the audio and video transmission bit rate, target resolution and transmission frame rate within a reasonable range, and try to maintain the smoothness and high definition of audio and video communication under various terminal devices and network environments. .

相关技术中,终端设备在接收和处理音视频数据过程中,当网络状况发生变化时,第一设备会根据网络状况对发送的媒体数据的发送码率进行调整,再根据发送码率调整发送帧率,没有在采集到播放媒体数据的整个过程中进行监控及反馈。In related technologies, when a terminal device receives and processes audio and video data, when the network condition changes, the first device will adjust the transmission code rate of the media data sent according to the network condition, and then adjust the transmission frame according to the transmission code rate. rate, there is no monitoring and feedback during the entire process of collecting and playing media data.

发明内容Contents of the invention

有鉴于此,本公开实施例期望提供一种数据传输方法及装置、计算机设备、存储介质。In view of this, embodiments of the present disclosure are expected to provide a data transmission method and device, computer equipment, and storage media.

第一方面,本公开实施例提供一种数据传输方法,应用于第一设备,所述方法包括:In a first aspect, an embodiment of the present disclosure provides a data transmission method, applied to a first device, and the method includes:

将第一媒体数据以预设第一发送帧率发送给第二设备;Send the first media data to the second device at the preset first sending frame rate;

接收所述第二设备基于所述第一媒体数据反馈的渲染帧率;其中,所述渲染帧率是所述第二设备显示所述第一媒体数据的显示频率;Receive the rendering frame rate fed back by the second device based on the first media data; wherein the rendering frame rate is the display frequency at which the second device displays the first media data;

根据所述渲染帧率,确定待发送的第二媒体数据的第二发送帧率;Determine a second sending frame rate of the second media data to be sent according to the rendering frame rate;

基于所述第二发送帧率向所述第二设备发送所述第二媒体数据。Send the second media data to the second device based on the second sending frame rate.

在一些实施例中,所述方法还包括:In some embodiments, the method further includes:

接收所述第二设备基于所述第一媒体数据反馈的网络参数;Receive network parameters fed back by the second device based on the first media data;

根据所述网络参数,确定所述第二媒体数据的发送码率和目标分辨率;Determine the transmission code rate and target resolution of the second media data according to the network parameters;

所述基于所述第二发送帧率向所述第二设备发送所述第二媒体数据,包括:The sending the second media data to the second device based on the second sending frame rate includes:

基于所述第二发送帧率、所述发送码率向所述第二设备发送所述目标分辨率的所述第二媒体数据。Send the second media data of the target resolution to the second device based on the second sending frame rate and the sending code rate.

在一些实施例中,所述网络参数包括:接收端估计码率最大值;In some embodiments, the network parameters include: the maximum estimated code rate at the receiving end;

所述根据所述网络参数,确定所述第二媒体数据的发送码率和目标分辨率,包括:Determining the sending code rate and target resolution of the second media data according to the network parameters includes:

若所述接收端估计码率最大值小于预设发送码率阈值,根据所述接收端估计码率最大值调整所述第二媒体数据的目标分辨率,并根据所述接收端估计码率最大值确定所述第二媒体数据的发送码率;If the maximum estimated code rate of the receiving end is less than the preset transmission code rate threshold, adjust the target resolution of the second media data according to the maximum estimated code rate of the receiving end, and adjust the target resolution of the second media data according to the maximum estimated code rate of the receiving end. The value determines the sending code rate of the second media data;

若所述接收端估计码率最大值大于或等于所述预设发送码率阈值,维持所述目标分辨率不变,根据所述接收端估计码率最大值确定所述第二媒体数据的发送码率。If the maximum estimated code rate of the receiving end is greater than or equal to the preset transmission code rate threshold, the target resolution is maintained unchanged, and the transmission of the second media data is determined based on the maximum estimated code rate of the receiving end. Code rate.

在一些实施例中,所述根据所述渲染帧率,确定待发送的所述第二媒体数据的第二发送帧率,包括:In some embodiments, determining the second sending frame rate of the second media data to be sent based on the rendering frame rate includes:

若所述渲染帧率与所述预设第一发送帧率不相等,调整所述渲染帧率,并将调整后的渲染帧率作为所述第二媒体数据的第二发送帧率;If the rendering frame rate is not equal to the preset first sending frame rate, adjust the rendering frame rate, and use the adjusted rendering frame rate as the second sending frame rate of the second media data;

若所述渲染帧率与所述预设第一发送帧率相等,将所述渲染帧率作为所述第二媒体数据的第二发送帧率。If the rendering frame rate is equal to the preset first sending frame rate, the rendering frame rate is used as the second sending frame rate of the second media data.

在一些实施例中,所述调整所述渲染帧率,并将调整后的渲染帧率作为所述第二媒体数据的第二发送帧率,包括:In some embodiments, adjusting the rendering frame rate and using the adjusted rendering frame rate as the second sending frame rate of the second media data includes:

对预设时长内的渲染帧率进行滤波,获得滤波后的渲染帧率;Filter the rendering frame rate within the preset time period to obtain the filtered rendering frame rate;

基于所述滤波后的渲染帧率与预设帧率调节值,确定调整后的渲染帧率并将调整后的渲染帧率作为所述第二媒体数据的第二发送帧率;其中,第二发送帧率小于或等于所述预设第一发送帧率。Based on the filtered rendering frame rate and the preset frame rate adjustment value, the adjusted rendering frame rate is determined and the adjusted rendering frame rate is used as the second sending frame rate of the second media data; wherein, the second The sending frame rate is less than or equal to the preset first sending frame rate.

第二方面,本公开实施例提供一种数据传输方法,应用于第二设备,所述方法包括:In a second aspect, embodiments of the present disclosure provide a data transmission method, applied to a second device, and the method includes:

接收第一设备以预设第一发送帧率发送的第一媒体数据;Receive first media data sent by the first device at a preset first sending frame rate;

基于所述第一媒体数据确定渲染帧率;其中,所述渲染帧率是所述第二设备显示所述第一媒体数据的显示频率;Determine a rendering frame rate based on the first media data; wherein the rendering frame rate is a display frequency at which the second device displays the first media data;

将所述渲染帧率反馈给所述第一设备;其中,所述渲染帧率用于所述第一设备确定待发送的第二媒体数据的第二发送帧率;Feed back the rendering frame rate to the first device; wherein the rendering frame rate is used by the first device to determine the second sending frame rate of the second media data to be sent;

接收所述第一设备基于所述第二发送帧率发送的第二媒体数据。Receive second media data sent by the first device based on the second sending frame rate.

在一些实施例中,所述基于所述第一媒体数据确定渲染帧率,包括:In some embodiments, determining the rendering frame rate based on the first media data includes:

对接收到的所述第一媒体数据进行解码,获取第一解码数据;Decode the received first media data to obtain first decoded data;

对所述第一解码数据进行后处理,获取第一后处理数据;Perform post-processing on the first decoded data to obtain first post-processed data;

对所述第一后处理数据进行渲染,获取渲染帧率。Render the first post-processing data to obtain a rendering frame rate.

在一些实施例中,所述方法还包括:In some embodiments, the method further includes:

基于所述第一媒体数据确定网络参数;Determine network parameters based on the first media data;

将所述网络参数反馈给所述第一设备;其中,所述网络参数用于所述第一设备确定所述第二媒体数据的发送码率和目标分辨率;Feed back the network parameters to the first device; wherein the network parameters are used by the first device to determine the sending code rate and target resolution of the second media data;

接收所述第一设备基于所述第二发送帧率、所述发送码率发送的所述目标分辨率的第二媒体数据。Receive second media data of the target resolution sent by the first device based on the second sending frame rate and the sending code rate.

第三方面,本公开实施例提供一种数据传输装置,其特征在于,应用于第一设备,所述装置包括:In a third aspect, an embodiment of the present disclosure provides a data transmission device, which is characterized in that it is applied to a first device, and the device includes:

第一发送模块,用于将第一媒体数据以预设第一发送帧率发送给第二设备;A first sending module configured to send the first media data to the second device at a preset first sending frame rate;

第一接收模块,用于接收所述第二设备基于所述第一媒体数据反馈的渲染帧率;其中,所述渲染帧率是所述第二设备显示所述第一媒体数据的显示频率;A first receiving module configured to receive the rendering frame rate fed back by the second device based on the first media data; wherein the rendering frame rate is the display frequency at which the second device displays the first media data;

第一确定模块,用于根据所述渲染帧率,确定待发送的第二媒体数据的第二发送帧率;A first determination module, configured to determine the second sending frame rate of the second media data to be sent according to the rendering frame rate;

第二发送模块,还用于基于所述第二发送帧率向所述第二设备发送所述第二媒体数据。The second sending module is also configured to send the second media data to the second device based on the second sending frame rate.

第四方面,本公开实施例提供一种数据传输装置,其特征在于,应用于第二设备,所述装置包括:In a fourth aspect, an embodiment of the present disclosure provides a data transmission device, which is characterized in that it is applied to a second device, and the device includes:

第二接收模块,用于接收第一设备以预设第一发送帧率发送的第一媒体数据;a second receiving module configured to receive the first media data sent by the first device at the preset first sending frame rate;

第二确定模块,用于基于所述第一媒体数据确定渲染帧率;其中,所述渲染帧率是所述第二设备显示所述第一媒体数据的显示频率;a second determination module, configured to determine a rendering frame rate based on the first media data; wherein the rendering frame rate is the display frequency at which the second device displays the first media data;

第一反馈模块,用于将所述渲染帧率反馈给所述第一设备;其中,所述渲染帧率用于所述第一设备确定待发送的第二媒体数据的第二发送帧率;A first feedback module configured to feed back the rendering frame rate to the first device; wherein the rendering frame rate is used by the first device to determine the second sending frame rate of the second media data to be sent;

第三接收模块,用于接收所述第一设备基于所述第二发送帧率发送的第二媒体数据。A third receiving module configured to receive second media data sent by the first device based on the second sending frame rate.

第五方面,本公开实施例提供一种计算机设备,包括:In a fifth aspect, an embodiment of the present disclosure provides a computer device, including:

处理器;processor;

用于存储处理器可执行指令的存储器;Memory used to store instructions executable by the processor;

其中,所述处理器被配置为执行第一方面或第二方面中所述的方法。Wherein, the processor is configured to execute the method described in the first aspect or the second aspect.

第六方面,本公开实施例提供一种存储介质,其上存储有计算机程序,该计算机程序被处理器执行时实现第一方面或第二方面中所述方法。In a sixth aspect, embodiments of the present disclosure provide a storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described in the first aspect or the second aspect is implemented.

本公开的实施例提供的技术方案可以包括以下有益效果:The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:

在本公开的实施例中,第一设备根据第二设备反馈的渲染帧率调整发送帧率,使得第一设备的发送帧率与第二设备的性能和/或网络环境相适配,能尽可能在平衡设备资源和/或网络环境的情况下提升媒体数据显示的流畅度,从而提升用户体验。In embodiments of the present disclosure, the first device adjusts the sending frame rate according to the rendering frame rate fed back by the second device, so that the sending frame rate of the first device adapts to the performance of the second device and/or the network environment, and can be achieved as much as possible. It is possible to improve the smoothness of media data display while balancing device resources and/or network environment, thereby improving user experience.

应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and do not limit the present disclosure.

附图说明Description of the drawings

此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。The accompanying drawings herein are incorporated into and constitute a part of this specification. They illustrate embodiments consistent with the disclosure and, together with the description, serve to explain the technical solutions of the disclosure.

图1为本公开实施例提供的一种数据传输方法的实现流程示意图一;Figure 1 is a schematic diagram 1 of the implementation flow of a data transmission method provided by an embodiment of the present disclosure;

图2为本公开实施例提供的一种数据传输方法的实现流程示意图二;Figure 2 is a schematic diagram 2 of the implementation flow of a data transmission method provided by an embodiment of the present disclosure;

图3为本公开实施例提供的一种数据传输方法的交互图;Figure 3 is an interaction diagram of a data transmission method provided by an embodiment of the present disclosure;

图4为本公开实施例提供的一种数据传输模块关系图;Figure 4 is a data transmission module relationship diagram provided by an embodiment of the present disclosure;

图5A为本公开实施例提供的一种数据传输方法的交互示意图一;Figure 5A is an interactive schematic diagram 1 of a data transmission method provided by an embodiment of the present disclosure;

图5B为本公开实施例提供的一种数据传输方法的交互示意图二;Figure 5B is an interactive schematic diagram 2 of a data transmission method provided by an embodiment of the present disclosure;

图6是本公开实施例提供的一种应用于第一设备的数据传输装置示意图;Figure 6 is a schematic diagram of a data transmission device applied to a first device provided by an embodiment of the present disclosure;

图7是本公开实施例提供的一种应用于第二设备的数据传输装置示意图;Figure 7 is a schematic diagram of a data transmission device applied to a second device provided by an embodiment of the present disclosure;

图8为本公开实施例中计算机设备的一种硬件实体示意图。FIG. 8 is a schematic diagram of a hardware entity of a computer device in an embodiment of the present disclosure.

具体实施方式Detailed ways

为了使本公开的目的、技术方案和优点更加清楚,下面结合附图和实施例对本公开的技术方案进一步详细阐述,所描述的实施例不应视为对本公开的限制,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the present disclosure clearer, the technical solutions of the present disclosure are further elaborated below in conjunction with the accompanying drawings and examples. The described embodiments should not be regarded as limiting the present disclosure. Those of ordinary skill in the art will All other embodiments obtained without creative efforts belong to the scope of protection of this disclosure.

在以下的描述中,涉及到“一些实施例”,其描述了所有可能实施例的子集,但是可以理解,“一些实施例”可以是所有可能实施例的相同子集或不同子集,并且可以在不冲突的情况下相互结合。In the following description, reference is made to "some embodiments" which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or a different subset of all possible embodiments, and Can be combined with each other without conflict.

如果申请文件中出现“第一/第二”的类似描述则增加以下的说明:本公开所涉及的术语“第一/第二/第三”仅仅是区别类似的对象,不代表针对对象的特定排序,可以理解地,“第一/第二/第三”在允许的情况下可以互换特定的顺序或先后次序,以使这里描述的本公开实施例能够以除了在这里图示或描述的以外的顺序实施。If similar descriptions of "first/second" appear in the application documents, add the following explanation: The terms "first/second/third" involved in this disclosure are only used to distinguish similar objects and do not represent the specificity of the objects. Ordering, it is understood that "first/second/third" may interchange the specific order or sequence where permitted, so that the embodiments of the disclosure described herein can be used in other ways than those illustrated or described herein. Implemented in other order.

除非另有定义,本文所使用的所有的技术和科学术语与属于本公开的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述本公开的目的,不是旨在限制本公开。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing the disclosure only and is not intended to be limiting of the disclosure.

图1是本公开实施例提供的数据传输方法的实现流程示意图一,应用于第一设备,如图1所示,该方法包括如下步骤:Figure 1 is a schematic flow chart of the implementation of the data transmission method provided by an embodiment of the present disclosure. It is applied to the first device. As shown in Figure 1, the method includes the following steps:

S101、将第一媒体数据以预设第一发送帧率发送给第二设备;S101. Send the first media data to the second device at the preset first sending frame rate;

S102、接收所述第二设备基于所述第一媒体数据反馈的渲染帧率;其中,所述渲染帧率是所述第二设备显示所述第一媒体数据的显示频率;S102. Receive the rendering frame rate fed back by the second device based on the first media data; wherein the rendering frame rate is the display frequency at which the second device displays the first media data;

S103、根据所述渲染帧率,确定待发送的第二媒体数据的第二发送帧率;S103. Determine the second sending frame rate of the second media data to be sent according to the rendering frame rate;

S104、基于所述第二发送帧率向所述第二设备发送所述第二媒体数据。S104. Send the second media data to the second device based on the second sending frame rate.

在本公开实施例中,第一设备可以是包含多台终端设备的群组,也可以是单台终端设备;其中,第一设备可以但不限于是具有编码和数据发送能力的终端设备,如网络摄像机、个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。第二设备可以但不限于是具有显示功能的设备,如显示器、电子白板、智能交互平板、幕布、电视机以及视频会议终端等。第一设备和第二设备间可以以无线或有线的方式连接,所涉及的通信连接的方式包括:互联网、局域网、蓝牙、移动热点(Wi-Fi)或紫峰协议(ZigBee)。第一媒体数据包括视频、音视频等。In this embodiment of the present disclosure, the first device may be a group including multiple terminal devices, or it may be a single terminal device; wherein, the first device may be, but is not limited to, a terminal device with coding and data transmission capabilities, such as Webcams, PCs, laptops, smartphones, tablets and portable wearable devices. The second device may be, but is not limited to, a device with a display function, such as a monitor, an electronic whiteboard, an intelligent interactive tablet, a screen, a television, a video conferencing terminal, etc. The first device and the second device may be connected in a wireless or wired manner, and the communication connection methods involved include: Internet, local area network, Bluetooth, mobile hotspot (Wi-Fi) or ZigBee protocol. The first media data includes video, audio and video, etc.

以第一媒体数据是视频为例,第一设备可以将采集到的模拟信号转换成数字信号,第一设备可对数字信号进行编码后获得第一媒体数据。可采用的编码标准包括:H264、H265、vp8、vp9、av1等。发送帧率即每秒传输帧数(Frames Per Second,FPS)。Taking the first media data as a video as an example, the first device can convert the collected analog signal into a digital signal, and the first device can encode the digital signal to obtain the first media data. The encoding standards that can be adopted include: H264, H265, vp8, vp9, av1, etc. The sending frame rate is the number of frames transmitted per second (Frames Per Second, FPS).

本公开实施例中,第一设备可将媒体数据的采集帧率作为预设第一发送帧率,并以预设第一发送帧率发送第一媒体数据给第二设备。需要说明的是,不同的场景可对应有不同的预设第一发送帧率,示例性的,当本公开实施例的方案应用于远程监控场景下,预设第一发送帧率可以为15FPS;当本公开实施例的方案应用于在线视频场景下,预设第一发送帧率可以为30FPS。In the embodiment of the present disclosure, the first device may use the collection frame rate of the media data as the preset first sending frame rate, and send the first media data to the second device at the preset first sending frame rate. It should be noted that different scenarios may correspond to different preset first sending frame rates. For example, when the solution of the embodiment of the present disclosure is applied to a remote monitoring scenario, the preset first sending frame rate may be 15 FPS; When the solution of the embodiment of the present disclosure is applied to an online video scenario, the preset first sending frame rate may be 30 FPS.

在本公开实施例中,第一设备可以利用实时传输协议(Real-time TransportProtocol,RTP)将第一媒体数据封装后得到RTP数据,再将得到的RTP数据以预设第一发送帧率发送给第二设备。本公开实施例中,第二设备接收到第一媒体数据后,对第一媒体数据进行解码,然后对解码的媒体数据进行渲染显示,并确定当前的渲染帧率。本公开实施例中,第二设备中可包括图形处理器(Graphic Processing Unit,GPU)可对解码的媒体数据进行渲染,然后第二设备中的硬件可把渲染后的内容呈现到屏幕上。In the embodiment of the present disclosure, the first device can use the real-time transport protocol (Real-time Transport Protocol, RTP) to encapsulate the first media data to obtain the RTP data, and then send the obtained RTP data to the preset first transmission frame rate. Secondary device. In the embodiment of the present disclosure, after receiving the first media data, the second device decodes the first media data, then renders and displays the decoded media data, and determines the current rendering frame rate. In this embodiment of the present disclosure, the second device may include a graphics processing unit (GPU) to render the decoded media data, and then the hardware in the second device may present the rendered content on the screen.

本公开实施例中,第二设备将第一媒体数据的渲染帧率反馈给第一设备,示例性,第二设备将渲染帧率利用实时传输控制协议(Realtime Transport Control Protocol,RTCP)封装后得到RTCP数据,再将得到的RTCP数据反馈给第一设备。In this embodiment of the disclosure, the second device feeds back the rendering frame rate of the first media data to the first device. For example, the second device encapsulates the rendering frame rate using the Realtime Transport Control Protocol (RTCP). RTCP data, and then feeds back the obtained RTCP data to the first device.

本公开实施例中,第一设备接收到第二设备的反馈的渲染帧率后,即可根据渲染帧率确定待发送的第二媒体数据的第二发送帧率,并以第二发送帧率发送第二媒体数据。以媒体数据是音视频为例,其中,第一媒体数据和第二媒体数据,可以为同一音视频文件的部分连续帧,也可以为不同的音视频文件。In the embodiment of the present disclosure, after the first device receives the rendering frame rate fed back by the second device, it can determine the second sending frame rate of the second media data to be sent based on the rendering frame rate, and use the second sending frame rate to determine the second sending frame rate of the second media data to be sent. Send second media data. Taking the media data as audio and video as an example, the first media data and the second media data may be partial consecutive frames of the same audio and video file, or may be different audio and video files.

需要说明的是,当网络拥塞时,第二设备无法及时收到第一媒体数据从而导致无法及时显示,此时,同一传输时间内第一媒体数据的渲染帧率小于预设第一发送帧率;当网络畅通时,同一传输时间内第一媒体数据的渲染帧率可等于预设第一发送帧率。此外,由于媒体数据的显示,会受到解码算法性能、渲染性能的影响,例如解码和/或渲染比较耗时,且发送帧率高的情况下,通常难以以预设第一发送帧率来播放第一媒体数据,渲染帧率一方面也是第二设备的性能的体现,过高的发送帧率容易造成接收端显示的拥塞,且使得第一设备的资源浪费;而在发送帧率较低,接收端设备渲染性能和解码算法性能较好的情况下,又会造成接收端设备资源的浪费;因此,根据接收端设备的反馈来调节发送帧率能尽可能在平衡设备资源和/或网络环境的情况下提升媒体数据显示的流畅度,从而提升用户体验。It should be noted that when the network is congested, the second device cannot receive the first media data in time and cannot display it in time. At this time, the rendering frame rate of the first media data within the same transmission time is less than the preset first sending frame rate. ; When the network is open, the rendering frame rate of the first media data within the same transmission time can be equal to the preset first sending frame rate. In addition, the display of media data will be affected by the performance of the decoding algorithm and rendering performance. For example, when decoding and/or rendering are time-consuming and the sending frame rate is high, it is usually difficult to play at the preset first sending frame rate. On the one hand, the rendering frame rate of the first media data is also a reflection of the performance of the second device. An excessively high sending frame rate can easily cause congestion on the receiving end display and waste resources of the first device; while when the sending frame rate is low, When the rendering performance and decoding algorithm performance of the receiving end device are good, it will cause a waste of resources on the receiving end device; therefore, adjusting the sending frame rate based on the feedback of the receiving end device can balance the device resources and/or the network environment as much as possible Improve the smoothness of media data display, thereby improving user experience.

然而,相关技术中仅仅是根据网络状况对发送的媒体数据进行调整,没有对媒体数据从采集到渲染显示的整个过程中进行监控,并进行反馈,即接收端设备的性能和接收端设备解码算法性能在整个媒体数据的调整过程中没有得到体现。However, the related technology only adjusts the sent media data according to the network conditions, and does not monitor the entire process of media data from collection to rendering and display, and provides feedback, that is, the performance of the receiving end device and the decoding algorithm of the receiving end device. Performance is not reflected in the entire media data adjustment process.

对此,本公开的实施例中,第一设备根据第二设备反馈的渲染帧率调整发送帧率,使得第一设备的发送帧率与第二设备的性能和/或网络环境相适配,能尽可能在平衡设备资源和/或网络环境的情况下提升媒体数据显示的流畅度,从而提升用户体验。In this regard, in embodiments of the present disclosure, the first device adjusts the sending frame rate according to the rendering frame rate fed back by the second device, so that the sending frame rate of the first device adapts to the performance and/or network environment of the second device, It can improve the smoothness of media data display while balancing device resources and/or network environment as much as possible, thereby improving user experience.

在一些实施例中,所述方法还包括:In some embodiments, the method further includes:

接收所述第二设备基于所述第一媒体数据反馈的网络参数;Receive network parameters fed back by the second device based on the first media data;

根据所述网络参数,确定所述第二媒体数据的发送码率和目标分辨率;Determine the transmission code rate and target resolution of the second media data according to the network parameters;

所述基于所述第二发送帧率向所述第二设备发送所述第二媒体数据,包括:The sending the second media data to the second device based on the second sending frame rate includes:

基于所述第二发送帧率、所述发送码率向所述第二设备发送所述目标分辨率的所述第二媒体数据。Send the second media data of the target resolution to the second device based on the second sending frame rate and the sending code rate.

在本公开实施例中,第一设备以预设的第一发送帧率发送第一媒体数据给第二设备。第二设备基于接收到的第一媒体数据,得到网络参数并反馈给第一设备;其中,网络参数包括:丢包率(Loss Rate)、接收端估计码率最大值(Receiver Estimated Max Bitrate,REMB)和往返时延(Round-Trip Time,RTT)等。In this embodiment of the present disclosure, the first device sends the first media data to the second device at a preset first sending frame rate. Based on the received first media data, the second device obtains network parameters and feeds them back to the first device; wherein the network parameters include: packet loss rate (Loss Rate), receiver estimated maximum bitrate (Receiver Estimated Max Bitrate, REMB ) and round-trip delay (Round-Trip Time, RTT), etc.

在本公开实施例中,第一设备接收到第二设备反馈的网络参数后,根据网络参数,确定第二媒体数据的发送码率和目标分辨率;然后基于第二发送帧率、发送码率向第二设备发送目标分辨率的第二媒体数据。In this embodiment of the present disclosure, after receiving the network parameters fed back by the second device, the first device determines the transmission code rate and target resolution of the second media data based on the network parameters; and then based on the second transmission frame rate, transmission code rate Send second media data at the target resolution to the second device.

由于在网络拥塞时,第二设备可能无法及时收到媒体数据从而导致无法及时显示,对应的,第二设备媒体数据显示的流畅感可能不好,即网络环境,也会影响媒体数据的显示。When the network is congested, the second device may not be able to receive the media data in time and therefore cannot display it in time. Correspondingly, the media data displayed on the second device may not be smooth. That is, the network environment may also affect the display of the media data.

对此,本公开第一设备接收第二设备基于第一媒体数据反馈的网络参数,来确定第二媒体数据的发送码率和目标分辨率。其中,码率是数据传输时单位时间传送的数据位数,单位为bps(bit per second),码率和媒体数据质量有关,相应的,码率越大,媒体数据画面越清晰画质越高。当网络畅通时,可适当增大或维持发送码率值,网络拥塞时,可适当减小发送码率值。其中,分辨率表征每一张媒体数据图像上的像素数量,其影响图像大小,与图像大小成正比。示例性的,分辨率越高,图像越大,传输媒体数据所需的带宽越大;分辨率越低,图像越小,传输媒体数据所需的带宽越小。当网络畅通时,可适当增大或维持目标分辨率值,网络拥塞时,可适当减小目标分辨率值。因此本公开实施例根据网络参数调节码率和分辨率有助于调节第二媒体数据的显示。In this regard, the first device of the present disclosure receives the network parameters fed back by the second device based on the first media data to determine the transmission code rate and target resolution of the second media data. Among them, the code rate is the number of data bits transmitted per unit time during data transmission, and the unit is bps (bit per second). The code rate is related to the quality of media data. Correspondingly, the greater the code rate, the clearer the media data picture and the higher the picture quality. . When the network is smooth, the sending code rate value can be appropriately increased or maintained; when the network is congested, the sending code rate value can be appropriately reduced. Among them, resolution represents the number of pixels on each media data image, which affects the image size and is proportional to the image size. For example, the higher the resolution, the larger the image, and the greater the bandwidth required to transmit media data; the lower the resolution, the smaller the image, and the smaller the bandwidth required to transmit media data. When the network is smooth, the target resolution value can be appropriately increased or maintained; when the network is congested, the target resolution value can be appropriately reduced. Therefore, the embodiment of the present disclosure adjusts the code rate and resolution according to network parameters to help adjust the display of the second media data.

可以理解的是,本公开实施例中,第一设备根据网络参数以及第二设备反馈的渲染帧率确定发送帧率、发送码率以及目标分辨率,使得第二媒体数据的发送能与第二设备的渲染能力以及当前网络环境相适配,能尽可能在平衡设备资源以及网络资源的情况下提升媒体数据显示的流畅度,从而提升用户体验。It can be understood that in the embodiment of the present disclosure, the first device determines the sending frame rate, sending code rate and target resolution according to the network parameters and the rendering frame rate fed back by the second device, so that the sending of the second media data can be consistent with the second The rendering capabilities of the device are adapted to the current network environment, which can improve the smoothness of media data display while balancing device resources and network resources as much as possible, thereby improving user experience.

在一些实施例中,所述网络参数包括:接收端估计码率最大值;In some embodiments, the network parameters include: the maximum estimated code rate at the receiving end;

所述根据所述网络参数,确定所述第二媒体数据的发送码率和目标分辨率,包括:Determining the sending code rate and target resolution of the second media data according to the network parameters includes:

若所述接收端估计码率最大值小于预设发送码率阈值,根据所述接收端估计码率最大值调整所述第二媒体数据的目标分辨率,并根据所述接收端估计码率最大值确定所述第二媒体数据的发送码率;If the maximum estimated code rate of the receiving end is less than the preset transmission code rate threshold, adjust the target resolution of the second media data according to the maximum estimated code rate of the receiving end, and adjust the target resolution of the second media data according to the maximum estimated code rate of the receiving end. The value determines the sending code rate of the second media data;

若所述接收端估计码率最大值大于或等于所述预设发送码率阈值,维持所述目标分辨率不变,根据所述接收端估计码率最大值确定所述第二媒体数据的发送码率。If the maximum estimated code rate of the receiving end is greater than or equal to the preset transmission code rate threshold, the target resolution is maintained unchanged, and the transmission of the second media data is determined based on the maximum estimated code rate of the receiving end. Code rate.

本公开实施例中,网络参数包括接收端估计码率最大值,接收端估计码率最大值可表征第二设备的可用带宽,能够表征当前网络环境是否拥塞。示例性的,带宽较大的情况下,数据的传输速度较快,第二设备画面显示流畅;带宽较小的情况下,第二设备显示的画面容易出现延迟、马赛克、花屏等现象。In the embodiment of the present disclosure, the network parameters include the maximum estimated code rate at the receiving end. The maximum estimated code rate at the receiving end can represent the available bandwidth of the second device and can represent whether the current network environment is congested. For example, when the bandwidth is large, the data transmission speed is faster, and the screen display of the second device is smooth; when the bandwidth is small, the screen displayed by the second device is prone to delays, mosaics, screen distortion, and other phenomena.

在本公开实施例中,第一设备将接收端估计码率最大值与预设发送码率阈值进行比较,其中,预设发送码率阈值可表征当前分辨率下的媒体数据的发送码率下限。若接收端估计码率最大值低于该预设发送码率阈值,如果是视频数据,图像会不清晰,视频质量会非常差;如果是音频数据,音质损失会较严重。对应的,若接收端估计码率最大值大于或等于该预设发送码率阈值,表明媒体数据质量较好,但是如果接收端估计码率最大值较小,会造成媒体数据传输丢帧、播放卡顿等问题,因此,本公开可根据接收端估计码率最大值与预设发送码率阈值之间的大小关系来调整目标分辨率和发送码率,以适配当前的网络环境。In this embodiment of the present disclosure, the first device compares the maximum estimated code rate of the receiving end with a preset transmission code rate threshold, where the preset transmission code rate threshold can represent the lower limit of the transmission code rate of media data at the current resolution. . If the maximum bit rate estimated by the receiving end is lower than the preset sending bit rate threshold, if it is video data, the image will be unclear and the video quality will be very poor; if it is audio data, the sound quality loss will be serious. Correspondingly, if the maximum value of the bit rate estimated by the receiving end is greater than or equal to the preset transmission bit rate threshold, it indicates that the media data quality is good. However, if the maximum value of the bit rate estimated by the receiving end is smaller, it will cause frame loss and playback of the media data. Therefore, the present disclosure can adjust the target resolution and transmission code rate according to the relationship between the maximum estimated code rate at the receiving end and the preset transmission code rate threshold to adapt to the current network environment.

在一种实施例中,当接收端估计码率最大值小于预设发送码率阈值时,说明网络环境较差,此时可根据接收端估计码率最大值调整第二媒体数据的目标分辨率,例如降低第二媒体数据的目标分辨率,且根据接收端估计码率最大值确定第二媒体数据的发送码率,例如,在接收端估计码率最大值基础上适当降低发送码率的数值作为第二媒体数据的发送码率。In one embodiment, when the maximum value of the bit rate estimated by the receiving end is less than the preset transmission code rate threshold, it indicates that the network environment is poor. At this time, the target resolution of the second media data can be adjusted according to the maximum value of the bit rate estimated by the receiving end. , for example, reduce the target resolution of the second media data, and determine the transmission code rate of the second media data based on the maximum estimated code rate of the receiving end, for example, appropriately reduce the value of the transmission code rate based on the maximum estimated code rate of the receiving end. As the sending code rate of the second media data.

在一种实施例中,当接收端估计码率最大值大于或等于预设发送码率阈值时,说明网络环境较好,此时可维持所述目标分辨率不变,根据接收端估计码率最大值确定第二媒体数据的发送码率,例如,在接收端估计码率最大值基础上适当提高发送码率的数值作为第二媒体数据的发送码率。In one embodiment, when the maximum estimated code rate at the receiving end is greater than or equal to the preset transmission code rate threshold, it indicates that the network environment is good. At this time, the target resolution can be maintained unchanged. According to the estimated code rate at the receiving end, The maximum value determines the transmission code rate of the second media data. For example, based on the maximum value of the code rate estimated by the receiving end, the value of the transmission code rate is appropriately increased as the transmission code rate of the second media data.

可以理解的是,本公开实施例在接收端估计码率最大值小于预设发送码率阈值的情况下,根据接收端估计码率最大值调整第二媒体数据的目标分辨率,以减小例如图像数据的占用内存,从而节约媒体数据传输所占用的带宽,因而能尽可能平衡网络状况对第二设备显示第二媒体数据的影响。此外,本公开实施例在接收端估计码率最大值大于或等于预设发送码率阈值且分辨率一定的情况下,根据接收端估计码率最大值确定第二媒体数据的发送码率,使得第二媒体数据的发送能与当前网络环境相适配,能尽可能在平衡网络资源的情况下提升媒体数据显示的清晰度。It can be understood that in the embodiment of the present disclosure, when the maximum estimated code rate at the receiving end is less than the preset transmission code rate threshold, the target resolution of the second media data is adjusted according to the maximum estimated code rate at the receiving end to reduce, for example, Image data occupies memory, thereby saving bandwidth occupied by media data transmission, thus balancing the impact of network conditions on the display of the second media data on the second device as much as possible. In addition, in the embodiment of the present disclosure, when the maximum estimated code rate at the receiving end is greater than or equal to the preset transmission code rate threshold and the resolution is constant, the transmission code rate of the second media data is determined based on the maximum estimated code rate at the receiving end, so that The transmission of the second media data can be adapted to the current network environment, and the clarity of media data display can be improved as much as possible while balancing network resources.

在一些实施例中,所述根据所述渲染帧率,确定待发送的所述第二媒体数据的第二发送帧率,包括:In some embodiments, determining the second sending frame rate of the second media data to be sent based on the rendering frame rate includes:

若所述渲染帧率与所述预设第一发送帧率不相等,调整所述渲染帧率,并将调整后的渲染帧率作为所述第二媒体数据的第二发送帧率;If the rendering frame rate is not equal to the preset first sending frame rate, adjust the rendering frame rate, and use the adjusted rendering frame rate as the second sending frame rate of the second media data;

若所述渲染帧率与所述预设第一发送帧率相等,将所述渲染帧率作为所述第二媒体数据的第二发送帧率。If the rendering frame rate is equal to the preset first sending frame rate, the rendering frame rate is used as the second sending frame rate of the second media data.

如前所述的,网络环境不同,渲染帧率与预设第一发送帧率的大小关系不同;此外,渲染帧率可体现第二设备的性能,当第二设备性能差时,第一媒体数据的渲染帧率可小于预设第一发送帧率,当第二设备性能好时,第一媒体数据的渲染帧率也可等于预设第一发送帧率。As mentioned above, the network environment is different, and the relationship between the rendering frame rate and the preset first sending frame rate is different; in addition, the rendering frame rate can reflect the performance of the second device. When the performance of the second device is poor, the first media The rendering frame rate of the data may be lower than the preset first sending frame rate. When the performance of the second device is good, the rendering frame rate of the first media data may also be equal to the preset first sending frame rate.

对此,本公开实施例中,若渲染帧率与预设第一发送帧率不相等,即渲染帧率小于预设第一发送帧率,说明第二设备性能和/或网络环境不佳,预设的第一发送帧率已经不合适了,此时可在当前设备性能和网络环境下尽可能的确定合适的发送帧率以提升第二媒体数据的显示效果,例如可将大于渲染帧率的值作为第二发送帧率;若渲染帧率与第一发送帧率相等,说明第二设备性能和网络环境佳,此时可维持第一设备的发送帧率不变。In this regard, in the embodiment of the present disclosure, if the rendering frame rate is not equal to the preset first sending frame rate, that is, the rendering frame rate is less than the preset first sending frame rate, it means that the performance of the second device and/or the network environment is poor, The preset first sending frame rate is no longer appropriate. At this time, the appropriate sending frame rate can be determined as much as possible under the current device performance and network environment to improve the display effect of the second media data. For example, it can be greater than the rendering frame rate. The value is used as the second sending frame rate; if the rendering frame rate is equal to the first sending frame rate, it means that the performance of the second device and the network environment are good, and the sending frame rate of the first device can be maintained unchanged.

可以理解的是,本公开实施例中,若渲染帧率与预设第一发送帧率不相等,可在当前设备性能和/或网络环境下尽可能的确定合适的发送帧率,以提升媒体数据显示的流畅感;若渲染帧率与第一发送帧率相等,可维持第一设备的发送帧率不变,以保持媒体数据显示的稳定性。It can be understood that in the embodiments of the present disclosure, if the rendering frame rate is not equal to the preset first sending frame rate, an appropriate sending frame rate can be determined as much as possible under the current device performance and/or network environment to improve the media Data display is smooth; if the rendering frame rate is equal to the first sending frame rate, the sending frame rate of the first device can be maintained unchanged to maintain the stability of media data display.

在一些实施例中,所述调整所述渲染帧率,并将调整后的渲染帧率作为所述第二媒体数据的第二发送帧率,包括:In some embodiments, adjusting the rendering frame rate and using the adjusted rendering frame rate as the second sending frame rate of the second media data includes:

对预设时长内的渲染帧率进行滤波,获得滤波后的渲染帧率;Filter the rendering frame rate within the preset time period to obtain the filtered rendering frame rate;

基于所述滤波后的渲染帧率与预设帧率调节值,确定调整后的渲染帧率并将调整后的渲染帧率作为所述第二媒体数据的第二发送帧率;其中,第二发送帧率小于或等于所述预设第一发送帧率。Based on the filtered rendering frame rate and the preset frame rate adjustment value, the adjusted rendering frame rate is determined and the adjusted rendering frame rate is used as the second sending frame rate of the second media data; wherein, the second The sending frame rate is less than or equal to the preset first sending frame rate.

需要说明的是,滤波算法包括:维纳滤波、卡尔曼滤波等,本公开实施例并不限定所采用的滤波算法。本公开实施例中,第一设备对第二设备反馈的渲染帧率进行滤波,可减少渲染帧率出现异常值的情况发生。然后基于滤波后的渲染帧率与预设帧率调节值调整发送帧率,例如可以是将滤波后的渲染帧率与预设帧率调节值相加,将相加后的值作为第二媒体数据的第二发送帧率;还可以是将滤波后的渲染帧率与预设帧率调节值相乘,将相乘后的值作为第二媒体数据的第二发送帧率。It should be noted that filtering algorithms include: Wiener filtering, Kalman filtering, etc., and the embodiments of the present disclosure do not limit the filtering algorithm used. In the embodiment of the present disclosure, the first device filters the rendering frame rate fed back by the second device, which can reduce the occurrence of abnormal values in the rendering frame rate. Then adjust the sending frame rate based on the filtered rendering frame rate and the preset frame rate adjustment value. For example, the filtered rendering frame rate and the preset frame rate adjustment value can be added, and the added value is used as the second media The second sending frame rate of the data; it may also be that the filtered rendering frame rate is multiplied by the preset frame rate adjustment value, and the multiplied value is used as the second sending frame rate of the second media data.

需要说明的是,由于渲染帧率与预设第一发送帧率不相等的情况下,渲染帧率通常是小于预设第一发送帧率的,且说明第二设备的性能和/或当前的网络环境不佳,因此第二发送帧率也是小于或等于预设第一发送帧率的。It should be noted that, since the rendering frame rate is not equal to the preset first sending frame rate, the rendering frame rate is usually smaller than the preset first sending frame rate, and this indicates the performance of the second device and/or the current The network environment is not good, so the second sending frame rate is also less than or equal to the preset first sending frame rate.

可以理解的是,本公开实施例中,基于滤波后的渲染帧率与预设帧率调节值调整发送帧率,能提升对第二发送帧率确认的准确性,以提升第二媒体数据的显示效果。It can be understood that in the embodiment of the present disclosure, adjusting the sending frame rate based on the filtered rendering frame rate and the preset frame rate adjustment value can improve the accuracy of confirming the second sending frame rate, so as to improve the accuracy of the second media data. display effect.

图2是本公开实施例提供的数据传输方法的实现流程示意图二,应用于第二设备,如图2所示,该方法包括如下步骤:Figure 2 is a schematic flowchart 2 of the implementation of the data transmission method provided by an embodiment of the present disclosure. It is applied to the second device. As shown in Figure 2, the method includes the following steps:

S201、接收第一设备以预设第一发送帧率发送的第一媒体数据;S201. Receive the first media data sent by the first device at the preset first sending frame rate;

S202、基于所述第一媒体数据确定渲染帧率;其中,所述渲染帧率是所述第二设备显示所述第一媒体数据的显示频率;S202. Determine the rendering frame rate based on the first media data; wherein the rendering frame rate is the display frequency at which the second device displays the first media data;

S203、将所述渲染帧率反馈给所述第一设备;其中,所述渲染帧率用于所述第一设备确定待发送的第二媒体数据的第二发送帧率;S203. Feed back the rendering frame rate to the first device; wherein the rendering frame rate is used by the first device to determine the second sending frame rate of the second media data to be sent;

S204、接收所述第一设备基于所述第二发送帧率发送的第二媒体数据。S204. Receive second media data sent by the first device based on the second sending frame rate.

以第一媒体数据是视频为例,第一设备可以将采集到的模拟信号转换成数字信号,第一设备可对数字信号进行编码后获得第一媒体数据。本公开实施例中,第一设备可将媒体数据的采集帧率作为预设第一发送帧率。Taking the first media data as a video as an example, the first device can convert the collected analog signal into a digital signal, and the first device can encode the digital signal to obtain the first media data. In the embodiment of the present disclosure, the first device may use the collection frame rate of the media data as the preset first sending frame rate.

在本公开实施例中,第一设备可以利用实时传输协议将第一媒体数据封装后得到的数据以预设第一发送帧率发送给第二设备。本公开实施例中,第二设备接收到第一媒体数据后,可对第一媒体数据进行解码,然后对解码的媒体数据进行渲染显示,并确定当前的渲染帧率。本公开实施例中,第二设备中可包括图形处理器可对解码的媒体数据进行渲染,然后第二设备中的硬件可把渲染后的内容呈现到屏幕上。In this embodiment of the present disclosure, the first device may use a real-time transmission protocol to send the data obtained after encapsulating the first media data to the second device at a preset first sending frame rate. In the embodiment of the present disclosure, after receiving the first media data, the second device may decode the first media data, then render and display the decoded media data, and determine the current rendering frame rate. In this embodiment of the present disclosure, the second device may include a graphics processor to render the decoded media data, and then the hardware in the second device may present the rendered content on the screen.

本公开实施例中,第二设备可利用实时传输控制协议将第一媒体数据的渲染帧率封装并反馈给第一设备。In this embodiment of the present disclosure, the second device may use the real-time transmission control protocol to encapsulate the rendering frame rate of the first media data and feed it back to the first device.

本公开实施例中,第一设备接收到第二设备的反馈的渲染帧率后,即可根据渲染帧率确定待发送的第二媒体数据的第二发送帧率,并以第二发送帧率发送第二媒体数据。In the embodiment of the present disclosure, after the first device receives the rendering frame rate fed back by the second device, it can determine the second sending frame rate of the second media data to be sent based on the rendering frame rate, and use the second sending frame rate to determine the second sending frame rate of the second media data to be sent. Send second media data.

需要说明的是,同一传输时间内第一媒体数据的渲染帧率小于或等于预设第一发送帧率,本公开实施例中,可根据渲染帧率和预设第一发送帧率的大小关系,获知设备性能和/或网络环境对媒体数据显示的影响,并对待发送的第二媒体数据的发送帧率进行调整。It should be noted that the rendering frame rate of the first media data within the same transmission time is less than or equal to the preset first sending frame rate. In the embodiment of the present disclosure, the rendering frame rate can be based on the relationship between the rendering frame rate and the preset first sending frame rate. , learn the impact of device performance and/or network environment on media data display, and adjust the sending frame rate of the second media data to be sent.

需要说明的是,由于媒体数据的显示受网络环境的影响,同一传输时间内第一媒体数据的渲染帧率小于或等于预设第一发送帧率。此外,由于媒体数据的显示,会受到解码算法性能、渲染性能的影响,例如解码和/或渲染比较耗时,且发送帧率高的情况下,通常难以以预设第一发送帧率来播放第一媒体数据,渲染帧率一方面也是第二设备的性能的体现,过高的发送帧率容易造成接收端显示的拥塞,且使得第一设备的资源浪费;而在发送帧率较低,接收端设备渲染性能和解码算法性能较好的情况下,又会造成接收端设备资源的浪费;因此,根据接收端设备的反馈来调节发送帧率能尽可能在平衡设备资源和/或网络环境的情况下提升媒体数据显示的流畅度,从而提升用户体验。It should be noted that since the display of media data is affected by the network environment, the rendering frame rate of the first media data within the same transmission time is less than or equal to the preset first sending frame rate. In addition, the display of media data will be affected by the performance of the decoding algorithm and rendering performance. For example, when decoding and/or rendering are time-consuming and the sending frame rate is high, it is usually difficult to play at the preset first sending frame rate. On the one hand, the rendering frame rate of the first media data is also a reflection of the performance of the second device. An excessively high sending frame rate can easily cause congestion on the receiving end display and waste resources of the first device; while when the sending frame rate is low, When the rendering performance and decoding algorithm performance of the receiving end device are good, it will cause a waste of resources on the receiving end device; therefore, adjusting the sending frame rate based on the feedback of the receiving end device can balance the device resources and/or the network environment as much as possible Improve the smoothness of media data display, thereby improving user experience.

本公开的实施例中,第一设备根据第二设备反馈的渲染帧率调整发送帧率,使得第一设备的发送帧率和第二设备的性能和/或网络环境相适配,能尽可能在平衡设备资源和/或网络环境的情况下提升媒体数据显示的流畅度,从而提升用户体验。In the embodiment of the present disclosure, the first device adjusts the sending frame rate according to the rendering frame rate fed back by the second device, so that the sending frame rate of the first device adapts to the performance and/or network environment of the second device, and can be as possible as possible. Improve the smoothness of media data display while balancing device resources and/or network environment, thereby improving user experience.

在一些实施例中,所述基于所述第一媒体数据确定渲染帧率,包括:In some embodiments, determining the rendering frame rate based on the first media data includes:

对接收到的所述第一媒体数据进行解码,获取第一解码数据;Decode the received first media data to obtain first decoded data;

对所述第一解码数据进行后处理,获取第一后处理数据;Perform post-processing on the first decoded data to obtain first post-processed data;

对所述第一后处理数据进行渲染,获取渲染帧率。Render the first post-processing data to obtain a rendering frame rate.

可以理解的是,在媒体数据中存在着大量的冗余信息,编码就是对媒体数据进行压缩,去除媒体数据中的冗余信息。在本公开实施例中,第二设备可对接收到的第一媒体数据进行解码,即对编码后的数据进行解压缩。本公开实施例中,第二设备可对解码后的数据进行后处理,即对媒体数据中可能产生质量跳变的帧进行处理。本公开实施例中,第二设备可对后处理后的数据进行渲染,将后处理后的数据进行显示,并获取渲染帧率。It is understandable that there is a large amount of redundant information in the media data, and encoding is to compress the media data and remove the redundant information in the media data. In this embodiment of the present disclosure, the second device may decode the received first media data, that is, decompress the encoded data. In the embodiment of the present disclosure, the second device may perform post-processing on the decoded data, that is, processing frames in the media data that may cause quality jumps. In the embodiment of the present disclosure, the second device can render the post-processed data, display the post-processed data, and obtain the rendering frame rate.

本公开的实施例中,第二设备对接收到的第一媒体数据进行解码、后处理、渲染,能在识别媒体数据后显示媒体数据时,减少因媒体数据质量问题而闪烁的情况发生,提高媒体数据显示的流畅度。In the embodiment of the present disclosure, the second device decodes, post-processes, and renders the received first media data, and can reduce the occurrence of flickering due to media data quality problems when displaying the media data after identifying the media data, and improve the quality of the media data. The smoothness of media data display.

在一些实施例中,所述方法还包括:In some embodiments, the method further includes:

基于所述第一媒体数据确定网络参数;Determine network parameters based on the first media data;

将所述网络参数反馈给所述第一设备;其中,所述网络参数用于所述第一设备确定所述第二媒体数据的发送码率和目标分辨率;Feed back the network parameters to the first device; wherein the network parameters are used by the first device to determine the sending code rate and target resolution of the second media data;

接收所述第一设备基于所述第二发送帧率、所述发送码率发送的所述目标分辨率的第二媒体数据。Receive second media data of the target resolution sent by the first device based on the second sending frame rate and the sending code rate.

在本公开实施例中,第一设备以预设的第一发送帧率发送第一媒体数据给第二设备。第二设备基于接收到的第一媒体数据,得到网络参数并反馈给第一设备。In this embodiment of the present disclosure, the first device sends the first media data to the second device at a preset first sending frame rate. The second device obtains network parameters based on the received first media data and feeds them back to the first device.

在本公开实施例中,第一设备接收到第二设备反馈的网络参数后,根据网络参数,确定第二媒体数据的发送码率和目标分辨率;然后基于第二发送帧率、发送码率向第二设备发送目标分辨率的第二媒体数据。In this embodiment of the present disclosure, after receiving the network parameters fed back by the second device, the first device determines the transmission code rate and target resolution of the second media data based on the network parameters; and then based on the second transmission frame rate, transmission code rate Send second media data at the target resolution to the second device.

本公开实施例中,第一设备根据网络参数以及第二设备反馈的渲染帧率确定发送帧率、发送码率以及目标分辨率,使得第二媒体数据的发送能与第二设备的渲染能力以及当前网络环境相适配,能尽可能在平衡设备资源以及网络资源的情况下提升媒体数据显示的流畅度,从而提升用户体验。In the embodiment of the present disclosure, the first device determines the sending frame rate, sending code rate and target resolution according to the network parameters and the rendering frame rate fed back by the second device, so that the sending of the second media data can be consistent with the rendering capabilities of the second device and the Adapting to the current network environment can improve the smoothness of media data display while balancing device resources and network resources as much as possible, thereby improving user experience.

图3为本公开实施例提供的一种数据传输方法的交互图,如图3所示,包括如下步骤:Figure 3 is an interaction diagram of a data transmission method provided by an embodiment of the present disclosure. As shown in Figure 3, it includes the following steps:

S301、第一设备将第一媒体数据以预设第一发送帧率发送给第二设备;S301. The first device sends the first media data to the second device at the preset first sending frame rate;

S302、第二设备基于所述第一媒体数据确定渲染帧率;其中,所述渲染帧率是所述第二设备显示所述第一媒体数据的显示频率;S302. The second device determines the rendering frame rate based on the first media data; wherein the rendering frame rate is the display frequency at which the second device displays the first media data;

S303、第二设备将所述渲染帧率反馈给所述第一设备;S303. The second device feeds back the rendering frame rate to the first device;

S304、第一设备根据所述渲染帧率,确定待发送的第二媒体数据的第二发送帧率;S304. The first device determines the second sending frame rate of the second media data to be sent according to the rendering frame rate;

S305、第一设备基于所述第二发送帧率向所述第二设备发送所述第二媒体数据。S305. The first device sends the second media data to the second device based on the second sending frame rate.

本公开的实施例中,第一设备根据第二设备反馈的渲染帧率调整发送帧率,使得第一设备的发送帧率和第二设备的性能和/或网络环境相适配,能尽可能在平衡设备资源和/或网络环境的情况下提升媒体数据显示的流畅度,从而提升用户体验。In the embodiment of the present disclosure, the first device adjusts the sending frame rate according to the rendering frame rate fed back by the second device, so that the sending frame rate of the first device adapts to the performance and/or network environment of the second device, and can be as possible as possible. Improve the smoothness of media data display while balancing device resources and/or network environment, thereby improving user experience.

图4为本公开实施例提供的一种数据传输模块关系图,如图4所示,媒体数据源通过媒体数据发送调节模块L401基于实时传输协议发送端L402(即本公开实施例的第一设备)采用实时传输协议发送给实时传输协议接收端L403(即本公开实施例的第二设备);其中,媒体数据源包括本公开的第一媒体数据,媒体数据发送调节模块L401属于本公开实施例中第一设备中的功能模块。第二设备接收到第一媒体数据后,第二设备的网络参数统计模块L404基于接收到的第一媒体数据,得到包括丢包率、接收端估计码率最大值、往返时延等的网络参数;同时,第二设备的解码模块L405对接收到的第一媒体数据进行解码,再通过后处理模块L406对解码的媒体数据中可能产生质量跳变的帧进行处理,随后通过渲染模块L407对后处理的媒体数据进行渲染显示,进一步的,第二设备的渲染帧率统计模块L408获取当前的渲染帧率。Figure 4 is a data transmission module relationship diagram provided by an embodiment of the present disclosure. As shown in Figure 4, the media data source uses the media data transmission adjustment module L401 based on the real-time transmission protocol sending end L402 (i.e., the first device of the embodiment of the present disclosure). ) is sent to the real-time transmission protocol receiving end L403 (ie, the second device of the embodiment of the present disclosure) using the real-time transmission protocol; wherein the media data source includes the first media data of the present disclosure, and the media data transmission adjustment module L401 belongs to the embodiment of the present disclosure. Function module in the first device. After the second device receives the first media data, the network parameter statistics module L404 of the second device obtains network parameters including the packet loss rate, the maximum estimated code rate of the receiving end, the round-trip delay, etc. based on the received first media data. ; At the same time, the decoding module L405 of the second device decodes the received first media data, and then processes the frames that may cause quality jumps in the decoded media data through the post-processing module L406, and then processes the post-processing through the rendering module L407. The processed media data is rendered and displayed, and further, the rendering frame rate statistics module L408 of the second device obtains the current rendering frame rate.

第二设备在获得网络参数和第一媒体数据的渲染帧率后,通过实时传输控制协议发送端L409(即本公开实施例的第二设备)基于实时传输控制协议将网络参数和渲染帧率反馈给实时传输控制协议接收端L410(即本公开实施例的第一设备)。After obtaining the network parameters and the rendering frame rate of the first media data, the second device feeds back the network parameters and the rendering frame rate based on the real-time transmission control protocol through the real-time transmission control protocol sending terminal L409 (ie, the second device in the embodiment of the present disclosure). To the real-time transmission control protocol receiving end L410 (ie, the first device in the embodiment of the present disclosure).

第一设备中的发送端反馈模块L411接收到第二设备反馈的网络参数和渲染帧率后,通过媒体数据发送调节模块L401对媒体数据源中待发送的第二媒体数据的发送参数进行调节;其中,调节的发送参数包括本公开实施例的第二发送帧率、发送码率以及分辨率等。After receiving the network parameters and rendering frame rate fed back by the second device, the sending end feedback module L411 in the first device adjusts the sending parameters of the second media data to be sent in the media data source through the media data sending adjustment module L401; The adjusted transmission parameters include the second transmission frame rate, transmission code rate, resolution, etc. according to the embodiment of the present disclosure.

本公开实施例中,第一设备根据第二设备反馈的渲染帧率调整发送帧率,使得第一设备的发送帧率和第二设备的性能和/或网络环境相适配,能尽可能在平衡设备资源和/或网络环境的情况下提升媒体数据显示的流畅度,从而提升用户体验。In the embodiment of the present disclosure, the first device adjusts the sending frame rate according to the rendering frame rate fed back by the second device, so that the sending frame rate of the first device matches the performance of the second device and/or the network environment, and can be used as much as possible in the second device. Improve the smoothness of media data display while balancing device resources and/or network environment, thereby improving user experience.

图5A为本公开实施例提供的一种数据传输方法的交互示意图一,侧重于第二设备,如图5A所示,接收端(即本公开实施例的第二设备)接收到由发送端(即本公开实施例的第一设备)的媒体数据发送调节模块L401基于实时传输协议发送的第一媒体数据后,接收端的网络参数统计模块L404基于接收到的第一媒体数据,得到网络参数。同时,接收端的解码模块L405对接收到的第一媒体数据进行解码,然后接收端的后处理模块L406对解码的媒体数据中可能产生质量跳变的帧进行处理,然后接收端的渲染模块L407对后处理后的媒体数据进行渲染显示,进一步的,接收端的渲染帧率统计模块L408获取当前的渲染帧率。Figure 5A is an interactive schematic diagram 1 of a data transmission method provided by an embodiment of the disclosure, focusing on the second device. As shown in Figure 5A, the receiving end (i.e., the second device of the embodiment of the disclosure) receives the data transmitted by the sending end ( That is, after the media data adjustment module L401 of the first device of the embodiment of the present disclosure sends the first media data based on the real-time transmission protocol, the network parameter statistics module L404 of the receiving end obtains network parameters based on the received first media data. At the same time, the decoding module L405 of the receiving end decodes the received first media data, and then the post-processing module L406 of the receiving end processes the frames that may cause quality jumps in the decoded media data, and then the rendering module L407 of the receiving end performs post-processing The final media data is rendered and displayed. Further, the rendering frame rate statistics module L408 of the receiving end obtains the current rendering frame rate.

接收端将第一媒体数据的渲染帧率和网络参数基于实时传输控制协议由接收端反馈模块L501反馈给发送端。发送端的发送端反馈模块L411接收到接收端反馈的渲染帧率和网络参数后,通过发送端的媒体数据发送调节模块L401根据渲染帧率和网络参数确定待发送的第二媒体数据的第二发送帧率、发送码率、目标分辨率,并以第二发送帧率、发送码率向接收端发送目标分辨率的第二媒体数据。The receiving end feeds back the rendering frame rate and network parameters of the first media data to the sending end through the receiving end feedback module L501 based on the real-time transmission control protocol. After the sending end feedback module L411 of the sending end receives the rendering frame rate and network parameters fed back by the receiving end, the media data transmission adjustment module L401 of the sending end determines the second sending frame of the second media data to be sent according to the rendering frame rate and network parameters. rate, transmission code rate, and target resolution, and sends the second media data of the target resolution to the receiving end at the second transmission frame rate and transmission code rate.

需要说明的是,图5A中的媒体数据发送调节模块L401、网络参数统计模块L404、解码模块L405、后处理模块L406、渲染模块L407、渲染帧率统计模块L408、发送端反馈模块L411与图4中同一标识的模块可属于同样功能的模块。It should be noted that the media data transmission adjustment module L401, network parameter statistics module L404, decoding module L405, post-processing module L406, rendering module L407, rendering frame rate statistics module L408, and transmitter feedback module L411 in Figure 5A are the same as in Figure 4 Modules with the same identification in can belong to modules with the same function.

本公开实施例中,接收端对接收到的第一媒体数据进行解码、后处理、渲染,能在识别媒体数据后显示媒体数据时,减少因媒体数据质量问题而闪烁的情况发生,提高媒体数据显示的流畅度。In the embodiment of the present disclosure, the receiving end decodes, post-processes, and renders the received first media data, and can reduce the occurrence of flickering due to media data quality problems when displaying the media data after identifying the media data, and improve the quality of the media data. Display fluency.

图5B为本公开实施例提供的一种数据传输方法的交互示意图二,侧重于第一设备,如图5B所示,发送端(即本公开实施例的第一设备)中媒体数据发送控制模块L502基于实时传输协议将第一媒体数据封装发送给第二设备。接收端接(即本公开实施例的第二设备)收到第一媒体数据后,由接收端的网络参数及渲染帧率统计模块L503确定第一媒体数据的渲染帧率和网络参数,并将第一媒体数据的渲染帧率和网络参数基于实时传输控制协议由接收端反馈模块L501反馈给发送端。Figure 5B is an interactive schematic diagram 2 of a data transmission method provided by an embodiment of the disclosure, focusing on the first device. As shown in Figure 5B, the media data transmission control module in the sending end (ie, the first device of the embodiment of the disclosure) L502 encapsulates and sends the first media data to the second device based on the real-time transmission protocol. After the receiving terminal (i.e., the second device in the embodiment of the present disclosure) receives the first media data, the network parameter and rendering frame rate statistics module L503 of the receiving terminal determines the rendering frame rate and network parameters of the first media data, and sets the first media data to the first media data. The rendering frame rate and network parameters of a media data are fed back to the sending end by the receiving end feedback module L501 based on the real-time transmission control protocol.

发送端的发送端反馈模块L411接收到接收端反馈的渲染帧率和网络参数后,判断渲染帧率是否不等于发送帧率,若渲染帧率不等于发送帧率,由发送端的滤波模块L504对渲染帧率进行滤波处理,减少渲染帧率出现异常值的情况发生,然后发送端的发送帧率控制模块L505基于滤波后的渲染帧率确定第二媒体数据的第二发送帧率,再由发送端的分辨率控制模块L506确定第二媒体数据的目标分辨率,同时,由发送端的码率控制模块L507确定第二媒体数据的发送码率;若渲染帧率等于发送帧率,由发送端的分辨率控制模块L506确定第二媒体数据的目标分辨率,同时,由发送端的码率控制模块L507确定第二媒体数据的发送码率。After receiving the rendering frame rate and network parameters fed back by the receiving end, the sending end feedback module L411 of the sending end determines whether the rendering frame rate is not equal to the sending frame rate. If the rendering frame rate is not equal to the sending frame rate, the filtering module L504 of the sending end determines whether the rendering frame rate is not equal to the sending frame rate. The frame rate is filtered to reduce the occurrence of abnormal values in the rendering frame rate. Then the sending frame rate control module L505 of the sending end determines the second sending frame rate of the second media data based on the filtered rendering frame rate, and then determines the second sending frame rate of the second media data based on the resolution of the sending end. The rate control module L506 determines the target resolution of the second media data, and at the same time, the code rate control module L507 of the sending end determines the sending code rate of the second media data; if the rendering frame rate is equal to the sending frame rate, the resolution control module of the sending end L506 determines the target resolution of the second media data, and at the same time, the code rate control module L507 of the transmitting end determines the transmission code rate of the second media data.

进一步的,发送端的媒体数据发送控制模块L502以第二发送帧率、发送码率向接收端发送目标分辨率的第二媒体数据。Further, the media data transmission control module L502 of the sending end sends the second media data of the target resolution to the receiving end at the second sending frame rate and the sending code rate.

需要说明的是,图5B中的发送端反馈模块L411、接收端反馈模块L501与图4、图5A中同一标识的模块可属于同样功能的模块。图5A中发送端的媒体数据发送调节模块L401可包括图5B中发送端的媒体数据发送控制模块L502、滤波模块L504、发送帧率控制模块L505、分辨率控制模块L506、码率控制模块L507。图5B中接收端的网络参数及渲染帧率统计模块L503可包括图5A中接收端的网络参数统计模块L404、解码模块L405、后处理模块L406、渲染模块L407、渲染帧率统计模块L408。It should be noted that the sending end feedback module L411 and the receiving end feedback module L501 in Figure 5B may belong to modules with the same function as the modules with the same identification in Figures 4 and 5A. The media data transmission adjustment module L401 of the transmitter in Figure 5A may include the media data transmission control module L502, filtering module L504, transmission frame rate control module L505, resolution control module L506, and code rate control module L507 of the transmitter in Figure 5B. The network parameter and rendering frame rate statistics module L503 of the receiving end in Figure 5B may include the network parameter statistics module L404, decoding module L405, post-processing module L406, rendering module L407, and rendering frame rate statistics module L408 of the receiving end in Figure 5A.

本公开实施例中,发送端根据接收端反馈的渲染帧率和网络参数确定发送帧率、发送码率以及目标分辨率,使得第二媒体数据的发送能与第二设备的性能以及当前网络环境相适配,能尽可能在平衡设备资源以及网络资源的情况下提升媒体数据显示的流畅度,从而提升用户体验。In the embodiment of the present disclosure, the sending end determines the sending frame rate, sending code rate and target resolution based on the rendering frame rate and network parameters fed back by the receiving end, so that the sending of the second media data can be consistent with the performance of the second device and the current network environment. Adaptation can improve the smoothness of media data display while balancing device resources and network resources as much as possible, thereby improving user experience.

图6是本公开实施例提供的一种应用于第一设备的数据传输装置示意图,如图6所示,数据传输装置600包括:Figure 6 is a schematic diagram of a data transmission device applied to the first device provided by an embodiment of the present disclosure. As shown in Figure 6, the data transmission device 600 includes:

第一发送模块601,用于将第一媒体数据以预设第一发送帧率发送给第二设备;The first sending module 601 is used to send the first media data to the second device at the preset first sending frame rate;

第一接收模块602,用于接收所述第二设备基于所述第一媒体数据反馈的渲染帧率;其中,所述渲染帧率是所述第二设备显示所述第一媒体数据的显示频率;The first receiving module 602 is configured to receive the rendering frame rate fed back by the second device based on the first media data; wherein the rendering frame rate is the display frequency at which the second device displays the first media data. ;

第一确定模块603,用于根据所述渲染帧率,确定待发送的第二媒体数据的第二发送帧率;The first determination module 603 is configured to determine the second sending frame rate of the second media data to be sent according to the rendering frame rate;

第二发送模块604,用于基于所述第二发送帧率向所述第二设备发送所述第二媒体数据。The second sending module 604 is configured to send the second media data to the second device based on the second sending frame rate.

在一些实施例中,所述装置还包括:In some embodiments, the device further includes:

第四接收模块,用于接收所述第二设备基于所述第一媒体数据反馈的网络参数;A fourth receiving module, configured to receive network parameters fed back by the second device based on the first media data;

第三确定模块,用于根据所述网络参数,确定所述第二媒体数据的发送码率和目标分辨率;A third determination module, configured to determine the transmission code rate and target resolution of the second media data according to the network parameters;

所述第二发送模块604,还用于基于所述第二发送帧率、所述发送码率向所述第二设备发送所述目标分辨率的所述第二媒体数据。The second sending module 604 is further configured to send the second media data of the target resolution to the second device based on the second sending frame rate and the sending code rate.

在一些实施例中,所述网络参数包括:接收端估计码率最大值;In some embodiments, the network parameters include: the maximum estimated code rate at the receiving end;

所述第三确定模块,还用于若所述接收端估计码率最大值小于预设发送码率阈值,根据所述接收端估计码率最大值调整所述第二媒体数据的目标分辨率,并根据所述接收端估计码率最大值确定所述第二媒体数据的发送码率;若所述接收端估计码率最大值大于或等于所述预设发送码率阈值,维持所述目标分辨率不变,根据所述接收端估计码率最大值确定所述第二媒体数据的发送码率。The third determination module is also configured to adjust the target resolution of the second media data according to the maximum estimated code rate of the receiving end if the maximum estimated code rate of the receiving end is less than the preset transmission code rate threshold, And determine the transmission code rate of the second media data according to the maximum estimated code rate of the receiving end; if the maximum estimated code rate of the receiving end is greater than or equal to the preset transmission code rate threshold, maintain the target resolution If the rate remains unchanged, the sending code rate of the second media data is determined according to the maximum estimated code rate of the receiving end.

在一些实施例中,所述第一确定模块603,还用于若所述渲染帧率与所述预设第一发送帧率不相等,调整所述渲染帧率,并将调整后的渲染帧率作为所述第二媒体数据的第二发送帧率;若所述渲染帧率与所述预设第一发送帧率相等,将所述渲染帧率作为所述第二媒体数据的第二发送帧率。In some embodiments, the first determination module 603 is also configured to adjust the rendering frame rate if the rendering frame rate is not equal to the preset first sending frame rate, and use the adjusted rendering frame The rate is used as the second sending frame rate of the second media data; if the rendering frame rate is equal to the preset first sending frame rate, the rendering frame rate is used as the second sending frame rate of the second media data. frame rate.

在一些实施例中,所述第一确定模块603,还用于若所述渲染帧率与所述预设第一发送帧率不相等,对预设时长内的渲染帧率进行滤波,获得滤波后的渲染帧率;基于所述滤波后的渲染帧率与预设帧率调节值,确定调整后的渲染帧率并将调整后的渲染帧率作为所述第二媒体数据的第二发送帧率,其中,第二发送帧率小于或等于所述预设第一发送帧率。In some embodiments, the first determination module 603 is also configured to filter the rendering frame rate within the preset time period if the rendering frame rate is not equal to the preset first sending frame rate to obtain the filtered based on the filtered rendering frame rate and the preset frame rate adjustment value, determine the adjusted rendering frame rate and use the adjusted rendering frame rate as the second sending frame of the second media data rate, wherein the second sending frame rate is less than or equal to the preset first sending frame rate.

图7是本公开实施例提供的一种应用于第二设备的数据传输装置示意图,如图7所示,数据传输装置700包括:Figure 7 is a schematic diagram of a data transmission device applied to a second device provided by an embodiment of the present disclosure. As shown in Figure 7, the data transmission device 700 includes:

第二接收模块701,用于接收第一设备以预设第一发送帧率发送的第一媒体数据;The second receiving module 701 is used to receive the first media data sent by the first device at the preset first sending frame rate;

第二确定模块702,用于基于所述第一媒体数据确定渲染帧率;其中,所述渲染帧率是所述第二设备显示所述第一媒体数据的显示频率;The second determination module 702 is used to determine the rendering frame rate based on the first media data; wherein the rendering frame rate is the display frequency of the second device displaying the first media data;

第一反馈模块703,用于将所述渲染帧率反馈给所述第一设备;其中,所述渲染帧率用于所述第一设备确定待发送的第二媒体数据的第二发送帧率;The first feedback module 703 is used to feed back the rendering frame rate to the first device; wherein the rendering frame rate is used by the first device to determine the second sending frame rate of the second media data to be sent. ;

第三接收模块704,用于接收所述第一设备基于所述第二发送帧率发送的第二媒体数据。The third receiving module 704 is configured to receive second media data sent by the first device based on the second sending frame rate.

在一些实施例中,所述第二确定模块702,还用于对接收到的所述第一媒体数据进行解码,获取第一解码数据;对所述第一解码数据进行后处理,获取第一后处理数据;对所述第一后处理数据进行渲染,获取渲染帧率。In some embodiments, the second determination module 702 is also used to decode the received first media data to obtain the first decoded data; to post-process the first decoded data to obtain the first decoded data. Post-processing data; rendering the first post-processing data to obtain a rendering frame rate.

在一些实施例中,所述装置还包括:In some embodiments, the device further includes:

第四确定模块,用于基于所述第一媒体数据确定网络参数;A fourth determination module, configured to determine network parameters based on the first media data;

第二反馈模块,用于将所述网络参数反馈给所述第一设备;其中,所述网络参数用于所述第一设备确定所述第二媒体数据的发送码率和目标分辨率;A second feedback module, configured to feed back the network parameters to the first device; wherein the network parameters are used by the first device to determine the transmission code rate and target resolution of the second media data;

第五接收模块,用于接收所述第一设备基于所述第二发送帧率、所述发送码率发送的所述目标分辨率的第二媒体数据。The fifth receiving module is configured to receive the second media data of the target resolution sent by the first device based on the second sending frame rate and the sending code rate.

图8为本公开实施例中计算机设备的一种硬件实体示意图,如图8所示,该计算机设备800的硬件实体包括:处理器801、通信接口802和存储器803,其中:处理器801通常控制计算机设备800的总体操作。通信接口802可以使计算机设备通过网络与其他终端或服务器通信。Figure 8 is a schematic diagram of a hardware entity of a computer device in an embodiment of the present disclosure. As shown in Figure 8, the hardware entity of the computer device 800 includes: a processor 801, a communication interface 802 and a memory 803, where the processor 801 usually controls Overall operation of computer device 800. The communication interface 802 can enable the computer device to communicate with other terminals or servers through a network.

存储器803配置为存储由处理器801可执行的指令和应用,还可以缓存待处理器801以及计算机设备800中各模块待处理或已经处理的数据(例如,图像数据、音频数据、语音通信数据和视频通信数据),可以通过闪存(FLASH)或随机访问存储器(Random AccessMemory,RAM)实现。处理器801、通信接口802和存储器803之间可以通过总线804进行数据传输。其中,处理器801用于执行上述方法中的部分或全部步骤。The memory 803 is configured to store instructions and applications executable by the processor 801, and can also cache data to be processed or processed by the processor 801 and each module in the computer device 800 (for example, image data, audio data, voice communication data and Video communication data), which can be implemented through flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data transmission can be carried out between the processor 801, the communication interface 802 and the memory 803 through the bus 804. The processor 801 is used to execute some or all steps in the above method.

对应地,本公开实施例提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时,实现上述方法中的部分或全部步骤。Correspondingly, embodiments of the present disclosure provide a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, some or all of the steps in the above method are implemented.

这里需要指出的是:以上存储介质和设备实施例的描述,与上述方法实施例的描述是类似的,具有同方法实施例相似的有益效果。对于本公开存储介质和设备实施例中未披露的技术细节,请参照本公开方法实施例的描述而理解。It should be pointed out here that the above description of the storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium and device embodiments of the present disclosure, please refer to the description of the method embodiments of the present disclosure for understanding.

应理解,说明书通篇中提到的“一个实施例”或“一实施例”意味着与实施例有关的特定特征、结构或特性包括在本公开的至少一个实施例中。因此,在整个说明书各处出现的“在一个实施例中”或“在一实施例中”未必一定指相同的实施例。此外,这些特定的特征、结构或特性可以任意适合的方式结合在一个或多个实施例中。应理解,在本公开的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本公开实施例的实施过程构成任何限定。上述本公开实施例序号仅仅为了描述,不代表实施例的优劣。It will be understood that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present disclosure. Thus, the appearances of "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily referring to the same embodiment. Furthermore, the particular features, structures or characteristics may be combined in any suitable manner in one or more embodiments. It should be understood that in various embodiments of the present disclosure, the size of the sequence numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its functions and internal logic, and should not be used in the embodiments of the present disclosure. The implementation process constitutes any limitation. The above serial numbers of the embodiments of the present disclosure are only for description and do not represent the advantages and disadvantages of the embodiments.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, in this document, the terms "comprising", "comprises" or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or device that includes a series of elements not only includes those elements, It also includes other elements not expressly listed or inherent in the process, method, article or apparatus. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of additional identical elements in a process, method, article or apparatus that includes that element.

在本公开所提供的几个实施例中,应该理解到,所揭露的设备和方法,可以通过其它的方式实现。以上所描述的设备实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,如:多个单元或组件可以结合,或可以集成到另一个系统,或一些特征可以忽略,或不执行。另外,所显示或讨论的各组成部分相互之间的耦合、或直接耦合、或通信连接可以是通过一些接口,设备或单元的间接耦合或通信连接,可以是电性的、机械的或其它形式的。In the several embodiments provided in this disclosure, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods, such as: multiple units or components may be combined, or can be integrated into another system, or some features can be ignored, or not implemented. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be electrical, mechanical, or other forms. of.

上述作为分离部件说明的单元可以是、或也可以不是物理上分开的,作为单元显示的部件可以是、或也可以不是物理单元;既可以位于一个地方,也可以分布到多个网络单元上;可以根据实际的需要选择其中的部分或全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated; the components shown as units may or may not be physical units; they may be located in one place or distributed to multiple network units; Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

另外,在本公开各实施例中的各功能单元可以全部集成在一个处理单元中,也可以是各单元分别单独作为一个单元,也可以两个或两个以上单元集成在一个单元中;上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present disclosure can be all integrated into one processing unit, or each unit can be separately used as a unit, or two or more units can be integrated into one unit; the above-mentioned integration The unit can be implemented in the form of hardware or in the form of hardware plus software functional units.

本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:移动存储设备、只读存储器(Read Only Memory,ROM)、磁碟或者光盘等各种可以存储程序代码的介质。Those of ordinary skill in the art can understand that all or part of the steps to implement the above method embodiments can be completed through hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the execution includes: The steps of the above method embodiment; and the aforementioned storage media include: mobile storage devices, read-only memory (Read Only Memory, ROM), magnetic disks or optical disks and other various media that can store program codes.

或者,本公开上述集成的单元如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机、服务器、或者网络设备等)执行本公开各个实施例所述方法的全部或部分。而前述的存储介质包括:移动存储设备、ROM、磁碟或者光盘等各种可以存储程序代码的介质。Alternatively, if the above-mentioned integrated units of the present disclosure are implemented in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure can be embodied in the form of a software product in essence or that contributes to related technologies. The computer software product is stored in a storage medium and includes a number of instructions to enable a computer. A computer device (which may be a personal computer, a server, a network device, etc.) executes all or part of the methods described in various embodiments of the present disclosure. The aforementioned storage media include: mobile storage devices, ROMs, magnetic disks or optical disks and other media that can store program codes.

以上所述,仅为本公开的实施方式,但本公开的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应以所述权利要求的保护范围为准。The above are only embodiments of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present disclosure, and should are covered by the protection scope of this disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims (12)

1. A method of data transmission, for use with a first device, the method comprising:
transmitting the first media data to the second device at a preset first transmission frame rate;
receiving a rendering frame rate fed back by the second device based on the first media data; wherein the rendering frame rate is a display frequency at which the second device displays the first media data;
determining a second transmission frame rate of second media data to be transmitted according to the rendering frame rate;
and transmitting the second media data to the second device based on the second transmission frame rate.
2. The method according to claim 1, wherein the method further comprises:
receiving network parameters fed back by the second device based on the first media data;
determining a sending code rate and a target resolution of the second media data according to the network parameters;
the transmitting the second media data to the second device based on the second transmission frame rate includes:
and transmitting the second media data of the target resolution to the second device based on the second transmission frame rate and the transmission code rate.
3. The method of claim 2, wherein the network parameters comprise: the receiving end estimates the maximum value of the code rate;
The determining, according to the network parameter, the sending code rate and the target resolution of the second media data includes:
if the maximum value of the estimated code rate of the receiving end is smaller than a preset sending code rate threshold value, adjusting the target resolution of the second media data according to the maximum value of the estimated code rate of the receiving end, and determining the sending code rate of the second media data according to the maximum value of the estimated code rate of the receiving end;
and if the maximum value of the estimated code rate of the receiving end is larger than or equal to the preset sending code rate threshold value, maintaining the target resolution unchanged, and determining the sending code rate of the second media data according to the maximum value of the estimated code rate of the receiving end.
4. The method of claim 1, wherein the determining a second transmission frame rate of the second media data to be transmitted according to the rendering frame rate comprises:
if the rendering frame rate is not equal to the preset first sending frame rate, adjusting the rendering frame rate, and taking the adjusted rendering frame rate as a second sending frame rate of the second media data;
and if the rendering frame rate is equal to the preset first sending frame rate, taking the rendering frame rate as a second sending frame rate of the second media data.
5. The method of claim 4, wherein the adjusting the rendering frame rate and taking the adjusted rendering frame rate as the second transmission frame rate of the second media data comprises:
filtering the rendering frame rate in the preset duration to obtain a filtered rendering frame rate;
determining an adjusted rendering frame rate based on the filtered rendering frame rate and a preset frame rate adjustment value, and taking the adjusted rendering frame rate as a second sending frame rate of the second media data; the second sending frame rate is smaller than or equal to the preset first sending frame rate.
6. A data transmission method, applied to a second device, the method comprising:
receiving first media data sent by a first device at a preset first sending frame rate;
determining a rendering frame rate based on the first media data; wherein the rendering frame rate is a display frequency at which the second device displays the first media data;
feeding back the rendering frame rate to the first device; wherein the rendering frame rate is used for the first device to determine a second transmission frame rate of second media data to be transmitted;
second media data transmitted by the first device based on the second transmission frame rate is received.
7. The method of claim 6, wherein the determining a rendering frame rate based on the first media data comprises:
decoding the received first media data to obtain first decoded data;
post-processing is carried out on the first decoded data to obtain first post-processed data;
and rendering the first post-processing data to obtain a rendering frame rate.
8. The method of claim 6, wherein the method further comprises:
determining a network parameter based on the first media data;
feeding back the network parameters to the first device; wherein the network parameter is used for the first device to determine the sending code rate and the target resolution of the second media data;
and receiving second media data of the target resolution, which is transmitted by the first device based on the second transmission frame rate and the transmission code rate.
9. A data transmission apparatus for use with a first device, the apparatus comprising:
the first sending module is used for sending the first media data to the second equipment at a preset first sending frame rate;
a first receiving module, configured to receive a rendering frame rate fed back by the second device based on the first media data; wherein the rendering frame rate is a display frequency at which the second device displays the first media data;
A first determining module, configured to determine a second transmission frame rate of second media data to be transmitted according to the rendering frame rate;
and the second sending module is further used for sending the second media data to the second device based on the second sending frame rate.
10. A data transmission apparatus for use with a second device, the apparatus comprising:
the second receiving module is used for receiving first media data sent by the first equipment at a preset first sending frame rate;
a second determination module for determining a rendering frame rate based on the first media data; wherein the rendering frame rate is a display frequency at which the second device displays the first media data;
a first feedback module configured to feed back the rendering frame rate to the first device; wherein the rendering frame rate is used for the first device to determine a second transmission frame rate of second media data to be transmitted;
and a third receiving module, configured to receive second media data sent by the first device based on the second sending frame rate.
11. A computer device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of any one of claims 1 to 5 or claims 6 to 8.
12. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the method of any of claims 1 to 5 or of claims 6 to 8.
CN202210997603.8A 2022-08-19 2022-08-19 Data transmission method and device, computer equipment and storage medium Pending CN116962613A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210997603.8A CN116962613A (en) 2022-08-19 2022-08-19 Data transmission method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210997603.8A CN116962613A (en) 2022-08-19 2022-08-19 Data transmission method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116962613A true CN116962613A (en) 2023-10-27

Family

ID=88449998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210997603.8A Pending CN116962613A (en) 2022-08-19 2022-08-19 Data transmission method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116962613A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117745147A (en) * 2024-02-05 2024-03-22 江苏金寓信息科技有限公司 Multimedia screening system based on digital twin platform

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117745147A (en) * 2024-02-05 2024-03-22 江苏金寓信息科技有限公司 Multimedia screening system based on digital twin platform
CN117745147B (en) * 2024-02-05 2024-05-10 江苏金寓信息科技有限公司 Multimedia screening system based on digital twin platform

Similar Documents

Publication Publication Date Title
CN102457544B (en) Method and system for acquiring screen image in screen sharing system based on Internet
US9699099B2 (en) Method of transmitting data in a communication system
US8842159B2 (en) Encoding processing for conferencing systems
CN110662114B (en) Video processing method and device, electronic equipment and storage medium
US10334223B2 (en) System and method for multi-view video in wireless devices
US10116715B2 (en) Adapting encoded bandwidth
US9344678B2 (en) Information processing apparatus, information processing method and computer-readable storage medium
US9306987B2 (en) Content message for video conferencing
US11968379B2 (en) Video decoding method and apparatus, video encoding method and apparatus, storage medium, and electronic device
US12052429B2 (en) Video encoding method, video decoding method, and related apparatuses
US20220256114A1 (en) System and method for automatically adjusting key frame quantization parameter and frame rate
US11849127B2 (en) Video encoding method, video decoding method, and related apparatuses
WO2009112547A1 (en) Method of transmitting data in a communication system
US10404606B2 (en) Method and apparatus for acquiring video bitstream
JP2011029868A (en) Terminal device, remote conference system, method for controlling terminal device, control program of terminal device, and computer readable recording medium recording control program of terminal device
WO2021057697A1 (en) Video encoding and decoding methods and apparatuses, storage medium, and electronic device
US20140099040A1 (en) Image processing device and image processing method
WO2021057478A1 (en) Video encoding and decoding method and related apparatus
CN116962613A (en) Data transmission method and device, computer equipment and storage medium
US12034944B2 (en) Video encoding method and apparatus, video decoding method and apparatus, electronic device and readable storage medium
US11936698B2 (en) Systems and methods for adaptive video conferencing
CN116962806A (en) A video streaming transmission method, terminal device and storage medium
WO2012154157A1 (en) Apparatus and method for dynamically changing encoding scheme based on resource utilization
US20240236409A9 (en) Electronic apparatus, server apparatus and control method thereof
CN113160342B (en) Encoding method and device based on feedback, storage medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination