CN111541897A - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN111541897A
CN111541897A CN202010318217.2A CN202010318217A CN111541897A CN 111541897 A CN111541897 A CN 111541897A CN 202010318217 A CN202010318217 A CN 202010318217A CN 111541897 A CN111541897 A CN 111541897A
Authority
CN
China
Prior art keywords
target
transmission
frame image
preset threshold
frame
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
CN202010318217.2A
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.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics 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 Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN202010318217.2A priority Critical patent/CN111541897A/en
Publication of CN111541897A publication Critical patent/CN111541897A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/134Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or criterion affecting or controlling the adaptive coding
    • H04N19/164Feedback from the receiver or from the transmission channel
    • H04N19/166Feedback from the receiver or from the transmission channel concerning the amount of transmission errors, e.g. bit error rate [BER]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/102Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the element, parameter or selection affected or controlled by the adaptive coding
    • H04N19/103Selection of coding mode or of prediction mode
    • H04N19/114Adapting the group of pictures [GOP] structure, e.g. number of B-frames between two anchor frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/10Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding
    • H04N19/169Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding
    • H04N19/177Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using adaptive coding characterised by the coding unit, i.e. the structural portion or semantic portion of the video signal being the object or the subject of the adaptive coding the unit being a group of pictures [GOP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The disclosure provides a data transmission method and a data transmission device, relates to the technical field of electronic information, and can solve the problem of poor image transmission quality when transmission resources are poor. The specific technical scheme is as follows: when the target frame image is transmitted, acquiring a target transmission parameter corresponding to the target frame image, if the target transmission parameter is greater than a preset threshold value, switching the target frame image, and transmitting the target video through the switched target frame image. The present disclosure is for data transmission.

Description

数据传输方法及装置Data transmission method and device

技术领域technical field

本公开涉及电子信息技术领域,尤其涉及数据传输方法及装置。The present disclosure relates to the field of electronic information technology, and in particular, to a data transmission method and device.

背景技术Background technique

目前,现有技术中的图形图像传输协议是把一系列的图像划分为多个画面组(GOP,Group of Pictures),基于每一个GOP进行帧间编码。每一个GOP的第一帧为I帧,后续各帧为P帧,I帧的数据会完整传输,而P帧需要根据I帧进行编码。基于该协议,在传输视频图像时,当网络状况较差时,I帧传输较慢,解码端接收到的I帧的图像质量会比较差,从而直接影响整个GOP内解码后的图像质量。同时,在对图像进行帧间编码时,GOP的大小为两个I帧之间的间隔。如果GOP设置较小,会导致I帧变多,码流变大;GOP如果设置过大,会导致计算量增大,因此GOP的设置会影响编码的效果和效率。At present, the graphic image transmission protocol in the prior art divides a series of images into multiple groups of pictures (GOPs, Group of Pictures), and performs inter-frame coding based on each GOP. The first frame of each GOP is an I frame, and subsequent frames are P frames. The data of the I frame will be completely transmitted, and the P frame needs to be encoded according to the I frame. Based on this protocol, when transmitting video images, when the network condition is poor, the transmission of I-frames will be slow, and the image quality of the I-frames received by the decoding end will be poor, which directly affects the decoded image quality in the entire GOP. Meanwhile, when inter-coding an image, the size of the GOP is the interval between two I-frames. If the GOP setting is small, it will lead to more I-frames and larger code streams; if the GOP is set too large, the amount of computation will increase, so the GOP setting will affect the encoding effect and efficiency.

发明内容SUMMARY OF THE INVENTION

本公开实施例提供一种数据传输方法及装置,能够解决在传输资源不佳时,图像传输质量差的问题。所述技术方案如下:Embodiments of the present disclosure provide a data transmission method and apparatus, which can solve the problem of poor image transmission quality when transmission resources are poor. The technical solution is as follows:

根据本公开实施例的第一方面,提供一种数据传输方法,该方法包括:According to a first aspect of the embodiments of the present disclosure, there is provided a data transmission method, the method comprising:

获取目标帧图像及该目标帧图像对应的目标传输参数,该目标帧图像为目标视频中的I帧,该目标传输参数包括:该目标帧图像的传输延迟时间、重传次数及目标丢包率中的至少一种;Obtain the target frame image and the target transmission parameter corresponding to the target frame image, the target frame image is an I frame in the target video, and the target transmission parameter includes: the transmission delay time of the target frame image, the number of retransmissions and the target packet loss rate at least one of;

当该目标传输参数大于预设阈值时,对该目标帧图像进行切换处理;When the target transmission parameter is greater than the preset threshold, switching processing is performed on the target frame image;

根据该已切换处理的目标帧图像,对该目标视频进行编码处理并传输。The target video is encoded and transmitted according to the target frame image that has been switched.

在一个实施例中,该方法中在对该目标帧图像进行切换处理之前,该方法包括:In one embodiment, before performing the switching process on the target frame image in the method, the method includes:

获取该目标传输参数对应的预设阈值,并对比该目标传输参数和该预设阈值,该预设阈值包括:传输延迟时间的预设阈值、重传次数的预设阈值及丢包率的预设阈值中的至少一种;Acquire a preset threshold corresponding to the target transmission parameter, and compare the target transmission parameter with the preset threshold, where the preset threshold includes: a preset threshold of transmission delay time, a preset threshold of the number of retransmissions, and a predicted packet loss rate. Set at least one of the thresholds;

根据该预设阈值,逐一对比该目标传输参数;According to the preset threshold, compare the target transmission parameters one by one;

若该目标传输参数中有至少一种数据值大于该预设阈值,则确定该目标传输参数大于该预设阈值。If at least one data value in the target transmission parameter is greater than the preset threshold, it is determined that the target transmission parameter is greater than the preset threshold.

在一个实施例中,该方法中对该目标视频进行编码处理,包括:In one embodiment, encoding the target video in the method includes:

获取该目标帧图像对应的下一帧P帧,并将该下一帧P帧作为目标参考帧;Obtain the next frame P frame corresponding to the target frame image, and use the next frame P frame as the target reference frame;

对该目标帧图像做帧内编码处理,并根据该目标参考帧对该目标视频进行编码处理。Perform intra-frame coding processing on the target frame image, and perform coding processing on the target video according to the target reference frame.

在一个实施例中,该方法还包括:In one embodiment, the method further includes:

获取目标传输资源及目标GOP;Obtain target transmission resources and target GOP;

若该目标传输资源符合预设传输要求,则根据该目标GOP,对该目标视频进行编码处理并传输;If the target transmission resource meets the preset transmission requirements, encoding and transmitting the target video according to the target GOP;

若该目标传输资源不符合预设传输要求,则根据预设规则对该GOP进行调整,并根据该已调整后的目标GOP对该目标视频进行编码处理并传输。If the target transmission resource does not meet the preset transmission requirements, the GOP is adjusted according to the preset rule, and the target video is encoded and transmitted according to the adjusted target GOP.

在一个实施例中,该方法中根据预设规则对该GOP进行调整,包括:In one embodiment, in the method, the GOP is adjusted according to preset rules, including:

获取该数据传输装置的目标负载;Obtain the target load of the data transmission device;

当该数据传输装置的目标负载超过阈值时,通过增加该目标GOP中的帧数,对该GOP进行调整。When the target load of the data transmission device exceeds a threshold, the GOP is adjusted by increasing the number of frames in the target GOP.

该方法在传输目标帧图像时,获取该目标帧图像对应的目标传输参数,若该目标传输参数大于预设阈值时,则对该目标帧图像进行切换处理,并通过已切换处理后的目标帧图像对目标视频进行传输,从而解决了因为网络原因或者I帧数据量大等原因,导致的视频编码、传输效果差。When transmitting the target frame image, the method obtains the target transmission parameter corresponding to the target frame image, and if the target transmission parameter is greater than the preset threshold, the target frame image is switched, and the target frame after the switching processing is passed. The image is transmitted to the target video, which solves the poor video encoding and transmission effect caused by network reasons or the large amount of I-frame data.

根据本公开实施例的第二方面,提供一种数据传输装置,包括:接收器和处理器,该接收器和处理器相连接,According to a second aspect of the embodiments of the present disclosure, there is provided a data transmission device, comprising: a receiver and a processor, the receiver and the processor are connected,

该接收器,用于获取目标帧图像及该目标帧图像对应的目标传输参数,该目标帧图像为目标视频中的I帧,该目标传输参数包括:该目标帧图像的传输延迟时间、重传次数及目标丢包率中的至少一种;The receiver is used to obtain a target frame image and a target transmission parameter corresponding to the target frame image, the target frame image is an I frame in the target video, and the target transmission parameter includes: the transmission delay time of the target frame image, the retransmission time At least one of the number of times and the target packet loss rate;

该处理器,用于当该目标传输参数大于预设阈值时,对该目标帧图像进行切换处理;The processor is configured to perform switching processing on the target frame image when the target transmission parameter is greater than a preset threshold;

及根据该已切换处理的目标帧图像,对该目标视频进行编码处理并发送。And according to the target frame image that has been switched, the target video is encoded and sent.

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

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.

图1是本公开实施例提供的一种数据传输方法的流程图;1 is a flowchart of a data transmission method provided by an embodiment of the present disclosure;

图2是本公开实施例提供的一种数据传输装置的结构图。FIG. 2 is a structural diagram of a data transmission apparatus provided by an embodiment of the present disclosure.

具体实施方式Detailed ways

这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. Where the following description refers to the drawings, the same numerals in different drawings refer to the same or similar elements unless otherwise indicated. The implementations described in the illustrative examples below are not intended to represent all implementations consistent with this disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as recited in the appended claims.

本公开实施例提供一种数据传输方法,如图1所示,该数据传输方法包括以下步骤:An embodiment of the present disclosure provides a data transmission method. As shown in FIG. 1 , the data transmission method includes the following steps:

101、获取目标帧图像及该目标帧图像对应的目标传输参数。101. Acquire a target frame image and target transmission parameters corresponding to the target frame image.

该目标帧图像为目标视频中的I帧。The target frame image is an I frame in the target video.

该目标传输参数包括:该目标帧图像的传输延迟时间、重传次数及目标丢包率;The target transmission parameters include: the transmission delay time of the target frame image, the number of retransmissions and the target packet loss rate;

其中,I帧的传输延迟是指当前时间与I帧开始传输时间之间的差值。The transmission delay of the I frame refers to the difference between the current time and the time when the I frame starts to transmit.

重传次数是指,在对I帧进行传输时,如果在预设时长后,仍未成功传输I帧则会在超过预设时长后,进行重传。The number of retransmissions refers to when the I frame is transmitted, if the I frame is not successfully transmitted after the preset time period, the retransmission will be performed after the preset time period is exceeded.

目标丢包率是指发送目标帧图像时,所丢失数据包数量占所发送数据组的比率,此处列举示例性的计算方法:The target packet loss rate refers to the ratio of the number of lost data packets to the transmitted data group when the target frame image is sent. Here is an example calculation method:

获取预设时间;Get the preset time;

根据该预设时间,获取预设时间内数据传输装置发送的目标帧图像对应的数据量S及预设时间内接收设备接收到的目标帧图像对应的数据量R;According to the preset time, obtain the data volume S corresponding to the target frame image sent by the data transmission device within the preset time and the data volume R corresponding to the target frame image received by the receiving device within the preset time;

根据该数据量S和数据量S,则丢包率的计算公式为:(S-R)/S。According to the data amount S and the data amount S, the calculation formula of the packet loss rate is: (S-R)/S.

102、当该目标传输参数大于预设阈值时,对该目标帧图像进行切换处理。102. When the target transmission parameter is greater than a preset threshold, perform switching processing on the target frame image.

本公开所提供的方法,还包括根据数据传输装置的参数信息和目标视频,设置预设阈值,具体可以包括:The method provided by the present disclosure further includes setting a preset threshold according to the parameter information of the data transmission device and the target video, which may specifically include:

针对目标帧图像的传输延迟时间、重传次数及目标丢包率分别设置预设传输延迟时间、预设重传次数及预设丢包率。The preset transmission delay time, the preset number of retransmissions and the preset packet loss rate are respectively set for the transmission delay time, the number of retransmissions and the target packet loss rate of the target frame image.

本公开所提供的方法在对该目标帧图像进行切换处理之前,还需要确定目标传输参数是否大于预设阈值,其确定步骤包括:Before the method provided by the present disclosure performs switching processing on the target frame image, it is also necessary to determine whether the target transmission parameter is greater than a preset threshold, and the determining steps include:

获取该目标传输参数对应的预设阈值,并对比该目标传输参数和该预设阈值,该预设阈值包括:传输延迟时间的预设阈值、重传次数的预设阈值及丢包率的预设阈值中的至少一种;Acquire a preset threshold corresponding to the target transmission parameter, and compare the target transmission parameter with the preset threshold, where the preset threshold includes: a preset threshold of transmission delay time, a preset threshold of the number of retransmissions, and a predicted packet loss rate. Set at least one of the thresholds;

根据该预设阈值,逐一对比该目标传输参数;According to the preset threshold, compare the target transmission parameters one by one;

若该目标传输参数中有至少一种数据值大于该预设阈值,则确定该目标传输参数大于该预设阈值。If at least one data value in the target transmission parameter is greater than the preset threshold, it is determined that the target transmission parameter is greater than the preset threshold.

本公开所提供的方法中,若目标传输参数均小于预设阈值时,则根据预设阈值参数继续监控下一帧图像的目标传输参数。In the method provided by the present disclosure, if the target transmission parameters are all smaller than the preset threshold, the target transmission parameters of the next frame of image are continuously monitored according to the preset threshold parameters.

本公开所提供方法中的对该目标帧图像进行切换处理,即获取该目标帧图像对应的下一帧P帧,并将该下一帧P帧作为目标参考帧,具体的,该切换处理过程可以包括:In the method provided by the present disclosure, the target frame image is switched, that is, the next frame P frame corresponding to the target frame image is acquired, and the next frame P frame is used as the target reference frame. Specifically, the switching processing process Can include:

假设一个图像序列的组成是IPPPIPPP,如果第一个I帧的传输时延或者重传次数或者当前丢包率大于预设阈值,则将第二帧(原P帧)作为新的I帧,在不改变GOP(Group ofPictures)大小的情况下,等于跳过原I帧继续进行帧间编码。在切换I帧后,上述图像序列可以象征性的表示为XIPPPIPP,其中,用X表示原I帧。Assuming that the composition of an image sequence is IPPPIPPP, if the transmission delay or the number of retransmissions of the first I frame or the current packet loss rate is greater than the preset threshold, the second frame (original P frame) will be regarded as a new I frame, in If the GOP (Group of Pictures) size is not changed, it is equivalent to skipping the original I frame and continuing to perform inter-frame coding. After switching the I frame, the above image sequence can be symbolically represented as XIPPIPP, where X represents the original I frame.

本公开对于对该目标帧图像进行切换处理时,对目标帧图像的处理方式可以有以下两种:将目标帧图像直接丢弃;或者对目标帧图像进行帧内编码处理后,进行发送。In the present disclosure, when the target frame image is switched, the target frame image can be processed in the following two ways: directly discarding the target frame image; or performing intra-frame encoding processing on the target frame image before sending.

103、根据该已切换处理的目标帧图像,对该目标视频进行编码处理。103. Perform encoding processing on the target video according to the switched target frame image.

本公开所提供方法中对该目标视频进行编码处理,包括:Encoding the target video in the method provided by the present disclosure includes:

获取该目标帧图像对应的下一帧P帧,并将该下一帧P帧作为目标参考帧;Obtain the next frame P frame corresponding to the target frame image, and use the next frame P frame as the target reference frame;

对该目标帧图像做帧内编码处理,并根据该目标参考帧对该目标视频进行编码处理。Perform intra-frame coding processing on the target frame image, and perform coding processing on the target video according to the target reference frame.

本公开能够在传输资源无法满足传输I帧时,或者由于I帧传输质量差,而导致后续根据I帧进行解码的各P帧解码出的画面质量差的情况下,通过对I帧图像进行切换处理,迅速切换I帧,防止显示端画面出现卡顿。The present disclosure can switch the I-frame image by switching the I-frame image when the transmission resources cannot meet the transmission quality of the I-frame, or when the quality of the images decoded from the subsequent P-frames decoded according to the I-frame is poor due to the poor transmission quality of the I-frame Processing, quickly switch the I frame to prevent the screen from being stuck on the display side.

本公开所提供的方法在对该目标帧图像进行切换处理后,还包括对目标视频进行编码、传输,具体的,在编码、传输时还会根据网络状况和设备的负载情况确定是否改变目标视频中的目标GOP。具体的传输步骤包括:After switching the target frame image, the method provided by the present disclosure further includes encoding and transmitting the target video. Specifically, during encoding and transmission, it is also determined whether to change the target video according to network conditions and device load conditions. The target GOP in . The specific transmission steps include:

获取目标传输资源及目标GOP;Obtain target transmission resources and target GOP;

若该目标传输资源满足预设传输要求,则根据该目标GOP对该目标视频进行编码处理并发送;If the target transmission resource satisfies the preset transmission requirements, encoding and sending the target video according to the target GOP;

若该目标传输资源不满足预设传输要求,则根据预设规则对该GOP进行调整,并根据已调整后的该目标GOP对对该目标视频进行编码处理并发送。If the target transmission resource does not meet the preset transmission requirements, the GOP is adjusted according to the preset rule, and the target video is encoded and sent according to the adjusted target GOP.

其中,可以通过网络延迟判断目标传输资源是否符合预设传输要求,即网络状态良好,通过实验可知,网络状态较好时,网络延迟<=10ms;网络状态一般时,10ms<=网络延迟<=50ms;网络状态较差时,50ms<=网络延迟<=100ms;网络状态极差时,100ms<=网络延迟<500ms;Among them, the network delay can be used to determine whether the target transmission resource meets the preset transmission requirements, that is, the network status is good. It can be seen from experiments that when the network status is good, the network delay is <= 10ms; when the network status is normal, 10ms<= network delay<= 50ms; when the network state is poor, 50ms<=network delay<=100ms; when the network state is extremely poor, 100ms<=network delay<500ms;

因此,基于上述实验中的网络状况,可以将预设网络延迟设置为50ms,若目标网络延迟<=50ms时,认为网络状态好或者一般;当50ms<网络延迟时,认为网络状态差。Therefore, based on the network conditions in the above experiments, the preset network delay can be set to 50ms. If the target network delay<=50ms, the network status is considered to be good or normal; when 50ms<network delay, the network status is considered to be poor.

进一步的,上述的该根据预设规则对该GOP进行调整,包括:Further, the above-mentioned adjustment of the GOP according to the preset rules includes:

获取该数据传输装置的目标负载;Obtain the target load of the data transmission device;

当该目标负载超过阈值时,通过增大该GOP中的帧数实现对GOP的调整。When the target load exceeds the threshold, the GOP is adjusted by increasing the number of frames in the GOP.

上述的数据传输装置的目标负载可以通过数据传输装置的CPU和/或内存的使用率来确定。The target load of the above-mentioned data transmission device may be determined by the utilization rate of the CPU and/or memory of the data transmission device.

此处列举具体示例进行阐释:目标负载超过阈值的情况是指:CPU和/或内存的使用率超过70%,就是说,CPU和内存的使用率均大于等于70%;或者,CPU或内存其中之一的使用率大于等于70%。Here are specific examples to illustrate: the situation where the target load exceeds the threshold means: the usage of CPU and/or memory exceeds 70%, that is, the usage of CPU and memory is greater than or equal to 70%; The usage rate of one is greater than or equal to 70%.

本公开所提供的方法在传输目标帧图像时遇到网络状况差但系统负载低的情况时,通过动态调节GOP的帧数大小,从而能够在I帧出现传输困难的情况下,降低目标视频中I帧个数,避免频繁出现I帧传输困难的问题The method provided by the present disclosure can dynamically adjust the frame size of the GOP when the network condition is poor but the system load is low when the target frame image is transmitted, thereby reducing the number of frames in the target video when the transmission of the I frame is difficult. The number of I frames to avoid the frequent problem of difficult I frame transmission

本公开实施例提供的数据传输方法,在传输目标帧图像时,获取该目标帧图像对应的目标传输参数,若该目标传输参数大于预设阈值时,则对该目标帧图像进行切换处理,并通过已切换处理后的目标帧图像对目标视频进行传输,从而解决了因为网络原因或者I帧数据量大等原因,导致的视频编码、传输效果差。In the data transmission method provided by the embodiment of the present disclosure, when a target frame image is transmitted, a target transmission parameter corresponding to the target frame image is acquired, and if the target transmission parameter is greater than a preset threshold, the target frame image is switched, and the target frame image is switched. The target video is transmitted through the switched target frame image, thereby solving the problem of poor video coding and transmission due to network reasons or a large amount of I-frame data.

实施例二Embodiment 2

基于上述图1对应的实施例中所描述的数据传输方法,下述为本公开装置实施例,可以用于执行本公开方法实施例。Based on the data transmission method described in the above-mentioned embodiment corresponding to FIG. 1 , the following device embodiments of the present disclosure can be used to execute the method embodiments of the present disclosure.

本公开实施例提供一种数据传输装置,如图2所示,该数据传输装置20包括:接收器201和处理器202,该接收器201和处理器202相连接,An embodiment of the present disclosure provides a data transmission apparatus. As shown in FIG. 2 , the data transmission apparatus 20 includes: a receiver 201 and a processor 202, and the receiver 201 and the processor 202 are connected,

该接收器201,用于获取目标帧图像及该目标帧图像对应的目标传输参数,该目标帧图像为目标视频中的I帧,该目标传输参数包括:该目标帧图像的传输延迟时间、重传次数及目标丢包率中的至少一种;The receiver 201 is configured to acquire a target frame image and a target transmission parameter corresponding to the target frame image, where the target frame image is an I frame in the target video, and the target transmission parameter includes: the transmission delay time of the target frame image, the repetition rate At least one of the number of transmissions and the target packet loss rate;

该处理器202,用于当该目标传输参数大于预设阈值时,对该目标帧图像进行切换处理;The processor 202 is configured to perform switching processing on the target frame image when the target transmission parameter is greater than a preset threshold;

及根据该已切换处理的目标帧图像,对该目标视频进行编码处理并发送。And according to the target frame image that has been switched, the target video is encoded and sent.

在一个实施例中,本公开提供的装置20中的处理器202,还用于在对该目标帧图像进行切换处理之前,获取该目标传输参数对应的预设阈值,并对比该目标传输参数和该预设阈值,该预设阈值包括:传输延迟时间的预设阈值、重传次数的预设阈值及丢包率的预设阈值中的至少一种;In one embodiment, the processor 202 in the apparatus 20 provided by the present disclosure is further configured to obtain a preset threshold value corresponding to the target transmission parameter before performing the switching processing on the target frame image, and compare the target transmission parameter with The preset threshold value, the preset threshold value includes: at least one of a preset threshold value of transmission delay time, a preset threshold value of retransmission times, and a preset threshold value of packet loss rate;

并根据该预设阈值,逐一对比该目标传输参数;and compare the target transmission parameters one by one according to the preset threshold;

若该目标传输参数中有至少一种数据值大于该预设阈值,则确定该目标传输参数大于该预设阈值。If at least one data value in the target transmission parameter is greater than the preset threshold, it is determined that the target transmission parameter is greater than the preset threshold.

在一个实施例中,本公开提供的装置20中的处理器202还用于,In one embodiment, the processor 202 in the apparatus 20 provided by the present disclosure is further configured to:

获取该目标帧图像对应的下一帧P帧,并将该下一帧P帧作为目标参考帧;Obtain the next frame P frame corresponding to the target frame image, and use the next frame P frame as the target reference frame;

对该目标帧图像做帧内编码处理,并根据该目标参考帧对该目标帧视频进行编码处理。Perform intra-frame coding processing on the target frame image, and perform coding processing on the target frame video according to the target reference frame.

在一个实施例中,本公开提供的装置20中的处理器202还用于,In one embodiment, the processor 202 in the apparatus 20 provided by the present disclosure is further configured to:

获取目标传输资源及目标GOP;Obtain target transmission resources and target GOP;

若该目标传输资源符合预设传输要求,则根据该目标GOP对目标视频进行编码处理并发送;If the target transmission resource meets the preset transmission requirements, encode and send the target video according to the target GOP;

若该目标传输资源不符合预设传输要求,则根据预设规则对该GOP进行调整,并根据该已调整后的目标GOP对该目标视频进行编码处理并发送。If the target transmission resource does not meet the preset transmission requirements, the GOP is adjusted according to the preset rule, and the target video is encoded and sent according to the adjusted target GOP.

在一个实施例中,本公开提供的装置20中的处理器202还用于,若该目标传输资源不符合预设传输要求时,获取该数据传输装置的目标负载;In one embodiment, the processor 202 in the device 20 provided by the present disclosure is further configured to acquire the target load of the data transmission device if the target transmission resource does not meet the preset transmission requirements;

当该数据传输装置的目标负载超过阈值时,通过增加该目标GOP中的帧数,对该GOP进行调整。When the target load of the data transmission device exceeds a threshold, the GOP is adjusted by increasing the number of frames in the target GOP.

本公开实施例提供的数据传输装置,在传输目标帧图像时,获取该目标帧图像对应的目标传输参数,若该目标传输参数大于预设阈值时,则对该目标帧图像进行切换处理,并通过已切换处理后的目标帧图像对目标视频进行传输,从而解决了因为网络原因或者I帧数据量大等原因,导致的视频编码、传输效果差。The data transmission device provided by the embodiment of the present disclosure obtains the target transmission parameter corresponding to the target frame image when transmitting the target frame image, and if the target transmission parameter is greater than the preset threshold, performs switching processing on the target frame image, and The target video is transmitted through the switched target frame image, thereby solving the problem of poor video coding and transmission due to network reasons or a large amount of I-frame data.

基于上述图1对应的实施例中所描述的数据传输方法,本公开实施例还提供一种计算机可读存储介质,例如,非临时性计算机可读存储介质可以是只读存储器(英文:ReadOnly Memory,ROM)、随机存取存储器(英文:Random Access Memory,RAM)、CD-ROM、磁带、软盘和光数据存储装置等。该存储介质上存储有计算机指令,用于执行上述图1对应的实施例中所描述的数据传输方法,此处不再赘述。Based on the data transmission method described in the embodiment corresponding to FIG. 1 , an embodiment of the present disclosure further provides a computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be a read-only memory (English: ReadOnly Memory). , ROM), random access memory (English: Random Access Memory, RAM), CD-ROM, magnetic tape, floppy disk and optical data storage devices, etc. The storage medium stores computer instructions for executing the data transmission method described in the embodiment corresponding to FIG. 1 , which will not be repeated here.

本领域技术人员在考虑说明书及实践这里公开的公开后,将容易想到本公开的其它实施方案。本申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。Other embodiments of the present disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or techniques in the technical field not disclosed by the present disclosure . The specification and examples are to be regarded as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. A data transmission method, applied to a data transmission apparatus, the method comprising:
acquiring a target frame image and a target transmission parameter corresponding to the target frame image, wherein the target frame image is an I frame in a target video, and the target transmission parameter comprises: at least one of transmission delay time, retransmission times and target packet loss rate of the target frame image;
when the target transmission parameter is larger than a preset threshold value, switching the target frame image;
and according to the target frame image which is switched and processed, carrying out coding processing on the target video and transmitting the target video.
2. The method according to claim 1, wherein before the switching process on the target frame image, the method comprises:
acquiring a preset threshold corresponding to the target transmission parameter, and comparing the target transmission parameter with the preset threshold, wherein the preset threshold comprises: at least one of a preset threshold of transmission delay time, a preset threshold of retransmission times and a preset threshold of packet loss rate;
comparing the target transmission parameters one by one according to the preset threshold;
and if at least one data value in the target transmission parameters is greater than the preset threshold value, determining that the target transmission parameters are greater than the preset threshold value.
3. The method according to claim 2, wherein said encoding said target video comprises:
acquiring a next frame P frame corresponding to the target frame image, and taking the next frame P frame as a target reference frame;
and carrying out intra-frame coding processing on the target frame image, and carrying out coding processing on the target video according to the target reference frame.
4. The method of claim 1, further comprising:
acquiring target transmission resources and a target GOP;
if the target transmission resource meets the preset transmission requirement, encoding and transmitting the target video according to the target GOP;
and if the target transmission resource does not meet the preset transmission requirement, adjusting the GOP according to a preset rule, and encoding and transmitting the target video according to the adjusted target GOP.
5. The method of claim 4, wherein the adjusting the GOP according to the preset rules comprises:
acquiring a target load of the data transmission device;
and when the target load of the data transmission device exceeds a threshold value, adjusting the target GOP by increasing the number of frames in the target GOP.
6. A data transmission apparatus, comprising: a receiver and a processor, the receiver and the processor being connected,
the receiver is configured to obtain a target frame image and a target transmission parameter corresponding to the target frame image, where the target frame image is an I frame in a target video, and the target transmission parameter includes: at least one of transmission delay time, retransmission times and target packet loss rate of the target frame image;
the processor is used for switching the target frame image when the target transmission parameter is larger than a preset threshold value;
and according to the target frame image which is switched and processed, carrying out coding processing on the target video and sending the target video.
7. The apparatus according to claim 6, wherein the processor is further configured to, before performing the switching process on the target frame image, obtain a preset threshold corresponding to the target transmission parameter, and compare the target transmission parameter with the preset threshold, where the preset threshold includes: at least one of a preset threshold of transmission delay time, a preset threshold of retransmission times and a preset threshold of packet loss rate;
comparing the target transmission parameters one by one according to the preset threshold;
and if at least one data value in the target transmission parameters is greater than the preset threshold value, determining that the target transmission parameters are greater than the preset threshold value.
8. The apparatus of claim 7, wherein the processor is further configured to,
acquiring a next frame P frame corresponding to the target frame image, and taking the next frame P frame as a target reference frame;
and carrying out intra-frame coding processing on the target frame image, and carrying out coding processing on the target video according to the target reference frame.
9. The apparatus of claim 7, wherein the processor is further configured to,
acquiring target transmission resources and a target GOP;
if the target transmission resource meets the preset transmission requirement, encoding and sending a target video according to the target GOP;
and if the target transmission resource does not meet the preset transmission requirement, adjusting the GOP according to a preset rule, and encoding and transmitting the target video according to the adjusted target GOP.
10. The apparatus of claim 9, wherein the processor is further configured to obtain a target load of the data transmission apparatus if the target transmission resource does not meet a predetermined transmission requirement;
and when the target load of the data transmission device exceeds a threshold value, adjusting the target GOP by increasing the number of frames in the target GOP.
CN202010318217.2A 2020-04-21 2020-04-21 Data transmission method and device Pending CN111541897A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010318217.2A CN111541897A (en) 2020-04-21 2020-04-21 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010318217.2A CN111541897A (en) 2020-04-21 2020-04-21 Data transmission method and device

Publications (1)

Publication Number Publication Date
CN111541897A true CN111541897A (en) 2020-08-14

Family

ID=71975121

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010318217.2A Pending CN111541897A (en) 2020-04-21 2020-04-21 Data transmission method and device

Country Status (1)

Country Link
CN (1) CN111541897A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117939124A (en) * 2024-01-08 2024-04-26 书行科技(北京)有限公司 Image encoding method, device, equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1127645A (en) * 1997-06-30 1999-01-29 Nec Corp Video telephone set
US20030054769A1 (en) * 2001-09-18 2003-03-20 Koninklijke Philips Electronics N.V. Video recovery system and method
JP2006165733A (en) * 2004-12-03 2006-06-22 Matsushita Electric Ind Co Ltd Wireless video transmission device
CN101060633A (en) * 2006-04-17 2007-10-24 株式会社日立制作所 Image display apparatus
CN101668170A (en) * 2009-09-23 2010-03-10 中山大学 Digital television program copyright protecting method for resisting time synchronization attacks
CN105915904A (en) * 2016-05-23 2016-08-31 北京中兴高达通信技术有限公司 Video stream Qos control method for broadband trunking call service
CN108737825A (en) * 2017-04-13 2018-11-02 腾讯科技(深圳)有限公司 Method for coding video data, device, computer equipment and storage medium
CN109951722A (en) * 2019-02-27 2019-06-28 腾讯科技(深圳)有限公司 The transmission method and transmitting device of video data
CN110602507A (en) * 2019-08-19 2019-12-20 西安万像电子科技有限公司 Frame loss processing method, device and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1127645A (en) * 1997-06-30 1999-01-29 Nec Corp Video telephone set
US20030054769A1 (en) * 2001-09-18 2003-03-20 Koninklijke Philips Electronics N.V. Video recovery system and method
JP2006165733A (en) * 2004-12-03 2006-06-22 Matsushita Electric Ind Co Ltd Wireless video transmission device
CN101060633A (en) * 2006-04-17 2007-10-24 株式会社日立制作所 Image display apparatus
CN101668170A (en) * 2009-09-23 2010-03-10 中山大学 Digital television program copyright protecting method for resisting time synchronization attacks
CN105915904A (en) * 2016-05-23 2016-08-31 北京中兴高达通信技术有限公司 Video stream Qos control method for broadband trunking call service
CN108737825A (en) * 2017-04-13 2018-11-02 腾讯科技(深圳)有限公司 Method for coding video data, device, computer equipment and storage medium
CN109951722A (en) * 2019-02-27 2019-06-28 腾讯科技(深圳)有限公司 The transmission method and transmitting device of video data
CN110602507A (en) * 2019-08-19 2019-12-20 西安万像电子科技有限公司 Frame loss processing method, device and system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117939124A (en) * 2024-01-08 2024-04-26 书行科技(北京)有限公司 Image encoding method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109600610B (en) Data encoding method, terminal and computer readable storage medium
US9030565B2 (en) Method, apparatus, and system for evaluating video quality
US10230651B2 (en) Effective intra-frame refresh in multimedia communications over packet networks
CN106331717B (en) Video code rate self-adapting regulation method and sending ending equipment
CN103945281B (en) Transmission of video processing method, device and system
CN113068001B (en) Data processing method, device, device and medium based on cascaded cameras
CN111093083B (en) Data transmission method and device
CN112261354B (en) Data transmission method based on multiple network cameras and related device
JP2024109848A (en) Client, server, receiving method and transmitting method
CN112866746A (en) Multi-path streaming cloud game control method, device, equipment and storage medium
CN102223218B (en) Method and equipment for inhibiting media message retransmission
JP2010028378A (en) Communication apparatus and communication method
US20160360220A1 (en) Selective packet and data dropping to reduce delay in real-time video communication
CN109862400B (en) Streaming media transmission method, device and system
CN111541897A (en) Data transmission method and device
KR20150028948A (en) Apparatus for transmission of encoded video stream and Method for the same
CN111953612B (en) Data transmission control method and device
CN109982080A (en) A video transmission method, storage medium, robot and control system
CN106713842B (en) Image processing method and camera thereof
CN111953613B (en) Data transmission control method and device
KR20230040872A (en) Methods and devices for controlling a transmission of a video stream
CN112929667A (en) Encoding and decoding method, device and equipment and readable storage medium
CN112087635A (en) Image coding control method, device, equipment and computer readable storage medium
US20250024328A1 (en) Terminal device, wireless communication system, and method for processing terminal device
CN115834975B (en) Video transmission method, device, equipment and medium

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200814

RJ01 Rejection of invention patent application after publication